:root {
  color-scheme: light;
  --ink: #20252b;
  --muted: #68717b;
  --line: #dfe3e6;
  --paper: #ffffff;
  --surface: #f4f5f4;
  --soft: #eaeeec;
  --accent: #365d50;
  --accent-hover: #294b40;
  --danger: #9b2f2f;
  --shadow: 0 18px 50px rgba(32, 37, 43, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--surface); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

a { color: inherit; }

.site-header {
  width: min(1120px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 680;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #aeb7b3;
  border-radius: 8px;
  color: var(--accent);
  background: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 17px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(54, 93, 80, 0.22);
  outline-offset: 2px;
}

.button:disabled { opacity: 0.6; cursor: wait; }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--paper); }
.button-secondary:hover { border-color: #aeb7b3; background: #fafbfa; }
.button-full { width: 100%; }

.landing-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 9vh 0 80px;
}

.hero { max-width: 720px; }
.eyebrow, .card-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; }
h1 { margin: 0; font-size: clamp(2.5rem, 7vw, 5.15rem); font-weight: 640; }
h2 { margin: 0 0 10px; font-size: 1.18rem; }
h3 { margin: 0 0 5px; font-size: 1rem; }

.hero-copy {
  max-width: 620px;
  margin: 26px 0 32px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.principles {
  margin-top: 13vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.principles article { padding: 30px 36px 0 0; }
.principles p, .portal-card p { margin: 0; color: var(--muted); }

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}
.site-footer nav { display: flex; gap: 18px; }
.site-footer a:hover, .auth-legal a:hover { color: var(--ink); }

.auth-body { background: #eef0ee; }
.auth-main { min-height: calc(100vh - 76px); display: grid; place-items: start center; padding: 8vh 20px 60px; }
.auth-card {
  width: min(100%, 440px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 2.15rem; }
.muted { color: var(--muted); }
.auth-card > .muted { margin: 10px 0 28px; }
form { display: grid; }
label { margin: 16px 0 7px; font-size: 0.86rem; font-weight: 650; }
input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8ced1;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.form-message { min-height: 24px; margin: 14px 0 8px; color: var(--danger); font-size: 0.88rem; }
.auth-help { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.auth-legal { margin: 14px 0 0; display: flex; justify-content: center; gap: 10px; color: var(--muted); font-size: 0.8rem; }
.auth-divider { margin: 22px 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.button-google { color: var(--ink); border-color: #c8ced1; background: #fff; }
.button-google:hover { border-color: #90999d; background: #fafbfa; }

.legal-main { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 90px; }
.legal-card { padding: clamp(28px, 6vw, 54px); border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
.legal-card h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.legal-card h2 { margin-top: 34px; }
.legal-card p, .legal-card li { color: var(--muted); }
.legal-card ul { padding-left: 22px; }

.portal-header { border-bottom: 1px solid var(--line); }
.account-actions { display: flex; align-items: center; gap: 15px; }
.account-name { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 90px; }
.portal-intro h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
.portal-intro .muted { margin: 12px 0 0; }
.portal-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.portal-card { min-height: 190px; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.portal-card-wide { grid-column: 1 / -1; min-height: 240px; }
.muted-card { background: #f8f9f8; }
.download-list { margin-top: 24px; }
.download-row { padding: 20px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.download-row p { font-size: 0.9rem; }

@media (max-width: 700px) {
  .site-header, .landing-main, .portal-main, .site-footer { width: min(100% - 28px, 1120px); }
  .landing-main { padding-top: 7vh; }
  .principles { margin-top: 10vh; grid-template-columns: 1fr; }
  .principles article { padding-right: 0; }
  .auth-card { padding: 28px 22px; }
  .account-name { display: none; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card-wide { grid-column: auto; }
  .download-row { align-items: flex-start; flex-direction: column; }
  .download-row .button { width: 100%; }
}

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