/* Shared styles for the statement (brand) pages and the legal page. The home page has its own. */

@font-face { font-family: "Hind"; src: url("/assets/fonts/hind-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hind"; src: url("/assets/fonts/hind-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Hind"; src: url("/assets/fonts/hind-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f5f5f5;
  --surface: #fff;
  --ink: #000;
  --muted: #505050;
  --line: #dedede;
  --chip: #efefef;
  --rule: #000;
  --font: "Hind", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --surface: #111;
    --ink: #f2f2f2;
    --muted: #b3b3b3;
    --line: #2a2a2a;
    --chip: #1a1a1a;
    --rule: #8c8c8c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100svh; margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); }
body > main { flex: 1 0 auto; width: 100%; }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
}

/* ---- header / footer ---------------------------------------------------- */
.masthead { background: #000; border-bottom: 1px solid var(--line); }
.masthead .wrap { padding-block: 22px; }
.masthead a { display: inline-block; }
.masthead img { display: block; width: auto; height: 42px; }
.masthead a:focus-visible { outline: 2px solid #fff; outline-offset: 6px; border-radius: 2px; }

/* footer: full-width black band mirroring the masthead; text aligns with the content column */
.foot { background: #000; border-top: 1px solid var(--line); color: rgba(255, 255, 255, 0.72); font-size: 0.875rem; line-height: 1.5; }
.foot .wrap { padding-block: 24px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.foot li { white-space: nowrap; }
.foot li + li { margin-top: 0; }
.foot a { color: #fff; }
.foot a:focus-visible, .masthead a:focus-visible { outline-color: #fff; }

/* ---- type ----------------------------------------------------------------- */
main { padding-block: 56px 72px; }
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 { margin: 0 0 1.75rem; font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h2 { margin: 2.5rem 0 0.6rem; font-size: 1.4rem; font-weight: 700; line-height: 1.3; }
h3 { margin: 1.75rem 0 0.35rem; font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li + li { margin-top: 0.35rem; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--rule); outline-offset: 2px; border-radius: 2px; }
strong { font-weight: 600; }
.lead { margin: 0; font-size: 1.25rem; line-height: 1.55; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.descriptor {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--chip);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
/* other ways the same charge can appear, listed under the heading */
.also { margin: -0.75rem 0 1.75rem; color: var(--muted); }
.also .descriptor { margin: 0.25rem 0.35rem 0 0; color: var(--ink); font-size: 0.95rem; }

/* ---- statement page layout: text column + help panel --------------------- */
.layout { display: grid; grid-template-areas: "lead" "aside" "body"; gap: 2rem; }
.layout > .lead { grid-area: lead; max-width: 44rem; }
.layout > .body { grid-area: body; max-width: 44rem; }
.layout > .aside { grid-area: aside; }
.body > h2:first-child { margin-top: 0; }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 25rem; grid-template-areas: "lead aside" "body aside"; column-gap: 4rem; row-gap: 2.5rem; }
  .layout > .aside { position: sticky; top: 24px; align-self: start; }
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.facts dt, .facts dd { margin: 0; padding: 0.75rem 1rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dd { overflow-wrap: break-word; }
.facts dd.mono { font-size: 0.875rem; }

.aside-title { margin: 0 0 0.6rem; font-size: 1.1rem; }
.actions { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.actions li + li { margin-top: 0; }
.actions a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
}
.actions a::after { content: "\2192"; color: var(--muted); }
.actions a:hover { border-color: var(--muted); }
.actions .primary a { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.actions .primary a::after { color: inherit; }

.note { padding: 0.9rem 1rem; border-left: 3px solid var(--rule); border-radius: 0 8px 8px 0; background: var(--surface); }

/* ---- legal page: policy text + "on this page" panel (same grid as the brand pages) ---- */
.prose { max-width: 48rem; }
.layout.legal { grid-template-areas: "body" "aside"; }
.layout.legal > .body > h2:first-child { margin-top: 0; }
.toc { display: none; }
.toc + .aside-title { margin-top: 1.5rem; }
@media (min-width: 960px) {
  .layout.legal { grid-template-areas: "body aside"; }
  .toc { display: block; }
}
.summary { padding: 1rem 1rem 1rem 2.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.draft {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  background: #ffe9a8;
  color: #4a3800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ---- phones ----------------------------------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
  .masthead .wrap { padding-block: 16px; }
  .masthead img { height: 32px; }
  main { padding-block: 32px 48px; }
  .eyebrow { margin-bottom: 0.5rem; font-size: 0.75rem; }
  h1 { margin-bottom: 1.25rem; font-size: 1.75rem; line-height: 1.2; text-wrap: wrap; }
  /* the descriptor gets its own line, sized to fit the screen */
  h1 .descriptor { display: block; width: fit-content; max-width: 100%; margin-bottom: 0.4rem; padding: 0.15em 0.45em; font-size: clamp(1.05rem, 5.6vw, 1.6rem); }
  .also { margin: -0.5rem 0 1.25rem; font-size: 0.95rem; }
  .also .descriptor { font-size: 0.875rem; }
  .lead { font-size: 1.125rem; }
  h2 { margin-top: 2rem; font-size: 1.25rem; }
  .layout { gap: 1.5rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dt, .facts dd { padding-inline: 0.9rem; }
  .facts dt { padding-top: 0.6rem; padding-bottom: 0.1rem; }
  .facts dd { padding-top: 0; padding-bottom: 0.6rem; border-top: 0; }
  .actions a { padding: 0.8rem 0.9rem; }
  .summary { padding: 0.9rem 0.9rem 0.9rem 2rem; }
  .foot .wrap { padding-block: 20px; }
}
