/* Duty Suite — the public pages (20.2). One family (Atkinson Hyperlegible, made for legibility), one memorable thing
   (the highlighter over your own name on the roster), everything else quiet. No inline scripts or styles: CSP. */

/* Atkinson Hyperlegible (OFL, fonts/OFL.txt) with one change: the zero's slash is removed and its two half-counters
   joined into one, so 0 is plain (2026-10-19). The O stays wider than the 0, so the two are still told apart. */
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #f6f8fb;
  --sheet: #ffffff;
  --ink: #1b2430;
  --muted: #5a6677;
  --rule: #d5dce6;
  --blue: #1f5fbf;
  --blue-soft: #e4edfa;
  --marker: #ffd95a;
  --marker-ink: #1b2430;
  --focus: #1f5fbf;
  /* a classical scale on an 18 px body */
  --s-1: 0.8333rem; /* 15 */
  --s0: 1rem;       /* 18 */
  --s1: 1.1667rem;  /* 21 */
  --s2: 1.3333rem;  /* 24 */
  --s3: 2rem;       /* 36 */
  --s4: 2.6667rem;  /* 48 */
  --s5: 3.3333rem;  /* 60 */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 34em;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121821;
    --sheet: #1a2230;
    --ink: #e8edf4;
    --muted: #a5b0bf;
    --rule: #2e3a4c;
    --blue: #7fb0ff;
    --blue-soft: #1e2d45;
    --marker: #f2c94c;
    --marker-ink: #1b2430;
    --focus: #9cc2ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: var(--s0); line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--sheet); }
.skip:focus { left: var(--gutter); z-index: 10; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(var(--s3), 6vw, var(--s5)); letter-spacing: -0.02em; }
h2 { font-size: clamp(var(--s2), 3.4vw, var(--s3)); }
h3 { font-size: var(--s1); }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--s1); color: var(--ink); }
.quiet { color: var(--muted); }
.small { font-size: var(--s-1); }

/* ---- the top bar ---- */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; flex-wrap: wrap; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: var(--s1); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px; background: var(--blue); color: #fff; font-size: var(--s-1); }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; }
.account { display: flex; gap: 0.6rem; align-items: center; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.5rem 1.15rem; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--blue); cursor: pointer; }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: #194e9c; border-color: #194e9c; }
.button.plain { background: transparent; color: var(--blue); }
.button.plain:hover { background: var(--blue-soft); }
@media (prefers-color-scheme: dark) { .button.primary { color: #0e1622; } .button.primary:hover { background: #a8c8ff; border-color: #a8c8ff; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.5rem 0 0.75rem; }

/* ---- the hero: a roster ----
   The words and the roster sit side by side only when the roster fits at its own width; otherwise the roster moves
   under the words. No breakpoint to keep in step with the tables: the words want 24rem, the roster wants its
   natural width (flex-basis auto = the table's max-content), and flex-wrap decides. */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero .wrap > div { flex: 1 1 24rem; min-width: 0; }

.roster { flex: 0 1 auto; margin: 0; min-width: 0; max-width: 100%; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 1.25rem 1.25rem 1rem; box-shadow: 0 1px 0 var(--rule), 0 14px 30px -18px rgba(27, 36, 48, 0.35); transform: rotate(-0.6deg); }
@media (prefers-reduced-motion: reduce) { .roster { transform: none; } }
.roster-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.roster-head strong { font-size: var(--s1); }
.roster-scroll { overflow-x: auto; }
.roster table { border-collapse: collapse; width: 100%; font-size: var(--s-1); }
.roster th, .roster td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.roster th { font-weight: 700; color: var(--muted); }
.roster tbody th { color: var(--ink); }
/* a row label's time ("Day 0700–1930", "Sun, Dec 7, 10 AM"): on the same line, or under it on a phone */
.roster .t::before { content: ' '; }
.roster .t.after-comma::before { content: ', '; }
/* the caption is the figure's, outside the scrolling table: it wraps to the roster's width and is never cut off
   (contain: inline-size keeps its one-line length out of the roster's natural width) */
.roster figcaption { contain: inline-size; padding-top: 0.75rem; color: var(--muted); font-size: var(--s-1); }
/* phones: the cells wrap so the whole roster shows without sideways scrolling */
@media (max-width: 640px) {
  .roster { padding: 1rem 0.75rem 0.85rem; }
  .roster table { font-size: 0.7778rem; } /* 14 px */
  .roster th, .roster td { white-space: normal; padding: 0.5rem 0.35rem; }
  .roster .phone-hide { display: none; }
  .roster .to { display: block; } /* a shift's end time under its start: 1800 / –0200 */ /* a column the caption does not talk about */
  .roster thead th, .roster td .mine, .roster td .open { white-space: nowrap; }
  .roster .t { display: block; white-space: nowrap; font-weight: 400; color: var(--muted); }
  .roster .t::before, .roster .t.after-comma::before { content: none; }
}
.open { color: var(--blue); font-style: italic; }

/* the highlighter: a felt-tip stroke laid over your own name, once, as the page arrives */
.mine { position: relative; z-index: 0; font-weight: 700; color: var(--marker-ink); }
.mine::before { content: ''; position: absolute; z-index: -1; left: -0.3em; right: -0.3em; top: 0.12em; bottom: 0.02em; background: var(--marker); border-radius: 0.25em 0.6em 0.3em 0.5em; transform: skewX(-8deg) scaleX(1); transform-origin: left center; animation: stroke 0.55s cubic-bezier(0.3, 0.7, 0.3, 1) both; }
.mine:nth-of-type(1)::before { animation-delay: 0.35s; }
tr:nth-child(2) .mine::before { animation-delay: 0.7s; }
tr:nth-child(4) .mine::before { animation-delay: 1.05s; }
@keyframes stroke { from { transform: skewX(-8deg) scaleX(0); } to { transform: skewX(-8deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .mine::before { animation: none; } }
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::before { content: ''; position: absolute; z-index: -1; left: -0.15em; right: -0.15em; bottom: 0.05em; height: 0.42em; background: var(--marker); border-radius: 0.2em; transform: skewX(-8deg); opacity: 0.85; }

/* ---- sections ---- */
.band { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }
.band.sheet { background: var(--sheet); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0 1rem; }
.steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue); font-weight: 700; }
.steps h3 { margin: 0.35rem 0 0.25rem; }
.steps p { margin: 0; color: var(--muted); }

.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.facts li { padding-left: 1.4rem; position: relative; max-width: var(--measure); }
.facts li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 0.55rem; height: 0.55rem; border-radius: 2px; background: var(--blue); }
.facts strong { display: block; }

/* a phone's list of "my duties" */
.phone { max-width: 22rem; margin: 0 auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 26px; padding: 1.1rem 1rem 1.25rem; box-shadow: 0 18px 40px -26px rgba(27, 36, 48, 0.45); }
.phone h3 { font-size: var(--s0); margin: 0.2rem 0.25rem 0.75rem; }
.duty { border-top: 1px solid var(--rule); padding: 0.75rem 0.25rem; display: grid; gap: 0.15rem; }
.duty .when { font-weight: 700; }
.duty .what { color: var(--muted); font-size: var(--s-1); }
.duty .state { font-size: var(--s-1); color: var(--blue); }

.sectors { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sectors li { border-bottom: 1px solid var(--rule); }
.sectors a { display: grid; grid-template-columns: minmax(10rem, 0.4fr) 1fr; gap: 0.25rem 2rem; padding: 1.1rem 0.25rem; color: var(--ink); text-decoration: none; }
.sectors a:hover .name { text-decoration: underline; text-decoration-thickness: 2px; }
.sectors .name { font-weight: 700; font-size: var(--s1); color: var(--blue); }
@media (max-width: 640px) { .sectors a { grid-template-columns: 1fr; } }

/* ---- pricing ---- */
.toggle { display: inline-flex; border: 2px solid var(--blue); border-radius: 10px; padding: 3px; gap: 3px; margin: 0.5rem 0 1.75rem; }
.toggle button { font: inherit; border: 0; background: transparent; color: var(--blue); padding: 0.45rem 1rem; border-radius: 7px; cursor: pointer; min-height: 2.5rem; }
.toggle button[aria-pressed='true'] { background: var(--blue); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { .toggle button[aria-pressed='true'] { color: #0e1622; } }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.plan + .plan { border-left: 1px solid var(--rule); }
@media (max-width: 860px) { .plan + .plan { border-left: 0; border-top: 1px solid var(--rule); } }
.plan h2 { font-size: var(--s2); margin: 0; }
.price { font-size: var(--s3); font-weight: 700; line-height: 1.1; }
.price small { font-size: var(--s0); font-weight: 400; color: var(--muted); }
.plan ul { margin: 0; padding-left: 1.1rem; }
.plan li { margin: 0.2rem 0; }
.plan .button { margin-top: auto; }
.when-year { display: none; }
body.yearly .when-year { display: inline; }
body.yearly .when-month { display: none; }
.faq dt { font-weight: 700; margin-top: 1.25rem; }
.faq dd { margin: 0.25rem 0 0; max-width: var(--measure); color: var(--muted); }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; color: var(--muted); font-size: var(--s-1); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot a { color: var(--muted); }

/* ---- 22.5: the developer page — prose with samples ---- */
.docs { display: grid; gap: 1.5rem; max-width: 52rem; }
.docs h2 { margin: 1rem 0 0; }
.docs p, .docs ul, .docs ol { margin: 0; }
.docs li + li { margin-top: 0.35rem; }
.docs code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--sheet); border: 1px solid var(--rule); border-radius: 0.3rem; padding: 0.05rem 0.3rem; }
.docs pre { margin: 0; padding: 1rem; overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 0.5rem; line-height: 1.45; }
.docs pre code { background: none; border: 0; padding: 0; font-size: var(--s-1); }
.docs table { border-collapse: collapse; width: 100%; }
.docs th, .docs td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
.docs .scroll { overflow-x: auto; }
