/* E-Shot Media: one stylesheet, mobile first. System fonts only. */

:root {
  --paper: #f7f3ea;
  --card: #fffdf8;
  --paper-2: #efe8d9;
  --ink: #1b2230;
  --ink-2: #4a5263;
  --line: #d9cfbc;
  --red: #b3261e;        /* postbox red */
  --blue: #1f4a8a;       /* airmail blue */
  --link: #1a4f9c;
  --link-visited: #5b3a8e;
  --focus: #e0a800;
  --code-bg: #1d2433;
  --code-ink: #e8edf6;
  --tip: #e6efe4;
  --tip-line: #3d7a46;
  --warn: #f8e6df;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141a24;
    --card: #1b2230;
    --paper-2: #202938;
    --ink: #ece6da;
    --ink-2: #b7b0a3;
    --line: #364055;
    --red: #ff8478;
    --blue: #8fb4ff;
    --link: #9fc1ff;
    --link-visited: #c9b0f5;
    --focus: #ffd24d;
    --code-bg: #0d1118;
    --code-ink: #e8edf6;
    --tip: #1d2d22;
    --tip-line: #79c486;
    --warn: #35201d;
  }
}

*, *::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.65 var(--sans);
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin: .2em 0 .35em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 1.9rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.5em 0 .4em; }
p, ul, ol, dl { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--paper-2); padding: .1em .3em; border-radius: 3px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: 8px; color: var(--paper); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-2); }
.plain { list-style: none; padding: 0; margin: 0; }

/* Airmail stripe: the envelope border motif */
.airmail {
  height: 7px;
  background: repeating-linear-gradient(-45deg,
    var(--red) 0 14px, transparent 14px 22px, var(--blue) 22px 36px, transparent 36px 44px);
}

/* Header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 14px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:visited { color: var(--ink); }
.brand-env { width: 46px; height: 35px; color: var(--ink); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; letter-spacing: -.01em; }
.brand-name span { color: var(--red); }
.brand-tag { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }
.mainnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; }
.mainnav a { display: block; padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; border-radius: var(--radius); }
.mainnav a:visited { color: var(--ink); }
.mainnav a:hover { background: var(--paper-2); }
.mainnav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); }

/* Footer */
.site-foot { margin-top: 3rem; background: var(--paper-2); border-top: 1px solid var(--line); font-size: .95rem; }
.foot-grid { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 12px; }
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin-bottom: .5em; }
.foot-env { width: 34px; height: 26px; color: var(--ink); }
.foot-h { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .6em; color: var(--ink-2); }
.site-foot li { margin: 0 0 .35em; }
.foot-base { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 18px; color: var(--ink-2); font-size: .88rem; }
.foot-base p { margin: 0; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1.2fr 1.2fr 1fr; } }

/* Buttons */
.btn { display: inline-block; padding: 11px 18px; border-radius: var(--radius); background: var(--red); color: #fff; font-weight: 700; text-decoration: none; border: 2px solid var(--red); }
.btn:visited { color: #fff; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) { .btn { color: #1b0b09; } .btn:visited { color: #1b0b09; } }

/* Common page heads */
.page-head, .article-head { padding: 1.5rem 0 .5rem; }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--red); margin: 0 0 .3em; }
.standfirst { font-family: var(--serif); font-size: clamp(1.15rem, 2.6vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: 46em; }
.postmark { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--ink-2); }
.postmark span { border: 1.5px dashed var(--line); border-radius: 999px; padding: 2px 12px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 1rem 0 0; font-size: .88rem; color: var(--ink-2); }
.crumbs li + li::before { content: "\203A"; margin-right: 4px; color: var(--ink-2); }

/* Home */
.hero { padding: 2rem 0 1rem; display: grid; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.hero .standfirst { margin-bottom: 1.2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 1fr; padding-top: 3rem; } }

/* The envelope card */
.envelope {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(0,0,0,.35);
}
.envelope::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; border-radius: var(--radius) var(--radius) 0 0;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, transparent 10px 16px, var(--blue) 16px 26px, transparent 26px 32px);
}
.envelope-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 6px 0 10px; font-family: var(--sans); font-weight: 700; }

/* Inbox previews (start-here path, subject line examples) */
.inbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 1.2em 0 1.6em; overflow: hidden; }
.envelope .inbox { margin: 0; }
.inbox-row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 14px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.inbox-row:first-child { border-top: 0; }
.inbox-row .from { font-weight: 700; font-size: .92rem; }
.inbox-row .when { font-size: .8rem; color: var(--ink-2); text-align: right; }
.inbox-row .subj { grid-column: 1 / -1; font-weight: 600; }
.inbox-row .pre { grid-column: 1 / -1; color: var(--ink-2); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.inbox-row:visited { color: var(--ink); }
a.inbox-row:hover { background: var(--paper-2); }
a.inbox-row:hover .subj { text-decoration: underline; }
a.inbox-row .subj::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 8px; vertical-align: middle; }

/* Sections and cards */
.band { padding: 1.5rem 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.sec-head h2 { margin-bottom: .3em; }
.card-grid { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
}
.card h3 { margin: .1em 0 .4em; font-size: 1.2rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card:hover { border-color: var(--ink-2); }
.card:hover h3 a { text-decoration: underline; }
.card p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.card .kicker { color: var(--red); font-size: .72rem; }
.card .stamp {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 46px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; color: var(--red); font-size: 1.1rem;
  border: 2px dotted var(--red); border-radius: 3px; background: var(--paper);
}
.card.has-stamp h3, .card.has-stamp .kicker { padding-right: 52px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); margin-top: 10px; }

/* Articles */
.article-grid { display: grid; gap: 24px; }
.prose { max-width: 70ch; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose li { margin-bottom: .35em; }
.prose h2 { padding-top: .6em; border-top: 1px solid var(--line); }
.toc { font-size: .93rem; border-left: 3px solid var(--red); padding: 2px 0 2px 14px; }
.toc-h { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 0 0 .5em; border: 0; padding: 0; }
.toc ol { padding-left: 1.2em; margin: 0; }
.toc li { margin-bottom: .3em; }
@media (min-width: 1000px) {
  .article-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
  .toc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; }
}
.related { margin-top: 2.5rem; }

.callout { background: var(--tip); border-left: 4px solid var(--tip-line); padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4em 0; }
.callout.warn { background: var(--warn); border-left-color: var(--red); }
.callout > :last-child { margin-bottom: 0; }
.callout-h { font-weight: 700; margin: 0 0 .3em; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.example { border: 1.5px dashed var(--line); background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin: 1.4em 0; }
.example > :last-child { margin-bottom: 0; }
.example-h { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin: 0 0 .4em; }

ol.steps { list-style: none; counter-reset: step; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: .9em; min-height: 32px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--red); border: 2px solid var(--red); background: var(--card);
}

ul.checks { list-style: none; padding: 0; }
ul.checks > li { position: relative; padding-left: 30px; margin-bottom: .5em; }
ul.checks > li::before { content: ""; position: absolute; left: 4px; top: .35em; width: 14px; height: 8px; border-left: 3px solid var(--tip-line); border-bottom: 3px solid var(--tip-line); transform: rotate(-45deg); }

ul.checklist { list-style: none; padding: 0; }
ul.checklist > li { border-bottom: 1px solid var(--line); }
ul.checklist label { display: grid; grid-template-columns: 26px 1fr; gap: 0 10px; padding: 10px 0; cursor: pointer; }
ul.checklist input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--red); }
ul.checklist .why { grid-column: 2; display: block; color: var(--ink-2); font-size: .92rem; }
ul.checklist input:checked + * { text-decoration: line-through; text-decoration-color: var(--ink-2); }

pre { background: var(--code-bg); color: var(--code-ink); padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: .86rem; line-height: 1.55; margin: 1.2em 0 1.5em; tab-size: 2; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; white-space: pre; }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--paper-2); font-size: .85rem; }
tbody tr:last-child > * { border-bottom: 0; }
.compare th[scope="row"] { white-space: nowrap; }

a.ext::after { content: "\2009\2197"; font-size: .8em; text-decoration: none; display: inline-block; }

/* Tool profile */
.factcard { margin: 0 0 1.5rem; }
.factcard dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.factcard dt { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.factcard dd { margin: 0; }
.profile-grid { display: grid; gap: 28px; }
@media (min-width: 1000px) { .profile-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; } .profile-grid .factcard { position: sticky; top: 16px; } }

/* Glossary */
.az ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 1rem 0 1.5rem; }
.az a { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; font-weight: 700; }
.gloss-letter h2 { font-size: 2rem; color: var(--red); border-bottom: 1px solid var(--line); padding-bottom: .2em; }
dl.gloss dt { font-weight: 700; font-family: var(--serif); font-size: 1.12rem; margin-top: 1em; scroll-margin-top: 12px; }
dl.gloss dt:target { background: var(--paper-2); outline: 2px dashed var(--red); outline-offset: 4px; }
dl.gloss dd { margin: .2em 0 0; color: var(--ink); }

/* 404 */
.error-page { padding-top: 2.5rem; }
.bounce-code { font-family: var(--mono); color: var(--red); font-weight: 700; margin: 0; }
.link-list li { margin-bottom: .4em; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .site-head nav, .site-foot, .fiveod-wrap, .toc, .related, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  pre { white-space: pre-wrap; }
}
.lead { font-size: 1.15rem; }
.card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card .card-link:focus-visible { outline: none; }
.card:hover .card-link { text-decoration: underline !important; }
