/**
 * DejargonateIT — Phase 1
 * Warm, editorial, human. Content first; chrome stays quiet.
 */

:root {
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tagline: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #f3ebe3;
  --bg-deep: #e8ddd2;
  --page-bg-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, #f9e4d4 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #f3e0d4 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  --surface: #fffaf6;
  --surface-2: #f7efe7;
  --ink: #1c1714;
  --ink-soft: #4a413a;
  --muted: #6b6158;

  --accent: #0f7c6e;
  --accent-hover: #0a6358;
  --accent-soft: rgba(15, 124, 110, 0.12);
  --honey: #c47a14;
  --honey-soft: rgba(196, 122, 20, 0.14);

  --border: #dfd2c4;
  --fill-soft: color-mix(in srgb, var(--surface) 88%, var(--bg-deep));
  --focus: #0f5c9a;
  --shadow-sm: 0 1px 2px rgba(28, 23, 20, 0.05);
  --shadow-md: 0 10px 36px rgba(28, 23, 20, 0.08);

  --radius: 1.5rem;
  --radius-sm: 0.85rem;
  --radius-pill: 999px;
  --tap: 3rem;
  --space: 1rem;
  --max: 44rem;
  --max-wide: 52rem;
  --app-bar-h: 3.35rem;
  --header-h: 3.75rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --app-bar-total-h: calc(var(--app-bar-h) + var(--safe-top));
}

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

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--page-bg-image);
  background-attachment: fixed;
  accent-color: var(--accent);
}

body.modal-open {
  overflow: hidden;
}

:focus {
  outline: none;
}

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

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

a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1.5px;
}

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

.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;
}

.skip-link {
  position: absolute;
  left: var(--space);
  top: var(--space);
  z-index: 300;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

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

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

/* Shared app bar layout (searching home + About / Browse / etc.) */
.site-header,
.page-home.is-searching .home-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-sizing: border-box;
  width: 100%;
  height: var(--app-bar-total-h);
  min-height: var(--app-bar-total-h);
  margin: 0 0 0.85rem;
  padding: var(--safe-top) max(0.35rem, calc((100vw - var(--max)) / 2 - 0.4rem)) 0
    max(0.875rem, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 55;
}

.page-home.is-searching .home-bar {
  position: static;
  top: auto;
  z-index: auto;
  align-self: stretch;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  border-bottom-color: color-mix(in srgb, var(--border) 75%, transparent);
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand,
.site-header .brand,
.page-home .brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
  overflow: visible;
}

.brand:hover,
.site-header .brand:hover,
.page-home .brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand__word,
.brand .logo__mark,
.page-home .brand__word,
.page-home .brand .logo__mark {
  flex: 0 0 auto;
}

.brand .logo__mark,
.page-home .brand .logo__mark {
  color: var(--accent);
  letter-spacing: -0.03em;
}

/* Compact brand used on inner pages + searching home */
.brand--compact,
.site-header .brand,
.page-home.is-searching .brand {
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  gap: 0;
  padding: 0;
  height: auto;
  min-height: 2.5rem;
  line-height: 1.15;
  align-self: center;
  transform: none;
  transform-origin: left center;
  margin-right: auto;
  overflow: visible;
}

.site-header .menu-toggle,
.page-home.is-searching .menu-toggle {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  z-index: auto;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
  transform: none;
}

.logo {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}

.logo:hover {
  color: var(--ink);
  text-decoration: none;
}

.logo__mark {
  color: var(--accent);
}

.nav-inline {
  display: none;
  flex-wrap: nowrap;
  gap: 0.15rem;
  align-items: center;
  justify-content: flex-end;
}

.nav-inline a {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-pill);
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
}

.nav-inline a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.header-search:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.header-search__icon {
  display: block;
  flex: 0 0 auto;
}

.header-search__text {
  display: none;
}

@media (min-width: 48rem) {
  .nav-inline {
    display: flex;
  }

  .menu-toggle,
  .site-menu {
    display: none !important;
  }

  .header-search {
    width: auto;
    height: 2.6rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
  }

  .header-search__icon {
    display: none;
  }

  .header-search__text {
    display: inline;
  }
}

.nav-inline a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.nav-inline a.nav-search {
  background: var(--ink);
  color: #fffaf6;
}

.nav-inline a.nav-search:hover {
  background: color-mix(in srgb, var(--ink) 88%, #fff);
  color: #fffaf6;
}

.page-home .nav-inline {
  position: fixed;
  top: 0.65rem;
  right: max(0.875rem, calc((100vw - var(--max)) / 2));
  z-index: 80;
}

.page-home.is-searching .nav-inline {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  z-index: auto;
}

.breadcrumbs {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.25rem 0 0;
  width: min(100% - 1.75rem, var(--max));
  margin-inline: auto;
}

.breadcrumbs a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

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

main#main {
  padding-top: 0.35rem;
  padding-bottom: 4rem;
}

.home-landing-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

/* Keep header + search pinned while record/results scroll beneath */
.page-home.is-searching .home-landing-stack {
  position: sticky;
  top: 0;
  z-index: 60;
  align-self: stretch;
  align-items: stretch;
  box-sizing: border-box;
  background: var(--bg);
  isolation: isolate;
}

.page-home main#main.home-stage {
  /* Landing stack sits ~2/3 up the page (≈1/3 from the top) */
  padding: clamp(4.75rem, 30vh, 34vh) 0 3.5rem;
  transition:
    padding-top var(--home-motion),
    min-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-landing-spacer {
  display: none;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transition: flex-grow var(--home-motion), min-height var(--home-motion);
}

.page-home.is-searching main#main.home-stage {
  padding: 0 0 3rem;
}

/* Home stage: landing ↔ searching */
.page-home {
  min-height: 100dvh;
}

body.page-home {
  --menu-clearance: 3.25rem;
  --home-bar-h: var(--app-bar-h);
}

.page-home.is-searching {
  --home-search-input-h: 3.35rem;
  --home-search-h: calc(0.4rem + 0.55rem + var(--home-search-input-h) + 1px);
}

.page-home .home-stage {
  --home-motion: 480ms cubic-bezier(0.22, 1, 0.36, 1);
  --home-motion-soft: 520ms cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: visible;
  container-type: inline-size;
  transition:
    padding var(--home-motion),
    min-height var(--home-motion),
    align-items var(--home-motion);
}

.page-home.is-searching .home-stage {
  align-items: stretch;
  min-height: 0;
}

/* Header chrome: transparent mid-page on landing → sticky bar when searching */
.page-home .home-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0 0 0.85rem;
  padding: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  /* Do not set backdrop-filter here — it makes position:fixed menu bind to this bar */
  transition:
    background-color var(--home-motion),
    border-color var(--home-motion),
    padding var(--home-motion),
    margin var(--home-motion),
    width var(--home-motion),
    height var(--home-motion),
    min-height var(--home-motion),
    max-width var(--home-motion),
    align-self var(--home-motion),
    border-radius var(--home-motion);
}

.page-home.is-searching .home-bar {
  /* Full-bleed bar inside sticky `.home-landing-stack` */
  height: var(--app-bar-total-h);
  min-height: var(--app-bar-total-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: color-mix(in srgb, var(--border) 75%, transparent);
}

.page-home .brand {
  font-size: clamp(2.4rem, 14cqi, 4.15rem);
  padding: 0.15em 0;
  white-space: nowrap;
  transform-origin: center center;
  transition:
    font-size var(--home-motion),
    padding var(--home-motion),
    height var(--home-motion),
    gap var(--home-motion),
    transform-origin var(--home-motion);
}

.page-home.is-searching .brand {
  /* size/layout from shared `.brand--compact, .site-header .brand, ...` */
  transition:
    font-size var(--home-motion),
    padding var(--home-motion),
    height var(--home-motion),
    gap var(--home-motion),
    transform-origin var(--home-motion);
}

/* Menu: fixed corner on landing; in-bar on search */
.page-home .menu-toggle {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: calc(0.75rem + env(safe-area-inset-right, 0px));
  z-index: 80;
  width: 2.85rem;
  height: 2.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
  transition:
    width var(--home-motion),
    height var(--home-motion),
    top var(--home-motion),
    right var(--home-motion),
    opacity calc(var(--home-motion) * 0.7);
}

.page-home.is-searching .menu-toggle {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  z-index: auto;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  flex: 0 0 auto;
  align-self: center;
  transform: none;
}

.page-home .tagline {
  font-family: var(--font-tagline);
  font-size: clamp(1.45rem, 4.8vw, 1.85rem);
  font-weight: 500;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--ink);
  text-align: center;
  align-self: center;
  max-height: 4.5rem;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition:
    opacity calc(var(--home-motion) * 0.65),
    max-height var(--home-motion),
    margin var(--home-motion),
    transform calc(var(--home-motion) * 0.75);
}

.page-home.is-searching .tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
  transform: translateY(-0.6rem);
  pointer-events: none;
}

.search-chrome {
  width: 100%;
  align-self: stretch;
}

.page-home .search-chrome {
  display: flex;
  justify-content: center;
}

.page-home.is-searching .search-chrome {
  position: static;
  top: auto;
  z-index: auto;
  align-self: stretch;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  padding: 0.4rem max(0.875rem, calc((100vw - var(--max)) / 2)) 0.55rem;
  background: var(--bg);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.page-home.is-searching .search-chrome::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.25rem;
  height: 1.25rem;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg), transparent);
}

.page-home .search-block {
  width: 100%;
  max-width: min(100%, 28rem);
  align-self: center;
  position: relative;
  transform: translateY(0);
  transition:
    margin var(--home-motion),
    transform var(--home-motion),
    max-width var(--home-motion);
}

.page-home.is-searching .search-block {
  position: static;
  top: auto;
  z-index: auto;
  margin-top: 0;
  max-width: min(100%, 28rem);
  transform: translateY(0);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.page-home.is-searching .search-block::before,
.page-home.is-searching .search-block::after {
  display: none;
}

.page-home.is-searching .search-block input[type="search"] {
  position: relative;
  z-index: 1;
  background: var(--surface);
}

.page-home.is-from-browse .search-chrome,
.page-home.is-from-browse .search-block {
  display: none;
}

/* Results: fade + rise under the morphing header */
.page-home .home-output {
  width: 100%;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(1.35rem);
  transition:
    opacity calc(var(--home-motion-soft) * 0.85) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--home-motion-soft),
    visibility 0ms linear 360ms,
    max-height 0ms linear 360ms;
}

.page-home.is-searching .home-output,
.page-home.has-results .home-output {
  opacity: 1;
  visibility: visible;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
  transform: none;
  position: relative;
  z-index: 1;
  transition:
    opacity var(--home-motion-soft),
    visibility 0ms linear 0ms,
    max-height 0ms linear 0ms;
  transition-delay: 70ms, 0ms, 0ms;
}

.page-home.has-results:not(.is-searching) .home-landing-spacer {
  flex: 0 0 clamp(1.25rem, 6vh, 3rem);
  min-height: clamp(1.25rem, 6vh, 3rem);
}

/* About info button */
.menu-toggle {
  position: fixed;
  top: calc(0.85rem + env(safe-area-inset-top, 0px));
  right: calc(0.85rem + env(safe-area-inset-right, 0px));
  z-index: 80;
  width: 2.85rem;
  height: 2.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
}

.menu-toggle:hover {
  background: transparent;
}

/* About panel (info icon) */
.menu-toggle:hover .menu-toggle__icon {
  color: var(--ink-soft);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
  color: var(--accent-hover);
}

.menu-toggle__icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--ink);
  transition: color 180ms ease;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu-toggle,
body.menu-open .page-home .menu-toggle,
body.menu-open .page-home.is-searching .menu-toggle {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: calc(0.75rem + env(safe-area-inset-right, 0px));
  z-index: 100;
  width: 2.85rem;
  height: 2.85rem;
}

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(28, 23, 20, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 24rem);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--surface);
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: -12px 0 40px rgba(28, 23, 20, 0.1);
  padding: 0;
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.site-menu.is-open .site-menu__panel {
  transform: translateX(0);
}

.site-menu__panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 2.75rem;
  flex: 1 1 auto;
}

.site-menu__about {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 3.25rem 1.15rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.site-menu__about-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.site-menu__prose {
  margin-bottom: 1rem;
}

.site-menu__steps {
  margin-bottom: 0.5rem;
}

.site-menu__discovery {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.site-menu__discovery .section-heading {
  font-size: 1.05rem;
}

.site-menu__close {
  flex: 0 0 auto;
  margin-top: auto;
  width: calc(100% - 2.3rem);
  margin-inline: 1.15rem;
  margin-bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.site-menu__close:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.site-menu__panel a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
}

.site-menu__panel a:hover {
  background: var(--surface-2);
  color: var(--accent-hover);
}

.site-menu__icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--accent);
}

.site-menu__search:hover .site-menu__icon {
  color: var(--accent-hover);
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-stage,
  .page-home .home-bar,
  .page-home .brand,
  .page-home .tagline,
  .page-home .search-chrome,
  .page-home .search-block,
  .page-home .home-landing-stack,
  .page-home .home-landing-spacer,
  .page-home .home-output,
  .page-home .menu-toggle,
  .menu-toggle__icon {
    transition: none !important;
  }

  .page-home .home-output {
    transform: none !important;
  }

  .site-menu,
  .site-menu__panel {
    transition: none !important;
  }
}

/* Legacy hero bits kept for non-home pages */
.hero {
  padding: 3rem 0 2rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 9vw, 3.35rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.hero__brand .logo__mark {
  color: var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.8vw, 1.85rem);
  font-weight: 550;
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  color: var(--ink);
  max-width: none;
}

.hero__sub {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 38ch;
  line-height: 1.55;
}

.search-block {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.search-block--hero {
  padding: 0;
}

.search-block label,
.field-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.search-block input[type="search"] {
  width: 100%;
  min-height: 3.35rem;
  padding: 0 1.1rem;
  font-size: 1.125rem;
  font-family: var(--font);
  border: 2px solid color-mix(in srgb, var(--border) 65%, #c4a882);
  border-radius: var(--radius-sm);
  background: var(--fill-soft);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.search-block input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.35rem;
  cursor: pointer;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11' stroke='%230f7c6e' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.search-block input[type="search"]::-webkit-search-cancel-button:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11' stroke='%230a6358' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.search-block input[type="search"]::placeholder {
  color: #9a8f84;
}

.search-block input[type="search"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: var(--fill-soft);
}

.search-hint {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.live-results {
  margin-top: 1rem;
}

.live-results:empty {
  display: none;
}

.live-results__item {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.75rem 1.15rem 0.15rem;
  margin-bottom: 0.35rem;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  min-height: var(--tap);
  transition: opacity 0.15s ease;
  text-decoration: none;
}

.live-results__item:hover,
.live-results__item:focus-visible {
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.88;
}

.live-results__item:hover .live-results__go,
.live-results__item:focus-visible .live-results__go {
  opacity: 1;
  transform: translateX(0.15rem);
}

.live-results__copy {
  display: block;
  /* Wide enough for ~2 lines on a typical one-liner, not a single long line */
  max-width: min(100% - 1.75rem, 46ch);
}

.live-results__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--accent);
}

.live-results__subtitle {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 0.2rem;
}

.live-results__liner {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 500;
}

.live-results__go {
  position: absolute;
  right: 0.15rem;
  bottom: 1.05rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.live-results__heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
  color: var(--ink-soft);
}

.back-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 0.5rem 0 0.15rem;
}

.back-row[hidden] {
  display: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem 0;
  min-height: 0;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.zero-state {
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.page-home .zero-state {
  width: 100%;
  max-width: min(100%, 28rem);
  margin-left: auto;
  margin-right: auto;
}

.page-home .zero-state .request-inline {
  max-width: none;
  width: 100%;
}

.page-home .request-inline--zero {
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.zero-state__msg {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.ai-backstop-loading {
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

.record--ai .record__name {
  color: var(--honey);
}

.record--ai .entry-block--purpose {
  margin-top: 2.5rem;
}

.record__ai-footer {
  margin: 1.75rem 0 0;
  max-width: 32ch;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}

/* Glanceable full record */
.record {
  margin-top: 1.5rem;
  padding: 0 0 calc(6rem + env(safe-area-inset-bottom, 0));
}

#record-actions-dock,
.record-actions {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  pointer-events: none;
}

.record-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--bg) 35%, var(--border));
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  box-shadow:
    0 2px 4px rgba(28, 23, 20, 0.06),
    0 10px 24px rgba(28, 23, 20, 0.14);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  pointer-events: auto;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.record-actions__btn:hover,
.record-actions__btn:focus-visible {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  outline: none;
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(28, 23, 20, 0.08),
    0 14px 32px rgba(28, 23, 20, 0.16);
}

.record-actions__btn.is-flashing {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 16%, var(--bg) 72%);
  box-shadow:
    0 2px 6px rgba(28, 23, 20, 0.08),
    0 12px 28px rgba(28, 23, 20, 0.15);
}

.record-actions__btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.record-actions__icon {
  flex: 0 0 auto;
}

.record-actions__status {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  max-width: min(70vw, 14rem);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fffaf6;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: right;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.record-actions__status[hidden] {
  display: none;
}

.record[hidden] {
  display: none;
}

.record__masthead {
  position: sticky;
  top: var(--app-bar-total-h);
  z-index: 45;
  margin: 0 0 0.35rem;
  padding: 1.7rem 0 0.55rem;
  background: transparent;
  isolation: isolate;
}

.record__masthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--bg);
  pointer-events: none;
}

.page-home.is-searching .record__masthead {
  top: calc(var(--app-bar-total-h) + var(--home-search-h));
}

.page-home.is-from-browse.is-searching .record__masthead {
  top: var(--app-bar-total-h);
}

.page-home.is-record .home-landing-stack,
.page-home.is-record .home-bar,
.page-home.is-record .search-chrome,
.page-home.is-record .brand,
.page-home.is-record .search-block {
  transition: none !important;
}

.page-home.is-record .home-landing-stack {
  flex-shrink: 0;
}

.page-home.is-record .home-stage {
  container-type: normal;
}

.page-home.is-record.is-searching {
  --record-chrome-h: calc(var(--app-bar-total-h) + var(--home-search-h));
  background-image: none;
  background-color: var(--bg);
}

.page-home.is-from-browse.is-record.is-searching {
  --record-chrome-h: var(--app-bar-total-h);
}

/* Record view: pin header + search to the viewport; only record body scrolls */
.page-home.is-record.is-searching main#main.home-stage {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  box-sizing: border-box;
  background: var(--bg);
}

.page-home.is-record.is-searching .home-landing-stack {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  flex-shrink: 0;
  align-self: stretch;
  width: 100%;
  padding-top: 0;
  background: var(--bg);
  isolation: isolate;
}

.page-home.is-record.is-searching .home-landing-stack::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.35rem;
  height: 1.35rem;
  pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 88%, transparent), transparent);
}

.page-home.is-record.is-searching .home-bar {
  align-items: center;
  padding-top: var(--safe-top);
  padding-bottom: 0;
  height: var(--app-bar-total-h);
  min-height: var(--app-bar-total-h);
  margin-bottom: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}

.page-home.is-record.is-searching .search-chrome::after {
  display: none;
}

.page-home.is-record.is-searching .home-output {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--record-chrome-h) max(0.875rem, calc((100vw - var(--max)) / 2)) 0;
  box-sizing: border-box;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-home.is-record.is-searching .home-output::-webkit-scrollbar {
  display: none;
}

.page-home.is-record.is-searching .back-row {
  margin: 0.35rem 0 0;
}

.page-home.is-record.is-searching .record {
  margin-top: 0;
}

.page-home.is-record.is-searching .record__masthead,
.page-home.is-from-browse.is-record.is-searching .record__masthead {
  top: 0;
  padding-top: 1rem;
}

.record__name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 11vw, 4rem);
  font-weight: 650;
  margin: 0 0 0.35rem;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--accent);
}

.record__subtitle {
  margin: 0 0 0.45rem;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.record__lede {
  max-width: min(100%, 34ch);
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.35rem);
}

.record__liner {
  font-family: inherit;
  font-size: inherit;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 0.75rem;
  max-width: none;
}

.record__liner--pending {
  font-style: italic;
  color: var(--muted);
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  max-width: min(100%, 38ch);
}

.record__kind {
  margin: 0 0 0.5rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  opacity: 0.85;
  text-align: right;
}

.record__more {
  margin-top: 1.75rem;
  padding-top: 1.85rem;
}

.record__more:empty {
  display: none;
}

.record-guide {
  margin-top: 1.75rem;
  max-width: min(100%, 46ch);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.record-guide__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--honey);
  text-decoration: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.22em;
  cursor: pointer;
  transition: color 0.15s ease;
}

.record-guide__toggle:hover,
.record-guide__toggle:focus-visible {
  color: color-mix(in srgb, var(--honey) 82%, #000);
}

.record-guide__toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--honey) 55%, transparent);
  outline-offset: 2px;
}

.record-guide__toggle-label {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}

.record-guide__toggle[hidden] {
  display: none;
}

.record-guide__stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: stretch;
}

.record-guide__step {
  margin: 0 0 1.75rem;
  max-width: 48ch;
  scroll-margin-top: 1rem;
}

.record-guide__step[hidden],
.record-guide__examples[hidden],
.record-guide__analogies[hidden] {
  display: none;
}

.record-guide__step.is-revealed,
.record-guide__examples.is-revealed,
.record-guide__analogies.is-revealed {
  animation: record-guide-reveal 0.28s ease;
}

.record-guide__example-item[hidden],
.record-guide__analogy-item[hidden] {
  display: none;
}

.record-guide__example-item.is-revealed,
.record-guide__analogy-item.is-revealed {
  animation: record-guide-reveal 0.28s ease;
}

.record-guide__examples .entry-block__label,
.record-guide__analogies .entry-block__label {
  margin-bottom: 0.7rem;
}

.record-guide__examples.entry-block--example,
.record-guide__analogies.entry-block--analogy {
  margin-top: 0;
}

.record-guide__example-list,
.record-guide__analogy-list {
  margin: 0;
}

.record-guide__example-list .example-list__item,
.record-guide__analogy-list .example-list__item {
  border-bottom: none;
  scroll-margin-top: 1rem;
}

@keyframes record-guide-reveal {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.record-guide__step .entry-block__label {
  margin-bottom: 0.55rem;
}

.record-guide__step .entry-block__body {
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.58;
}

.record-guide.is-complete .record-guide__stack .record-guide__step:last-child {
  margin-bottom: 0;
}

.entry-block {
  margin: 0 0 2.35rem;
  padding: 0;
  max-width: 48ch;
  background: none;
  border: none;
}

.entry-block:last-child {
  margin-bottom: 0;
}

.entry-block__label {
  margin: 0 0 0.7rem;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.entry-block__label::after {
  content: "";
  display: block;
  width: 60%;
  height: 5px;
  margin-top: 0.45rem;
  background: var(--honey);
  clip-path: polygon(0 28%, 90% 50%, 0 72%);
}

.entry-block__body {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.record__more > .entry-block:first-child {
  margin-top: 0;
}

.record__more .entry-block__label {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0 0 0.7rem;
}

.entry-block--purpose .entry-block__body {
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.58;
}

.entry-block--example {
  margin-top: 2.5rem;
}

.example-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 48ch;
}

.example-list__item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 1.05rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
}

.example-list--single .example-list__item {
  grid-template-columns: minmax(0, 1fr);
}

.example-list__item:first-child {
  padding-top: 0.15rem;
}

.example-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.example-list__num {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 650;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--honey);
}

.example-list__body {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.58;
}

.entry-block--analogy {
  margin-top: 2.15rem;
}

.analogy-carousel__viewport {
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.analogy-carousel__track {
  display: flex;
  transition: transform 0.22s ease;
  will-change: transform;
}

.analogy-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  margin: 0;
}

.analogy-carousel__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.analogy-carousel__btn {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.analogy-carousel__btn:hover:not(:disabled),
.analogy-carousel__btn:focus-visible:not(:disabled) {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.analogy-carousel__btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.analogy-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.analogy-carousel__dot {
  width: 0.42rem;
  height: 0.42rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.analogy-carousel__dot.is-active {
  background: var(--ink);
  transform: scale(1.15);
}

.analogy-carousel__dot:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.entry-block--aside {
  margin-top: 2.15rem;
}

.entry-block--aside .entry-block__body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.58;
}

.entry-block--related {
  margin-top: 2.6rem;
  max-width: 46ch;
}

.entry-block--related .entry-block__label {
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
}

.entry-block--related .entry-block__label::after {
  width: 0.85rem;
  height: 2px;
  margin-top: 0.32rem;
  opacity: 0.75;
}

.entry-block__related {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.7;
  color: var(--muted);
}

.entry-block__related a {
  color: var(--ink-soft);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.entry-block__related a:hover,
.entry-block__related a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.confused-with.term-list {
  max-width: min(100%, 46ch);
}

.confused-with.term-list a {
  position: relative;
  padding-right: 2.35rem;
}

.confused-with.term-list a:link,
.confused-with.term-list a:visited,
.confused-with.term-list a:active {
  border-color: var(--border);
  color: inherit;
  text-decoration: none;
}

.confused-with.term-list a:hover,
.confused-with.term-list a:focus-visible {
  border-color: var(--accent);
}

.confused-with .term-list__go {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: -0.275rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.confused-with a:hover .term-list__go,
.confused-with a:focus-visible .term-list__go {
  opacity: 1;
  transform: rotate(-45deg) translate(0.12rem, 0.12rem);
}

.confused-with.term-list strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.confused-with.term-list strong .confused-with__subtitle {
  display: inline;
  margin-top: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  color: var(--muted);
  line-height: inherit;
}

.confused-with.term-list a > span:not(.term-list__go) {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.entry-block--confused {
  max-width: min(100%, 46ch);
  margin-bottom: 0;
}

.record-feedback {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 1.75rem;
  padding-top: 1.85rem;
  max-width: min(100%, 28rem);
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
}

.record-feedback input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.7rem 0.9rem;
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.record-feedback input[type="text"]::placeholder {
  color: var(--ink-soft);
  opacity: 1;
}

.record-feedback input[type="text"]:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--honey) 55%, var(--border));
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--honey-soft);
}

.record-feedback button {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.7rem 1.05rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--honey);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fffaf6;
  cursor: pointer;
  min-height: var(--tap);
  transition: background-color 0.15s ease;
}

.record-feedback button:hover,
.record-feedback button:focus-visible {
  background: color-mix(in srgb, var(--honey) 86%, #000);
  color: #fffaf6;
}

.record-feedback button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.page-home .site-footer {
  margin-top: 2rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

/* Discovery */
.discovery {
  margin-top: 2.25rem;
}

.discovery__label {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}

.chip:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent-hover);
  text-decoration: none;
}

.browse-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.browse-links a {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink-soft);
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

.browse-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.discovery + .discovery {
  margin-top: 1.75rem;
}

.request-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
  max-width: 32rem;
}

.request-inline input[type="text"] {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 1rem;
  font-size: 1.05rem;
  font-family: var(--font);
  border: 2px solid color-mix(in srgb, var(--border) 65%, #c4a882);
  border-radius: var(--radius-sm);
  background: var(--fill-soft);
  color: var(--ink);
}

.request-inline input[type="text"]::placeholder {
  color: #9a8f84;
}

.request-inline input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--accent);
}

.request-inline .btn {
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--tap);
  padding: 0 1.25rem;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 750;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: var(--muted);
  background: var(--surface-2);
  text-decoration: none;
}

.btn--block {
  width: 100%;
}

.search-block--compact {
  padding: 0;
  box-shadow: none;
}

.search-block--compact input[type="search"] {
  min-height: 2.85rem;
}

.explainer {
  margin-top: 1.5rem;
  padding: 0.25rem 0 0;
}

.explainer:empty::before {
  content: "Type above to look something up.";
  display: block;
  color: var(--muted);
  padding: 1rem 0;
}

.explainer__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 8vw, 2.85rem);
  font-weight: 650;
  margin: 0 0 1.1rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.one-liner {
  margin: 0 0 1.5rem;
}

.one-liner__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--honey);
  margin: 0 0 0.45rem;
}

.one-liner__text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  max-width: 28ch;
}

.frames {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 2rem;
}

.frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: clip;
}

.frame summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.95rem 1.1rem;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink);
}

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

.frame summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

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

.frame summary:hover {
  background: var(--surface-2);
}

.frame__body {
  margin: 0;
  padding: 0 1.1rem 1.15rem;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 42ch;
}

.related {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
}

.related__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.related__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.3rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--honey-soft);
  border: 1px solid transparent;
  color: #8a5208;
  text-decoration: none;
  font-weight: 750;
}

.related__list a:hover {
  border-color: var(--honey);
  color: var(--ink);
  text-decoration: none;
}

/* Page chrome */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 650;
  margin: 0 0 0.45rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.page-about .page-title {
  margin: 1.15rem 0 1.35rem;
}

.about-steps {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: 0;
  width: 100%;
  max-width: 20rem;
  margin: 1.75rem 0 0;
  padding: 0;
}

.about-steps__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--font-tagline);
  font-size: 1rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
}

.about-steps__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 -0.15rem;
  padding: 0;
  color: var(--accent);
  transform: translateY(-0.85rem);
}

.about-steps__arrow svg {
  display: block;
  width: 1.3rem;
  height: 1.3rem;
}

.about-steps__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.05rem;
  height: 3.05rem;
  flex: 0 0 auto;
  color: var(--accent);
}

.about-steps__icon svg {
  display: block;
  width: 3.05rem;
  height: 3.05rem;
}

.about-steps__icon--lightbulb svg {
  width: 2.86rem;
  height: 2.86rem;
}

@media (max-width: 28rem) {
  .about-steps {
    max-width: 100%;
    column-gap: 0;
  }

  .about-steps__step {
    font-size: 0.92rem;
    gap: 0.65rem;
  }

  .about-steps__icon {
    width: 2.67rem;
    height: 2.67rem;
  }

  .about-steps__icon svg {
    width: 2.67rem;
    height: 2.67rem;
  }

  .about-steps__icon--lightbulb svg {
    width: 2.5rem;
    height: 2.5rem;
  }

  .about-steps__arrow {
    margin: 0 -0.12rem;
    transform: translateY(-0.72rem);
  }

  .about-steps__arrow svg {
    width: 1.15rem;
    height: 1.15rem;
  }
}

.page-lede {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 40ch;
  line-height: 1.55;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
  color: var(--ink);
}

.stack-gap {
  margin-top: 0.75rem;
}

.back-spacing {
  margin-bottom: 1rem;
}

.empty {
  text-align: left;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.prose {
  max-width: 42ch;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.about-steps + .discovery {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}

.chip[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* Browse */
.browse-head {
  position: sticky;
  top: var(--app-bar-total-h);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.35rem;
  padding: 0.35rem 0 0.85rem;
  isolation: isolate;
}

.browse-head::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  pointer-events: none;
}

.browse-head .page-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.browse-head__controls {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.browse-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.browse-section-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.browse-section-action:hover,
.browse-section-action:focus-visible {
  border-color: var(--accent);
  color: var(--accent-hover);
  outline: none;
}

.browse-section-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.browse-filter-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.browse-filter__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

.browse-filter__toggle:hover,
.browse-filter__toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent-hover);
  outline: none;
}

.browse-filter__toggle[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

@media (max-width: 42rem) {
  .browse-head {
    flex-wrap: wrap;
  }

  .browse-head__controls {
    width: 100%;
    justify-content: space-between;
  }

  .browse-section-actions {
    justify-content: flex-start;
  }
}

.browse-filter__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 20;
  width: min(calc(100vw - 2rem), 22rem);
  padding: 0.9rem 0.95rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.browse-filter__panel[hidden] {
  display: none;
}

.browse-filter__label {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.browse-filter__types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.browse-filter__chip {
  cursor: pointer;
  font: inherit;
  gap: 0.4rem;
}

.browse-filter__chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.browse-filter__count {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted);
}

.browse-filter__chip[aria-pressed="true"] .browse-filter__count {
  color: var(--accent-hover);
}

.browse-filter__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.browse-filter__action {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-hover);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.browse-filter__action:hover,
.browse-filter__action:focus-visible {
  color: var(--ink);
  outline: none;
}

.browse-section {
  margin-bottom: 1.1rem;
  scroll-margin-top: calc(var(--app-bar-h) + 4.25rem);
}

.browse-section:not(.is-collapsed) {
  margin-bottom: 2.25rem;
}

.browse-section h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.browse-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.browse-section__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.browse-section__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.browse-section__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.browse-section__count {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.browse-section__chevron {
  transition: transform 0.2s ease;
}

.browse-section.is-collapsed .browse-section__chevron {
  transform: rotate(-90deg);
}

.browse-section.is-collapsed h2 {
  margin-bottom: 0;
  border-bottom-color: transparent;
}

.browse-section__lede {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 1rem;
}

.browse-subtitle {
  display: inline;
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.term-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.term-list a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-height: var(--tap);
}

.term-list a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.term-list strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.term-list span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Tools */
.category-section {
  margin-bottom: 2rem;
}

.category-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 36rem) {
  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tool-card {
  display: block;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  min-height: var(--tap);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.tool-card__name {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.tool-card__blurb {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.tool-detail__meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-weight: 700;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.links-row a {
  font-weight: 750;
}

/* Triage (preserved for Phase 2; not linked in Phase 1 nav) */
.dim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 30rem) {
  .dim-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dim-card {
  width: 100%;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-height: 5.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.dim-card:hover {
  border-color: var(--accent);
}

.dim-card:active {
  transform: scale(0.99);
}

.dim-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.dim-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.path-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.path-item {
  margin-bottom: 0.45rem;
}

.path-item button {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.path-item button:hover {
  border-color: var(--accent);
}

.path-item__meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.brief-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.brief-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 650;
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.brief-card .lede {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.brief-section {
  margin-bottom: 1rem;
}

.brief-section h3 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.brief-section ul {
  margin: 0;
  padding-left: 1.15rem;
}

.brief-footer-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer a {
  font-weight: 750;
}

.site-footer .footer-fineprint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.page-about .site-footer--about {
  margin-top: 2rem;
  padding: 0.75rem 0 2rem;
  border-top: 0;
}

.page-about .site-footer--about .footer-fineprint {
  margin-top: 0.35rem;
}

/* Modal */
.request-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: end center;
}

.request-modal[hidden] {
  display: none;
}

.request-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 23, 20, 0.45);
}

.request-modal__panel {
  position: relative;
  width: min(100% - 1rem, 26rem);
  margin-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-height: min(90dvh, 560px);
  overflow: auto;
}

.request-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.request-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  margin: 0;
  line-height: 1.25;
}

.request-modal__lede {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0.5rem 0 0.7rem;
  line-height: 1.45;
}

.request-modal textarea {
  width: 100%;
  resize: vertical;
  min-height: 7rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  margin-top: 0.25rem;
  background: var(--surface-2);
}

.request-modal textarea:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
}

.request-modal__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.icon-btn {
  border: none;
  background: var(--surface-2);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  border-radius: var(--radius-sm);
  min-width: var(--tap);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%);
  z-index: 220;
  background: var(--ink);
  color: #fffaf6;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.98rem;
  font-weight: 750;
  box-shadow: var(--shadow-md);
  max-width: min(92vw, 24rem);
  text-align: center;
}

.toast[hidden] {
  display: none;
}

@media (hover: none) and (max-width: 720px) {
  .page-home:not(.is-searching) main#main.home-stage {
    transition:
      min-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
      max-height 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .page-home.is-searching main#main.home-stage {
    transition: none;
  }

  .page-home.is-searching .home-bar,
  .page-home.is-searching .brand,
  .page-home.is-searching .tagline,
  .page-home.is-searching .search-chrome,
  .page-home.is-searching .search-block,
  .page-home.is-searching .home-output {
    transition: none !important;
  }

  .page-home:not(.is-searching) .brand,
  .page-home:not(.is-searching) .tagline {
    transition: none !important;
  }

  .page-home:not(.is-searching) .home-landing-spacer {
    display: block;
  }

  html.is-landing-keyboard-root,
  html.is-landing-keyboard-root body.page-home.is-landing-keyboard {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .page-home:not(.is-searching).is-landing-keyboard:not(.has-results) main#main.home-stage {
    position: fixed;
    top: var(--home-visible-offset-top, 0);
    left: 0;
    right: 0;
    box-sizing: border-box;
    width: 100%;
    min-height: var(--home-visible-h, 100dvh);
    max-height: var(--home-visible-h, 100dvh);
    height: var(--home-visible-h, 100dvh);
    padding: 0 max(0.875rem, calc((100vw - var(--max)) / 2)) 0;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    transition: none;
  }

  .page-home:not(.is-searching).is-landing-keyboard:not(.has-results) .home-output {
    display: none;
  }

  .page-home:not(.is-searching).is-landing-keyboard.has-results main#main.home-stage {
    position: fixed;
    top: var(--home-visible-offset-top, 0);
    left: 0;
    right: 0;
    box-sizing: border-box;
    width: 100%;
    min-height: var(--home-visible-h, 100dvh);
    max-height: var(--home-visible-h, 100dvh);
    height: var(--home-visible-h, 100dvh);
    padding: clamp(1rem, 4vh, 2rem) max(0.875rem, calc((100vw - var(--max)) / 2)) 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: center;
  }

  .page-home:not(.is-searching).is-landing-keyboard .home-stage {
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: visible;
    justify-content: flex-start;
    width: 100%;
  }

  .page-home.is-landing-keyboard .home-bar,
  .page-home.is-landing-keyboard .brand,
  .page-home.is-landing-keyboard .tagline,
  .page-home.is-landing-keyboard .search-chrome {
    transition: none !important;
  }

  .page-home.is-landing-keyboard .brand {
    font-size: var(--home-landing-brand-size, clamp(2.4rem, 14cqi, 4.15rem));
  }

  .page-home.is-landing-keyboard .tagline {
    font-size: var(--home-landing-tagline-size, clamp(1.45rem, 4.8vw, 1.85rem));
  }

  .page-home:not(.is-searching).is-landing-keyboard .home-landing-spacer {
    display: none;
  }

  .page-home.is-landing-keyboard .menu-toggle {
    top: calc(var(--home-visible-offset-top, 0px) + 0.75rem + env(safe-area-inset-top, 0px));
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 48rem) {
  .page-home.is-searching .home-stage {
    padding-bottom: 3rem;
  }

  .site-header,
  .page-home.is-searching .home-bar {
    padding-right: max(0.5rem, calc((100vw - var(--max)) / 2 - 0.25rem));
  }

  .page-home .nav-inline {
    right: max(0.5rem, calc((100vw - var(--max)) / 2 - 0.25rem));
  }
}
