/* GoodWorks Network — styles for authenticated pages (/login/, /join/, /account/) and the legal pages.
   Tokens copied from index.html :root plus the semantic ok/warn/danger colors from the approved mockups
   (docs/superpowers/mockups/login.html, join.html). Light-only, matching the live site. */
:root {
  --paper: #F3EDE0; --paper-2: #ECE3D3; --paper-card: #FBF7EE;
  --ink: #25211B; --ink-soft: #4A443A; --muted: #756C5C;
  --evergreen: #1E4435; --evergreen-2: #2C5A47; --evergreen-3: #3C6F58;
  --clay: #B5663F; --clay-soft: #D7A079;
  --line: rgba(37,33,27,0.13); --line-2: rgba(37,33,27,0.08);
  --ok: #2E6B45; --ok-bg: #E4EEDF; --warn: #8A5A12; --warn-bg: #F6E7C8; --danger: #9E3B23; --danger-bg: #F5DDD2;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px;
       line-height: 1.55; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
.tm { font-size: .58em; line-height: 0; vertical-align: super; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--evergreen); }

/* ---------- portal frame: brand bar, then cards on the site's paper ---------- */
.portal-top { border-bottom: 1px solid var(--line-2); background: color-mix(in srgb, var(--paper) 86%, transparent); }
.portal-top .in { max-width: 1080px; margin: 0 auto; padding-inline: 24px; height: 64px; display: flex;
                  align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand span { font-family: var(--serif); font-size: 19px; color: var(--evergreen); white-space: nowrap; }
.brand b { font-weight: 600; }
.brand small { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
               color: var(--clay); margin-left: 4px; }
.top-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.top-link:hover { color: var(--evergreen); }

.auth { display: grid; justify-items: center; padding-block: 56px 72px; padding-inline: 16px; }
.auth > .card { max-width: 27rem; padding: 34px 32px 30px; }
.join { max-width: 40rem; margin: 0 auto; padding-block: 40px 72px; padding-inline: 16px; display: grid; gap: 22px; }
.join > .card { padding: 32px; }

/* ---------- components ---------- */
.card { width: 100%; background: var(--paper-card); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
        box-shadow: 0 24px 60px -42px rgba(37,33,27,.5); display: grid; gap: 20px; min-width: 0; }
.card h1 { font-size: 32px; }
.join .card h1 { font-size: 30px; }
.lede { color: var(--ink-soft); font-size: 15.5px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field input, .field select { width: 100%; font: inherit; font-size: 15.5px; color: var(--ink); background: #fff;
                              border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 46px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--evergreen);
                              box-shadow: 0 0 0 3px color-mix(in srgb, var(--evergreen) 13%, transparent); }
.field input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.hint, .muted { font-size: 12.5px; color: var(--muted); }
.muted { font-size: 14px; }
.error-text { color: var(--danger); font-size: 14px; }
.link { color: var(--evergreen); font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px;
        background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px;
       border-radius: 12px; font: inherit; font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none;
       border: 1px solid var(--line); background: var(--paper-card); color: var(--ink); }
.auth .btn, .join .btn { width: 100%; }
.join .btn { min-height: 50px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn--primary { background: var(--evergreen); color: var(--paper-card); border: none; }
.btn--primary:hover { background: var(--evergreen-2); }
.btn--primary:disabled { background: var(--evergreen-3); opacity: 1; cursor: progress; }
.btn--secondary { background: var(--paper-card); color: var(--ink); border: 1px solid var(--line); }
.btn--secondary:hover { border-color: var(--evergreen-3); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn svg { width: 18px; height: 18px; }
.divider { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; font-size: 12px; color: var(--muted);
           letter-spacing: .06em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); }
.alt { display: grid; gap: 10px; }
.foot { font-size: 14px; color: var(--muted); text-align: center; }
.foot a { color: var(--evergreen); font-weight: 600; }
.stack { display: grid; gap: 16px; }

.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 11px 13px; font-size: 14px;
          line-height: 1.45; background: var(--paper-2); }
.banner--danger { background: var(--danger-bg); color: var(--danger); }
.banner--warn { background: var(--warn-bg); color: var(--warn); }
.banner--ok { background: var(--ok-bg); color: var(--ok); }
.banner a { color: inherit; font-weight: 700; }
.banner b { font-weight: 700; }

.sent { display: grid; gap: 14px; justify-items: start; }
.envelope, .live-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
                        background: color-mix(in srgb, var(--evergreen) 12%, transparent); }
.live-mark { width: 56px; height: 56px; background: color-mix(in srgb, var(--evergreen) 14%, transparent); }
.envelope svg, .live-mark svg { width: 24px; height: 24px; stroke: var(--evergreen); fill: none; }
.live-mark svg { width: 26px; height: 26px; }
.addr { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.later { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
         color: var(--paper-card); background: var(--clay); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }

/* ---------- /join/ ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); }
.steps li span::before { content: counter(s) " · "; font-variant-numeric: tabular-nums; }
.steps li.done { color: var(--evergreen-3); }
.steps li.done::before { background: var(--evergreen-3); }
.steps li.now { color: var(--evergreen); }
.steps li.now::before { background: var(--clay); }

.slug { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; min-height: 46px; }
.slug:focus-within { border-color: var(--evergreen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--evergreen) 13%, transparent); }
.slug.is-error { border-color: var(--danger); }
.slug.is-ok { border-color: var(--ok); }
.slug .pre { display: flex; align-items: center; padding: 0 4px 0 12px; font-family: var(--mono); font-size: 14px; color: var(--muted);
             background: var(--paper-2); border-right: 1px solid var(--line); white-space: nowrap; }
.slug input { flex: 1; min-width: 0; border: none; outline: none; font-family: var(--mono); font-size: 15px; padding: 0 12px;
              background: transparent; color: var(--ink); border-radius: 0; box-shadow: none; min-height: 0; }
.slug input:focus { box-shadow: none; }
.avail { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 22px; }
.avail .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.avail.ok { color: var(--ok); } .avail.ok .dot { background: var(--ok); }
.avail.bad { color: var(--danger); } .avail.bad .dot { background: var(--danger); }
.avail.wait { color: var(--muted); } .avail.wait .dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.rules { font-size: 12.5px; color: var(--muted); }
.preview { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; background: var(--paper); }
.preview .cap { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.partner-tag { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: var(--paper-card);
               border: 1px solid var(--line); border-radius: 999px; padding: 5px 16px 5px 5px; font-size: 14px;
               color: var(--ink-soft); justify-self: start; }
.partner-mono { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--evergreen); color: var(--paper-card);
                font-family: var(--serif); font-size: 14px; font-weight: 600; display: grid; place-items: center; }
.partner-tag strong { color: var(--evergreen); font-weight: 600; overflow-wrap: anywhere; }
.checks { display: grid; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); line-height: 1.45; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--evergreen); flex: none; }
.check a { color: var(--evergreen); font-weight: 600; }
.check.is-error { color: var(--danger); }

.founding { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
            background: color-mix(in srgb, var(--clay) 10%, var(--paper-card)); border: 1px solid color-mix(in srgb, var(--clay) 30%, transparent); }
.founding .seal { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--clay); color: var(--clay);
                  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 15px; }
.founding b { display: block; color: var(--ink); font-size: 15px; }
.founding span { font-size: 13.5px; color: var(--ink-soft); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border: none; margin: 0; padding: 0; min-width: 0; }
.plan { position: relative; display: grid; gap: 6px; padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(input:checked) { border-color: var(--evergreen); box-shadow: 0 0 0 3px color-mix(in srgb, var(--evergreen) 12%, transparent); }
.plan:has(input:focus-visible) { outline: 2px solid var(--clay); outline-offset: 3px; }
.plan .name { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.plan .price { font-family: var(--serif); font-size: 34px; color: var(--ink); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.plan .price small { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.plan .was { font-size: 13px; color: var(--muted); }
.plan .save { justify-self: start; font-size: 11.5px; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 2px 8px; }
.disclosure { font-size: 13px; color: var(--ink-soft); background: var(--paper); border-radius: 10px; padding: 12px 14px; line-height: 1.5; }
.secure { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--paper-card) 40%, transparent);
           border-top-color: var(--paper-card); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-mark { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--clay); animation: spin 1s linear infinite; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 14px;
            border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.copy-row .lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.copy-row .url { font-family: var(--mono); font-size: 14.5px; color: var(--evergreen); overflow-wrap: anywhere; user-select: all; }
.copy-row .use { font-size: 12.5px; color: var(--muted); }
.copy-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--evergreen); background: var(--paper-card);
            border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 40px; cursor: pointer; }

/* ---------- shared pieces reworked in Phases 06-07 from the account/admin mockups ---------- */
.portal-shell { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent;
       padding: 10px 14px; font: inherit; color: var(--ink-soft); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--evergreen); }
.modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(37,33,27,.45); padding: 16px; z-index: 50; }
.modal > .card { width: min(520px, 100%); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.lead-card { background: var(--paper-card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
@media (max-width: 640px) { .table { display: none; } }
@media (min-width: 641px) { .lead-card { display: none; } }

/* ---------- legal pages (/terms/, /privacy/) ---------- */
.legal-wrap { max-width: 46rem; margin: 0 auto; padding: 40px 16px 72px; }
.legal { max-width: 46rem; gap: 0; padding: 32px; }
.legal h1 { margin-bottom: .5rem; }
.legal h2 { font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: .4rem; }
.legal p, .legal li { line-height: 1.65; }
.legal p { margin-top: .6rem; color: var(--ink-soft); }
.legal ul { padding-left: 1.25rem; display: grid; gap: .4rem; color: var(--ink-soft); }

@media (max-width: 560px) {
  .card, .join > .card { padding: 24px 18px; border-radius: 16px; }
  .auth > .card { padding: 26px 20px 24px; }
  .card h1, .join .card h1 { font-size: 26px; }
  .auth { padding-block: 28px 48px; }
  .plans { grid-template-columns: 1fr; }
  .steps li span { font-size: 0; }
  .steps li span::before { font-size: 12px; content: counter(s); }
  .steps li.now span { font-size: 12px; }
  .steps li.now span::before { content: counter(s) " · "; }
  .top-link { display: none; }
  .slug .pre { font-size: 12.5px; padding-left: 8px; }
  .legal { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { .spinner, .wait-mark, .avail.wait .dot { animation: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.avail:not(.ok):not(.bad):not(.wait) .dot { display: none; }
