:root {
  color-scheme: light;
  --brand: #176b45;
  --brand-dark: #0e4b31;
  --brand-soft: #eaf6ee;
  --ink: #183128;
  --muted: #61756c;
  --line: #dbe6df;
  --paper: #ffffff;
  --canvas: #f4f7f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 16px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.auth-page { min-height: 100vh; background: #eef4ef; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.08fr) minmax(390px, .92fr); }
.auth-brand { position: relative; overflow: hidden; min-height: 100vh; padding: clamp(42px, 7vw, 92px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: radial-gradient(circle at 80% 15%, rgba(119, 205, 153, .28), transparent 30%), linear-gradient(145deg, #0f5135 0%, #123f2e 54%, #0b2d22 100%); }
.auth-brand::after { content: ""; position: absolute; right: -130px; bottom: -180px; width: 500px; height: 500px; border: 1px solid rgba(255,255,255,.12); border-radius: 45% 55% 62% 38%; transform: rotate(18deg); }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--brand-dark); background: #d7f2df; font-size: 1.4rem; font-weight: 800; letter-spacing: -.06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.brand-mark.small { width: 40px; height: 40px; border-radius: 13px; font-size: 1rem; }
.eyebrow { display: block; margin-bottom: 12px; color: #4d7865; font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.auth-brand .eyebrow { color: #a9d8ba; }
.auth-brand h1 { max-width: 650px; margin: 0; font-size: clamp(2.6rem, 5vw, 5.2rem); line-height: .98; letter-spacing: -.06em; }
.auth-brand p { max-width: 580px; margin: 24px 0 0; color: #cde2d5; font-size: clamp(1rem, 1.5vw, 1.22rem); line-height: 1.7; }
.trust-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #cde2d5; font-size: .92rem; }
.trust-note span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #0e4b31; background: #a8dfba; font-weight: 900; }
.auth-card { align-self: center; width: min(440px, calc(100% - 48px)); margin: 48px auto; padding: clamp(30px, 5vw, 52px); border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: 0 24px 70px rgba(30, 65, 49, .10); }
.auth-card h1, .auth-card h2 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.045em; }
.intro { margin: 10px 0 30px; color: var(--muted); line-height: 1.6; }
.auth-card form { display: grid; gap: 10px; }
.auth-card label, .auth-card form p { margin: 8px 0 0; color: #334b40; font-size: .9rem; font-weight: 750; }
.auth-card input { width: 100%; min-height: 50px; padding: 0 15px; border: 1px solid #cbd9d0; border-radius: 12px; color: var(--ink); background: white; outline: none; transition: border-color .18s, box-shadow .18s; }
.auth-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23,107,69,.12); }
.auth-card button { min-height: 52px; margin-top: 14px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 13px; color: white; background: var(--brand); font-weight: 800; cursor: pointer; transition: background .18s, transform .18s; }
.auth-card button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.form-alert { margin: 0 0 20px; padding: 13px 14px; border: 1px solid #efc7c1; border-radius: 12px; color: #812e24; background: #fff3f1; line-height: 1.45; }
.help-text { margin: 24px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 34px; }
.mobile-brand.always { display: flex; }
.single-card-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.app-shell { min-height: 100vh; }
.topbar { min-height: 76px; padding: 0 clamp(20px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.user-area { display: flex; align-items: center; gap: 18px; text-align: right; }
.user-area span { display: grid; gap: 3px; }
.user-area small { color: var(--muted); }
.quiet-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; cursor: pointer; }
.workspace { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(36px, 6vw, 72px) 0; }
.welcome-card { padding: clamp(30px, 6vw, 64px); border: 1px solid #cadecf; border-radius: 28px; background: radial-gradient(circle at 90% 0, rgba(53,153,99,.14), transparent 38%), white; }
.welcome-card h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.5rem); letter-spacing: -.06em; }
.welcome-card p { max-width: 730px; margin: 18px 0 0; color: var(--muted); font-size: 1.06rem; line-height: 1.7; }
.session-status { display: inline-flex; align-items: center; gap: 9px; margin-top: 26px; color: var(--brand); font-weight: 800; }
.session-status span { width: 9px; height: 9px; border-radius: 50%; background: #2baa69; box-shadow: 0 0 0 5px rgba(43,170,105,.13); }
.foundation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.foundation-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.card-icon { color: var(--brand); font-size: .76rem; font-weight: 850; letter-spacing: .1em; }
.foundation-grid h2 { margin: 22px 0 8px; font-size: 1.15rem; }
.foundation-grid p { min-height: 72px; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.foundation-grid strong { color: var(--brand); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }

@media (max-width: 800px) {
  .auth-shell { display: block; padding: 24px 0; }
  .auth-brand { display: none; }
  .auth-card { width: min(500px, calc(100% - 32px)); }
  .mobile-brand { display: flex; }
  .topbar { align-items: flex-start; padding-block: 16px; }
  .user-area span { display: none; }
  .foundation-grid { grid-template-columns: 1fr; }
  .foundation-grid p { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
