/* Session 3b proving shell. Not one of the three screens CLAUDE.md Part 8
   concentrates design effort on — clean and unremarkable, per that section,
   but still follows the same system: one typeface, one accent colour, one
   corner radius, no gradients, no unlabelled icons. */

:root {
  --base: 8px;
  --accent: #2563eb;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #d1d5db;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --radius: 8px;
  --bg: #f9fafb;
  --card-bg: #ffffff;

  /* Part 8: four type sizes, nothing off the scale. Every font-size in
     this file is one of these four — meta text, body/controls, headings,
     the one headline figure. */
  --size-meta: 13px;
  --size-body: 16px;
  --size-heading: 20px;
  --size-headline: 40px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--base) * 3);
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--base) * 4);
}

h1 {
  font-size: var(--size-heading);
  margin: 0 0 calc(var(--base) * 3);
}

label {
  display: block;
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin-bottom: calc(var(--base) * 0.5);
}

input {
  width: 100%;
  font-size: var(--size-body); /* 16px minimum avoids iOS auto-zoom on focus */
  padding: calc(var(--base) * 1.25);
  margin-bottom: calc(var(--base) * 2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  width: 100%;
  font-size: var(--size-body);
  font-weight: 600;
  padding: calc(var(--base) * 1.5);
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

button.secondary,
a.secondary {
  display: block;
  box-sizing: border-box;
  width: 100%;
  font-size: var(--size-body);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  padding: calc(var(--base) * 1.5);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

a.secondary {
  margin-bottom: calc(var(--base) * 1.5);
}

.error {
  font-size: var(--size-meta);
  color: var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: calc(var(--base) * 1.25);
  margin-bottom: calc(var(--base) * 2);
}

.error[hidden] {
  display: none;
}

#signed-in-view[hidden] {
  display: none;
}

#signed-in-view p {
  font-size: var(--size-meta);
  color: var(--text-muted);
}

#signed-in-view strong {
  display: block;
  font-size: var(--size-body);
  color: var(--text);
  margin-bottom: calc(var(--base) * 2);
  word-break: break-all;
}

/* Session 6 — the net worth summary. Monarch's structure (Part 8): the
   figure, the date and staleness readable at arm's length, without
   scrolling. Same tokens as the sign-in shell above — one typeface, one
   accent, one radius. Tabular figures throughout so columns align. */

body.report-body {
  display: block;
  align-items: initial;
  justify-content: initial;
  padding: calc(var(--base) * 3) calc(var(--base) * 2);
}

.report-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--base) * 4) calc(var(--base) * 3);
}

#gate {
  font-size: var(--size-body);
  color: var(--text-muted);
}

#gate[hidden] {
  display: none;
}

#content[hidden] {
  display: none;
}

/* A plain text link, not a button: no fill, no accent colour (Part 8 keeps
   the accent for the primary action). Tall enough to hit with a thumb. */
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: calc(var(--base) * 6);
  margin-bottom: calc(var(--base) * 1);
  font-size: var(--size-meta);
  color: var(--text-muted);
  text-decoration: underline;
}

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.report-controls {
  display: flex;
  gap: calc(var(--base) * 2);
  margin-bottom: calc(var(--base) * 2);
}

.report-controls > div {
  flex: 1;
}

.report-controls label {
  margin-bottom: calc(var(--base) * 0.5);
}

.report-controls select,
.report-controls input {
  width: 100%;
  font-size: var(--size-body);
  padding: calc(var(--base) * 1.25);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}

#rate-date {
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin: 0 0 calc(var(--base) * 2);
}

#rate-date[hidden] {
  display: none;
}

/* Session 7 (D-94): when the figures on screen were read. Same style as
   the rate date directly above it. */
#read-at {
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin: 0 0 calc(var(--base) * 2);
}

#read-at[hidden] {
  display: none;
}

.headline {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius);
  padding: calc(var(--base) * 2) calc(var(--base) * 1);
  margin: 0 0 calc(var(--base) * 2) calc(var(--base) * -1);
  cursor: pointer;
  font-family: inherit;
}

.headline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.headline[hidden] {
  display: none;
}

#headline-currency {
  display: block;
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin-bottom: calc(var(--base) * 0.5);
}

#headline-currency[hidden] {
  display: none;
}

#headline-amount {
  display: block;
  font-size: var(--size-headline);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

#withheld {
  font-size: var(--size-body);
  color: var(--text);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: calc(var(--base) * 1.5);
  margin: 0 0 calc(var(--base) * 2);
}

#withheld[hidden] {
  display: none;
}

#load-error[hidden] {
  display: none;
}

#lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.report-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px calc(var(--base) * 1.5);
  padding: calc(var(--base) * 1.5) 0;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.report-line-label {
  font-size: var(--size-body);
  color: var(--text);
  grid-column: 1;
}

.report-line-native {
  font-size: var(--size-meta);
  color: var(--text-muted);
  grid-column: 1;
}

.report-line-converted {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--size-body);
  color: var(--text);
  text-align: right;
}

.report-line-flag {
  display: inline-block;
  grid-column: 1 / -1;
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Session 7 (D-93): which build this page is, in small muted text at the
   foot of the card on every page. Filled in by app/build-id.js. */
.build-id {
  font-size: var(--size-meta);
  color: var(--text-muted);
  margin: calc(var(--base) * 3) 0 0;
  font-variant-numeric: tabular-nums;
}
