/* ihasmail.org — "stickers and stamps"

   The look is lifted from the cat itself. The mark is a flat drawing with a
   thick ink outline, in the cat's orange (#F9A34B) and the envelope's teal
   (#46CAC3), so the site is drawn the same way: ink outlines, hard offset
   shadows rather than soft ones, and the furniture of the post -- perforated
   stamp edges, airmail stripes, a wavy cancel line under the one word that
   matters. Silly name, serious mail: the drawing is playful, the type is a
   serious serif.

   Dark is the base definition on :root, and it is what everybody gets until
   they say otherwise -- the system preference is deliberately not consulted.
   Light exists only under [data-theme="light"], which the toggle sets and
   localStorage remembers. Every token is defined in the dark block, so none
   can go missing there.

   Navigation is a tab bar along the bottom, the way the app itself works on a
   phone, with a compose button beside it (it opens the demo). More opens the
   mailbox: everything on the site in folders, with a search line on top. */

:root {
  --paper: #0f2a38;
  --paper-2: #0b2230;
  --card: #163a4b;
  --card-2: #1b4557;
  --line: #03111a;
  --rule: #24505f;

  --text: #f7f0e3;
  --muted: #bccfd3;
  --faint: #93b1b8;

  --teal: #46cac3;
  --teal-ink: #6fdcd6;
  --orange: #f9a34b;
  --orange-ink: #fbb56b;
  --on-fill: #0b2230;
  --stamp: #f7f0e3;
  --night: #07171f;

  --dot: rgba(0, 0, 0, 0.24);
  --code-bg: #0b2230;

  --lift-sm: 2px 2px 0 var(--line);
  --lift: 4px 4px 0 var(--line);
  --lift-lg: 7px 7px 0 var(--line);

  --airmail: repeating-linear-gradient(-45deg,
      var(--teal) 0 10px, var(--stamp) 10px 16px,
      var(--orange) 16px 26px, var(--stamp) 26px 32px);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ui: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --dock-h: 66px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --paper: #fbf5ea;
  --paper-2: #f3e9d6;
  --card: #fffdf8;
  --card-2: #ffffff;
  --line: #1c4053;
  --rule: #e2d4bb;

  --text: #15323f;
  --muted: #44606b;
  --faint: #5a727c;

  --teal: #46cac3;
  --teal-ink: #0b6b67;
  --orange: #f9a34b;
  --orange-ink: #9c580c;
  --on-fill: #12303d;
  --stamp: #fffdf8;
  --night: #1c4053;

  --dot: rgba(28, 64, 83, 0.13);
  --code-bg: #f3e9d6;
  color-scheme: light;
}

/* ---- faces ---- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-soft.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-soft-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/archivo-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('fonts/archivo-latin-ext-var.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  color: var(--text);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100;
  color: var(--text);
  line-height: 1.12;
}
h3, h4 { font-weight: 650; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
code, .mono { font-family: var(--mono); }
code { background: var(--code-bg); border-radius: 5px; padding: 1px 6px; font-size: 0.9em; }
strong { color: var(--text); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 90;
  background: var(--teal); color: var(--on-fill); font-weight: 700;
  padding: 10px 16px; border: 2px solid var(--line); border-radius: 10px; box-shadow: var(--lift-sm);
}
.skip:focus { left: 8px; }

.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

pre.cmd {
  margin: 16px 0; padding: 14px 16px;
  background: var(--code-bg); border: 2px solid var(--line); border-radius: 10px;
  overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
}
pre.cmd code { background: none; padding: 0; font: inherit; white-space: pre; }
pre.cmd .c { color: var(--faint); }

/* ---- the stamp edge ----
   A perforated edge is a mask: solid in the content box, and a grid of holes
   in the padding band around it, positioned so each hole straddles the edge.
   A mask also cuts off any shadow, so the hard shadow comes from a
   drop-shadow filter on the element and the stamp itself is its pseudo. */
.card .icon::before, .tile .icon::before, .eyebrow::after, .ftile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--stamp-fill, var(--teal));
  padding: var(--perf, 3px);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, #0000 calc(var(--perf, 3px) * 0.62), #000 calc(var(--perf, 3px) * 0.62 + 0.6px))
      calc(var(--perf, 3px) * -1) calc(var(--perf, 3px) * -1) / calc(var(--perf, 3px) * 2) calc(var(--perf, 3px) * 2) round;
  mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, #0000 calc(var(--perf, 3px) * 0.62), #000 calc(var(--perf, 3px) * 0.62 + 0.6px))
      calc(var(--perf, 3px) * -1) calc(var(--perf, 3px) * -1) / calc(var(--perf, 3px) * 2) calc(var(--perf, 3px) * 2) round;
}

/* ---- buttons: stickers you can press ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px;
  font-family: var(--ui); font-weight: 700; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  border: 2px solid var(--line); box-shadow: var(--lift-sm);
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--lift); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--line); }
.btn-primary { background: var(--teal); color: var(--on-fill); }
.btn-ghost { background: var(--card); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-sponsor .i { width: 15px; height: 15px; stroke: #db61a2; }
.btn-sponsor:hover .i { fill: #db61a2; }
.btn-swag .i { width: 15px; height: 15px; }
@media (max-width: 680px) { .btn-swag { display: none; } }

kbd {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1.5px solid var(--rule); border-bottom-width: 3px; border-radius: 6px;
  padding: 1px 6px; background: var(--paper-2); white-space: nowrap;
}

/* ---- the inbuxa bar ----
   One line above everything, on the night ink, with an airmail edge. */
.stack-bar { background: var(--night); position: relative; }
.stack-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--airmail); }
.stack-bar a {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 46px; padding: 8px 0 13px;
  color: #d8e6e8; text-decoration: none; font-size: 14px; line-height: 1.4;
}
.stack-bar .stack-new {
  flex: none; font-family: var(--ui); font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: #12303d; background: var(--orange);
  border-radius: 6px; padding: 2px 8px; transform: rotate(-3deg);
}
.stack-bar b.inbuxa { color: #fbb56b; font-weight: 800; }
.stack-bar .stack-go { flex: none; font-weight: 700; color: #6fdcd6; white-space: nowrap; }
.stack-bar .stack-go span { display: inline-block; transition: transform .15s; }
.stack-bar a:hover .stack-go span { transform: translateX(3px); }
.stack-bar a:hover { color: #fff; }
.stack-bar .stack-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stack-bar .stack-short { display: none; }
@media (max-width: 760px) {
  .stack-bar .stack-full { display: none; }
  .stack-bar .stack-short { display: inline; }
}
@media (max-width: 420px) {
  .stack-bar a { gap: 8px; font-size: 13px; }
  .stack-bar .stack-go { font-size: 0; }
  .stack-bar .stack-go span { font-size: 14px; }
}

/* ---- masthead ----
   Not sticky: the tab bar is the navigation, so the top of the page only has
   to say whose page it is. */
.masthead-in { display: flex; align-items: center; gap: 16px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .mark { height: 46px; width: auto; display: block; transition: transform .2s; }
.brand:hover .mark { transform: rotate(-6deg) scale(1.04); }
.brand .wordmark {
  font-family: var(--display); font-variation-settings: "SOFT" 100;
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
}
.masthead-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--card); border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--lift-sm);
}
.seg button {
  display: inline-grid; place-items: center; width: 32px; height: 28px;
  background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 16px;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--orange); color: #12303d; }
@media (max-width: 560px) { .btn-sponsor { display: none; } .brand .wordmark { font-size: 24px; } }

/* ---- the tab bar ---- */
.dock {
  position: fixed; z-index: 50;
  left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: stretch; gap: 10px;
  max-width: calc(100vw - 24px);
}
.dock-track {
  position: relative; display: flex; align-items: stretch; gap: 2px;
  padding: 6px; height: var(--dock-h);
  background: var(--card); border: 2px solid var(--line); border-radius: 18px;
  box-shadow: var(--lift);
}
.dock-item {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px; border-radius: 12px; border: 0; background: none;
  font-family: var(--ui); font-weight: 650; font-size: 14px; white-space: nowrap;
  color: var(--muted); text-decoration: none; cursor: pointer;
  transition: color .2s;
}
.dock-item .i { font-size: 18px; }
.dock-item:hover { color: var(--text); }
.dock-item.here { color: var(--on-fill); }
.dock-item[hidden] { display: none; }
.dock-short { display: none; }
.dock-more { margin-left: 4px; }
.dock-more::before { content: ""; position: absolute; left: -3px; top: 10px; bottom: 10px; border-left: 2px dashed var(--rule); }

/* The lit tab is a teal sticker that slides to whichever section you are
   reading. The script sizes and places it; without it, .here simply goes teal. */
.dock-pill {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0;
  background: var(--teal); border: 2px solid var(--line); border-radius: 12px;
  opacity: 0;
  transition: transform .38s cubic-bezier(.3, 1.35, .5, 1), width .38s cubic-bezier(.3, 1.35, .5, 1), opacity .2s;
}
.dock-pill.is-on { opacity: 1; }
html:not(.js) .dock-item.here { background: var(--teal); }

.dock-compose {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0 20px; height: var(--dock-h);
  background: var(--orange); color: #12303d;
  border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift);
  font-family: var(--ui); font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
}
.dock-compose .i { font-size: 20px; }
.dock-compose:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: var(--lift-lg); }

@media (max-width: 1240px) { .dock-extra { display: none; } }

/* On a phone it is the app's own bottom bar: full width, icons over short
   labels, and compose as the round button floating above it. */
@media (max-width: 760px) {
  :root { --dock-h: 62px; }
  .dock { left: 10px; right: 10px; transform: none; max-width: none; }
  .dock-track { flex: 1; justify-content: space-between; padding: 5px; }
  .dock-item { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; padding: 0 2px; font-size: 11px; }
  .dock-item .i { font-size: 20px; }
  .dock-long { display: none; }
  .dock-short { display: inline; }
  .dock-pill { top: 5px; bottom: 5px; }
  .dock-more { margin-left: 0; }
  .dock-more::before { display: none; }
  .dock-compose {
    position: fixed; right: 16px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--dock-h) + 14px);
    width: 58px; height: 58px; padding: 0; justify-content: center; border-radius: 18px;
  }
  .dock-compose-label { display: none; }
  .dock-compose .i { font-size: 24px; }
}

/* ---- the mailbox ---- */
.mailbox {
  position: fixed; inset: auto 0 calc(max(14px, env(safe-area-inset-bottom)) + var(--dock-h) + 22px) 0;
  margin: 0 auto; padding: 0;
  width: min(820px, calc(100vw - 32px)); max-height: min(72vh, 660px);
  color: var(--text); background: var(--card);
  border: 2px solid var(--line); border-radius: 20px; box-shadow: var(--lift-lg);
  overflow: hidden;
}
.mailbox[open] { display: flex; animation: mailbox-in .26s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes mailbox-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.mailbox::backdrop { background: rgba(3, 12, 18, 0.55); backdrop-filter: blur(3px); }
.mailbox-box { display: flex; flex-direction: column; width: 100%; min-height: 0; }

.mailbox-search {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 2px solid var(--line); background: var(--card-2);
}
.mailbox-search .i { font-size: 20px; color: var(--teal-ink); }
.mailbox-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text);
  font-family: var(--ui); font-weight: 600; font-size: 17px;
}
.mailbox-search input::placeholder { color: var(--faint); font-weight: 600; }

.mailbox-folders {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px;
  padding: 16px 18px 18px; overflow-y: auto;
}
.mailbox-folders[hidden] { display: none; }
.folder { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-name {
  margin: 4px 0 6px; font-family: var(--ui); font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-ink);
}
.folder-name-2 { margin-top: 16px; }
.folder a, .mailbox-results li {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 8px; border-radius: 10px;
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px;
  border: 2px solid transparent; cursor: pointer;
}
.folder a:hover, .folder a:focus-visible { background: var(--paper-2); border-color: var(--line); outline: 0; }
.fname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fname small { font-size: 12px; color: var(--faint); font-weight: 500; }
.fname b.inbuxa { color: var(--orange-ink); }
.folder .out { color: var(--faint); font-size: 14px; }

.ftile {
  position: relative; isolation: isolate; flex: none;
  display: grid; place-items: center; width: 30px; height: 34px;
  color: #12303d; font-size: 16px; --perf: 2.5px;
  filter: drop-shadow(1.5px 1.5px 0 var(--line));
}
.ftile-sky { --stamp-fill: #8fd3f0; }
.ftile-warm { --stamp-fill: var(--orange); }

.mailbox-results { list-style: none; margin: 0; padding: 10px; overflow-y: auto; }
.mailbox-results[hidden] { display: none; }
.mailbox-results li[aria-selected="true"] { background: var(--teal); color: var(--on-fill); border-color: var(--line); }
.mailbox-results li[aria-selected="true"] .pl-note { color: var(--on-fill); }
.mailbox-results .pl-name { font-weight: 700; }
.mailbox-results .pl-note { margin-left: auto; color: var(--faint); font-size: 12.5px; font-weight: 500; text-align: right; }
.mailbox-results .pl-empty { justify-content: center; color: var(--faint); cursor: default; padding: 22px; }

.mailbox-foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 2px dashed var(--rule);
  font-size: 13px; color: var(--faint);
}
.mailbox-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.mailbox-foot a:hover { color: var(--teal-ink); }
.mailbox-keys { margin-left: auto; }

@media (max-width: 760px) {
  .mailbox {
    inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 86vh;
    border-radius: 22px 22px 0 0; border-bottom: 0; box-shadow: none;
  }
  .mailbox[open] { animation-name: sheet-in; }
  .mailbox-folders { grid-template-columns: 1fr 1fr; }
  .mailbox-folders .folder:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
  .mailbox-folders .folder:first-child .folder-name { grid-column: 1 / -1; }
  .mailbox-keys { display: none; }
}
@keyframes sheet-in { from { transform: translateY(40%); opacity: .4; } }
@media (max-width: 460px) {
  .mailbox-folders { grid-template-columns: 1fr; }
}

/* ---- hero ---- */
.hero { position: relative; padding: 40px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 64px; align-items: center; }
.hero h1 {
  font-size: clamp(44px, 5.3vw, 78px); font-weight: 800; letter-spacing: -0.025em; line-height: 0.98;
  margin: 18px 0 22px;
}
.hero h1 .accent {
  font-style: italic; font-weight: 700; color: var(--teal-ink);
  text-decoration: underline wavy var(--orange); text-decoration-thickness: 3px;
  text-underline-offset: 0.16em; text-decoration-skip-ink: none;
}
.hero p.lede { font-size: 18.5px; color: var(--muted); max-width: 560px; margin: 0 0 30px; }
.hero p.lede a, .hero-note a, .release-note a { color: var(--teal-ink); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-ctas .btn { padding: 14px 24px; font-size: 16px; }
.hero-note { margin: 0; font-size: 14.5px; color: var(--muted); }
.hero-note + .hero-note { margin-top: 6px; }

.release-note {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 6px 14px 6px 8px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--card); box-shadow: var(--lift-sm);
  font-family: var(--ui); font-weight: 650; font-size: 13.5px; color: var(--muted);
  transform: rotate(-1.5deg);
}
.release-note a { text-decoration: none; }
.release-mark { height: 24px; width: auto; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px;
  border: 2px dashed var(--rule); color: var(--muted); font-size: 13.5px; text-decoration: none;
}
.badge strong { color: var(--teal-ink); font-weight: 700; }
a.badge:hover { border-style: solid; border-color: var(--line); color: var(--text); }

.hero-shot { position: relative; }
.window {
  position: relative; z-index: 1;
  border: 2px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--card); box-shadow: var(--lift-lg);
  transform: rotate(1.2deg);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 2px solid var(--line); background: var(--card-2); }
.window-bar .lamp { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--stamp); }
.window-bar .lamp.on { background: var(--orange); }
.window-bar .lamp:nth-child(2) { background: var(--teal); }
.window-name { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-left: 8px; }
.window img { display: block; width: 100%; height: auto; }
.window .shot-light { display: none; }
:root[data-theme="light"] .window .shot-light { display: block; }
:root[data-theme="light"] .window .shot-dark { display: none; }

.hero-cat {
  position: absolute; z-index: 2; right: 34px; top: -86px; height: 104px; width: auto;
  filter: drop-shadow(3px 3px 0 var(--line));
  transform-origin: 50% 100%; animation: cat-peek 6s ease-in-out infinite;
}
@keyframes cat-peek { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-7deg); } 95% { transform: rotate(5deg); } }

.postmark {
  position: absolute; z-index: 2; left: -46px; bottom: -54px; width: 150px; height: 150px;
  color: var(--orange-ink); transform: rotate(-14deg); pointer-events: none;
}
.postmark text { font-family: var(--ui); font-weight: 800; fill: currentColor; }
.hero-shot-note { position: relative; z-index: 3; margin: 26px 0 0; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.hero-shot-note a { color: var(--teal-ink); }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 110px; }
  .hero { padding-top: 24px; }
}
@media (max-width: 560px) {
  .hero-cat { height: 70px; top: -58px; right: 14px; }
  .postmark { width: 104px; height: 104px; left: -14px; bottom: -44px; }
  .hero-grid { gap: 92px; }
  .window { transform: none; }
}

/* 404 */
.notfound { min-height: calc(100vh - 300px); display: flex; align-items: center; text-align: left; }
.notfound .wrap { width: 100%; }
.notfound .hero-mark { display: block; margin-bottom: 26px; height: 120px; width: auto; filter: drop-shadow(4px 4px 0 var(--line)); transform: rotate(-6deg); }
.notfound-path { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.notfound-path code { color: var(--text); }

/* ---- sections ---- */
main { counter-reset: sec; }
main > section { padding: 96px 0; position: relative; }
main > section[id]:not(.hero) { counter-increment: sec; }
section.tinted { background-color: var(--paper-2); border-block: 2px solid var(--line); }
main > section[id], .companions, .legal h2[id] { scroll-margin-top: 24px; }

.section-head { max-width: 780px; margin: 0 0 48px; }
.eyebrow {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 8px 14px;
  font-family: var(--ui); font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: #12303d; --stamp-fill: var(--orange); --perf: 3px;
  filter: drop-shadow(2px 2px 0 var(--line));
  transform: rotate(-2deg);
}
/* .prose p would otherwise win and paint the stamp's text the body grey. */
.prose p.eyebrow { color: #12303d; font-size: 12.5px; margin-bottom: 18px; }
main > section[id]:not(.hero) .eyebrow::before {
  content: "No. " counter(sec, decimal-leading-zero);
  padding-right: 10px; border-right: 2px solid rgba(18, 48, 61, .35);
}
.about-cols .panel + .panel .eyebrow::before { content: none !important; }
.about-cols .panel + .panel .eyebrow { --stamp-fill: var(--teal); }
h2.section-title, .prose h2 {
  font-size: clamp(32px, 4.4vw, 54px); font-weight: 750; letter-spacing: -0.02em; line-height: 1.04;
  margin: 0 0 18px;
}
h1.section-title { font-size: clamp(38px, 5vw, 62px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0 0 18px; }
p.section-sub { font-size: 18px; color: var(--muted); margin: 0; max-width: 680px; }
p.section-sub a { color: var(--teal-ink); }

/* ---- features: twelve stickers ----
   Twelve, always: 3 columns without the script, 4 with it, then 3, 2, 1 --
   twelve is the count that fills every row at every one of those widths. */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; padding: 24px;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: var(--lift);
}
.card .icon {
  position: relative; isolation: isolate;
  display: grid; place-items: center; width: 46px; height: 52px; margin-bottom: 16px;
  color: #12303d; --perf: 3px;
  filter: drop-shadow(2px 2px 0 var(--line));
}
.card .icon svg, .tile .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card.warm .icon, .tile.warm .icon { --stamp-fill: var(--orange); }
.card h3 { font-size: 21px; margin: 0 0 10px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card p + p { margin-top: 10px; }
.card a { color: var(--teal-ink); }

.grid.is-deck { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  display: flex; align-items: center; gap: 13px; width: 100%; min-height: 76px;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--card); color: var(--text);
  border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--lift-sm);
  font-family: var(--ui); font-weight: 650; font-size: 15px; line-height: 1.3;
  transition: transform .14s, box-shadow .14s, background-color .15s;
}
.tile:nth-child(4n+1) { transform: rotate(-0.6deg); }
.tile:nth-child(4n+3) { transform: rotate(0.5deg); }
.tile:hover { transform: translate(-2px, -2px) rotate(0); box-shadow: var(--lift); }
.tile.is-open { background: var(--teal); color: var(--on-fill); box-shadow: var(--lift); transform: translate(-2px, -2px); }
.tile .icon {
  position: relative; isolation: isolate; flex: none;
  display: grid; place-items: center; width: 38px; height: 44px; margin: 0;
  color: #12303d; --perf: 2.5px;
  filter: drop-shadow(1.5px 1.5px 0 var(--line));
}
.tile.is-open .icon { --stamp-fill: var(--stamp); }
.tile-label { flex: 1 1 auto; }
.tile-chev { flex: none; display: inline-flex; color: var(--faint); transition: transform .2s; }
.tile.is-open .tile-chev { color: var(--on-fill); transform: rotate(180deg); }
.tile-chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* The open feature is a letter: airmail edge, the full paragraph inside. */
.tile-panel {
  grid-column: 1 / -1; position: relative;
  padding: 26px 64px 26px 30px; border-radius: 16px;
  border: 7px solid transparent;
  background: linear-gradient(var(--card-2), var(--card-2)) padding-box, var(--airmail) border-box;
  box-shadow: 0 0 0 2px var(--line), var(--lift);
  opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s;
}
.tile-panel.is-in { opacity: 1; transform: none; }
.tile-panel[hidden] { display: none; }
.tile-panel h3 { margin: 0 0 10px; font-size: 24px; }
.tile-panel p { margin: 0; color: var(--muted); max-width: 70ch; font-size: 16px; }
.tile-panel p + p { margin-top: 10px; }
.tile-panel-close {
  position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--text); border: 2px solid var(--line); box-shadow: var(--lift-sm);
}
.tile-panel-close:hover { background: var(--orange); color: #12303d; }
.tile-panel-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

@media (max-width: 1040px) { .grid.is-deck { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .grid, .grid.is-deck { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .grid, .grid.is-deck { grid-template-columns: 1fr; } .tile-panel { padding: 22px 52px 22px 20px; } }

/* ---- screenshots ---- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.shot {
  margin: 0; background: var(--card); overflow: hidden;
  border: 2px solid var(--line); border-radius: 16px; box-shadow: var(--lift);
}
.shot img { display: block; width: 100%; height: auto; border-bottom: 2px solid var(--line); }
.shot.narrow { display: flex; flex-direction: column; align-items: center; }
.shot.narrow img { max-width: 340px; border-inline: 2px solid var(--line); }
.shot.narrow .cap { width: 100%; }
.shot .cap { padding: 16px 20px; }
.shot .cap h4 { margin: 0 0 4px; font-size: 18px; }
.shot .cap p { margin: 0; color: var(--muted); font-size: 14.5px; }
.shot-note { margin: 22px 0 0; color: var(--faint); font-size: 13.5px; }

.shots.is-carousel { display: block; position: relative; max-width: 1040px; margin: 0 auto; }
.shots.is-carousel .shot { display: none; cursor: zoom-in; }
.shots.is-carousel .shot.is-current { display: block; animation: shot-in .3s ease; }
@keyframes shot-in { from { opacity: .3; transform: translateX(10px); } }
.shots.is-carousel .shot.narrow.is-current { display: flex; }
.shots-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.shots-nav {
  display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
  background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--lift-sm);
  transition: transform .12s, box-shadow .12s;
}
.shots-nav:hover { transform: translate(-2px, -2px); box-shadow: var(--lift); background: var(--teal); color: var(--on-fill); }
.shots-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.shots-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.shots-dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; cursor: pointer; background: var(--card); border: 2px solid var(--line); transition: transform .15s, background-color .15s; }
.shots-dot:hover { background: var(--faint); }
.shots-dot.is-current { background: var(--orange); transform: scale(1.3); }

body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: clamp(12px, 4vw, 48px); background: rgba(3, 12, 18, .88);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1420px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.lightbox img {
  display: block; max-width: 100%; max-height: calc(100vh - 160px); width: auto; height: auto; object-fit: contain;
  border-radius: 14px; border: 2px solid #03111a; box-shadow: 7px 7px 0 #03111a;
}
.lightbox figcaption { color: #fff; text-align: center; font-size: 14px; padding: 16px 4px 0; }
.lightbox-close, .lightbox-nav {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 46px; height: 46px; padding: 0; cursor: pointer;
  background: #f7f0e3; color: #12303d; border: 2px solid #03111a; border-radius: 12px; box-shadow: 3px 3px 0 #03111a;
}
.lightbox-close { position: absolute; top: 16px; right: 16px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--orange); }
.lightbox svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  .lightbox-nav { position: absolute; bottom: 18px; }
  .lightbox-nav.prev { left: 18px; }
  .lightbox-nav.next { right: 18px; }
  .lightbox figcaption { padding-bottom: 72px; }
}

/* ---- letters: the two-column panels ----
   Sharing, running and safety each arrive as one letter with an airmail
   edge, the two columns side by side inside it. */
.twocol {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
  padding: 36px 40px; border-radius: 18px;
  border: 8px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--airmail) border-box;
  box-shadow: 0 0 0 2px var(--line), var(--lift-lg);
}
.twocol > * { min-width: 0; }
.twocol h3 { font-size: 25px; margin: 0 0 6px; }
.twocol p { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.twocol a { color: var(--teal-ink); }
.twocol p.section-sub { margin-top: 20px; font-size: 16px; }

ul.checks { list-style: none; padding: 0; margin: 16px 0 0; }
ul.checks li { position: relative; padding: 0 0 0 36px; margin: 0 0 13px; color: var(--muted); font-size: 15.5px; }
ul.checks li em { color: var(--text); }
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px;
  border-radius: 50%; border: 2px solid var(--line); background: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312303d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E");
  background-size: 15px; background-position: center; background-repeat: no-repeat;
}

.companions { margin-top: 72px; }
.companions > h3 { font-size: 32px; margin: 0 0 8px; }
.companions-sub { color: var(--muted); font-size: 17px; margin: 0 0 28px; max-width: 680px; }
.companion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
a.card.companion { display: block; text-decoration: none; color: var(--text); transition: transform .14s, box-shadow .14s; }
a.card.companion:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: var(--lift-lg); }
a.card.companion .icon { --stamp-fill: var(--orange); }
.card p.companion-when {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 6px;
  background: var(--paper-2); border: 2px dashed var(--rule);
  font-family: var(--ui); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink);
}
.card.companion h4 { font-size: 24px; margin: 4px 0 8px; }
.companion-more { display: inline-block; margin-top: 14px; font-family: var(--ui); font-weight: 750; color: var(--teal-ink); }
.companion-more::after { content: " \2192"; }

/* ---- license ---- */
.prose { max-width: 780px; }
.prose p { color: var(--muted); font-size: 17px; margin: 0 0 18px; }
.prose a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
.license-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 30px 34px; border-radius: 18px;
  background: var(--orange); color: #12303d;
  border: 2px solid var(--line); box-shadow: var(--lift-lg);
  transform: rotate(-0.6deg);
}
.license-band h3 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; color: #12303d; }
.license-band p { margin: 0; font-size: 16px; color: #12303d; }
.license-band a { color: #12303d; font-weight: 700; }
.license-band .btn-primary { background: #fffdf8; color: #12303d; }

/* ---- about: two postcards ---- */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.about-cols .panel {
  position: relative; padding: 34px 36px;
  background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift-lg);
}
.about-cols .panel:first-child { transform: rotate(-0.8deg); }
.about-cols .panel + .panel { transform: rotate(0.7deg); }
.about-cols .prose h2 { font-size: clamp(28px, 3vw, 38px); }
.about-cols .prose h3 { font-size: 20px; margin: 22px 0 6px; }
.about-cols .prose p { font-size: 16px; }
.about-cols p:last-child { margin-bottom: 0; }

/* ---- footer: the back of the envelope ----
   The page has to end above the tab bar, so the footer carries the room for
   it rather than the body: the dark ink runs all the way down behind it. */
.site-foot { position: relative; background: var(--night); color: #c9dadd; padding-bottom: calc(var(--dock-h) + 30px); }
.site-foot .airmail { height: 10px; background: var(--airmail); border-block: 2px solid #03111a; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-top: 52px; padding-bottom: 36px; }
.site-foot .brand .mark { height: 42px; }
.site-foot .brand .wordmark { color: #f7f0e3; font-size: 25px; }
.site-foot .copy { margin: 12px 0 0; font-size: 14px; color: #a9c2c7; max-width: 300px; }
.foot-col { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.foot-head { margin: 0 0 6px; font-family: var(--ui); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fbb56b; }
.foot-col a { color: #c9dadd; text-decoration: none; }
.foot-col a:hover { color: #6fdcd6; }
.foot-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-top: 18px; padding-bottom: 22px; border-top: 2px dashed rgba(201, 218, 221, .2);
  font-size: 13.5px; color: #a9c2c7;
}
.foot-bar a { color: #e6eff0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(230, 239, 240, .35); }
.foot-bar a:hover { color: #6fdcd6; }
.built-with { text-align: center; }
.built-with a {
  display: inline-block; margin-left: 4px; padding: 2px 10px; border-radius: 8px; text-decoration: none;
  background: #f9a34b; color: #12303d; font-weight: 800; border: 2px solid #03111a; box-shadow: 2px 2px 0 #03111a;
}
.built-with a:hover { color: #12303d; background: #46cac3; }
.foot-legal { display: flex; gap: 16px; justify-content: flex-end; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: #e6eff0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(230, 239, 240, .35); }
.linklike:hover { color: #6fdcd6; }
.linklike[hidden] { display: none; }
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-bar { grid-template-columns: 1fr; text-align: center; }
  .foot-legal { justify-content: center; }
}

/* ---- consent ---- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  max-width: 1100px; margin: 0 auto;
  background: var(--card); color: var(--text);
  border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift-lg);
  padding: 20px 0;
}
.consent[hidden] { display: none; }
.consent-inner { padding: 0 24px; display: flex; gap: 26px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent-text { flex: 1 1 460px; min-width: 0; }
.consent-title { font-size: 19px; font-weight: 750; margin: 0 0 6px; }
.consent p { margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.consent p:last-child { margin-bottom: 0; }
.consent-current { color: var(--faint); font-style: italic; }
.consent-more a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; }
/* Both buttons are deliberately identical in size, weight and color: equal
   prominence is the requirement, so it is pinned here, not left to markup. */
.consent-actions { display: flex; gap: 12px; flex: 0 0 auto; }
.consent-actions .btn { padding: 11px 24px; font-size: 15px; min-width: 132px; }
@media (max-width: 640px) {
  .consent-inner { gap: 14px; padding: 0 18px; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1 1 0; min-width: 0; }
}

/* ---- long-form pages ---- */
.legal { margin-top: 8px; padding: 36px 40px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--lift-lg); max-width: 860px; }
.legal h2 { font-size: 26px; font-weight: 700; margin: 36px 0 10px; }
.legal h2:first-of-type { margin-top: 8px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 20px; margin: 10px 0 18px; color: var(--muted); }
.legal li { margin-bottom: 8px; }
.legal code { font-size: 13px; color: var(--text); }
.legal .updated { display: inline-block; color: var(--faint); font-size: 13px; margin-bottom: 18px; font-family: var(--mono); }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: 14.5px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; vertical-align: top; border-bottom: 2px dashed var(--rule); color: var(--muted); }
.legal th { color: var(--text); font-weight: 700; }
.legal .scroll-x { overflow-x: auto; }
@media (max-width: 560px) { .legal { padding: 24px 20px; } }

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  main > section { padding: 72px 0; }
  .twocol, .about-cols, .companion-grid, .shots { grid-template-columns: 1fr; }
  .twocol { gap: 30px; padding: 28px 26px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  main > section { padding: 60px 0; }
  .twocol { padding: 22px 18px; border-width: 6px; }
  .about-cols .panel { padding: 26px 22px; }
  .license-band { padding: 24px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
