:root {
  color-scheme: dark;
  --background: #080d16;
  --panel: #111a28;
  --panel-blue: #071a33;
  --input: #0b1422;
  --border: #26374c;
  --blue: #0878f9;
  --cyan: #08b7ee;
  --white: #f6f8fc;
  --muted: #aab8cb;
  --dim: #72839a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; background: radial-gradient(ellipse at 50% 28%, #102344 0, var(--background) 62%); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 620px); min-height: 100svh; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); }
.screen { min-height: calc(100svh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))); }
.screen[hidden] { display: none; }
.home-screen { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px 0; }
.brand-mark { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 13px; border: 1px solid #0878f955; border-radius: 28px; background: #0c1b31; box-shadow: 0 18px 60px #0878f922; }
.brand-mark svg { width: 57px; fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { margin: 0; font-size: clamp(42px, 11vw, 56px); font-weight: 800; letter-spacing: -2.7px; }
.brand-name span, .mini-brand span { color: var(--cyan); }
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.home-actions { display: grid; gap: 14px; width: min(100%, 330px); margin-top: 54px; }
.button { min-height: 56px; padding: 14px 19px; border: 1px solid transparent; border-radius: 17px; color: var(--white); font-weight: 700; cursor: pointer; transition: transform .14s ease, background .14s ease, border-color .14s ease; }
.button:active { transform: scale(.98); }
.button-primary { background: var(--blue); box-shadow: 0 8px 24px #0878f933; }
.button-primary:hover { background: #1687ff; }
.button-secondary { background: #111a28; border-color: var(--border); }
.button-secondary:hover { border-color: var(--cyan); }
.privacy-note { margin: 38px 0 0; color: var(--dim); font-size: 12px; }
.content-screen { padding: 4px 0 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 28px; }
.mini-brand { font-weight: 800; letter-spacing: -.5px; }
.back-button { padding: 10px 12px 10px 0; border: 0; background: transparent; color: var(--muted); font-weight: 650; cursor: pointer; }
h2 { margin: 0; font-size: clamp(26px, 7vw, 34px); letter-spacing: -.8px; }
.intro { margin: 8px 0 26px; color: var(--muted); line-height: 1.5; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
input { width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; outline: none; background: var(--input); color: var(--white); }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #08b7ee20; }
input::placeholder { color: #687a91; opacity: 1; }
.category-heading, .category-row { display: grid; grid-template-columns: minmax(76px, .75fr) minmax(0, 1.5fr) minmax(60px, .55fr); align-items: center; gap: 8px; }
.category-heading { margin: 25px 0 8px; color: var(--dim); font-size: 11px; font-weight: 700; }
.category-row { margin: 9px 0; }
.category-row label { font-size: 13px; font-weight: 700; }
.category-row input { min-height: 46px; padding: 10px 9px; font-size: 14px; }
.category-row input[type=number] { text-align: center; padding-inline: 4px; }
.helper { margin: 12px 0 19px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.result-card { padding: 18px 19px; border: 1px solid var(--blue); border-radius: 19px; background: var(--panel-blue); }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.result-card output { display: block; margin-top: 9px; color: var(--cyan); font-size: 42px; font-weight: 800; letter-spacing: -1px; }
.result-card output small { font-size: 22px; }
.result-card p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.submit-button { width: 100%; margin-top: 18px; }
.button-quiet { display: block; min-height: 46px; margin: 7px auto 0; padding: 10px 15px; border: 0; background: transparent; color: var(--muted); font-size: 14px; }
.error-message { margin: 12px 0 0; color: #ff9393; font-size: 13px; line-height: 1.45; }
.notes-list { display: grid; gap: 12px; }
.empty-state { padding: 25px 20px; border: 1px dashed var(--border); border-radius: 17px; color: var(--muted); text-align: center; line-height: 1.5; }
.note-card { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--panel); }
.note-summary { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; width: 100%; padding: 16px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.note-subject { overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.note-score { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--cyan); font-size: 22px; font-weight: 800; }
.note-date { color: var(--dim); font-size: 12px; }
.note-details { padding: 0 16px 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.note-details[hidden] { display: none; }
.note-details p { margin: 3px 0; }
.toast { position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); left: 20px; width: fit-content; max-width: calc(100% - 40px); margin: auto; padding: 12px 16px; transform: translateY(18px); border: 1px solid var(--border); border-radius: 13px; background: #172438; color: var(--white); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }
@media (max-width: 370px) { .app-shell { padding-right: 15px; padding-left: 15px; } .category-heading, .category-row { grid-template-columns: 70px minmax(0, 1.4fr) 54px; gap: 6px; } .category-row label { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
