/* ──────────────────────────────────────────────────────────────────────
   EcoRes hi-fi · global styles
   Direction 02 — sticky spine + sub-tabs
   --------------------------------------------------------------------
   Every page links to this one stylesheet. Page-specific overrides go
   in inline <style> blocks within each page (kept tiny).
   ────────────────────────────────────────────────────────────────── */

/* fonts loaded by each page from Google Fonts:
   Inter (400/500/600/700/800) + Newsreader (400/500/600/italic) + JetBrains Mono (400/500) */

:root {
  /* ink */
  --ink:      #1c1a16;
  --ink-2:    #4b463e;
  --ink-3:    #8a847a;
  --ink-4:    #b5afa3;

  /* paper */
  --paper:    #f7f4ed;
  --paper-2:  #efebe1;
  --paper-3:  #e6e1d3;
  --surface:  #fffdf8;
  --surface-2:#fbf8f1;

  /* accent — warm rust */
  --accent:        oklch(0.58 0.16 38);
  --accent-hover:  oklch(0.52 0.17 38);
  --accent-soft:   oklch(0.93 0.045 50);
  --accent-line:   oklch(0.78 0.10 42);

  /* status (for badges) */
  --good:  oklch(0.55 0.12 145);
  --warn:  oklch(0.68 0.13 75);
  --bad:   oklch(0.55 0.18 28);

  /* type */
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
  --serif:   "Newsreader", "Source Serif Pro", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* dims */
  --rail-w:    260px;
  --content-w: 760px;
  --wide-w:    1240px;

  /* radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(28,26,22,0.06);
  --shadow-md: 0 2px 8px rgba(28,26,22,0.08), 0 1px 2px rgba(28,26,22,0.04);
  --shadow-lg: 0 12px 40px rgba(28,26,22,0.12), 0 4px 10px rgba(28,26,22,0.05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11"; /* Inter niceties */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: white; }

a { color: var(--accent); text-decoration: none; transition: color 80ms ease; }
a:hover { color: var(--accent-hover); }

/* ──── App shell ─────────────────────────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ──── Sidebar ──────────────────────────────────────────────────── */

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  border-right: 1px solid var(--paper-3);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.sidebar__brand {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--paper-3);
  flex: 0 0 auto;
}
.sidebar__icon {
  width: 40px;
  height: 40px;
  display: block;
  flex: 0 0 40px;
}
.sidebar__mark {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink);
  line-height: 1;
}
.sidebar__sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.4;
}

.sidebar__spine {
  padding: 18px 14px 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.sidebar__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 8px 8px;
}

.spine-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
  transition: background 80ms ease;
}
.spine-item:hover { background: var(--paper); color: var(--ink); }
.spine-item.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}
.spine-item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.spine-item__num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--ink-4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
}
.spine-item.is-active .spine-item__num,
.spine-item.is-done .spine-item__num {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.spine-item.is-done .spine-item__num { background: var(--ink); border-color: var(--ink); }
.spine-item__body { min-width: 0; padding-top: 1px; }
.spine-item__title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.spine-item.is-active .spine-item__title { font-weight: 700; }
.spine-item__hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* nested sub-anchors under active step */
.spine-sub {
  margin: 4px 0 4px 32px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.spine-sub__item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 12px;
  position: relative;
  transition: background 80ms ease;
}
.spine-sub__item:hover { background: var(--paper); color: var(--ink); }
.spine-sub__item.is-active { background: var(--surface); color: var(--ink); font-weight: 600; }
.spine-sub__item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 5px; bottom: 5px; width: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.spine-sub__id {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
}
.spine-sub__item.is-active .spine-sub__id { color: var(--accent); }

.sidebar__partners {
  padding: 18px 22px 14px;
  border-top: 1px solid var(--paper-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}
.sidebar__partners-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.sidebar__partners img {
  display: block;
  height: auto;
  max-width: 100%;
}
.sidebar__partners img.logo--deeca {
  width: 180px;
}
.sidebar__partners img.logo--flare {
  width: 130px;
  border-radius: 4px;
  margin-top: 2px;
}

.sidebar__footer {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--paper-3);
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}
.sidebar__footer a {
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sidebar__footer a:hover { color: var(--accent); }

/* ──── Topbar (above each page) ─────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247,244,237,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-3);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar__crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.topbar__crumb a { color: var(--ink-2); }
.topbar__crumb b { color: var(--ink); font-weight: 700; }
.topbar__sep { color: var(--ink-4); margin: 0 6px; }
.topbar__spacer { flex: 1; }
.topbar__action {
  font-size: 12.5px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar__action:hover { color: var(--accent); }

/* ──── Content container ────────────────────────────────────────── */

.page {
  padding: 48px 44px 72px;
  max-width: var(--wide-w);
  margin: 0 auto;
}
.page--narrow { max-width: calc(var(--content-w) + 88px); margin: 0 auto; }
.page--wide { max-width: none; padding: 36px 36px 56px; }
.page > * + * { margin-top: 0; }
.page-narrative { max-width: var(--content-w); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow b { color: var(--ink-2); font-weight: 700; }

.h-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 14px 0 28px;
  color: var(--ink);
  text-wrap: balance;
}
.h-display em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.h-card {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
}
.h-finding {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 6px 0 14px;
  text-wrap: balance;
}

.lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--content-w);
  margin: 0 0 32px;
  text-wrap: pretty;
}
.lede b, .lede strong { color: var(--ink); font-weight: 600; }

p { margin: 0 0 1em; text-wrap: pretty; }
.prose { max-width: var(--content-w); color: var(--ink); font-size: 16px; line-height: 1.65; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose b, .prose strong { color: var(--ink); font-weight: 600; }
.prose a { border-bottom: 1px solid var(--accent-line); }

.question {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--accent);
  margin: 18px 0 0;
  max-width: var(--content-w);
}

/* ──── Stat strip / KPI block ───────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 32px 0;
}
.stat {
  background: var(--surface);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat__num--accent { color: var(--accent); }
.stat__lbl {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}
.stat__cap {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ──── Iframe slot — "plot space" ───────────────────────────────── */

.plot {
  margin: 36px 0;
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.plot--full {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  margin-left: calc(-1 * var(--page-pad, 36px));
  margin-right: calc(-1 * var(--page-pad, 36px));
}
.plot__head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--paper-3);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
}
.plot__id {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.plot__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.plot__spacer { flex: 1; }
.plot__open {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.plot__open:hover { color: var(--accent); }
.plot__frame {
  /* Aspect ratio fills naturally — apps decide their own internal height. */
  aspect-ratio: 16 / 10;
  width: 100%;
  min-height: 540px;
  background:
    linear-gradient(135deg, var(--surface-2) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(225deg, var(--surface-2) 25%, transparent 25%) 0 0 / 22px 22px,
    var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border: 0;
}
.plot__frame iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.plot__skel {
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plot__skel-mono {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plot__caption {
  padding: 10px 18px 14px;
  font-size: 12.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--paper-3);
  background: var(--surface);
}
.plot__caption b { color: var(--ink-2); font-weight: 600; }

/* compact plot variant for grids */
.plot--compact .plot__frame { aspect-ratio: 4 / 3; min-height: 380px; }
.plot--tall .plot__frame { aspect-ratio: 3 / 4; min-height: 480px; }

/* ──── Pills / chips / tags ─────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--ink-4);
  color: var(--ink-2);
  background: var(--surface);
}
.pill--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill--ink { color: var(--surface); border-color: var(--ink); background: var(--ink); }
.pill--ghost { border-color: var(--paper-3); color: var(--ink-3); }
.pill__name {
  text-transform: none;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0;
  color: var(--ink-2);
  font-weight: 500;
}

/* ──── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
  text-decoration: none;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn--accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost {
  border-color: var(--ink-4);
  color: var(--ink-2);
  background: transparent;
}
.btn--sm { padding: 6px 12px; font-size: 12.5px; }

/* ──── Generic card ─────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  padding: 22px 22px 20px;
}
.card--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.card--ink {
  background: var(--ink);
  color: var(--surface);
}
.card--ink .eyebrow { color: rgba(255,255,255,0.5); }
.card--ink .h-card { color: white; }

/* ──── Step navigation footer ───────────────────────────────────── */

.step-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-3);
}
.step-nav__link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 16px;
  padding: 16px 22px;
  border: 1.5px solid var(--ink-4);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: transform 100ms ease, box-shadow 100ms ease, border-color 100ms ease;
}
.step-nav__link::before {
  content: "←";
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  align-self: center;
}
.step-nav__hint  { grid-column: 2; grid-row: 1; }
.step-nav__title { grid-column: 2; grid-row: 2; }
.step-nav__link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 2px 2px 0 var(--ink);
  border-color: var(--ink);
}
.step-nav__link--right {
  grid-template-columns: 1fr auto;
}
.step-nav__link--right::before { content: none; display: none; }
.step-nav__link--right::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  align-self: center;
}
.step-nav__link--right .step-nav__hint  { grid-column: 1; grid-row: 1; text-align: right; }
.step-nav__link--right .step-nav__title { grid-column: 1; grid-row: 2; text-align: right; }

.step-nav__link--next { border-color: var(--accent); }
.step-nav__link--next:hover { box-shadow: 2px 2px 0 var(--accent); border-color: var(--accent); }
.step-nav__link--next .step-nav__hint { color: var(--accent); }

.step-nav__hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.step-nav__title { font-size: 15px; font-weight: 600; line-height: 1.25; }
.step-nav__center {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* ──── Sub-tabs (used by findings page) ─────────────────────────── */

.subtabs {
  display: flex;
  gap: 0;
  margin: 0 0 32px;
  border-bottom: 1px solid var(--paper-3);
  overflow-x: auto;
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtabs__tab {
  padding: 14px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 80ms ease, border-color 80ms ease, background 80ms ease;
  border-right: 1px solid var(--paper-3);
  flex: 1;
}
.subtabs__tab:hover { background: var(--surface-2); color: var(--ink); }
.subtabs__tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
  background: var(--surface);
}
.subtabs__id {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.subtabs__tab.is-active .subtabs__id { color: var(--accent); }
.subtabs__title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.25;
}
.subtabs__tab.is-active .subtabs__title { font-weight: 700; }

/* ──── Photo placeholder ────────────────────────────────────────── */

.photo {
  background:
    linear-gradient(135deg,
      oklch(0.78 0.06 60) 0%,
      oklch(0.66 0.08 50) 35%,
      oklch(0.48 0.06 30) 70%,
      oklch(0.32 0.04 20) 100%);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: white;
}
.photo::after {
  /* subtle texture so it doesn't look like a flat gradient */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(0,0,0,0.18), transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(255,255,255,0.10), transparent 50%);
  pointer-events: none;
}
.photo__cap {
  position: relative;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  width: 100%;
  font-size: 12.5px;
  line-height: 1.4;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.photo__cap b { font-weight: 700; }
.photo--hero { aspect-ratio: 21 / 9; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--square { aspect-ratio: 1; }

/* tone variants */
.photo--smoke {
  background: linear-gradient(160deg,
    oklch(0.6 0.04 60) 0%, oklch(0.45 0.05 40) 50%, oklch(0.28 0.04 28) 100%);
}
.photo--canopy {
  background: linear-gradient(180deg,
    oklch(0.52 0.10 145) 0%, oklch(0.36 0.08 140) 100%);
}

/* ──── Pull quote ───────────────────────────────────────────────── */

.pullquote {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--ink);
  padding: 28px 32px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  margin: 32px 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  text-wrap: balance;
}
.pullquote__src {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
  font-style: normal;
}

/* ──── Layout helpers ───────────────────────────────────────────── */

.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.section { margin-top: 64px; }
.section--tight { margin-top: 40px; }

.divider {
  border: 0;
  border-top: 1px solid var(--paper-3);
  margin: 56px 0;
}

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

/* ──── Responsive ───────────────────────────────────────────────── */

@media (max-width: 780px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--paper-3);
  }
  .page { padding: 36px 24px 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}


/* ──── App card — clickable preview that opens the Shiny app in a new tab ──── */

.app-card {
  display: block;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-line);
  border-radius: var(--r-md);
  padding: 20px 24px 22px;
  text-decoration: none;
  color: var(--ink);
  margin: 12px 0 8px;
  transition: transform 100ms ease, box-shadow 100ms ease, border-color 100ms ease, background 100ms ease;
  position: relative;
  max-width: 760px;
  cursor: pointer;
}
.app-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--accent);
  border-color: var(--accent);
  background: oklch(0.96 0.03 50);
}
.app-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.app-card__id {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.app-card__open {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: white;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 80ms ease, transform 80ms ease;
}
.app-card:hover .app-card__open {
  background: var(--accent-hover);
}
.app-card__body { display: flex; flex-direction: column; gap: 6px; }
.app-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.app-card__title::after {
  content: " \2192";
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 700;
}
.app-card__caption {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.app-card__caption b { color: var(--ink); font-weight: 600; }
