/* SelfPaid HQ — shared styles. System fonts only (fast, no third-party requests). */
:root {
  --bg: #F4F7F5; --surface: #FFFFFF; --fg: #12231C; --muted: #56675F; --line: #D9E2DD;
  --accent: #0F7B4F; --accent-ink: #FFFFFF; --accent-soft: #E0F1E8; --warn: #A34A06; --warn-soft: #FBEDE1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1713; --surface: #16231C; --fg: #E6F0EA; --muted: #9AACA3; --line: #2A3A31;
    --accent: #4CC38A; --accent-ink: #08130D; --accent-soft: #1B3326; --warn: #F0A15A; --warn-soft: #33251A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 18px; }
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--fg); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
main { padding: 28px 0 40px; }
h1 { font-size: clamp(26px, 4.5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.25; margin: 32px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 22px 0 6px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 22px; max-width: 65ch; }
.prose { max-width: 70ch; }
.prose p, .prose li { margin: 0 0 10px; }
.meta { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 15px; }
.field small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.inp { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp span { padding: 0 10px; color: var(--muted); font-size: 15px; }
.inp input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; font-variant-numeric: tabular-nums; padding: 10px; outline: none; }
.inp input:first-child { padding-left: 12px; }
select { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); }
.big { background: var(--accent-soft); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.big .k { font-size: 14px; color: var(--muted); }
.big .v { font-weight: 800; font-size: clamp(30px, 6vw, 40px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.big .s { font-size: 14px; margin-top: 4px; }
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); margin: 0; }
.rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.rows .total dt, .rows .total dd { color: var(--fg); font-weight: 800; }
.alert { background: var(--warn-soft); border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: 6px; font-size: 15px; margin: 12px 0; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--fg); text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card strong { display: block; font-size: 18px; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: 15px; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.role-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.role-row input[type=text] { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; }
.role-row .x { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); width: 40px; height: 42px; cursor: pointer; font-size: 18px; }
.signup { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 36px 0 0; }
.signup h2 { margin-top: 0; font-size: 20px; }
.signup form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.signup input[type=email] { flex: 1 1 240px; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.hp { position: absolute; left: -9999px; }
.site-foot { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 14px; }
.site-foot nav { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.site-foot a { color: var(--muted); }
.disclaimer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; }
@media print { .site-head, .site-foot, .signup { display: none; } }
@media (max-width: 560px) {
  .role-row.pool { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto !important; }
  .role-row.pool > input[type=text] { grid-column: 1 / -1; }
}
