@font-face{font-family:"Comic Neue";font-weight:400;font-display:block;src:url("./ComicNeue-400.woff2") format("woff2");}
@font-face{font-family:"Comic Neue";font-weight:700;font-display:block;src:url("./ComicNeue-700.woff2") format("woff2");}

:root {
  --paper: rgb(247, 241, 227);
  --paper-card: #fbf7ec;
  --paper-deep: #efe6d2;
  --ink: #332f27;
  --ink-soft: #7c7264;
  --line: rgba(51, 47, 39, 0.16);
  --line-strong: rgba(51, 47, 39, 0.4);
  --navy: #274690;
  --stamp: #b8472e;
  --good: #3f8f5f;
  --warn: #a8741a;
  --maxw: 880px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--paper); }

/* smooth cross-page navigation (Chrome/Safari; others fall back to the fade below) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Comic Neue", Avenir, Helvetica, sans-serif;
  font-size: 17.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 60%, rgba(51, 47, 39, 0.05));
  z-index: 0;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(30px, 5vw, 44px); margin: 10px 0 8px; }
h2 { font-size: clamp(23px, 3.4vw, 30px); margin: 44px 0 14px; }
h3 { font-size: 20px; margin: 26px 0 10px; }
p { margin: 0 0 14px; }
strong { font-weight: 700; }
.soft { color: var(--ink-soft); }
.perf { border: 0; border-top: 2px dashed var(--line-strong); margin: 34px 0; opacity: 0.6; }

/* ── sticky header ── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mk { width: 30px; height: 30px; border-radius: 26%; object-fit: cover; display: block; flex: none; box-shadow: 2px 2px 0 rgba(51, 47, 39, 0.14); }
.brand .wordmark { font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.brand small { color: var(--ink-soft); font-weight: 400; font-size: 13px; margin-left: 2px; }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { font-weight: 700; font-size: 15px; padding: 3px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { text-decoration: none; border-color: var(--navy); }
.site-nav a[aria-current="page"] { border-color: var(--navy); }

/* ── page intro ── */
.intro { padding: 34px 0 6px; }
.stamp-label {
  display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--navy); border: 2px solid var(--navy); border-radius: 6px; padding: 4px 10px; transform: rotate(-1.4deg);
}
.stamp-label.red { color: var(--stamp); border-color: var(--stamp); transform: rotate(1.2deg); }
.intro .lede { color: var(--ink-soft); font-size: 18px; max-width: 56ch; margin-top: 6px; }

/* ── cards ── */
.card {
  background: var(--paper-card); border: 2px solid var(--ink); border-radius: 14px;
  padding: 20px 22px; box-shadow: 4px 5px 0 rgba(51, 47, 39, 0.1); margin: 18px 0;
}
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* home tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.tile {
  display: block; background: var(--paper-card); border: 2px solid var(--ink); border-radius: 14px;
  padding: 20px 22px; box-shadow: 4px 5px 0 rgba(51, 47, 39, 0.1); color: var(--ink);
  transition: transform .12s;
}
.tile:hover { transform: translateY(-3px); text-decoration: none; }
.tile .no { font-size: 13px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px dashed var(--line-strong); padding-bottom: 8px; margin-bottom: 10px; }
.tile h3 { margin: 0 0 4px; font-size: 20px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ── callouts ── */
.callout {
  border: 2px solid var(--line-strong); border-left: 6px solid var(--navy); border-radius: 10px;
  background: rgba(39, 70, 144, 0.05); padding: 13px 16px; margin: 16px 0; font-size: 16.5px;
}
.callout.red { border-left-color: var(--stamp); background: rgba(184, 71, 46, 0.06); }
.callout.green { border-left-color: var(--good); background: rgba(63, 143, 95, 0.07); }
.callout > :last-child { margin-bottom: 0; }

/* ── tables ── */
.tbl-scroll { overflow-x: auto; margin: 16px 0; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-card); box-shadow: 4px 5px 0 rgba(51, 47, 39, 0.1); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); border-bottom: 2px dashed var(--line-strong); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td b, td strong { color: var(--navy); }

/* status marks */
.ok { color: var(--good); font-weight: 700; white-space: nowrap; }
.maybe { color: var(--warn); font-weight: 700; white-space: nowrap; }
.no-x { color: var(--stamp); font-weight: 700; white-space: nowrap; }

/* ── triage ladder ── */
.ladder { list-style: none; counter-reset: rung; margin: 20px 0; padding: 0; }
.ladder > li {
  counter-increment: rung; position: relative;
  background: var(--paper-card); border: 2px solid var(--ink); border-radius: 14px;
  padding: 16px 18px 16px 66px; margin: 0 0 26px; box-shadow: 4px 5px 0 rgba(51, 47, 39, 0.1);
}
.ladder > li::before {
  content: counter(rung); position: absolute; left: 16px; top: 15px;
  width: 34px; height: 34px; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; color: var(--paper-card);
  background: var(--navy); border: 2px solid var(--ink); border-radius: 50%;
}
.ladder > li:not(:last-child)::after {
  content: "all good? next rung ↓"; position: absolute; left: 66px; bottom: -23px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
}
.ladder .q { font-weight: 700; font-size: 18px; margin: 0 0 4px; }
.ladder .fail { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.ladder .fail b { color: var(--stamp); }

/* ── playbook accordions ── */
details.play {
  background: var(--paper-card); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 4px 5px 0 rgba(51, 47, 39, 0.1); margin: 14px 0; overflow: hidden;
}
details.play > summary {
  cursor: pointer; list-style: none; padding: 15px 18px; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; gap: 12px;
}
details.play > summary::-webkit-details-marker { display: none; }
details.play > summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--navy); flex: none; }
details.play[open] > summary::after { content: "–"; }
details.play[open] > summary { border-bottom: 2px dashed var(--line-strong); }
details.play .body { padding: 14px 18px 18px; }
details.play .body > :first-child { margin-top: 0; }
details.play .body > :last-child { margin-bottom: 0; }
details.play .body .tbl-scroll { border-width: 1.5px; box-shadow: none; }
.pb-tag {
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--navy); border: 2px solid var(--navy); border-radius: 6px; padding: 2px 8px;
}
.pb-note { font-weight: 400; font-size: 14px; color: var(--ink-soft); }

/* ── ordered checklists ── */
ol.checks { margin: 12px 0; padding-left: 24px; }
ol.checks li { margin: 7px 0; }
ul.dots { margin: 12px 0; padding-left: 22px; }
ul.dots li { margin: 7px 0; }

/* ── do / don't ── */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.dodont .card { margin: 0; }
.dodont h3 { margin-top: 0; }
.dodont .do h3 { color: var(--good); }
.dodont .dont h3 { color: var(--stamp); }
.dodont ul { margin: 0; padding-left: 20px; }
.dodont li { margin: 8px 0; font-size: 16px; }

/* ── snippets: tap anywhere on the card to copy ── */
.snippet { position: relative; cursor: pointer; transition: transform .12s; }
.snippet:hover { transform: translateY(-2px); }
.snippet blockquote { margin: 10px 0 0; padding: 12px 15px; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--paper); font-size: 16px; }
.copy-hint {
  position: absolute; top: 18px; right: 18px; pointer-events: none;
  font-weight: 700; font-size: 13px; color: var(--ink-soft);
}
.snippet:hover .copy-hint { color: var(--navy); }
.snippet.copied { border-color: var(--good); }
.snippet.copied .copy-hint { color: var(--good); }

/* ── code-ish bits ── */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
  white-space: nowrap;
}
.flow { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; font-size: 14.5px; margin: 10px 0; }
.flow .st { font-weight: 700; background: var(--paper-deep); border: 1.5px solid var(--line-strong); border-radius: 8px; padding: 3px 10px; white-space: nowrap; }
.flow .ar { color: var(--ink-soft); font-weight: 700; padding: 0 2px; }
.flow .st.err { color: var(--stamp); border-color: var(--stamp); }

/* mini toc */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.toc a {
  font-size: 14px; font-weight: 700; border: 2px solid var(--line-strong); border-radius: 999px;
  padding: 5px 13px; color: var(--ink); background: var(--paper-card);
}
.toc a:hover { text-decoration: none; border-color: var(--navy); color: var(--navy); }

/* atli corner mascot */
.atli-corner { float: right; width: 104px; height: auto; margin: -8px 0 10px 18px;
  animation: bob 3.8s ease-in-out infinite; transform-origin: center bottom; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(-2deg); } }

/* ── search ── */
.search-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-weight: 700; font-size: 15px; color: var(--ink);
  background: var(--paper-card); border: 2px solid var(--line-strong); border-radius: 10px;
  padding: 5px 12px; cursor: pointer; transition: transform .12s;
}
.search-btn:hover { transform: translateY(-1px); border-color: var(--navy); color: var(--navy); }
.search-btn kbd {
  font-family: inherit; font-size: 12px; font-weight: 700; color: var(--ink-soft);
  border: 1.5px solid var(--line-strong); border-radius: 5px; padding: 0 5px; line-height: 1.5;
}
.search-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(51, 47, 39, 0.35);
  display: grid; justify-items: center; align-items: start; padding: 9vh 16px 16px;
}
.search-overlay[hidden] { display: none; }
.search-panel {
  width: 100%; max-width: 620px; background: var(--paper-card);
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 6px 8px 0 rgba(51, 47, 39, 0.25);
  padding: 14px; display: flex; flex-direction: column; max-height: 76vh;
}
.search-input {
  font-family: inherit; font-size: 18px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line-strong); border-radius: 10px;
  padding: 11px 14px; width: 100%;
}
.search-input:focus { border-color: var(--navy); outline: none; }
.search-results { overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.search-hit {
  display: block; border: 2px solid var(--line); border-radius: 10px; padding: 9px 12px;
  color: var(--ink); background: var(--paper);
}
.search-hit:hover { text-decoration: none; border-color: var(--line-strong); }
.search-hit.sel { border-color: var(--navy); background: rgba(39, 70, 144, 0.05); }
.hit-page {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--navy); border: 1.5px solid var(--navy); border-radius: 5px; padding: 0 6px; margin-bottom: 3px;
}
.hit-head { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; }
.hit-snip { display: block; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.search-hit mark { background: rgba(39, 70, 144, 0.16); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { margin: 4px 2px 0; color: var(--ink-soft); font-size: 15px; }
.search-hint { display: flex; gap: 16px; margin-top: 10px; padding: 0 2px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
body.search-open { overflow: hidden; }

/* footer */
footer { padding: 40px 0 46px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 14.5px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.page-enter { animation: fadeIn .2s ease-out both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* browsers with view transitions crossfade natively; skip the extra fade so pages don't double-animate */
@supports (view-transition-name: none) {
  .page-enter { animation: none; }
}

@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  html { scroll-padding-top: 70px; }
  .site-head .wrap { padding-top: 9px; padding-bottom: 9px; gap: 10px; }
  /* logo-only brand so the menu fits on one row */
  .brand .wordmark, .brand small { display: none; }
  .site-nav { flex-wrap: nowrap; justify-content: flex-start; gap: 9px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { font-size: 13px; white-space: nowrap; flex: none; }
  .search-btn { flex: none; }
  .search-btn { padding: 4px 9px; }
  .search-btn .lbl, .search-btn kbd { display: none; }
  .intro { padding-top: 22px; }
  .intro .lede { font-size: 16.5px; }
  h2 { margin-top: 34px; }
  .card { padding: 15px 16px; }
  .tiles, .dodont { grid-template-columns: 1fr; gap: 14px; }
  .atli-corner { width: 74px; margin-left: 12px; }
  th, td { padding: 8px 10px; font-size: 14.5px; }
  .tbl-scroll, .card, .tile, details.play, .ladder > li { box-shadow: 3px 4px 0 rgba(51, 47, 39, 0.1); }
  details.play > summary { padding: 13px 14px; font-size: 16.5px; }
  details.play .body { padding: 12px 14px 15px; }
  .ladder > li { padding: 13px 14px 13px 54px; }
  .ladder > li::before { left: 11px; width: 30px; height: 30px; font-size: 15px; }
  .ladder > li:not(:last-child)::after { left: 54px; }
  .ladder .q { font-size: 16.5px; }
  .flow .st { font-size: 13px; }
  .copy-hint { top: 15px; right: 15px; }
  .search-overlay { padding: 12px; align-items: stretch; }
  .search-panel { max-height: calc(100dvh - 24px); }
  .search-hint { display: none; }
}
@media (max-width: 460px) {
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } scroll-behavior: auto; }
