/* Headstory Animation - site styles. No external fonts, scripts or trackers. */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --border: #ecdccb;
  --text: #15173d;
  --muted: #4a4d72;
  --link: #3a3fb0;
  --accent: #e5533f;
  --chip: #fff0e3;
  --shadow: 0 1px 2px rgba(21, 23, 61, 0.06), 0 6px 20px rgba(21, 23, 61, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1030;
    --surface: #171a45;
    --border: #2b2f6e;
    --text: #fff3e2;
    --muted: #c9c4dc;
    --link: #b3b5ff;
    --accent: #ff8a7e;
    --chip: #22265c;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1030;
  --surface: #171a45;
  --border: #2b2f6e;
  --text: #fff3e2;
  --muted: #c9c4dc;
  --link: #b3b5ff;
  --accent: #ff8a7e;
  --chip: #22265c;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site { padding: 28px 0 8px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.brand .name { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.01em; line-height: 1.2; }
.brand .tag { color: var(--muted); font-size: 0.95rem; }
nav.top { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 0.95rem; }
nav.top a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main { padding: 8px 0 40px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 32px 0 8px; }
h3 { font-size: 1.05rem; margin: 20px 0 4px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
code { font: 0.86em/1.4 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.lead { font-size: 1.1rem; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.92rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }

table.scopes { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.scopes th, table.scopes td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--border); }
table.scopes th { color: var(--muted); font-weight: 600; border-top: none; }
@media (max-width: 560px) {
  table.scopes, table.scopes tbody, table.scopes tr, table.scopes td { display: block; width: 100%; }
  table.scopes thead { display: none; }
  table.scopes tr { border-top: 1px solid var(--border); padding: 6px 0; }
  table.scopes td { border-top: none; padding: 2px 0; }
}

.contact { font-weight: 600; }
footer.site { border-top: 1px solid var(--border); padding: 18px 0 32px; color: var(--muted); font-size: 0.9rem; }
footer.site a { color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
