/* HintWise Studio. One brand colour (--accent), light by default, dark when
   the visitor's system asks for it. The ideas pages (Next up, browse, topics,
   the owner's notes) share these tokens with the studio pages. */
:root {
  color-scheme: light dark;
  --bg: #fcfbf8;
  --bg-soft: #f4f2ec;
  --card: #ffffff;
  --card-hover: #fbfaf6;
  --border: #e4e0d6;
  --text: #1d2130;
  --text-dim: #454b5b;
  --text-faint: #5c6373;
  --accent: #2f45c4;
  --accent-hover: #2537a6;
  --accent-ink: #ffffff;
  --accent-soft: #2f45c414;
  --accent-tint: #eef0fc;
  --weekend: var(--text);
  --week12: #8a5a00;
  --multi: var(--text);
  --implemented: var(--accent);
  --research: var(--text);
  --research-soft: var(--accent-soft);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1160px;
  --nav-h: 64px;
  --shadow: 0 1px 2px rgba(29, 33, 48, 0.04), 0 8px 28px rgba(29, 33, 48, 0.07);
  --shadow-lift: 0 2px 4px rgba(29, 33, 48, 0.05), 0 16px 40px rgba(29, 33, 48, 0.11);
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Nunito", "Atkinson Hyperlegible Next", ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --bg-soft: #1a1d25;
    --card: #1c1f28;
    --card-hover: #21252f;
    --border: #2e323d;
    --text: #eef0f5;
    --text-dim: #bfc6d3;
    --text-faint: #9ea6b6;
    --accent: #a9b8ff;
    --accent-hover: #c2ceff;
    --accent-ink: #12141a;
    --accent-soft: #a9b8ff1f;
    --accent-tint: #a9b8ff17;
    --week12: #f0c060;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 28px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons don't inherit font or color by default — make them, so button-based
   cards render their text in the page's font/color instead of the UA default. */
button { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.footer {
  margin-top: 48px;
  padding-bottom: 40px;
  color: var(--text-dim);
  font-size: 14px;
  overflow-wrap: anywhere;
}
/* Divider inside .wrap's padding, so it lines up with the content. */
.footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}
.footer p { margin: 0 0 8px; }

/* ---- Hero ---- */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.hero__title { font-size: 2.6rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero__tagline { font-size: 1.2rem; color: var(--text); margin: 0 0 18px; font-weight: 500; }
.hero__desc { font-size: 1rem; color: var(--text-dim); max-width: 760px; margin: 0 0 18px; }
.hero__meta { font-size: 0.85rem; color: var(--text-faint); margin: 0; }

/* ---- Sections ---- */
.section { margin: 44px 0; }
.section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.section__peppers { font-size: 1.5rem; line-height: 1; }
.section__title { font-size: 1.5rem; margin: 0; letter-spacing: -0.01em; }
.section__count {
  font-size: 0.8rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}
.section__blurb { width: 100%; color: var(--text-dim); font-size: 0.95rem; margin: 4px 0 0; }

.section[data-tier="weekend"] .section__title { color: var(--weekend); }
.section[data-tier="1-2-weeks"] .section__title { color: var(--week12); }
.section[data-tier="multi-week"] .section__title { color: var(--multi); }
.section[data-tier="implemented"] .section__title { color: var(--implemented); }
.section[data-tier="research"] .section__title { color: var(--research); }

/* Research cards get a subtle purple border tint */
.section[data-tier="research"] .card {
  border-color: var(--border);
}
.section[data-tier="research"] .card:hover {
  border-color: var(--research);
}

/* ---- Cards ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card__title { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--text); }
.card__peppers { font-size: 1rem; flex-shrink: 0; }
.card__summary { color: var(--text-dim); font-size: 0.92rem; margin: 0; }
.card__foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.tag {
  font-size: 0.72rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}
.tag--date { color: var(--text-faint); }
.tag--live { color: var(--implemented); border-color: var(--implemented); }

/* ---- Fold / show more ---- */
.fold-btn {
  margin-top: 18px;
  background: var(--bg-soft);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fold-btn:hover { background: var(--card-hover); color: var(--text); border-color: var(--accent); }
.hidden { display: none !important; }

.empty {
  color: var(--text-faint);
  font-style: italic;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(3px);
}
.modal__panel {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--text); }

.detail__peppers { font-size: 1.3rem; }
.detail__title { font-size: 1.7rem; margin: 6px 0 12px; letter-spacing: -0.01em; }
.detail__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.detail h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 22px 0 8px;
}
.detail p { color: var(--text); margin: 0 0 6px; }
.detail ul { margin: 0; padding-left: 20px; color: var(--text); }
.detail li { margin-bottom: 5px; }
.detail .inspired { color: var(--text-dim); font-size: 0.9rem; }
.detail__links { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.detail__cta { margin-top: 22px; padding-top: 16px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 18%, transparent); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.detail__cta p { margin: 0; }
.btn-link {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
}
.btn-link:hover { text-decoration: none; opacity: 0.92; }
.btn-link--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ---- Research modal detail ---- */
.detail--research .detail h3 { color: var(--research); }

.research-paper {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--research);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.research-paper__title { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 3px; }
.research-paper__meta { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 6px; }
.research-paper__abstract { font-size: 0.88rem; color: var(--text-dim); margin: 6px 0; }
.research-paper__relevance { font-size: 0.85rem; color: var(--research); margin: 4px 0 0; font-style: italic; }
.research-paper__doi { font-size: 0.8rem; color: var(--research); margin-top: 6px; display: inline-block; }
.research-paper__doi:hover { text-decoration: underline; }

.research-refs { display: flex; flex-direction: column; gap: 8px; }
.research-ref {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.research-ref__title { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.research-ref__meta { font-size: 0.78rem; color: var(--text-faint); margin: 2px 0 4px; }
.research-ref__relevance { font-size: 0.84rem; color: var(--text-dim); margin: 0; }

.research-plan { display: flex; flex-direction: column; gap: 10px; }
.research-plan__overview { color: var(--text); margin: 0; }
.research-plan__milestones { margin: 0; padding-left: 20px; color: var(--text); }
.research-plan__milestones li { margin-bottom: 6px; font-size: 0.9rem; }
.research-plan__venues { font-size: 0.9rem; color: var(--text-dim); margin: 0; }
.research-plan__resources { font-size: 0.9rem; color: var(--text-dim); margin: 0; }
.research-plan__risks { margin: 4px 0 0 18px; font-size: 0.88rem; color: var(--text-dim); }
.research-plan__irb {
  font-size: 0.85rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 0;
}

/* ---- Commercial idea detail ---- */
.tag--score { color: var(--accent); border-color: var(--accent); }
.tag--review { color: var(--weekend); border-color: var(--weekend); }
.tag--provisional { color: var(--week12); border-color: var(--week12); }
.tag--kind { color: var(--text-faint); font-size: 0.72rem; text-transform: lowercase; }

/* Provisional ideas state their shortfall up front, next to the scores. */
.gap-panel {
  border: 1px solid var(--week12);
  border-radius: var(--radius);
  background: #fbbf2411;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
}
.gap-panel__head { margin: 0 0 0.5rem; font-weight: 600; color: var(--week12); }
.gap-panel .sublabel { margin-top: 0.7rem; }
.gap-panel ul, .gap-panel p:last-child { margin-bottom: 0; }

.score-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 6px;
}
.score-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.score-total { display: flex; align-items: baseline; gap: 6px; }
.score-total__num { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.score-total__of { font-size: 0.85rem; color: var(--text-faint); }
.score-panel__rows { display: flex; flex-direction: column; gap: 8px; }
.score-row { display: grid; grid-template-columns: 9.5rem 1fr 2.5rem; align-items: center; gap: 10px; }
.score-row__label { font-size: 0.85rem; color: var(--text); }
.score-row__bar { height: 6px; background: var(--card-hover); border-radius: 999px; overflow: hidden; }
.score-row__fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.score-row__val { font-size: 0.8rem; color: var(--text-faint); text-align: right; font-variant-numeric: tabular-nums; }
.detail .score-item__why { font-size: 0.8rem; color: var(--text-faint); margin: 2px 0 0; overflow-wrap: anywhere; }

.detail .problem {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.deflist { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 14px; margin: 0; }
.deflist dt { font-size: 0.82rem; color: var(--text-faint); padding-top: 2px; }
.deflist dd { margin: 0; color: var(--text); font-size: 0.92rem; }

.stack { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.item__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.item__title { font-weight: 600; font-size: 0.92rem; }
.item__meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-faint); }
.detail .item__body { font-size: 0.88rem; color: var(--text-dim); margin: 4px 0 0; }
.detail .sublabel { font-size: 0.78rem; color: var(--text-faint); margin: 6px 0 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.detail .dim, .detail ul.dim { color: var(--text-dim); }

@media (max-width: 560px) {
  .score-row { grid-template-columns: 7.5rem 1fr 2.2rem; }
  .deflist { grid-template-columns: 1fr; gap: 2px; }
  .deflist dd { margin-bottom: 8px; }
}

@media (max-width: 560px) {
  .hero__title { font-size: 2rem; }
  .modal__panel { padding: 24px 20px; }
}

/* ---------------------------------------------------------------------------
   Navigation, browse and topics (added 2026-11-01)
   The archive outgrew a single scrolling page: 601 ideas, 167 in one tier.
   These are the three views plus the controls that make them navigable.
   --------------------------------------------------------------------------- */


.hero__cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 500;
}
.btn:hover { opacity: 0.92; }
.btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Tier jump bar: a long page needs a way between sections. */
.jumpbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.jumpbar__inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 20px;
  scrollbar-width: none;
}
.jumpbar__inner::-webkit-scrollbar { display: none; }
.jumpbar__link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.jumpbar__link:hover { color: var(--text); border-color: var(--accent); }
.jumpbar__link--top { margin-left: auto; }

/* The collapse control belongs in the section head, where it is reachable
   without scrolling past every expanded card. */
.section__toggle {
  margin-left: auto;
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}
.section__toggle:hover { color: var(--text); border-color: var(--accent); }
.section__foot { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.section__foot .fold-btn { margin-top: 0; }
.fold-link { color: var(--accent); text-decoration: none; font-size: 0.88rem; }
.fold-link:hover { text-decoration: underline; }

.pagehead { padding: 34px 20px 10px; }
.pagehead__title { font-size: 1.9rem; margin: 0 0 6px; }
.pagehead__sub { color: var(--text-dim); margin: 0; }

.controls { border-bottom: 1px solid var(--border); padding: 14px 0 16px; margin-bottom: 24px; }
.search { position: relative; max-width: 560px; }
.search__input {
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 38px 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}
.search__input:focus { outline: none; border-color: var(--accent); }
.search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}
.search__clear:hover { color: var(--text); }

.filters { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.filterrow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.filterrow__label {
  color: var(--text-faint);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 56px;
}
.chip {
  background: var(--bg-soft);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.controls__meta {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-size: 0.86rem;
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.pager { margin: 28px 0 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pager__btn {
  background: var(--bg-soft);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 40px;
}
.pager__btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.pager__btn:disabled { opacity: 0.4; cursor: default; }
.pager__btn.is-current { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pager__gap { color: var(--text-faint); padding: 0 2px; }

.topicgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 10px 0 30px;
}
.topiccard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.topiccard:hover { background: var(--card-hover); border-color: var(--accent); transform: translateY(-2px); }
.topiccard__count { font-size: 1.6rem; font-weight: 700; color: var(--accent); min-width: 2.2ch; }
.topiccard__name { color: var(--text); font-weight: 500; line-height: 1.3; }

.tag--topic { color: var(--text-dim); border-color: var(--text-faint); }

@media (max-width: 620px) {
  .pagehead__title { font-size: 1.5rem; }
  .filterrow__label { min-width: 0; width: 100%; }
}

/* Public idea page: the one-line summary leads. */
.detail .detail__lead { font-size: 1.05rem; line-height: 1.5; color: var(--text); margin: 4px 0 16px; }

/* ---------------------------------------------------------------------------
   HintWise Studio (2026-11-08): site navigation and footer on every page,
   then the home page, the Apps page and the page for each app. build.js
   writes these pages (build-studio.js); the ideas pages above are Next up.
   --------------------------------------------------------------------------- */

a:focus-visible, button:focus-visible, input:focus-visible, video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--nav-h); }
.wordmark { font-weight: 750; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark span { font-weight: 450; color: var(--text-faint); }
.site-nav__links { display: flex; align-items: center; gap: 2px; }
.site-nav__links a { color: var(--text-dim); font-size: 0.94rem; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.site-nav__links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.site-nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.site-nav__links .site-nav__cta { color: var(--accent-ink); background: var(--accent); margin-left: 8px; font-weight: 550; }
.site-nav__links .site-nav__cta:hover { color: var(--accent-ink); background: var(--accent-hover); }
@media (max-width: 560px) {
  .wordmark span { display: none; }
  .site-nav__links a { padding: 8px 8px; font-size: 0.9rem; }
  .site-nav__links .site-nav__cta { margin-left: 4px; padding: 8px 12px; }
  .site-nav__links .nav-about { display: none; }
}

.site-footer { margin-top: 96px; border-top: 1px solid var(--border); background: var(--bg-soft); color: var(--text-dim); font-size: 0.92rem; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 48px; }
.site-footer p { margin: 0 0 10px; }
.site-footer a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border); overflow-wrap: anywhere; }
.site-footer a:hover { text-decoration-color: currentColor; }
.site-footer .wordmark { display: inline-block; margin-bottom: 14px; text-decoration: none; }
.site-footer__name { color: var(--text); font-weight: 550; }
.site-footer__links { margin-top: 18px !important; display: flex; gap: 18px; flex-wrap: wrap; }
.nb { white-space: nowrap; }

/* ---- Shared studio pieces ---- */
.btn { border: 1px solid var(--accent); padding: 12px 20px; font-size: 1rem; font-weight: 550; border-radius: 10px; line-height: 1.2; }
.btn:hover { text-decoration: none; background: var(--accent-hover); border-color: var(--accent-hover); opacity: 1; }
.btn--ghost:hover, .btn--quiet:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn--quiet { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--small { padding: 9px 14px; font-size: 0.92rem; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 0.82rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.band { padding: 88px 0 0; }
.band__head { max-width: 720px; margin-bottom: 36px; }
.band__title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 12px; }
.band__sub { margin: 0; color: var(--text-dim); font-size: 1.08rem; }
.band__more { margin: 32px 0 0; }
.media { display: block; position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.media img, .media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---- Home: hero ---- */
.studio-hero { padding: 96px 0 24px; }
.studio-hero__title { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 22px; max-width: 17ch; }
.studio-hero__lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text-dim); max-width: 38em; margin: 0 0 32px; }
.studio-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.studio-hero__meta { margin: 22px 0 0; color: var(--text-faint); font-size: 0.95rem; }

/* ---- Home: featured apps ---- */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
.feature__body { padding-top: 20px; }
.feature__title { font-size: 1.45rem; letter-spacing: -0.015em; margin: 0 0 8px; }
.feature__title a { color: var(--text); }
.feature__blurb { margin: 0 0 18px; color: var(--text-dim); font-size: 1.02rem; }
.feature__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: 48px; } }

/* ---- Home: audiences ---- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.tile__label { font-weight: 650; font-size: 1.15rem; }
.tile__blurb { color: var(--text-dim); font-size: 0.95rem; flex: 1; }
.tile__count { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }

/* ---- Home: how it works ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--text); padding-top: 18px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.steps h3 { margin: 0 0 8px; font-size: 1.2rem; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--text-dim); }
.callout { margin-top: 48px; padding: 28px 30px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); display: flex; gap: 20px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.callout p { margin: 0; font-size: 1.12rem; color: var(--text); max-width: 40em; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Home: about ---- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; align-items: start; }
.about__name { font-size: 1.35rem; font-weight: 650; margin: 0 0 2px; letter-spacing: -0.01em; }
.about__role { margin: 0; color: var(--text-dim); }
.about__text p { margin: 0 0 14px; font-size: 1.05rem; color: var(--text-dim); }
.about__text p:first-child { color: var(--text); }
.about__links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px !important; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Apps page ---- */
.studio-head { padding: 64px 0 8px; }
.studio-head__title { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 12px; }
.studio-head__sub { color: var(--text-dim); font-size: 1.1rem; margin: 0; max-width: 40em; }
.appbar { position: sticky; top: var(--nav-h); z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); padding: 16px 0; margin: 20px 0 28px; border-bottom: 1px solid var(--border); }
.appbar__row { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; }
.appbar .search { flex: 1 1 260px; max-width: 360px; }
.appbar .search__input { width: 100%; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-size: 0.9rem; cursor: pointer; }
.seg button:hover { color: var(--text); border-color: var(--text-faint); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.appbar__count { color: var(--text-faint); font-size: 0.9rem; margin: 10px 0 0; }
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px 28px; }
.app-card { display: flex; flex-direction: column; }
.app-card[hidden] { display: none; }
.app-card .media { aspect-ratio: 16 / 10; }
.app-card__body { padding-top: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-card__title { margin: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.app-card__title a { color: var(--text); }
.app-card__blurb { margin: 0; color: var(--text-dim); font-size: 0.95rem; flex: 1; }
.app-card__meta { margin: 6px 0 0; display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; }
.app-card__open { margin-left: auto; font-weight: 600; }
.aud { color: var(--text-faint); }
.aud + .aud::before { content: "\00b7"; margin-right: 6px; }

/* ---- One app ---- */
.crumbs { margin: 40px 0 0; font-size: 0.92rem; color: var(--text-faint); }
.crumbs a { color: var(--text-dim); }
.app-hero { padding: 16px 0 36px; max-width: 820px; }
.app-hero__title { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 16px; }
.app-hero__lead { font-size: 1.2rem; color: var(--text-dim); margin: 0 0 26px; }
.app-shot { margin: 0 0 56px; }
.app-shot .media { aspect-ratio: auto; max-height: 720px; }
.app-shot .media img, .app-shot .media video { height: auto; max-height: 720px; object-fit: contain; background: var(--bg-soft); }
.app-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.prose h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 0 0 10px; }
.prose section + section { margin-top: 36px; }
.prose p { margin: 0 0 12px; font-size: 1.06rem; color: var(--text-dim); }
.prose ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 1.04rem; }
.prose li { margin-bottom: 6px; }
.side { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 16px; }
.side__box { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--card); }
.side__box h2 { font-size: 1rem; margin: 0 0 8px; }
.side__box p { margin: 0 0 14px; color: var(--text-dim); }
.side__box p:last-child { margin-bottom: 0; }
.side__box--cta { background: var(--bg-soft); }
.taglist { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.taglist a { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.88rem; color: var(--text); }
.taglist a:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 860px) { .app-cols { grid-template-columns: 1fr; gap: 36px; } .side { position: static; } }

/* ---- Next up (the ideas pages) ---- */
.hero { padding: 56px 0 40px; }
.hero__title { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.03em; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .studio-hero { padding-top: 56px; }
  .band { padding-top: 64px; }
  .callout { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .card, .topiccard { transition: none; }
}

/* ---------------------------------------------------------------------------
   Soft, approachable layer (2026-11-08, owner: "more fluid, softer, less
   boxy, more approachable font; universal design and accessibility").
   - Body: Atkinson Hyperlegible Next (Braille Institute, for low vision);
     headings: Nunito (rounded). Both OFL, self-hosted in /fonts, so no
     third-party font requests.
   - Surfaces lift with soft shadows instead of hard outlines; borders turn
     transparent rather than disappear, so forced-colors mode still draws them.
   - Targets at least 44px, a 3px focus ring, underlined links in running
     text, no motion when the visitor asks for less. All text colours meet
     WCAG AA (4.5:1) on their backgrounds in both themes.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-next-latin-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-next-latin-italic-var.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
}

html { font-size: 106.25%; }
body { overflow-x: clip; } /* the hero wash bleeds to the window edges; clip keeps sticky bars working */ /* 17px at the default, still scales with the visitor's setting */
body { line-height: 1.65; font-feature-settings: "kern"; text-rendering: optimizeLegibility; }
h1, h2, h3, h4,
.wordmark, .studio-hero__title, .band__title, .studio-head__title, .app-hero__title,
.feature__title, .app-card__title, .tile__label, .steps h3, .about__name, .prose h2,
.hero__title, .pagehead__title, .section__title, .card__title, .detail__title, .topiccard__count {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.005em;
}
.studio-hero__title, .studio-head__title, .app-hero__title, .hero__title { letter-spacing: -0.015em; line-height: 1.1; }
.studio-hero__title { font-weight: 850; }
p, li { max-width: 72ch; }

/* Links in running text are underlined, so colour is never the only cue. */
.crumbs a, .prose a, .about__text a, .studio-hero__meta a, .side__box p a, .detail p a, .callout p a, .band__sub a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* Focus: thick, offset and rounded, on every control. */
a:focus-visible, button:focus-visible, input:focus-visible, video:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}
.search__input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Nav: airy, no hard rule. */
.site-nav { border-bottom-color: transparent; box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent); }
.site-nav__links a { border-radius: 999px; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav__links .site-nav__cta { padding: 10px 18px; }
.wordmark { font-weight: 900; }
.wordmark span { font-weight: 600; }

/* Buttons: pills with comfortable targets. */
.btn, .btn-link { border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; transition: background 0.2s, box-shadow 0.2s, transform 0.2s; }
.btn:hover, .btn-link:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn--small { min-height: 44px; padding: 10px 18px; font-size: 0.94rem; }
.btn--quiet { background: var(--card); border-color: var(--border); }
.btn--quiet:hover { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--accent); }
.btn--ghost { background: var(--card); }

.eyebrow { text-transform: none; letter-spacing: 0.01em; font-size: 0.95rem; font-weight: 700; }

/* Home hero: a soft wash of colour behind the headline (decorative only). */
.studio-hero { position: relative; isolation: isolate; padding-top: 104px; padding-bottom: 40px; }
.studio-hero::before {
  content: ""; position: absolute; z-index: -1; top: -64px; bottom: -80px;
  left: calc(50% - 50vw); right: calc(50% - 50vw); /* full bleed, so no edge shows */
  background:
    radial-gradient(40% 65% at 80% 20%, color-mix(in srgb, var(--accent) 13%, transparent), transparent),
    radial-gradient(35% 55% at 10% 85%, color-mix(in srgb, #f2a65a 16%, transparent), transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
  pointer-events: none;
}

/* Media and surfaces: rounded, lifted, no box lines. */
.media { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature .media, .app-card .media { transition: box-shadow 0.25s, transform 0.25s; }
.feature:hover .media, .app-card:hover .media { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.features { gap: 72px 48px; }
.feature__body { padding: 22px 6px 0; }
.app-card__body { padding: 16px 6px 0; }

.tile { border-color: transparent; background: var(--card); box-shadow: var(--shadow); padding: 28px 26px; border-radius: var(--radius); }
.tile:hover { border-color: transparent; box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.tile:nth-child(4n+1) { background: color-mix(in srgb, var(--card) 88%, #f2a65a); }
.tile:nth-child(4n+2) { background: color-mix(in srgb, var(--card) 90%, var(--accent)); }
.tile:nth-child(4n+3) { background: color-mix(in srgb, var(--card) 88%, #5fb3a1); }
.tile:nth-child(4n+4) { background: color-mix(in srgb, var(--card) 88%, #c58bd6); }

/* How it works: numbered circles instead of hard rules. */
.steps li { border-top: 0; padding-top: 0; }
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; margin-bottom: 14px;
}
.callout { border-color: transparent; border-radius: 28px; background: var(--accent-tint); padding: 32px 36px; }

.side__box { border-color: transparent; box-shadow: var(--shadow); border-radius: var(--radius); }
.side__box--cta { background: var(--accent-tint); box-shadow: none; }
.taglist a { padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; background: var(--bg-soft); border-color: transparent; }
.taglist a:hover { background: var(--accent-tint); color: var(--accent); }

/* Apps page controls. */
.appbar { border-bottom-color: transparent; box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent); }
.search__input { border-radius: 999px; min-height: 46px; padding-left: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); border-color: transparent; }
.seg button { min-height: 44px; padding: 8px 16px; background: var(--card); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip, .jumpbar__link, .section__toggle, .pager__btn { min-height: 40px; }
.pager__btn, .fold-btn { border-radius: 999px; }

/* Next up and ideas pages share the softer cards. */
.card, .topiccard { border-color: transparent; box-shadow: var(--shadow); }
.card:hover, .topiccard:hover { border-color: transparent; box-shadow: var(--shadow-lift); }
.hero { border-bottom-color: transparent; }
.section__head { border-bottom-color: color-mix(in srgb, var(--border) 70%, transparent); }
.modal__panel { border-radius: 28px; border-color: transparent; }

.site-footer { border-top-color: transparent; border-radius: 40px 40px 0 0; }

/* Visitors who use high-contrast or forced colours get their outlines back. */
@media (forced-colors: active) {
  .tile, .media, .side__box, .card, .topiccard, .callout, .search__input, .btn, .seg button { border: 1px solid CanvasText; }
  .studio-hero::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn-link, .media, .tile, .feature .media, .app-card .media { transition: none; }
  .btn:hover, .btn-link:hover, .tile:hover, .feature:hover .media, .app-card:hover .media { transform: none; }
}
@media (max-width: 560px) {
  .studio-hero { padding-top: 64px; }
  .callout { padding: 24px 22px; }
  .site-footer { border-radius: 28px 28px 0 0; }
}
