:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #63707c;
  --line: #dce3e8;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --soft: #f4f7f9;
  --soft-2: #eef4f6;
  --accent: #0f6f86;
  --accent-2: #c86f42;
  --accent-soft: #e8f4f7;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(23, 32, 42, 0.06);
  --focus: 0 0 0 4px rgba(15, 111, 134, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

:target {
  scroll-margin-top: 12px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 111, 134, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfcfd 0%, var(--soft) 44%, #eef3f5 100%);
  color: var(--ink);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header {
  position: relative;
  z-index: 30;
}

.site-header__inner,
.site-footer__inner,
.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.header-menu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 24px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a {
  border-radius: 999px;
  padding: 9px 11px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  justify-self: end;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.menu-toggle span[aria-hidden="true"] {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header.is-open .menu-toggle span[aria-hidden="true"]:nth-child(2) {
  transform: translateY(5px) rotate(45deg);
}

.site-header.is-open .menu-toggle span[aria-hidden="true"]:nth-child(3) {
  opacity: 0;
}

.site-header.is-open .menu-toggle span[aria-hidden="true"]:nth-child(4) {
  transform: translateY(-5px) rotate(-45deg);
}

.site-search {
  position: relative;
  width: 100%;
}

.site-search input {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.site-search__results {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-search.is-open .site-search__results {
  display: grid;
}

.site-search__results a,
.site-search__empty {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-search__results span {
  color: var(--muted);
  font-size: 0.9rem;
}

.page {
  padding: 40px 0 64px;
}

.page > * {
  width: 100%;
  min-width: 0;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.hero,
.panel {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

.home-hero-palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 280px;
}

.home-hero-palette a {
  display: grid;
  align-content: end;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-hero-palette a:first-child {
  grid-row: span 2;
}

.home-hero-palette a:nth-child(4) {
  grid-column: span 2;
}

.home-hero-palette a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.home-hero-palette span {
  font-weight: 850;
}

.home-hero-palette strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  opacity: 1;
}

.hero > *,
.panel > *,
.grid > *,
.meta-grid > *,
.section-stack > *,
.explorer-grid > *,
.family-grid > *,
.summary-grid > *,
.tone-grid > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

h1,
h2,
h3 {
  line-height: 1.12;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

p {
  margin: 0 0 14px;
}

.fine-print {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
  margin-top: 10px;
  max-width: 72ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  display: grid;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card,
.index-row,
.color-result,
.family-card,
.nav-summary-card,
.tone-card,
.brand-index-card,
.brand-category-tile,
.related-guide-card,
.mini-swatch-link,
.compact-color-row,
.swatch-tile {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

a.card,
a.index-row,
a.color-result,
a.family-card,
a.nav-summary-card,
a.tone-card,
a.brand-index-card,
a.brand-category-tile,
a.related-guide-card,
a.mini-swatch-link,
a.compact-color-row {
  cursor: pointer;
}

a.card:hover,
a.index-row:hover,
a.color-result:hover,
a.family-card:hover,
a.nav-summary-card:hover,
a.tone-card:hover,
a.brand-index-card:hover,
a.brand-category-tile:hover,
a.related-guide-card:hover,
a.mini-swatch-link:hover,
a.compact-color-row:hover {
  border-color: rgba(15, 111, 134, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.about-color p {
  max-width: 78ch;
}

.related-guide-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.related-guide-card {
  background: linear-gradient(180deg, #fff, #f8fbfc);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 8px;
  padding: 16px;
  text-decoration: none;
}

.related-guide-card span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.home-featured-card,
.home-system-card,
.home-entry-card {
  cursor: default;
}

.home-featured-card > a,
.home-system-card > a,
.home-entry-card > a {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.home-featured-card > a {
  gap: 10px;
}

.home-featured-card > a span {
  color: var(--muted);
  font-size: .92rem;
}

.home-micro-json {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.home-micro-json summary {
  width: fit-content;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.home-micro-json pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #101820;
  color: #edf7f8;
  font-size: .82rem;
}

a.card:focus-visible,
a.index-row:focus-visible,
a.color-result:focus-visible,
a.family-card:focus-visible,
a.nav-summary-card:focus-visible,
a.tone-card:focus-visible,
a.brand-index-card:focus-visible,
a.brand-category-tile:focus-visible,
a.mini-swatch-link:focus-visible,
a.compact-color-row:focus-visible {
  outline: none;
  box-shadow: var(--focus), var(--shadow-soft);
  border-color: rgba(15, 111, 134, 0.38);
}

.swatch {
  min-height: 180px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.swatch--small {
  min-height: 72px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin: 20px 0;
}

.meta-grid--metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}

.fact {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), var(--soft-2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.fact--metric {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 118px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(15, 111, 134, 0.075), transparent 46%),
    linear-gradient(180deg, #ffffff, #f7fafb);
  border-color: rgba(90, 112, 124, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 12px 26px rgba(25, 44, 54, 0.04);
}

.fact strong {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fact--metric > span:not(.luminance-bar),
.fact--metric > em {
  display: block;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  font-style: normal;
  font-weight: 760;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fact--metric > span b {
  display: block;
  font: inherit;
}

.fact--metric-rich > span {
  white-space: normal;
}

.fact--metric button {
  justify-self: start;
  min-height: 30px;
  padding: 5px 10px;
  border-color: rgba(15, 111, 134, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  font-size: 0.76rem;
}

.fact--metric .luminance-bar {
  max-width: 180px;
}

.section-stack {
  display: grid;
  gap: 32px;
  margin-top: 34px;
}

.section-intro {
  max-width: 820px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.page > .panel + .panel,
.page > .hero + .panel,
.page > .panel + .hero {
  margin-top: 32px;
}

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

.chip {
  border: 1px solid rgba(15, 111, 134, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.chip--nav {
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  background: #C7E0E6;
  color: #0A596D;
  font-size: 0.75rem;
}

.family-actions {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.family-actions__group {
  display: grid;
  gap: 8px;
}

.family-actions__group > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.color-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.index-table {
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.colors-index-hero {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.45fr);
}

.families-hub-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
}

.family-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
}

.family-summary {
  display: grid;
  gap: 14px;
  align-content: center;
}

.family-ribbon {
  display: flex;
  width: 100%;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.family-ribbon span {
  flex: 1 1 0;
  min-width: 0;
  min-height: 66px;
}

.mini-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  gap: 10px;
  margin: 18px 0;
}

.mini-swatch-link {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  text-decoration: none;
}

.mini-swatch-link span {
  min-height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 7px;
}

.mini-swatch-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.index-metrics {
  display: grid;
  gap: 12px;
  align-content: center;
}

.index-metrics div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.index-metrics strong,
.index-metrics span {
  display: block;
}

.index-metrics strong {
  font-size: 2rem;
  line-height: 1;
}

.index-metrics span {
  margin-top: 4px;
  color: var(--muted);
}

.complete-index > summary {
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
}

.alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.alphabet-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.alphabet-index {
  display: grid;
  gap: 10px;
}

.letter-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  overflow: hidden;
}

.letter-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 800;
}

.letter-group > summary span {
  font-size: 1.05rem;
}

.letter-group > summary em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
}

.harmony-group__body {
  display: grid;
  gap: 18px;
  padding: 0 16px 16px;
}

.harmony-group__body .section-intro {
  margin-top: 0;
}

.compact-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.compact-color-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.compact-color-row .color-dot {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.compact-color-row span:not(.color-dot) {
  min-width: 0;
}

.compact-color-row strong,
.compact-color-row em {
  display: block;
}

.compact-color-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-color-row em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.compact-color-row code {
  color: var(--accent);
  font-weight: 800;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.index-row {
  display: grid;
  grid-template-columns: 52px minmax(160px, 1fr) 120px 110px 100px 92px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.index-row--head {
  background: var(--soft);
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.index-row code {
  color: var(--accent);
  font-weight: 800;
}

.explorer-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  margin-top: 22px;
  align-items: start;
}

.explorer-filters {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.explorer-filters [data-explorer-reset] {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, #ffffff, #f3f7f9);
}

.explorer-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(220, 227, 232, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-card summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.explorer-filters fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.explorer-filters legend {
  padding: 0 0 4px;
  font-weight: 800;
  color: var(--ink);
}

.explorer-filters input[type="checkbox"] {
  width: auto;
}

.filter-option {
  min-height: 34px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(244, 247, 249, 0.72);
}

.filter-option:hover {
  border-color: rgba(15, 111, 134, 0.18);
  background: #ffffff;
}

.filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.explorer-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.explorer-summary strong {
  font-size: 2rem;
}

.explorer-summary p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.active-filters span {
  border: 1px solid rgba(15, 111, 134, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 14px;
}

.color-result {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  text-decoration: none;
}

.color-result__swatch {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
}

.color-result__body {
  display: grid;
  gap: 4px;
}

.color-result code,
.color-result em {
  color: var(--muted);
  font-style: normal;
}

.color-result code {
  font-weight: 800;
  color: var(--accent);
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 14px;
  margin-top: 20px;
}

.family-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.family-card em {
  color: var(--muted);
  font-style: normal;
}

.family-card small {
  color: var(--muted);
  line-height: 1.35;
}

.family-card--rich {
  min-height: 150px;
}

.family-card__swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.family-card__swatches span {
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 14px;
  margin-top: 18px;
}

.nav-summary-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.nav-summary-card span,
.tone-card span {
  color: var(--muted);
}

.mini-ribbon {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.mini-ribbon span {
  min-height: 48px;
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tone-card {
  display: grid;
  gap: 12px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 249, 0.84)),
    radial-gradient(circle at 100% 0%, rgba(15, 111, 134, 0.12), transparent 36%);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tone-card:hover {
  border-color: rgba(15, 111, 134, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.tone-card strong {
  font-size: 1.05rem;
}

.tone-card span {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(15, 111, 134, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  margin-top: 18px;
}

.tool-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 252, 0.86));
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-card:hover {
  border-color: rgba(15, 111, 134, 0.28);
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
  transform: translateY(-1px);
}

.tool-card span {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(15, 111, 134, 0.18);
  border-radius: 999px;
  background: rgba(15, 111, 134, 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-card strong {
  font-size: 1.2rem;
}

.tool-card em,
.tool-card small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.tool-card small {
  align-self: end;
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-summary-card code {
  overflow-wrap: anywhere;
  color: var(--accent);
}

.converter-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
}

.converter-example-card {
  display: grid;
  gap: 14px;
  align-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(243, 248, 250, 0.88));
  box-shadow: var(--shadow-soft);
}

.converter-example-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.converter-example-card strong {
  font-size: 1.35rem;
}

.converter-example-card code {
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent);
  overflow-wrap: anywhere;
}

.converter-panel pre {
  margin-top: 14px;
}

.hex-live {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.muted-note {
  color: var(--muted);
}

.css-utility-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
}

.css-preview-card {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  padding: 22px;
  border: 1px solid var(--preview-border);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 45%),
    var(--preview-bg);
  color: var(--preview-fg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), var(--shadow-soft);
}

.css-preview-card span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.78;
}

.css-preview-card strong {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.css-preview-card code {
  font-weight: 800;
}

.css-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.css-example {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.css-example strong,
.css-example span {
  display: block;
}

.css-example span {
  color: inherit;
  opacity: 1;
}

.css-example--border {
  border-width: 3px;
}

.brand-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
}

.brand-index-hero {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
}

.brand-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.brand-category-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(238, 244, 246, 0.72);
}

.brand-category-tile {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(15, 111, 134, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.brand-category-tile strong,
.brand-category-tile em {
  display: block;
}

.brand-category-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.brand-category-tile small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.brand-category-tile__palette {
  display: flex;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  height: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.brand-category-tile__palette span {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.brand-category-tile__palette span + span {
  border-left: 1px solid rgba(17, 24, 39, 0.12);
}

.brand-category-preview {
  display: grid;
  gap: 14px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.brand-category-preview .brand-category-tile__palette {
  height: 26px;
  border-radius: 8px;
}

.brand-category-preview .brand-category-tile__palette span {
  height: 100%;
}

.brand-category-preview strong {
  font-size: 2.4rem;
  line-height: 1;
}

.brand-category-preview em {
  color: var(--muted);
  font-style: normal;
}

.palette-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.palette-index-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.palette-index-card:hover {
  border-color: rgba(15, 111, 134, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.palette-index-card strong,
.palette-index-card em,
.palette-index-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.palette-index-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.palette-index-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.palette-group > .section-intro,
.palette-group__links,
.palette-group > .palette-index-grid {
  margin-left: 14px;
  margin-right: 14px;
}

.palette-group > .palette-index-grid {
  margin-bottom: 14px;
}

.compare-group > .section-intro,
.compare-group .palette-group__links,
.compare-group > .comparison-index-grid {
  margin-left: 14px;
  margin-right: 14px;
}

.compare-group > .comparison-index-grid {
  margin-bottom: 14px;
}

.comparison-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.comparison-index-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.comparison-index-card:hover {
  border-color: rgba(15, 111, 134, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.comparison-strip {
  display: flex;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.comparison-strip span {
  flex: 1 1 0;
  min-width: 0;
}

.comparison-strip span + span {
  border-left: 1px solid rgba(17, 24, 39, 0.16);
}

.comparison-index-card strong,
.comparison-index-card em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.comparison-index-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.comparison-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comparison-card-meta span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(238, 244, 246, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.compare-detail-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.compare-split-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 10px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.compare-split-preview > div {
  display: grid;
  align-content: end;
  gap: 6px;
  min-width: 0;
  padding: 18px;
}

.compare-split-preview > div + div {
  border-left: 1px solid rgba(17, 24, 39, 0.18);
}

.compare-split-preview span,
.compare-split-preview strong {
  display: block;
  overflow-wrap: anywhere;
}

.compare-split-preview span {
  font-weight: 900;
  font-size: 1.15rem;
}

.compare-split-preview strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.comparison-profile-grid,
.comparison-advice-grid,
.comparison-accessibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.comparison-color-panel {
  display: grid;
  grid-template-columns: minmax(110px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.comparison-color-panel__swatch {
  min-height: 220px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.comparison-token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.comparison-token-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 244, 246, 0.72);
  overflow-wrap: anywhere;
}

.comparison-token-grid strong {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-advice-grid__wide {
  grid-column: 1 / -1;
}

.comparison-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.comparison-table > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.72fr) repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.comparison-table span,
.comparison-table strong {
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

.comparison-table strong {
  background: rgba(238, 244, 246, 0.92);
}

.comparison-table__wide {
  grid-column: span 2;
}

.comparison-access-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.comparison-access-card strong {
  font-size: 1.55rem;
  line-height: 1.05;
}

.comparison-access-card span {
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.section-heading p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.brand-signature-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 18px;
}

.brand-signature-swatch {
  align-items: center;
  background: linear-gradient(180deg, #fff, #f8fbfc);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 3px;
  grid-template-columns: 44px 1fr;
  min-height: 62px;
  padding: 8px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.brand-signature-swatch:hover {
  border-color: rgba(0, 105, 121, .32);
  box-shadow: 0 14px 32px rgba(11, 25, 38, .08);
  transform: translateY(-1px);
}

.brand-signature-swatch--static {
  cursor: default;
}

.brand-signature-swatch--static:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.brand-signature-swatch span {
  border: 1px solid rgba(11, 25, 38, .12);
  border-radius: 8px;
  grid-row: span 2;
  height: 44px;
  width: 44px;
}

.brand-signature-swatch strong,
.brand-signature-swatch em {
  display: block;
  min-width: 0;
}

.brand-signature-swatch strong {
  font-family: var(--mono);
  font-size: .88rem;
}

.brand-signature-swatch em {
  color: var(--muted);
  font-style: normal;
  font-size: .8rem;
}

.brand-index-card {
  display: grid;
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.brand-index-card em {
  color: var(--muted);
  font-style: normal;
}

.brand-index-card__palette {
  display: flex;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.brand-index-card__palette span {
  flex: 1 1 0;
  min-height: 38px;
}

.brand-preview {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), var(--shadow-soft);
}

.brand-preview span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.78;
}

.brand-preview strong {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.brand-palette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.brand-swatch {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
}

.brand-swatch span {
  min-height: 92px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 7px;
}

.brand-swatch code,
.brand-swatch em {
  color: var(--muted);
  font-style: normal;
}

.color-dot {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

pre {
  max-width: 100%;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #0f1720;
  color: #eff7fa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

button,
input {
  font: inherit;
}

button {
  min-height: 34px;
  border: 1px solid #cbd6dc;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f3f7f9);
  color: #24515e;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover {
  border-color: rgba(15, 111, 134, 0.42);
  background: linear-gradient(180deg, #ffffff, #edf5f7);
  box-shadow: 0 6px 14px rgba(23, 32, 42, 0.07);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.footer-cookie-settings {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
}

.footer-cookie-settings:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  transform: none;
}

.cookie-consent {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  left: 20px;
  margin: 0 auto;
  width: min(860px, calc(100% - 40px));
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(23, 32, 42, 0.2);
  backdrop-filter: blur(18px);
}

.cookie-consent__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 20px;
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.trust-page-meta {
  margin-top: 10px !important;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.cookie-consent h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.cookie-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.cookie-consent__links {
  display: flex;
  gap: 14px;
  margin-top: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 700;
}

.cookie-consent__links a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  display: flex;
  gap: 8px;
}

.cookie-consent__button {
  min-height: 40px;
  padding: 9px 14px;
  white-space: nowrap;
}

.cookie-consent__button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.cookie-consent__button--primary:hover {
  border-color: #0b5d70;
  background: #0b5d70;
  color: #fff;
}

@media (max-width: 680px) {
  .cookie-consent {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: calc(100% - 16px);
  }

  .cookie-consent__body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cookie-consent__button {
    min-width: 0;
    width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(15, 111, 134, 0.42);
  box-shadow: var(--focus);
}

input:focus {
  background: #ffffff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.tool-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contrast-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  margin: 16px 0;
  font-size: 1.4rem;
  font-weight: 800;
}

.hex-tool-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
}

.hex-tool-card {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.hex-tool-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hex-tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hex-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hex-presets button {
  min-height: 34px;
  padding: 6px 8px;
  background: linear-gradient(180deg, #ffffff, #f3f7f9);
  color: #24515e;
  border-color: #cbd6dc;
  font-size: 0.82rem;
}

.hex-result-panel {
  margin-top: 32px;
}

.hex-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.hex-hero__content {
  align-self: center;
}

.hex-hero__sample {
  min-height: 300px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  padding: 28px;
  display: grid;
  align-content: space-between;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hex-hero__sample--compact {
  min-height: 180px;
}

.hex-hero__sample span {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hex-hero__sample strong {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.05;
  max-width: 8ch;
}

.hex-live__intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.luminance-bar {
  display: block;
  height: 12px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, #000, #fff);
  overflow: hidden;
}

.luminance-bar span {
  display: block;
  height: 100%;
  background: var(--accent-2);
  border-right: 2px solid var(--ink);
}

.wcag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin: 18px 0;
}

.wcag-card {
  min-height: 136px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.wcag-card strong,
.wcag-card em,
.wcag-card span {
  display: block;
}

.wcag-card span {
  font-size: 1.7rem;
  font-weight: 800;
}

.wcag-card em {
  font-style: normal;
  font-weight: 800;
}

.wcag-card.is-pass {
  outline: 3px solid rgba(33, 128, 86, 0.25);
}

.wcag-card.is-fail {
  outline: 3px solid rgba(180, 72, 58, 0.22);
}

.swatch-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.swatch-tile {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.swatch-tile__color {
  display: block;
  min-height: 92px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.swatch-tile code {
  font: inherit;
  color: var(--muted);
}

.swatch-tile button {
  justify-self: start;
}

.json-details summary {
  cursor: pointer;
  font-weight: 800;
}

.json-details pre {
  margin-top: 14px;
}

.json-viewer {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.json-viewer__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}

.json-viewer__header > * {
  min-width: 0;
}

.dataset-badge,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #cbd6dc;
  border-radius: 7px;
  padding: 6px 10px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.dataset-badge {
  color: #24513f;
  background: #eef7f2;
  border-color: #c9ded3;
}

.button-link {
  background: linear-gradient(180deg, #276f80, #175b6b);
  color: #fff;
  border-color: #155466;
}

.button-link--soft {
  background: linear-gradient(180deg, #ffffff, #f3f7f9);
  color: #24515e;
  border-color: #cbd6dc;
}

.section-action {
  margin-top: 18px;
}

.section-action a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 111, 134, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 111, 134, 0.07), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 249, 250, 0.92));
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.section-action a::after {
  content: "->";
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 900;
}

.section-action a:hover {
  border-color: rgba(15, 111, 134, 0.32);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.section-action span,
.section-action em {
  display: block;
}

.section-action span {
  font-weight: 850;
}

.section-action em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.35;
}

.json-viewer__insights {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: stretch;
}

.json-viewer__insights .wcag-grid {
  margin: 0;
}

.json-schema {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 8px;
}

.json-schema div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.json-schema code {
  color: var(--accent);
  font-weight: 800;
}

.json-schema span {
  color: var(--muted);
  font-size: 0.9rem;
}

.json-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.json-sections,
.json-section,
.json-details {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.json-sections > summary,
.json-section > summary,
.json-details > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
}

.json-section-grid {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.json-section pre,
.json-details pre {
  border-radius: 0 0 8px 8px;
}

.json-code,
.json-section pre {
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-wrap: normal;
}

.json-token--key {
  color: #7cc7ff;
}

.json-token--string {
  color: #9ee6a8;
}

.json-token--number {
  color: #ffbd7a;
}

.json-token--boolean {
  color: #d6b2ff;
}

.json-token--null {
  color: #b9c2ca;
}

.json-viewer__footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(238, 244, 246, 0.82), rgba(248, 251, 252, 0.96));
}

.site-footer__inner {
  padding: 38px 0 24px;
  color: var(--muted);
  display: grid;
  gap: 28px;
}

.footer-brand {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
}

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 850;
  text-decoration: none;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1.55fr;
  gap: 32px;
  align-items: start;
}

.footer-nav {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-nav h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-nav--legal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 22px;
}

.footer-nav--legal h2 {
  grid-column: 1 / -1;
}

.footer-nav a {
  width: fit-content;
  text-decoration: none;
  color: var(--accent);
  font-weight: 650;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.text-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.text-list li + li {
  margin-top: 8px;
}

@media (max-width: 1120px) and (min-width: 981px) {
  .site-header__inner {
    gap: 14px;
  }

  .brand {
    gap: 8px;
    font-size: 1.02rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .header-menu {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
    gap: 10px;
  }

  .nav {
    gap: 0;
    font-size: 0.86rem;
  }

  .nav a {
    padding: 8px 7px;
  }

  .site-search input {
    font-size: 0.9rem;
  }
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    min-height: 64px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
    font-size: 1rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-menu {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
  }

  .site-header.is-open .header-menu {
    display: grid;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    font-size: 0.92rem;
  }

  .nav a {
    padding: 10px 8px;
    border: 1px solid var(--line);
    background: var(--soft);
    text-align: center;
  }

  .site-search {
    width: 100%;
  }

  .site-search__results {
    right: auto;
    left: 0;
    width: 100%;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-nav--legal {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
  }

  .footer-nav h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-header__inner,
  .site-footer__inner,
  .page {
    width: min(100%, calc(100% - 16px));
  }

  .hero,
  .hex-hero {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .home-hero-palette {
    min-height: 0;
    gap: 6px;
  }

  .home-hero-palette a {
    min-height: 74px;
    padding: 10px;
  }

  .panel {
    padding: 8px;
  }

  .index-metrics,
  .meta-grid,
  .json-schema,
  .json-section-grid,
  .related-guide-grid,
  .summary-grid,
  .tool-card-grid {
    gap: 8px;
  }

  .hex-hero__sample {
    min-height: 220px;
    padding: 12px;
  }

  .hex-live__intro {
    grid-template-columns: 1fr;
  }

  .hex-hero__sample--compact {
    min-height: 160px;
  }

  .section-stack {
    gap: 14px;
    margin-top: 14px;
  }

  .page > .panel + .panel,
  .page > .hero + .panel,
  .page > .panel + .hero {
    margin-top: 14px;
  }

  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    min-height: 64px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
    font-size: 1rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-menu {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
  }

  .site-header.is-open .header-menu {
    display: grid;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 0.95rem;
  }

  .nav a {
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--soft);
    text-align: center;
  }

  .site-search {
    width: 100%;
  }

  .site-search__results {
    right: auto;
    left: 0;
    width: 100%;
  }

  .site-footer__inner {
    padding: 28px 0 20px;
    gap: 22px;
  }

  .footer-links,
  .footer-nav--legal {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-nav {
    gap: 8px;
  }

  .footer-bottom {
    display: grid;
    gap: 8px;
  }

  .index-row {
    grid-template-columns: 52px 1fr;
  }

  .index-row--head {
    display: none;
  }

  .index-row span:not(.color-dot),
  .index-row code {
    grid-column: 2;
  }

  .compact-index {
    grid-template-columns: 1fr;
  }

  .compact-color-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .compact-color-row code {
    grid-column: 2;
  }

  .explorer-layout {
    grid-template-columns: 1fr;
  }

  .explorer-filters {
    position: static;
  }

  .section-heading {
    flex-direction: column;
    gap: 12px;
  }

  .compare-split-preview,
  .comparison-profile-grid,
  .comparison-advice-grid,
  .comparison-accessibility-grid {
    grid-template-columns: 1fr;
  }

  .comparison-color-panel {
    grid-template-columns: 1fr;
  }

  .comparison-color-panel__swatch {
    min-height: 160px;
  }

  .comparison-token-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
  }

  .comparison-table > div:first-child {
    display: none;
  }

  .comparison-table span,
  .comparison-table strong {
    padding: 9px 0;
    background: transparent;
  }

  .comparison-table__property {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-weight: 900;
  }

  .comparison-table span[data-label] {
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
  }

  .comparison-table span[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .comparison-table__wide {
    grid-column: auto;
  }

  .json-viewer__header,
  .json-viewer__insights {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .dataset-badge,
  .button-link,
  .json-toolbar button {
    width: 100%;
  }
}
