/* Undead Logic: one stylesheet for every page.
   The retro mascot look (Dustin's choice, Nov 20, 2026): colors taken from
   the mascot logos. Cream paper and ink outlines in light mode; ink-black
   paper and cream lines in dark mode. The page follows the device setting.
   Only system fonts: nothing is loaded from outside the site. */

:root {
  color-scheme: light dark;
  --paper: #f3e7cb;
  --paper-2: #eadbb8;
  --ink: #1c1814;
  --ink-soft: #4a4036;
  --line: #1c1814;
  --sage: #7d9566;
  --sage-deep: #5d7449;
  --brick: #c4442e;
  --on-accent: #fbf3df;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI Black", system-ui, sans-serif;
  --font-label: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17130f;
    --paper-2: #221c16;
    --ink: #f1e2bf;
    --ink-soft: #c9b995;
    --line: #f1e2bf;
    --sage: #8fa877;
    --sage-deep: #a9c28f;
    --brick: #e2654c;
    --on-accent: #17130f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }

.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }
.wide { width: min(1040px, 100% - 32px); margin-inline: auto; }

a { color: var(--brick); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
a:focus-visible, .button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 6px;
}

.skip-link { position: absolute; left: -9999px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 5; }
.skip-link:focus { left: 16px; top: 10px; }

/* ---------- Header and footer, the same on every page ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding: 14px 0; border-bottom: 3px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; letter-spacing: .01em;
}
.brand img { width: 46px; height: auto; }
.brand:hover { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 650; }
.site-header nav a { color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { border-bottom-color: var(--brick); }

.site-footer {
  margin-top: 64px; padding: 26px 0 44px; border-top: 3px solid var(--line);
  color: var(--ink-soft); font-size: .92rem;
}
.site-footer p { margin: 0 0 8px; max-width: none; }
.site-footer a { color: var(--ink); }

/* ---------- Page content ---------- */
main { padding: 36px 0 8px; }
main > p, main > ul, main > ol, main > h2, main > h3, main .card, main .note { max-width: 46em; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.01em; margin: 0 0 10px; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); line-height: 1.15; margin: 40px 0 12px; }
h3 { font-size: 1.2rem; line-height: 1.2; margin: 0 0 6px; }
p, li { margin-top: 0; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 8px; }
li::marker { color: var(--brick); }
code { font-family: var(--font-label); font-size: .88em; overflow-wrap: anywhere; }
strong { color: var(--ink); }

.lead { color: var(--ink-soft); font-size: 1.18rem; margin: 0 0 20px; }
.crumb { margin: 0 0 14px; font-size: .95rem; font-weight: 650; }
.crumb a { text-decoration: none; }
.note { color: var(--ink-soft); font-size: .95rem; }

.card {
  background: var(--paper); border: 3px solid var(--line); border-radius: 16px;
  padding: 18px 22px; margin: 18px 0;
}
.card > :last-child { margin-bottom: 0; }

.status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 16px; color: var(--ink-soft); font-size: .95rem; }
.pill {
  display: inline-block; background: var(--sage); color: var(--on-accent);
  border-radius: 99px; padding: 3px 11px;
  font-family: var(--font-label); font-size: .72rem; letter-spacing: .1em; font-weight: 700; text-transform: uppercase;
}
.eyebrow {
  color: var(--sage-deep); font-family: var(--font-label); font-size: .8rem;
  letter-spacing: .12em; font-weight: 700; text-transform: uppercase; margin: 0 0 10px;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button {
  display: inline-block; padding: 11px 22px; border: 3px solid var(--line); border-radius: 999px;
  font-weight: 750; text-decoration: none; color: var(--ink);
}
.button-primary { background: var(--brick); color: var(--on-accent); box-shadow: 4px 4px 0 var(--line); }
.button-primary:hover { color: var(--on-accent); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.button-secondary:hover { background: var(--paper-2); color: var(--ink); }
.button-mail { overflow-wrap: anywhere; }

/* ---------- Home page ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; gap: 28px; padding: 40px 0 36px;
}
.hero { overflow-x: clip; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(2.9rem, 8.5vw, 5.4rem); line-height: .98; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--brick); }
.hero .lead { max-width: 32em; }
.hero-art { position: relative; display: grid; place-items: center; min-width: 0; }
.hero-art::before {
  content: ""; position: absolute; width: 110%; max-width: 480px; aspect-ratio: 1; border-radius: 50%;
  background: repeating-conic-gradient(var(--paper-2) 0deg 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 55%, transparent 71%);
          mask: radial-gradient(circle, #000 55%, transparent 71%);
}
.hero-art img { position: relative; width: min(100%, 400px); }

.section {
  padding-top: 26px; margin-top: 34px; border-top: 3px solid var(--line);
}
.section > p { max-width: 46em; }

/* App cards (home and /apps/) */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px; margin-top: 8px; }
.apps .card {
  margin: 0; display: flex; flex-direction: column; gap: 4px; max-width: none;
  box-shadow: 7px 7px 0 var(--line);
}
.apps .card .links { margin-top: auto; padding-top: 10px; border-top: 2px dashed var(--ink-soft); font-weight: 650; font-size: .95rem; }
.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.app-icon { width: 58px; height: 58px; border-radius: 14px; border: 2px solid var(--line); flex: none; }
.app-head h3 { font-size: 1.6rem; margin: 0; }
.app-head .status { margin: 4px 0 0; }
.apps h3 a { color: var(--ink); text-decoration: none; }
.platforms { color: var(--ink-soft); font-size: .92rem; }
.apps + .note { margin-top: 22px; }

/* ---------- App pages ---------- */
.app-hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 36px; align-items: center; margin-bottom: 8px;
}
.app-hero > div { min-width: 0; }
.app-title { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.app-title img { width: 80px; height: 80px; border-radius: 18px; border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--line); flex: none; }
.app-title h1 { margin: 0; }

.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 28px;
  max-width: none !important;
}
.features li { margin: 0; padding-top: 12px; border-top: 3px solid var(--line); color: var(--ink-soft); }
.features li strong { color: var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 1.08rem; }

/* The example card on each app page: a paper ticket, marked "Example". */
.ticket {
  position: relative; margin: 14px auto 0; width: 100%; max-width: 420px;
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px; box-shadow: 8px 8px 0 var(--line);
  padding: 24px 22px 18px; display: flex; flex-direction: column; gap: 12px;
  font-family: var(--font-label); font-size: .92rem; transform: rotate(-1.2deg);
}
.ticket .stamp {
  position: absolute; top: -14px; right: 18px; background: var(--ink); color: var(--paper);
  padding: 2px 10px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; transform: rotate(2deg);
}
.ticket-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; border-bottom: 2px dashed var(--ink-soft); padding-bottom: 10px; }
.ticket-head b { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.ticket dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; }
.ticket dt { color: var(--ink-soft); }
.ticket dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ticket .total { border-top: 2px solid var(--line); padding-top: 7px; font-weight: 700; }
.ticket .bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 12px; border-radius: 4px; font-weight: 700; }
.ticket .bar-brick { background: var(--brick); color: var(--on-accent); }
.ticket .bar-sage { background: var(--sage); color: var(--on-accent); }
.ticket .verdict { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; line-height: 1.1; color: var(--brick); margin: 0; }
.ticket .muted { color: var(--ink-soft); }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.compare div { border: 2px solid var(--line); border-radius: 4px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.compare .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.compare .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.compare .win { background: var(--paper-2); }

/* Tables (platforms, storage, lookups) */
.table-scroll { overflow-x: auto; border: 3px solid var(--line); border-radius: 14px; margin: 12px 0 8px; max-width: 46em; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--ink-soft); vertical-align: top; }
thead th { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; background: var(--paper-2); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--sage-deep); font-weight: 700; }
td.no { color: var(--ink-soft); }

/* About page */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px; align-items: center; }
.about-hero > div { min-width: 0; }
.about-hero img { width: min(100%, 300px); justify-self: center; }

@media (max-width: 760px) {
  .hero, .app-hero, .about-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art, .about-hero img { order: -1; }
  .hero-art img { width: min(70%, 280px); }
  .about-hero img { width: min(60%, 220px); }
  .brand { font-size: 1.3rem; }
  .brand img { width: 38px; }
  .ticket { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button-primary:hover { transform: none; }
}
