@import url("https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=IBM+Plex+Sans+JP:wght@500;600;700&family=Inter:wght@500;700;800;900&family=Noto+Sans+JP:wght@400;500;700;800;900&display=swap");

:root {
  color-scheme: light;
  --ink: #17262a;
  --muted: #63767b;
  --line: #d7e1e1;
  --panel: #ffffff;
  --soft: #eef6f4;
  --brand: #087f83;
  --brand-dark: #075d63;
  --accent-soft: #fff7e8;
  --accent-line: #ead1a3;
  --font-body: "BIZ UDPGothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-heading: "Noto Sans JP", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-title: "IBM Plex Sans JP", "Noto Sans JP", "BIZ UDPGothic", system-ui, sans-serif;
  --font-latin: "Inter", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f4f7f6;
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "palt";
  text-rendering: optimizeLegibility;
  animation: page-fade .34s ease both;
}

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
.panel-label,
.card h3,
.term-page h2,
.category-page-head h2,
.showcase-card strong {
  font-family: var(--font-heading);
}

.topbar {
  position: relative;
  min-height: 142px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px clamp(18px, 5vw, 64px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(125deg, #0b6669 0%, #158b8b 48%, #7eb9a4 100%);
  background-size: 48px 48px, 48px 48px, auto;
  color: #fff;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, #d9efe9, #8fcfca, #e8d08d);
  opacity: .72;
}

.topbar::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -110px;
  top: -160px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  opacity: .7;
}

.topbar > div,
.topbar nav,
.mobile-menu {
  position: relative;
  z-index: 1;
}

.topbar > div {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.compact-topbar {
  min-height: 108px;
  padding-block: 18px;
}

.eyebrow {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-latin);
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  background: rgba(5, 57, 61, .18);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d6f1ea;
  box-shadow: 0 0 0 4px rgba(214, 241, 234, .16);
}

h1 {
  margin: 0;
  max-width: 13em;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 800;
  text-wrap: balance;
  text-shadow: 0 1px 18px rgba(0, 46, 50, .18);
}

.site-title {
  display: block;
}

.site-title-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: 880px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  transition: none;
}

.site-title-link:hover {
  color: inherit;
  text-decoration: none;
  border: 0;
  background: transparent;
  transform: none;
}

.title-main {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
}

.title-sub {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 2px 14px 4px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  font-size: .54em;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.compact-topbar h1 {
  max-width: 680px;
  font-size: clamp(24px, 3vw, 36px);
}

.compact-topbar .title-sub {
  min-height: 32px;
  padding-inline: 12px;
}

.topbar nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-menu {
  display: none;
}

.topbar a,
.view-link,
.mobile-menu summary {
  min-height: 40px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.5);
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 700;
  background: rgba(4, 63, 68, .22);
  backdrop-filter: blur(8px);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.topbar a:hover,
.view-link:hover,
.mobile-menu summary:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.8);
  transform: translateY(-1px);
}

.topbar .site-title-link,
.topbar .site-title-link:hover {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  transform: none;
}

.view-link.active {
  background: #fff;
  color: var(--brand-dark);
}

.mobile-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

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

.mobile-menu summary::before {
  content: "";
  width: 18px;
  height: 14px;
  flex: 0 0 auto;
  background:
    linear-gradient(#fff 0 0) 0 0 / 100% 2px no-repeat,
    linear-gradient(#fff 0 0) 0 6px / 100% 2px no-repeat,
    linear-gradient(#fff 0 0) 0 12px / 100% 2px no-repeat;
}

.mobile-menu > div {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(286px, 72vw);
  display: grid;
  align-content: start;
  gap: 0;
  padding: 82px 24px 18px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.32);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(6, 91, 94, .98), rgba(4, 73, 76, .98));
  box-shadow: -18px 0 40px rgba(0, 32, 36, .24);
  z-index: 20;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}

.mobile-menu .view-link,
  .mobile-menu a {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 6px 2px 0;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(217, 239, 233, .42);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.mobile-menu .view-link:hover,
.mobile-menu a:hover,
.mobile-menu .view-link.active {
  background: transparent;
  border-color: rgba(217, 239, 233, .7);
  color: #fff;
  transform: none;
}

.mobile-menu[open]::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(7, 24, 28, .42);
  z-index: 10;
}

.mobile-menu[open] > div,
.mobile-menu.menu-visible > div {
  transform: translateX(0);
  animation: drawer-slide-in .28s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes drawer-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

main {
  width: min(1180px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 108px);
  padding: 45px clamp(14px, 3vw, 36px) 120px;
}

.page-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.site-sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
}

.side-card,
.category-page {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.side-card {
  padding: 14px;
}

.side-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

.side-links,
.popular-list {
  display: grid;
  gap: 9px;
}

.side-link,
.popular-link,
.side-search {
  display: grid;
  gap: 6px;
  min-height: 58px;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.side-link:hover,
.side-link.active,
.popular-link:hover,
.side-search:hover {
  border-color: var(--brand);
  background: #f7fbfa;
  transform: translateY(-1px);
}

.side-link strong,
.popular-link strong {
  font-size: 13px;
  line-height: 1.35;
}

.side-link span,
.popular-link span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.side-search {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  background: var(--soft);
  border-color: #cbe0df;
  font-weight: 900;
}

.view {
  display: none;
}

.active-view {
  display: block;
  animation: fade-up .28s ease both;
}

.search-home {
  width: min(1040px, 100%);
  margin: 0 auto 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 12px 28px rgba(15, 45, 49, .06);
  animation: fade-up .42s ease both;
}

.panel-label {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 700;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
}

input[type="search"] {
  width: 100%;
  min-height: 68px;
  border: 1px solid #b9c9c9;
  border-radius: 6px;
  padding: 0 16px;
  font-size: 20px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.search-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 14px;
}

.search-options label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfa;
  color: #24484d;
  font-size: 15px;
  font-weight: 800;
}

.search-options input {
  accent-color: var(--brand);
}

.suggest {
  min-height: 26px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.suggest button {
  min-height: 28px;
  margin-left: 8px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: #7a4b06;
  border: 1px solid var(--accent-line);
}

.popular-showcase {
  width: min(1040px, 100%);
  margin: 0 auto 18px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease, max-height .22s ease, margin .22s ease;
  max-height: 150px;
  overflow: hidden;
  animation: fade-up .42s ease both;
  animation-delay: .08s;
}

.popular-showcase.showcase-hidden {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.showcase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 8px;
}

.showcase-head .panel-label {
  margin: 0;
}

.showcase-rail {
  position: relative;
  overflow: hidden;
  padding: 2px 0;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.showcase-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: showcase-scroll 120s linear infinite;
}

.showcase-rail:hover .showcase-track {
  animation-play-state: paused;
}

.showcase-card {
  width: 220px;
  min-height: 100px;
  display: grid;
  gap: 7px;
  align-content: start;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 45, 49, .05);
}

.showcase-card:hover {
  border-color: var(--brand);
}

.showcase-card span {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.showcase-card strong {
  font-size: 18px;
  line-height: 1.38;
}

.showcase-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

@keyframes showcase-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 5px)); }
}

@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .showcase-track {
    animation: none;
  }
}

.workspace {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.hidden {
  display: none;
}

.results-wrap,
.browse-head,
.category-group,
.archive-note,
.term-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  animation: fade-up .32s ease both;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 16px 16px 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

#resultCount {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.card {
  min-height: 166px;
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
  animation: fade-up .28s ease both;
}

.card:hover,
.card.active {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(8, 127, 131, .12);
  transform: translateY(-1px);
}

.card .cat {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.card h3 {
  margin: 9px 0 6px;
  font-size: 20px;
  line-height: 1.38;
}

.card .reading {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.card .desc {
  margin: 0;
  color: #394b4f;
  font-size: 13px;
  line-height: 1.65;
}

mark {
  background: #fff0ad;
  padding: 0 2px;
}

.term-detail {
  width: 100%;
  margin: 0;
  padding: 32px;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.back-results,
.back-search {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--brand-dark);
  background: var(--soft);
  border: 1px solid #cbe0df;
  border-radius: 6px;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 900;
}

.term-page .cat {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.term-page h2 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.28;
}

.term-detail .reading {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.term-description {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: 17px;
  line-height: 1.75;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.detail-grid-cards {
  align-items: stretch;
}

.detail-section,
.related-panel,
.expression-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8fbfa;
}

.detail-section h3,
.related-panel h3,
.expression-panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.compact-meta {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}

.compact-meta dt {
  color: var(--muted);
  font-weight: 900;
}

.compact-meta dd {
  margin: 0;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--brand-dark);
  background: transparent;
  font-weight: 900;
}

.ai-chip {
  background: var(--accent-soft);
  color: #7a4b06;
  border-color: var(--accent-line);
}

.related-panel {
  margin-top: 16px;
}

.expression-panel {
  margin-top: 16px;
}

.related-cards,
.term-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.related-card,
.term-mini-card {
  min-height: 93px;
  display: grid;
  gap: 7px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
  animation: fade-up .3s ease both;
}

.related-card:hover,
.term-mini-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(8, 127, 131, .08);
  transform: translateY(-1px);
}

.related-card span,
.term-mini-card small {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.related-card strong,
.term-mini-card strong {
  font-size: 15px;
  line-height: 1.45;
}

.related-card small,
.term-mini-card span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.5;
}

.term-mini-card-muted {
  border-style: dashed;
  background: #f8fbfa;
}

.expression-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expression-token {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cbe0df;
  border-radius: 999px;
  color: #23494d;
  background: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.meta {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
}

.meta dt {
  color: var(--muted);
  font-weight: 800;
}

.meta dd {
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  background: var(--soft);
  color: #23494d;
  border: 1px solid #cbe0df;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.browse-head {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 70px;
  align-items: center;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.browse-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  text-align: left;
  justify-self: start;
  max-width: 720px;
  overflow-wrap: anywhere;
}

.browse-head > div .panel-label {
  margin-bottom: 6px;
  text-align: left;
}

.browse-head h2 {
  margin: 0;
}

.category-browser {
  display: grid;
  gap: 12px;
}

.category-group {
  padding: 16px;
}

.category-group header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.category-group h3 {
  margin: 0;
  font-size: 20px;
}

.category-title-link {
  color: var(--ink);
  text-decoration: none;
}

.category-title-link:hover {
  color: var(--brand-dark);
}

.category-group header span {
  color: var(--muted);
  font-weight: 800;
}

.term-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.term-list a {
  min-height: 76px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
  animation: fade-up .28s ease both;
}

.term-list a:hover {
  border-color: var(--brand);
  background: #f7fbfa;
  transform: translateY(-1px);
}

.term-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.category-page {
  padding: 20px;
}

.category-page-head {
  position: relative;
  margin-bottom: 16px;
  padding-right: 86px;
}

.category-page-head .cat {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.category-page-head h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.category-page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.category-page-head > span {
  position: absolute;
  top: 4px;
  right: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.category-term-list a {
  min-height: 126px;
}

.category-term-list small {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.category-term-list p {
  margin: 4px 0 0;
  color: #394b4f;
  font-size: 12px;
  line-height: 1.55;
}

.archive-note {
  width: min(1180px, calc(100% - 28px));
  margin: 48px auto 18px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.archive-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.archive-stats span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  min-height: 24px;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.archive-stats strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.archive-note p {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.6;
}

.archive-note p strong {
  color: var(--ink);
  font-size: 12px;
}

@media (max-width: 720px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 13px;
    overflow: visible;
  }
  .compact-topbar {
    min-height: 0;
  }
  main {
    padding-top: 24px;
  }
  .topbar::after {
    display: none;
  }
  .topbar > div {
    grid-column: 1;
    grid-row: 1;
    gap: 7px;
    min-width: 0;
  }
  .compact-topbar h1 {
    max-width: none;
    font-size: clamp(21px, 5.6vw, 24px);
  }
  .site-title-link {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .title-main {
    white-space: nowrap;
  }
  .title-sub {
    min-height: 24px;
    padding: 1px 8px 2px;
    font-size: .52em;
    transform: translateY(-2px);
  }
  .eyebrow {
    padding: 4px 8px;
    font-size: 10px;
  }
  .topbar .desktop-nav {
    display: none;
  }
  .mobile-menu {
    display: block;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  .mobile-menu summary {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    position: relative;
    z-index: 30;
  }
  .suggest {
    font-size: 13px;
    line-height: 19px;
  }
  .search-box,
  .search-options,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .browse-head {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 20px;
  }
  .browse-head p {
    max-width: 30em;
    font-size: 13px;
    line-height: 1.7;
  }
  .page-shell {
    grid-template-columns: 1fr;
  }
  .page-shell > article,
  .category-page {
    order: 1;
  }
  .site-sidebar {
    order: 2;
    position: static;
  }
  .side-links {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .results {
    grid-template-columns: 1fr;
  }
}
