/* GoalRunner customer client — the Aurora identity, one stylesheet.
   The product pins a light theme (.streamlit/config.toml); this client keeps
   that commitment and paints its ground explicitly. One thing is loudest on
   any screen: the verdict, then the advised decision (Experience §11). */

:root {
  --paper: #fbfcfa;
  --paper-2: #f3f4f1;
  --card: #ffffff;
  --ink: #171a20;
  --body: #3c414c;
  --quiet: #79808c;
  --fine: #8a8f98;
  --line: #e4e5de;
  --line-soft: #eceee6;
  --accent: #3743b8;
  --accent-soft: #eef0fb;
  --danger: #a83232;
  --ok: #2e7d4f;
  --owed: #1f6e66;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
a { color: var(--accent); }

.gr-shell { max-width: 1080px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---- verdict header: first, largest, unmissable ---- */
.gr-verdict {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.gr-coverage { color: var(--quiet); font-size: .86rem; margin: 6px 0 0; }
.gr-coverage.impaired { color: var(--danger); }
.gr-degradation { color: var(--quiet); font-size: .86rem; font-style: italic; margin: 4px 0 0; }

/* ---- layout: focus dominant, docket quiet ---- */
.gr-day { display: flex; gap: 40px; margin-top: 26px; align-items: flex-start; }
.gr-focus { flex: 1.6; min-width: 0; }
.gr-docket { flex: 1; min-width: 240px; max-width: 340px; }

/* ---- the advised decision ---- */
.gr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
}
.gr-counsel {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
  text-wrap: balance;
}
.gr-owed { margin: 0 0 4px; color: var(--body); }
.gr-standing, .gr-age { color: var(--quiet); font-size: .88rem; margin: 2px 0; }
.gr-note { margin: 8px 0 0; color: var(--body); font-size: .92rem; }
.gr-quote {
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  padding: 10px 14px;
  margin: 14px 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--body);
}
.gr-quote .gr-attr { font-style: normal; font-family: var(--sans); font-size: .8rem; color: var(--fine); margin-top: 4px; }
.gr-quote .gr-attr a { color: var(--accent); }

.gr-verbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.gr-verb {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--body);
  border-radius: 8px;
  padding: 8px 16px;
  min-height: 40px;
}
.gr-verb:hover { border-color: var(--accent); color: var(--accent); }
.gr-verb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gr-verb.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.gr-verb.primary:hover { color: #fff; filter: brightness(1.06); }
.gr-verb.ghost { border-color: transparent; background: transparent; color: var(--quiet); }
.gr-verb.ghost:hover { color: var(--danger); }
.gr-verb[disabled] { opacity: .55; cursor: default; }
.gr-consequence { color: var(--fine); font-size: .8rem; margin-top: 8px; min-height: 1.2em; }
.gr-ack { color: var(--ok); font-size: .88rem; margin-top: 10px; }
.gr-error { color: var(--danger); font-size: .88rem; margin-top: 10px; }

/* defer chooser */
.gr-defer { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.gr-defer input[type="date"] {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; color: var(--body);
  background: var(--card);
}

/* ---- docket ---- */
.gr-docket h2 {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 18px 0 6px;
}
.gr-docket h2.owe { color: var(--danger); }
.gr-docket h2.owed { color: var(--owed); }
.gr-docket h2.returning { color: var(--fine); }
.gr-docket h2:first-child { margin-top: 4px; }
.gr-row {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--line-soft);
  padding: 9px 6px;
  display: block;
  color: var(--body);
  border-radius: 6px;
}
.gr-row:hover { background: var(--accent-soft); }
.gr-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gr-row.selected { background: var(--accent-soft); }
.gr-row .gr-row-what { color: var(--ink); font-weight: 500; }
.gr-row .gr-row-meta { color: var(--fine); font-size: .8rem; margin-top: 1px; }
.gr-row-open { border-top: 1px solid var(--line-soft); padding: 4px 6px 12px; }
.gr-row-open .gr-row-why { color: var(--body); font-size: .88rem; margin: 6px 0; }
.gr-row-open .gr-verb { padding: 5px 12px; min-height: 32px; font-size: .85rem; }
.gr-docket-empty { color: var(--quiet); font-size: .88rem; padding: 8px 6px; }

/* ---- footer: coverage + ledger receipt, quiet ---- */
.gr-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 34px;
  padding-top: 14px;
  color: var(--fine);
  font-size: .84rem;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.gr-kbd-hint { margin-left: auto; }
.gr-kbd-hint kbd {
  font-family: ui-monospace, monospace;
  font-size: .78em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 5px;
  background: var(--card);
}

/* ---- the ending ---- */
.gr-ending { text-align: left; padding: 48px 0 0; max-width: 560px; }
.gr-ending .gr-verdict { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.gr-ending .gr-next-look { color: var(--quiet); margin-top: 12px; }

/* ---- reply composer (inside the focus card) ---- */
.gr-composer { border-top: 1px solid var(--line-soft); margin-top: 16px; padding-top: 14px; }
.gr-composer-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.gr-fine-label {
  flex: 0 0 52px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fine); font-weight: 600;
}
.gr-composer input[type="text"], .gr-composer textarea, .gr-ask-input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  font: inherit; color: var(--ink); background: var(--card);
}
.gr-composer textarea { resize: vertical; line-height: 1.55; margin-bottom: 10px; }
.gr-composer input:focus-visible, .gr-composer textarea:focus-visible, .gr-ask-input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}

/* ---- the person door (a name is a door) ---- */
.gr-person-door {
  background: none; border: none; padding: 0; margin: 2px 0 0;
  color: var(--accent); font: inherit; text-decoration: underline;
  text-decoration-color: var(--accent-soft); text-underline-offset: 3px;
}
.gr-person-door:hover { text-decoration-color: var(--accent); }
.gr-person-h {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--fine); font-weight: 600; margin: 14px 0 4px;
}
.gr-person-line { margin: 2px 0; color: var(--body); }

/* ---- overlays: ask + person ---- */
.gr-overlay {
  position: fixed; inset: 0; background: rgba(23, 26, 32, .34);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  z-index: 20;
}
.gr-overlay-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; width: 100%; max-width: 560px; max-height: 72vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(23, 26, 32, .18);
}
.gr-answer { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 10px; }
.gr-answer p:first-child { color: var(--ink); }

.gr-row-body {
  color: var(--body); font-size: .88rem; white-space: pre-line; margin: 8px 0;
  max-height: 260px; overflow-y: auto;
}
.gr-foot-ask {
  background: none; border: none; padding: 0; color: var(--accent);
  font: inherit; font-size: .84rem; text-decoration: underline;
  text-decoration-color: var(--accent-soft); text-underline-offset: 3px;
}

/* ---- sign-in ---- */
.gr-signin { max-width: 430px; margin: 12vh auto 0; }
.gr-signin .gr-card { padding: 28px; }
.gr-signin h1 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0 0 8px; font-size: 1.5rem; }
.gr-signin p { color: var(--body); margin: 0 0 14px; }
.gr-signin input[type="email"] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; margin-bottom: 10px;
  background: var(--card); color: var(--ink);
}

/* ---- loading ---- */
.gr-loading { color: var(--quiet); padding: 24vh 0; text-align: center; font-family: var(--serif); font-style: italic; }

/* ---- phone: one column, verbs at thumb ---- */
@media (max-width: 760px) {
  .gr-shell { padding: 18px 16px 96px; }
  .gr-day { flex-direction: column; gap: 26px; }
  .gr-docket { max-width: none; width: 100%; }
  /* both selectors: .gr-row-open .gr-verb is more specific than .gr-verb and
     would otherwise keep its 32px desktop density on a phone (review B10) */
  .gr-verb, .gr-row-open .gr-verb { min-height: 44px; }
  .gr-kbd-hint { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .gr-row, .gr-verb { transition: background .12s ease, color .12s ease, border-color .12s ease; }
}

/* screen-reader-only live region for acknowledgements */
.gr-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
