/* TirangApp design tokens and layout. One file keeps the first load small. */

:root {
  --bg: #f3eee4;
  --surface: #fffcf7;
  --ink: #101a2b;
  --muted: #3e4c5f;
  --line: #e3d8c8;
  --navy: #0e1c30;
  --navy-2: #17304c;
  --cream: #f7f4ee;
  --saffron: #e39b2b;
  --saffron-deep: #9a5b0a;
  --green: #146b38;
  --cyan: #0c5c59;
  --gold: #f6c56b;
  --danger: #8c2f2f;
  --shadow: 0 16px 40px rgba(16, 26, 43, 0.08);
  --radius: 20px;
  --font-display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 1120px;
  --header: 4.5rem;
  --space: clamp(3.5rem, 6vw, 5.5rem);
  color-scheme: light;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.6rem;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(227, 155, 43, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 20%, rgba(20, 107, 56, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

button, input, summary { font: inherit; }

a { color: var(--cyan); }

a:hover { color: var(--green); }

p, ul, ol { margin: 0 0 1rem; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(1.7rem, 7.2vw, 3.4rem); font-weight: 650; }
h2, h3 { scroll-margin-top: 5.4rem; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 640; }
h3 { font-size: 1.2rem; font-weight: 640; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.hero :focus-visible,
.utility :focus-visible,
.band :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--gold);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: var(--cream);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  z-index: 80;
}

.skip-link:focus { top: 0.6rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.utility {
  background: var(--navy);
  color: var(--cream);
  font-size: 0.92rem;
  text-align: center;
  padding: 0.45rem 1rem;
}

.utility a { color: var(--gold); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 238, 228, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  position: relative;
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.28rem;
}

.wordmark:hover { color: var(--ink); }

.wordmark__text span { color: var(--green); }

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  border-radius: 10px;
}

.mark { display: block; }

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
}

.nav-button__close { display: none; }

.nav-toggle:focus-visible + .nav-button {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.nav-toggle:checked ~ .nav-button .nav-button__open { display: none; }
.nav-toggle:checked ~ .nav-button .nav-button__close { display: inline; }

.site-nav { display: none; }

.nav-toggle:checked ~ .site-nav { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0 0;
}

.site-nav > ul > li > a,
.nav-sub summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.02em;
}

.site-nav a[aria-current="page"] {
  color: var(--green);
  box-shadow: inset 0 -2px 0 var(--saffron);
}

.nav-sub summary {
  cursor: pointer;
  list-style: none;
}

.nav-sub summary::-webkit-details-marker { display: none; }

.nav-sub summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.4rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.nav-sub[open] summary::after { transform: rotate(225deg) translateY(-1px); }

.nav-sub ul a {
  display: flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  padding-left: 0.75rem;
}

.nav-cta { margin: 0.4rem 0 0.8rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 640;
  letter-spacing: -0.02em;
  border: 1px solid transparent;
}

.btn--primary { background: var(--saffron); color: var(--ink); }
.btn--primary:hover { background: #f0b14d; color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 244, 238, 0.45);
}

.btn--ghost:hover { background: rgba(247, 244, 238, 0.08); color: var(--cream); }

.btn--ink { background: var(--navy); color: var(--cream); }
.btn--ink:hover { color: var(--cream); background: var(--navy-2); }

.btn--line {
  background: transparent;
  color: var(--ink);
  border-color: #c9bba6;
}

.btn--line:hover { border-color: var(--ink); color: var(--ink); }

.btn--small { min-height: 42px; padding: 0.45rem 0.9rem; }

.hero { padding: 1.2rem 0 0; }

.hero__panel {
  display: grid;
  gap: 1.5rem;
  background:
    radial-gradient(500px 240px at 90% 0%, rgba(227, 155, 43, 0.22), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #12263f 70%, #163628 140%);
  color: var(--cream);
  border-radius: 28px;
  padding: 1.4rem 1.15rem 1.3rem;
  overflow: hidden;
  position: relative;
}

.hero__panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(247, 244, 238, 0.12);
  border-radius: 50%;
  right: -40px;
  bottom: -50px;
  pointer-events: none;
}

.eyebrow, .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}

/* Gold is for navy surfaces. On the light page hero it is about 1.6:1. */
.kicker { color: var(--saffron-deep); }

.hero h1 { color: var(--cream); max-width: 18ch; }

.lede, .dek {
  font-size: 1.12rem;
  color: var(--cream);
  max-width: 42rem;
}

.hero__copy p { color: #d7e4e2; }

.hero__actions, .cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.1rem 0;
}

.micro {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.4rem 0 0;
  list-style: none;
}

.micro li {
  background: rgba(247, 244, 238, 0.08);
  border: 1px solid rgba(247, 244, 238, 0.14);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.92rem;
  color: var(--cream);
}

.device { margin: 0; }

.device__frame {
  background: #091421;
  border-radius: 32px;
  padding: 0.7rem;
  border: 1px solid rgba(247, 244, 238, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  max-width: 280px;
  margin-inline: auto;
}

.device__frame img,
.shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border-radius: 22px;
  background: #17304c;
}

.device figcaption,
.shot figcaption,
.gallery figcaption {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.55rem;
  text-align: center;
}

.hero .device figcaption { color: #d7e4e2; }

.tri { display: inline-flex; gap: 4px; vertical-align: middle; }
.tri span { width: 8px; height: 8px; border-radius: 99px; display: block; }
.tri span:nth-child(1) { background: #e39b2b; }
.tri span:nth-child(2) { background: #f7f4ee; }
.tri span:nth-child(3) { background: #1f7a45; }

code { font-size: 0.9em; word-break: break-word; }
.hero code { color: var(--cream); }

.contact-card { padding: 1rem 1.1rem; margin: 1rem 0; }
.device--pad { margin: 1rem 0; }

.section { padding: var(--space) 0 0; }

.section__head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  max-width: 42rem;
}

.section__head p:last-child { color: var(--muted); margin: 0; }

.cards, .hub, .games, .related__grid {
  display: grid;
  gap: 0.9rem;
}

.card, .hub a, .game-card, .related a, .step, .callout, .fact-split section, .notice, .toc, .prose, .page-hero, .contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card, .game-card, .hub a, .related a {
  display: block;
  padding: 1rem 1rem 1.05rem;
  color: inherit;
  text-decoration: none;
}

.card:hover, .hub a:hover, .game-card:hover, .related a:hover {
  border-color: #c9b89a;
  transform: translateY(-2px);
}

.card h3, .game-card h3, .hub h3, .related h3 { margin-bottom: 0.35rem; }

.card p, .game-card p, .hub p, .related p, .step p { color: var(--muted); margin: 0; }

.card__link, .text-link {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 640;
}

.icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f6f1e7;
  margin-bottom: 0.8rem;
}

.icon svg { width: 24px; height: 24px; display: block; }

.gallery {
  display: grid;
  gap: 0.9rem;
}

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: zoom-in;
  color: inherit;
}

.shot img { border-radius: 18px; border: 1px solid var(--line); }

.gallery figcaption { color: var(--muted); text-align: left; }

.screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 280px);
  justify-content: center;
  gap: 0.9rem;
}

.screen-grid figure { margin: 0; min-width: 0; }

.screen-grid figcaption {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

.tile-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 0.6rem;
  justify-items: stretch;
}

.tile-grid figure {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.tile-grid .shot {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 211 / 260;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #101a2b;
}

.tile-grid .shot img {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tile-grid figcaption {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.3;
  min-height: 2.6em;
  margin-top: 0.4rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.tile-download {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin-top: auto;
  padding: 0.4rem 0.45rem;
  font-size: clamp(0.78rem, 2.6vw, 0.92rem);
}

.steps { display: grid; gap: 0.8rem; }

.step { padding: 1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; }

.step span {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 0.6rem;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1rem;
  min-height: 48px;
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.02em;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  float: right;
  color: var(--saffron-deep);
  font-weight: 700;
}

.faq details[open] summary::after { content: "–"; }

.faq details .answer { padding: 0 1rem 1rem; color: var(--muted); }

.band {
  margin-top: var(--space);
  background: var(--navy);
  color: var(--cream);
  border-radius: 28px;
  padding: 1.4rem 1.15rem;
}

.band h2, .band p { color: var(--cream); }
.band p { color: #d7e4e2; max-width: 40rem; }

.site-footer {
  margin-top: var(--space);
  background: var(--navy);
  color: #d7e4e2;
  padding: 2.2rem 0 1.2rem;
}

.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* Header green (#146B38) is about 2.6:1 on the navy footer. */
.site-footer .wordmark__text span { color: #b7e0c6; }
.site-footer .mark svg > rect:first-child { fill: #1d3554; }
.site-footer .brand-logo { height: 46px; }

.footer-grid {
  display: grid;
  gap: 1.4rem;
}

.site-footer h2 {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }

.legal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  border-top: 1px solid rgba(247, 244, 238, 0.14);
  margin-top: 1.4rem;
  padding-top: 1rem;
  font-size: 0.95rem;
}

.crumbs {
  padding-top: 1rem;
  font-size: 0.95rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.crumbs a { color: var(--cyan); text-decoration: none; }

.page-hero { padding: 1rem 1rem 1.1rem; margin-top: 0.8rem; }

.page-hero h1 { max-width: 18em; }

.dek { color: var(--muted); font-size: 1.12rem; }

.reviewed { color: var(--muted); font-size: 0.95rem; margin: 0.6rem 0 0; }

.notice {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  background: #f8f1e4;
  box-shadow: none;
}

.notice strong { font-family: var(--font-display); }

.article-grid { margin-top: 1rem; display: grid; gap: 1rem; }

.article-grid > * { min-width: 0; }

.toc { padding: 0.9rem 1rem; box-shadow: none; }

.toc ol { margin: 0.3rem 0 0; padding-left: 1.1rem; }

.toc a { text-decoration: none; }

.prose { padding: 0.3rem 1rem 1.2rem; min-width: 0; }

.prose h2 { margin-top: 1.8rem; scroll-margin-top: 5.5rem; }
.prose h3 { margin-top: 1.2rem; scroll-margin-top: 5.5rem; }

.prose li { margin: 0.3rem 0; }

.fact-split { display: grid; gap: 0.8rem; margin: 1rem 0; }

.fact-split section { padding: 0.9rem 1rem; box-shadow: none; }

.fact-split ul { margin: 0; padding-left: 1.1rem; }

.callout {
  padding: 0.95rem 1rem;
  box-shadow: none;
  margin: 1rem 0;
  background: #f6f1e7;
}

.callout--warn { background: #f8ece7; }

.related { margin-top: 1.2rem; }

.related h2 { margin-bottom: 0.7rem; }

dialog.lightbox {
  width: min(920px, calc(100% - 1.5rem));
  border: 0;
  border-radius: 20px;
  padding: 0.8rem;
  background: var(--navy);
  color: var(--cream);
}

dialog.lightbox::backdrop { background: rgba(9, 16, 28, 0.72); }

.lightbox img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #17304c;
}

.lightbox__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.lightbox__caption { color: #d7e4e2; margin: 0.5rem 0 0; }

.empty {
  padding: 2rem 0 3rem;
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}

.empty img { width: min(100%, 280px); }

.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table { min-width: 34rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 719px) {
  .hero h1 { max-width: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .lede, .dek { font-size: 1.02rem; }
  .utility { font-size: 0.84rem; padding: 0.35rem 0.75rem; }
  body.has-download-bar { padding-bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
}

.search-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.search-links li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.75rem 0.9rem;
}

.search-links a {
  font-family: var(--font-display);
  font-weight: 650;
}

@media (min-width: 720px) {
  .hero__panel { padding: 2rem; grid-template-columns: 1.15fr 0.85fr; align-items: center; }
  .device__frame { max-width: 340px; }
  .cards, .hub, .related__grid { grid-template-columns: 1fr 1fr; }
  .games { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1.3fr 0.7fr; }
  .gallery__side { display: grid; gap: 0.9rem; }
  .screen-grid { grid-template-columns: repeat(2, minmax(0, 280px)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-links { grid-template-columns: 1fr 1fr; }
  .fact-split, .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 959px) {
  .header-bar { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; width: 100%; }
}

@media (min-width: 960px) {
  .nav-button, .nav-toggle { display: none; }
  .site-nav,
  .nav-toggle:checked ~ .site-nav { display: flex; align-items: center; gap: 0.3rem; }
  .site-nav > ul { display: flex; align-items: center; gap: 0.15rem; padding: 0; }
  .site-nav > ul > li > a, .nav-sub summary { padding: 0 0.55rem; }
  .nav-sub { position: relative; }
  .nav-sub ul {
    position: absolute;
    top: calc(100% - 0.2rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-width: 230px;
    padding: 0.35rem;
    box-shadow: var(--shadow);
  }
  .nav-cta { margin: 0 0 0 0.4rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .games { grid-template-columns: 1fr 1fr; }
  .screen-grid { grid-template-columns: repeat(4, minmax(0, 240px)); }
  .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .article-grid { grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 5.4rem; }
  .prose { padding: 1.1rem 1.4rem 1.5rem; }
  .page-hero { padding: 1.3rem 1.4rem; }
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .tile-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover, .hub a:hover, .game-card:hover, .related a:hover { transform: none; }
}

.download-bar {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 0.55rem 0.85rem calc(0.55rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(16, 26, 43, 0.18), rgba(16, 26, 43, 0));
  pointer-events: none;
}

.download-bar__link {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  width: min(100%, 36rem);
  min-height: 48px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 3.5vw, 1rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: normal;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(16, 26, 43, 0.28);
}

.download-bar__link svg { flex: none; }

.download-bar__note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.download-bar__link:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

body.has-download-bar {
  padding-bottom: calc(4.8rem + env(safe-area-inset-bottom));
}

body:has(.nav-toggle:checked) .download-bar,
body:has(dialog[open]) .download-bar {
  visibility: hidden;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem;
}

.filters button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

.post-grid {
  display: grid;
  gap: 0.9rem;
}

.post-card a {
  display: grid;
  gap: 0.35rem;
  height: 100%;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
  background: #17304c;
}

.post-card h2 { font-size: 1.15rem; margin: 0; }

.post-card p:last-child { color: var(--muted); margin: 0; }

.filter-empty { color: var(--muted); }

.article-figure { margin: 0 0 1rem; }

.article-figure img {
  width: min(280px, 100%);
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.byline, .tags { margin: 0.35rem 0 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  list-style: none;
}

.tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

@media (min-width: 720px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .download-bar__link {
    width: auto;
    min-width: 22rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    text-align: left;
  }
  body.has-download-bar .device__frame { max-width: 280px; }
}

.section__more { margin-top: 1rem; }

@media print {
  .utility, .site-header, .site-footer, .toc, .hero__actions, .nav-cta, .download-bar { display: none; }
  body.has-download-bar { padding-bottom: 0; }
  body { background: white; }
  .card, .prose, .page-hero, .hero__panel { box-shadow: none; }
}
