/* Pocketful website. Colors are the app's own (App/Resources/Assets.xcassets: paper, card, ink, muted,
   AccentColor, good, attention), light and dark, plus the app's Increase Contrast values under
   prefers-contrast: more. System fonts only: no web fonts, no third-party requests. */
:root {
  color-scheme: light dark;
  --paper: #f6f2ea;
  --card: #fffdf9;
  --ink: #241f1a;
  --muted: #5f574d;
  --accent: #176263;
  --good: #2b6a3a;
  --attention: #9a4a1b;
  --line: #e2dccf;
  --radius: 14px;
  --measure: 40rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161411;
    --card: #221f1b;
    --ink: #f5efe6;
    --muted: #b5aa9b;
    --accent: #7ccfc4;
    --good: #8bd39a;
    --attention: #f0a878;
    --line: #3a352f;
  }
}
@media (prefers-contrast: more) {
  :root { --paper: #faf7f0; --card: #ffffff; --ink: #000000; --muted: #463f37; --accent: #12504b; --good: #1f5029; --attention: #7c3810; --line: #8a8174; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --paper: #0d0c0a; --card: #1a1815; --ink: #ffffff; --muted: #d3c9bb; --accent: #a5e4db; --good: #b0e8ba; --attention: #ffc9a3; --line: #8a8174; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 1; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.125rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: inline-block; }
nav.site ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 16px; flex-wrap: wrap; }
nav.site a { display: inline-block; min-height: 44px; line-height: 44px; }
nav.site a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }

main { padding: 32px 0 48px; }
h1 { font-size: clamp(1.875rem, 6vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; line-height: 1.25; margin: 40px 0 12px; }
h3 { font-size: 1.0625rem; margin: 24px 0 6px; }
p, ul, ol, table { margin: 0 0 14px; }
.lead { font-size: 1.1875rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

.cta { display: inline-block; margin: 8px 0 4px; padding: 12px 20px; min-height: 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-weight: 600; }
.cta[aria-disabled="true"] { cursor: not-allowed; }

.states { list-style: none; padding: 0; display: grid; gap: 12px; }
.state { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.state strong { display: block; font-size: 1.0625rem; }
.state .example { display: block; margin-top: 2px; }
.state p { margin: 6px 0 0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 4px; }
.tag.attention { color: var(--attention); }
.tag.good { color: var(--good); }

.facts { padding-left: 1.2em; }
.facts li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }

.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--attention); border-radius: 8px; padding: 12px 14px; }

details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; min-height: 48px; padding: 12px 0; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }

footer.site { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 0.9375rem; color: var(--muted); }
footer.site ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 16px; }
footer.site a { display: inline-block; min-height: 44px; line-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
