:root {
  color-scheme: light;
  --ink: #15161a;
  --muted: #62656d;
  --paper: #f8f6f1;
  --surface: #fff;
  --soft: #f1ece3;
  --line: #ded8cf;
  --accent: #ff6f3c;
  --accent-dark: #d94b1b;
  --danger: #a92c29;
  --danger-soft: #fff0ee;
  --hero: #2d1913;
}

* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-header { align-items: center; background: rgba(248, 246, 241, .95); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 72px; padding: 12px clamp(18px, 4vw, 56px); }
.brand { align-items: center; display: inline-flex; font-weight: 900; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; display: block; height: 42px; width: 42px; }
.header-link { font-size: .92rem; font-weight: 800; }

.page-hero { background: var(--hero); color: #fff; padding: clamp(48px, 8vw, 88px) clamp(18px, 8vw, 110px); }
.page-hero > * { max-width: 940px; }
.eyebrow, .section-number { color: var(--accent); font-size: .76rem; font-weight: 950; letter-spacing: .1em; margin: 0 0 12px; text-transform: uppercase; }
h1 { font-size: clamp(3.2rem, 8vw, 6.6rem); letter-spacing: -.06em; line-height: .87; margin: 0 0 26px; }
.page-hero > p:last-child { color: #ded6d2; font-size: clamp(1.05rem, 1.8vw, 1.3rem); margin: 0; max-width: 680px; }

.account-shell { margin: 0 auto; max-width: 1180px; padding: clamp(32px, 6vw, 72px) clamp(18px, 4vw, 50px) 88px; }
.login-panel { align-items: start; display: grid; gap: clamp(28px, 6vw, 90px); grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); letter-spacing: -.045em; line-height: 1; margin: 0 0 16px; }
.login-panel p, .choice-card li, .support-note p { color: var(--muted); }
.login-form { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(45, 25, 19, .08); display: grid; gap: 10px; padding: clamp(22px, 4vw, 34px); }
label { font-size: .85rem; font-weight: 850; }
input { background: #fff; border: 1px solid #bdb6ad; border-radius: 0; color: var(--ink); min-height: 50px; padding: 11px 13px; width: 100%; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 111, 60, .2); outline: none; }

.button { align-items: center; border: 1px solid transparent; display: inline-flex; font-weight: 900; justify-content: center; min-height: 52px; padding: 12px 18px; text-decoration: none; width: 100%; }
.button:disabled { cursor: wait; opacity: .58; }
.primary { background: var(--accent); color: #17110e; margin-top: 8px; }
.primary:hover { background: #ff8258; }
.secondary { background: var(--ink); color: #fff; }
.secondary:hover { background: #303137; }
.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.quiet:hover { background: var(--soft); }
.danger { background: var(--danger); color: #fff; }
.danger:hover { background: #8e211f; }

.status-message { background: #fff4cf; border-left: 5px solid #e6a900; margin-bottom: 28px; padding: 16px 18px; }
.status-message.success { background: #e9f7ea; border-color: #3a8b45; }
.status-message.error { background: var(--danger-soft); border-color: var(--danger); }
.signed-in-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 22px; grid-template-columns: 1fr auto auto; margin-bottom: 30px; padding: 0 0 20px; }
.signed-in-row span { color: var(--muted); display: block; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.signed-in-row strong { display: block; overflow-wrap: anywhere; }
.text-button { background: none; border: 0; color: var(--ink); font-weight: 850; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }

.choice-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 100%; padding: clamp(24px, 4vw, 38px); }
.choice-card h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.choice-summary { font-size: 1.05rem; font-weight: 750; margin: 0 0 22px; }
.choice-card ul { margin: 0 0 26px; padding-left: 20px; }
.choice-card li + li { margin-top: 9px; }
.choice-card .button { margin-top: auto; }
.delete-card { border-top: 5px solid var(--danger); }
.reset-card { border-top: 5px solid var(--accent); }
.important { background: var(--danger-soft); color: #6f1b19; font-size: .9rem; font-weight: 750; margin: 0 0 22px; padding: 13px 15px; }
.support-note { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; }
.support-note h2 { font-size: 1.35rem; }

dialog { background: transparent; border: 0; max-width: 560px; padding: 18px; width: calc(100% - 24px); }
dialog::backdrop { background: rgba(20, 14, 12, .72); backdrop-filter: blur(3px); }
.dialog-card { background: var(--surface); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); padding: clamp(24px, 6vw, 40px); position: relative; }
.dialog-close { background: none; border: 0; color: var(--muted); font-size: 2rem; line-height: 1; padding: 6px; position: absolute; right: 14px; top: 10px; }
.dialog-card p { color: var(--muted); }
.dialog-card label { display: block; margin: 24px 0 8px; }
.dialog-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1.35fr; margin-top: 20px; }
.danger-label { color: var(--danger); }

.site-footer { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; gap: 18px; justify-content: space-between; padding: 25px clamp(18px, 4vw, 56px); }
.site-footer p { margin: 0; }
.site-footer div:last-child { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 760px) {
  .login-panel, .choice-grid { grid-template-columns: 1fr; }
  .signed-in-row { align-items: start; grid-template-columns: 1fr 1fr; }
  .signed-in-row .text-button { grid-column: 1 / -1; justify-self: start; }
  .dialog-actions { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open] .dialog-card { animation: enter .18s ease-out; }
  @keyframes enter { from { opacity: 0; transform: translateY(10px) scale(.985); } }
}

