/* Accessible theme. Every text/background pair is documented in docs/ACCESSIBILITY-AUDIT.md.
   Dark: all text pairs reach WCAG AAA (7:1). Light: AAA for body text, AA or better elsewhere. No inline styles anywhere (CSP). */
:root {
  color-scheme: dark;
  --bg: #0d0e10; --surface: #15171a; --raised: #1e2125; --line: #2b2f35;
  --text: #f4f5f7; --muted: #a3aab4; --accent: #ff5b1f; --on-accent: #1a0a03;
  --link: #ff8a5c; --err: #ff7070; --ok: #4cd68f; --focus: #ffd166; --border: #656d79; --radius: 16px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font: 'Barlow', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 var(--font); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: 2.3rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; } .muted { color: var(--muted); }
a { color: var(--link); text-underline-offset: 3px; } a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }

/* keyboard: always-visible focus, never removed */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--focus); color: #000; padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

header.site, footer.site { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 14px max(16px, 4vw); border-bottom: 1px solid var(--border); }
footer.site { border-bottom: 0; border-top: 1px solid var(--border); margin-top: 40px; }
header.site nav, footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.brand { font-weight: 800; letter-spacing: .04em; color: var(--text); text-decoration: none; }
main { padding: 24px max(16px, 4vw); max-width: 1000px; margin: 0 auto; }
main.narrow { max-width: 520px; }
main.doc { max-width: 760px; } main.doc h2 { margin-top: 1.8em; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* forms */
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search] {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
input[aria-invalid=true] { border-color: var(--err); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.err { color: var(--err); font-weight: 600; } .ok { color: var(--ok); font-weight: 600; }
[role=alert]:empty, [role=status]:empty { display: none; }
.meter { height: 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.meter i[data-s="1"] { width: 25%; } .meter i[data-s="2"] { width: 50%; } .meter i[data-s="3"] { width: 75%; } .meter i[data-s="4"] { width: 100%; }
.reqs { list-style: none; padding: 0; margin: 8px 0 0; font-size: .92rem; }
.reqs li::before { content: "\2715  "; color: var(--err); font-weight: 700; } .reqs li.met::before { content: "\2713  "; color: var(--ok); }
.reqs li.met { color: var(--text); } .reqs li { color: var(--muted); }

/* buttons: equal visual weight for "Accept" and "Reject" (no dark patterns) */
.btn, button.btn { min-height: 48px; padding: 10px 20px; border-radius: 12px; border: 2px solid var(--border); background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 4px; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }

/* cookie banner + dialog */
.cc { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.cc[hidden] { display: none; }
.cc .row { margin-top: 12px; }
.cc .row .btn { flex: 1 1 140px; }
dialog.cc-dialog { background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: var(--radius); max-width: 560px; width: calc(100% - 24px); padding: 20px; }
dialog.cc-dialog::backdrop { background: rgba(0,0,0,.65); }

.notfound { text-align: center; padding-top: 10vh; }
.notfound .code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; line-height: 1; color: var(--accent); margin: 0; }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn.primary { border: 2px solid ButtonText; } }
[data-guard][data-ready="0"] body { visibility: hidden; }
.row.center { justify-content: center; }
main.doc table { table-layout: fixed; font-size: .9rem; }
main.doc th, main.doc td { overflow-wrap: anywhere; vertical-align: top; padding: 8px 6px; }
main.doc code { overflow-wrap: anywhere; }
main.doc blockquote { margin: 0 0 1em; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 8px; }

/* ---- match the FORGE AI app look ---- */
header.site, footer.site { border-color: var(--line); }
.card { border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand .word { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .08em; color: var(--text); }
.btn, button.btn { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; }
.btn:hover { border-color: #444a52; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search] { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
input::placeholder { color: #8a929d; }
.eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; color: var(--accent); font-weight: 600; }

/* ---- app-style atmosphere: soft orange glows, centred cards, big display type ---- */
body { position: relative; min-height: 100vh; overflow-x: hidden; }
body::before, body::after { content: ""; position: fixed; width: 320px; height: 320px; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none; }
body::before { background: rgb(255 91 31 / .45); top: -90px; left: -100px; opacity: .5; }
body::after { background: rgb(255 150 80 / .3); bottom: 30px; right: -120px; opacity: .45; }
header.site { background: transparent; border-bottom-color: var(--line); }
.brand .mark.logo { background: none; overflow: hidden; display: block; box-shadow: 0 4px 14px rgb(255 91 31 / .35); }
.brand .mark.logo svg { display: block; }
.brand .word b { color: var(--accent); font-weight: 700; }
main.narrow { padding-top: 40px; }
main.narrow h1, main.hero h1 { text-align: left; }
main.narrow > h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
main.narrow .card, .w-card { background: rgb(21 23 26 / .88); backdrop-filter: blur(8px); box-shadow: 0 12px 40px rgb(0 0 0 / .35); padding: 22px; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 91 31 / .15); }
label { font-size: .85rem; color: var(--muted); letter-spacing: .02em; }
.check { color: var(--text); } .check, .check * { font-size: .95rem; }
.btn { min-height: 50px; }
.btn.big { min-height: 54px; font-size: 1.05rem; flex: 1 1 160px; }
.btn.primary { box-shadow: 0 6px 20px rgb(255 91 31 / .3); }
main.hero { max-width: 480px; padding-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.w-title { font-size: clamp(2.6rem, 11vw, 3.8rem); line-height: .98; margin: 0; }
.accent-text { color: var(--accent); text-shadow: 0 0 30px rgb(255 91 31 / .45); }
.w-sub { font-size: 1.05rem; max-width: 36ch; margin: 0; }
.w-feats { display: flex; flex-direction: column; gap: 10px; }
.w-feat { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(21 23 26 / .7); }
.w-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgb(255 91 31 / .15); color: var(--accent); flex: none; font-size: .8rem; }
main.hero .w-card h2 { margin-bottom: .3em; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
main.hero > *, main.narrow > * { animation: riseIn .55s cubic-bezier(.2,.7,.2,1) both; }
main.hero > :nth-child(2), main.narrow > :nth-child(2) { animation-delay: .08s; } main.hero > :nth-child(3) { animation-delay: .16s; } main.hero > :nth-child(4) { animation-delay: .24s; }
footer.site { background: transparent; }
