:root {
  color-scheme: light;
  --ink: #1b1410;
  --muted: #766a61;
  --faint: #a4978d;
  --cream: #f4efe6;
  --paper: #fffaf2;
  --paper-strong: #fffdf8;
  --line: rgba(61, 42, 30, .12);
  --line-strong: rgba(61, 42, 30, .2);
  --roast: #754127;
  --roast-dark: #3f2116;
  --roast-soft: #a86c46;
  --leaf: #66704b;
  --leaf-soft: #e7eadc;
  --gold: #b88b52;
  --danger: #9b3f31;
  --danger-soft: #f8e8e3;
  --shadow: 0 24px 70px rgba(61, 39, 24, .11);
  --shadow-soft: 0 10px 30px rgba(61, 39, 24, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 94% 4%, rgba(184,139,82,.18), transparent 30rem),
    radial-gradient(circle at 4% 92%, rgba(102,112,75,.11), transparent 28rem),
    var(--cream);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff8ef;
  background: linear-gradient(145deg, var(--roast), var(--roast-dark));
  box-shadow: 0 8px 22px rgba(63,33,22,.22);
  font: 800 12px/1 Georgia, serif;
  letter-spacing: .08em;
}
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; font-size: 16px; letter-spacing: -.025em; }
.brand-copy small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.local-pill, .tag, .status, .step-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.local-pill { padding: 7px 9px; color: #596040; border: 1px solid rgba(102,112,75,.28); background: rgba(255,255,255,.38); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.identity { display: none; text-align: right; }
.identity strong, .identity small { display: block; }
.identity strong { font-size: 12px; }
.identity small { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.quiet-link, .back-link { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.quiet-link:hover, .back-link:hover { color: var(--roast); }
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.48);
  color: var(--ink);
  cursor: pointer;
}
.page { flex: 1; padding: 44px 0 54px; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; }

.eyebrow, .kicker { display: block; color: var(--roast); font-size: 10px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font: 600 clamp(40px, 10vw, 78px)/.95 Georgia, "Times New Roman", serif; letter-spacing: -.05em; }
h1 em { color: var(--roast); font-weight: 500; }
h2 { margin-bottom: 8px; font: 600 24px/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.6; }

.auth-wrap { display: grid; gap: 30px; align-items: start; padding: 26px 0 20px; }
.auth-intro { padding-top: 12px; }
.auth-intro h1 { margin-top: 12px; }
.auth-intro p { max-width: 520px; margin-bottom: 0; font-size: 15px; }
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,250,242,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.auth-panel, .form-panel { padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 25px; }
.panel-head h2 { margin-top: 5px; margin-bottom: 0; }
.step-badge { min-width: 38px; min-height: 38px; justify-content: center; color: var(--roast); background: #f2e4d5; }
.status-orb { width: 13px; height: 13px; margin-top: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 6px rgba(102,112,75,.12); }
label { display: grid; gap: 8px; margin-bottom: 17px; color: #4e4139; font-size: 12px; font-weight: 780; }
label small { color: var(--faint); font-size: 10px; font-weight: 500; line-height: 1.4; }
input, select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: rgba(255,253,248,.88);
  font-size: 15px;
  font-weight: 620;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
input:focus, select:focus { border-color: rgba(117,65,39,.56); background: #fffdf8; box-shadow: 0 0 0 4px rgba(117,65,39,.08); }
select { cursor: pointer; }
.field-pair { display: grid; gap: 0; }

.primary-button, .secondary-button, .danger-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 17px;
  border-radius: 15px;
  border: 0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.primary-button { width: 100%; color: #fff9f0; background: linear-gradient(135deg, var(--roast), var(--roast-dark)); box-shadow: 0 12px 28px rgba(63,33,22,.19); }
.primary-button.compact { width: auto; min-width: 132px; }
.secondary-button { color: var(--roast-dark); border: 1px solid var(--line-strong); background: rgba(255,253,248,.66); }
.secondary-button.full { width: 100%; justify-content: center; }
.danger-button { width: 100%; justify-content: center; color: #fff7f4; background: var(--danger); }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { filter: brightness(.98); transform: translateY(-1px); }
.notice { margin-bottom: 20px; padding: 12px 14px; border-radius: 13px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.notice.error { color: #7e3025; border: 1px solid rgba(155,63,49,.18); background: var(--danger-soft); }
.notice.success { color: #4e5b38; border: 1px solid rgba(102,112,75,.18); background: var(--leaf-soft); }

.hero { padding: 20px 0 28px; }
.compact-hero h1 { margin-top: 12px; max-width: 920px; }
.hero-copy { max-width: 650px; font-size: 15px; }
.action-grid { display: grid; gap: 12px; margin-top: 10px; }
.action-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 17px;
  align-items: start;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,250,242,.64);
  text-decoration: none;
}
.action-card h2 { margin: 0 0 7px; font-size: 22px; }
.action-card p { margin: 0; font-size: 12px; }
.action-index { color: var(--gold); font: 700 11px/1 Georgia, serif; }
.action-arrow { font-size: 20px; color: var(--roast); }
.future { opacity: .67; }
.active-card { background: rgba(255,250,242,.92); box-shadow: var(--shadow-soft); }

.page-heading { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { margin: 10px 0 8px; font-size: clamp(42px, 8vw, 67px); }
.page-heading p { max-width: 610px; margin: 0; font-size: 14px; }
.back-link { display: block; width: fit-content; margin-bottom: 18px; }
.narrow-heading { max-width: 760px; }

@media (min-width: 620px) {
  .app-shell { width: min(1240px, calc(100% - 54px)); }
  .topbar { min-height: 86px; }
  .identity { display: block; }
  .page { padding-top: 60px; }
  .auth-panel { padding: 28px; }
  .field-pair { grid-template-columns: 1fr 1fr; gap: 13px; }
  .page-heading { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .page { padding-top: 72px; padding-bottom: 76px; }
  .auth-wrap { grid-template-columns: minmax(0, 1.05fr) minmax(390px, .72fr); gap: 7vw; align-items: center; min-height: calc(100vh - 220px); }
  .login-wrap { min-height: calc(100vh - 220px); }
  .auth-intro { padding-top: 0; }
  .auth-intro h1 { font-size: clamp(62px, 6vw, 90px); }
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .action-card { min-height: 190px; }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button, .secondary-button, .danger-button, .action-card { transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease; }
  .active-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(61,39,24,.1); }
}
