:root {
  color-scheme: dark;
  --ink: #f1faf7;
  --muted: #96aaa5;
  --muted-strong: #bdcbc7;
  --surface: rgba(15, 35, 31, 0.76);
  --surface-strong: #102a24;
  --line: rgba(187, 221, 211, 0.14);
  --brand: #21d19f;
  --brand-light: #8ef1d3;
  --brand-dark: #06211a;
  --danger: #ff8d8d;
  --warning: #ffd38a;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #071412; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 15%, rgba(33, 209, 159, 0.11), transparent 31rem),
    linear-gradient(145deg, #071412 0%, #091a17 47%, #06110f 100%);
  overflow-x: hidden;
}
button, input { font: inherit; }
select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-light); text-underline-offset: 3px; }

.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 10; padding: .75rem 1rem; background: white; color: #111; border-radius: .6rem; }
.skip-link:focus { top: 1rem; }
.ambient { position: fixed; border-radius: 999px; filter: blur(2px); pointer-events: none; opacity: .45; }
.ambient-one { width: 22rem; height: 22rem; right: -9rem; top: 18%; background: radial-gradient(circle, rgba(36, 195, 151, .16), transparent 68%); }
.ambient-two { width: 16rem; height: 16rem; left: 35%; bottom: -8rem; background: radial-gradient(circle, rgba(112, 92, 255, .11), transparent 70%); }

.site-header, footer { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; }
.site-header { min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-weight: 720; letter-spacing: -.035em; font-size: 1.35rem; }
.brand img { filter: drop-shadow(0 8px 20px rgba(33,209,159,.16)); }
.trust-chip { display: inline-flex; gap: .55rem; align-items: center; color: var(--muted-strong); font-size: .78rem; letter-spacing: .03em; }
.trust-chip span { width: .45rem; height: .45rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(33,209,159,.09); }
.trust-chip b { font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.language-select { min-height: 2.25rem; padding: .35rem 1.8rem .35rem .65rem; color: var(--muted-strong); background: rgba(15,35,31,.75); border: 1px solid var(--line); border-radius: .6rem; cursor: pointer; outline: none; }
.language-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33,209,159,.12); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.page-shell { width: min(1180px, calc(100% - 3rem)); min-height: calc(100vh - 172px); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(3rem, 8vw, 8rem); padding: 3rem 0 5rem; }
.story-panel { max-width: 650px; }
.eyebrow { display: inline-flex; align-items: center; gap: .7rem; color: var(--brand-light); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 1.8rem; height: 1px; background: var(--brand); }
h1 { margin: 1.5rem 0 1.35rem; font-size: clamp(3.1rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.065em; font-weight: 650; }
h1 em { color: var(--brand); font-style: normal; }
.story-copy { max-width: 36rem; margin: 0; color: var(--muted-strong); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.72; }

.signal-card { margin-top: 2.4rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1.25rem; background: rgba(14, 36, 31, .56); backdrop-filter: blur(18px); box-shadow: 0 24px 50px rgba(0,0,0,.12); }
.signal-head { display: flex; justify-content: space-between; color: var(--muted); font-size: .74rem; margin-bottom: 1rem; }
.signal-status { color: var(--brand-light); }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.signal-grid div { padding: .9rem; background: rgba(255,255,255,.035); border-radius: .8rem; }
.signal-grid strong, .signal-grid span { display: block; }
.signal-grid strong { font-size: .84rem; margin-bottom: .36rem; }
.signal-grid span { color: var(--muted); font-size: .7rem; }
.principles { display: flex; gap: 1.5rem; margin-top: 1.4rem; color: var(--muted); font-size: .75rem; }
.principles span::before { content: "✓"; margin-right: .45rem; color: var(--brand); }

.auth-panel { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 440px; padding: clamp(1.6rem, 4vw, 2.6rem); border: 1px solid var(--line); border-radius: 1.65rem; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.auth-card h2 { margin: 0 0 .6rem; font-size: clamp(1.65rem, 3vw, 2rem); letter-spacing: -.045em; }
.auth-intro { margin: 0 0 1.8rem; color: var(--muted); line-height: 1.55; font-size: .94rem; }
.field { margin-bottom: 1.15rem; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
label { display: block; margin-bottom: .5rem; color: var(--muted-strong); font-size: .79rem; font-weight: 650; }
input { width: 100%; min-height: 3.25rem; padding: .78rem .95rem; color: var(--ink); background: rgba(3, 15, 12, .55); border: 1px solid rgba(190, 220, 211, .18); border-radius: .75rem; outline: none; transition: border .18s, box-shadow .18s, background .18s; }
input::placeholder { color: #69807a; }
input:hover { border-color: rgba(190, 220, 211, .3); }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(33,209,159,.12); background: rgba(3, 15, 12, .78); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 3.25rem; }
.reveal { position: absolute; right: .65rem; top: 50%; translate: 0 -50%; padding: .45rem; color: var(--muted); background: transparent; border: 0; border-radius: .45rem; cursor: pointer; }
.reveal:hover, .reveal:focus-visible { color: var(--ink); background: rgba(255,255,255,.06); }
.text-link { padding: 0; color: var(--brand-light); background: none; border: 0; cursor: pointer; font-size: .78rem; font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.primary-button { width: 100%; min-height: 3.3rem; margin-top: .35rem; padding: .85rem 1.2rem; color: var(--brand-dark); background: var(--brand); border: 0; border-radius: .78rem; font-weight: 780; cursor: pointer; box-shadow: 0 14px 35px rgba(33,209,159,.16); transition: transform .16s, background .16s, box-shadow .16s; }
.primary-button:hover { background: #42dcae; transform: translateY(-1px); box-shadow: 0 18px 40px rgba(33,209,159,.2); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: .64; cursor: wait; transform: none; }
.back-link { display: inline-flex; margin-top: 1.25rem; color: var(--muted-strong); font-size: .82rem; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.form-message { display: none; margin: 0 0 1rem; padding: .78rem .9rem; border-radius: .7rem; font-size: .8rem; line-height: 1.45; }
.form-message.visible { display: block; }
.form-message.error { color: #ffd1d1; background: rgba(255, 97, 97, .1); border: 1px solid rgba(255, 130, 130, .18); }
.form-message.success { color: #bbf9e5; background: rgba(33, 209, 159, .09); border: 1px solid rgba(33, 209, 159, .18); }
.password-hint { margin: -.55rem 0 1.15rem; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.legal-note { margin: 1.5rem 0 0; color: #718680; text-align: center; font-size: .68rem; line-height: 1.5; }
.success-mark { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; margin-bottom: 1.25rem; color: var(--brand-dark); background: var(--brand); border-radius: 1rem; font-size: 1.45rem; font-weight: 800; }

.dashboard { width: min(980px, calc(100% - 2rem)); margin: 2rem auto; }
.dashboard .auth-card { max-width: none; }

footer { min-height: 80px; padding-block: 1.5rem; color: #688079; font-size: .7rem; border-top: 1px solid rgba(255,255,255,.04); }

@media (max-width: 860px) {
  .page-shell { grid-template-columns: 1fr; gap: 2.4rem; padding-top: 2rem; }
  .story-panel { text-align: center; margin-inline: auto; }
  .eyebrow { justify-content: center; }
  .story-copy { margin-inline: auto; }
  .signal-card { display: none; }
  .principles { justify-content: center; }
  .auth-panel { justify-content: center; }
}
@media (max-width: 520px) {
  .site-header, .page-shell, footer { width: min(100% - 2rem, 1180px); }
  .site-header { min-height: 72px; }
  .trust-chip { font-size: 0; }
  .header-actions { gap: .6rem; }
  h1 { font-size: clamp(2.65rem, 13vw, 3.65rem); }
  .story-copy { font-size: .95rem; }
  .principles { flex-direction: column; gap: .5rem; }
  .auth-card { border-radius: 1.25rem; }
  footer { align-items: flex-start; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
