/* The user-guide site's whole stylesheet.
 *
 * Starts as a copy of web/disclosures/styles.css so the guide and the policy read as one
 * site, with the guide's own rules (tables, code, the contents list) at the end. Dark
 * tokens are the dashboard's (web/public/styles.css) and light ones the app's
 * (Color.kt), so moving between reports. and disclosures. reads as one product. Unlike
 * the dashboard these pages are read, not operated, and are opened from a Play listing
 * on whatever phone the reader has, so they also honour a light system theme.
 */

:root {
  --bg: #091819;
  --surface: #10262A;
  --line: #1C3438;
  --text: #E6E3E5;
  --muted: #B5B0B3;
  /* Filled buttons take the brand orange, as on the dashboard. Text in orange takes the
     brighter step (OrangeBright in Color.kt): the base orange is under 4.5:1 on this
     background, which a page of links and headings cannot afford. */
  --accent: #CE5100;
  --on-accent: #FFFFFF;
  --accent-text: #FF8A45;
}

/* The app's light theme (OrangeDeepShade on SurfaceLight in Color.kt). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F5F6;
    --surface: #FFFFFF;
    --line: #E4E1E3;
    --text: #091819;
    --muted: #4A4649;
    --accent: #A34000;
    --on-accent: #FFFFFF;
    --accent-text: #A34000;
  }
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 32px 16px 48px;
  background: var(--bg); color: var(--text);
  line-height: 1.6;
}

main { max-width: 720px; margin: auto; }

header { margin-bottom: 28px; }
.brand { color: var(--accent-text); font-weight: 600; letter-spacing: 0.5px; text-decoration: none; font-size: 0.9rem; }
h1 { margin: 6px 0 4px; font-size: 1.7rem; line-height: 1.25; }
h2 { margin: 36px 0 8px; font-size: 1.15rem; color: var(--accent-text); }
h3 { margin: 20px 0 4px; font-size: 1rem; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0; }

p, li { overflow-wrap: anywhere; }
ul { padding-left: 1.25rem; }
li { margin: 4px 0; }
a { color: var(--accent-text); }
code { font-size: 0.9em; overflow-wrap: anywhere; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 16px 0;
}
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.links { list-style: none; padding: 0; }
.links li { margin: 0 0 12px; }
.links a {
  display: block; padding: 16px 18px; border-radius: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.links a strong { color: var(--accent-text); display: block; }
.links a span { color: var(--muted); font-size: 0.9rem; }

.button {
  display: inline-block; padding: 11px 18px; border-radius: 8px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}

footer { margin-top: 48px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 16px; }

/* --- The guide ------------------------------------------------------------------- */

.download { margin: 16px 0 0; }

.guide h2 {
  margin-top: 48px; padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  scroll-margin-top: 16px;
}
.guide h3 { scroll-margin-top: 16px; }
.guide hr { display: none; }
.guide ol { padding-left: 1.5rem; }

.guide code {
  background: var(--surface); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 4px;
}
.guide pre {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; overflow-x: auto;
}
.guide pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }

/* Wide tables scroll inside themselves rather than widening the page on a phone. */
.guide table { display: block; overflow-x: auto; border-collapse: collapse; margin: 12px 0 16px; }
.guide th, .guide td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.guide th { background: var(--surface); }

.guide blockquote {
  margin: 14px 0; padding: 8px 14px;
  background: var(--surface); border-left: 3px solid var(--accent); color: var(--muted);
}
.guide blockquote p { margin: 0; }
