/* White liquid glass: neutral surfaces, small solid spectrum accents. */
:root {
  color-scheme: light;
  color: #252525;
  background: #fff;
  --bg: #fff;
  --panel: #fff;
  --line: #e6e6e6;
  --muted: #707070;
  --ice: #fff;
  --glass: rgb(255 255 255 / 82%);
  --glass-line: rgb(30 30 30 / 9%);
  --glass-shadow: 0 8px 30px rgb(0 0 0 / 4%), inset 0 1px 0 #fff;
  --accent: #454545;
  --rainbow-stops: #ff3b30 0%, #ff9500 16.667%, #ffd60a 33.333%, #34c759 50%, #00b8d9 66.667%, #007aff 83.333%, #af52de 100%;
}
body { background: #fff; color: #252525; }
::selection { background: #e9e9e9; color: #252525; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 1px solid #707070;
  outline-offset: 4px;
}
.site-header {
  background: rgb(255 255 255 / 80%);
  border-color: var(--glass-line);
  backdrop-filter: blur(24px) saturate(0);
  -webkit-backdrop-filter: blur(24px) saturate(0);
  box-shadow: 0 2px 18px rgb(0 0 0 / 3%);
}
.brand, .footer .brand, .brand-mark, .brand-word {
  background: none;
  color: #111;
  -webkit-text-fill-color: #111;
}
.brand-word {
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand .brand-mark, .brand .brand-word {
  background: linear-gradient(90deg, var(--rainbow-stops));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.brand-dot { color: inherit; }
.desktop-nav, .footer, .footer a { color: #646464; }
.desktop-nav a:hover, .footer a:hover { color: #252525; }
.search-trigger, .header-cta, .menu-trigger {
  color: #454545;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 #fff;
}
.search-trigger kbd { color: #707070; border-color: #e2e2e2; }
.menu-trigger span { background: #454545; }
.mobile-nav:not([hidden]) {
  background: rgb(255 255 255 / 95%);
  border-color: var(--glass-line);
  color: #454545;
}
.hero, .showcase.section-shell, .intro-band, .lab, .closing { background: #fff; color: #252525; }
.showcase .section-head h2 em, .hero h1 em, .section-head h2 em,
.interlude-content em, .closing h2 em { color: inherit; }
#about,
#about em,
#about i {
  font-style: normal;
}
#about em, #about i {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.section-kicker, .showcase .section-kicker, .closing .section-kicker,
.catalog-search-label, .catalog-select-label, .chip-heading,
.catalog-summary, .catalog-summary span:last-child, .toolbar-count { color: #707070; }
.section-head > p, .closing p { color: #656565; }
.catalog-summary, .showcase .catalog-summary, .showcase .toolbar {
  border-color: var(--glass-line);
}
.chip-heading span { color: #454545; }
.showcase .catalog-tools input, .showcase .catalog-tools select,
.catalog-pagination input {
  background: var(--glass);
  color: #333;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
}
.catalog-tools input::placeholder { color: #767676; }
.showcase .catalog-tools input:focus, .showcase .catalog-tools select:focus,
.catalog-pagination input:focus { border-color: #8a8a8a; }
.catalog-sidebar { scrollbar-color: #c9c9c9 #fff; }
.category-list { scrollbar-color: #c9c9c9 #fff; }
.showcase .filter, .catalog-sidebar .category-list .filter {
  color: #636363;
  background: var(--glass);
  border-color: var(--glass-line);
  box-shadow: inset 0 1px 0 #fff;
}
.showcase .filter:hover { color: #252525; background: #fff; border-color: #c6c6c6; }
.showcase .filter.active, .catalog-sidebar .category-list .filter.active {
  color: #252525;
  background: #fff;
  border-color: #cecece;
  font-weight: 600;
  box-shadow: 0 3px 12px rgb(0 0 0 / 5%), inset 0 1px 0 #fff;
}
.catalog-sidebar .category-list .filter { background: transparent; box-shadow: none; }
.catalog-sidebar .category-list .filter.active { box-shadow: var(--glass-shadow); }
.source-list .filter.active::before, .cover-list .filter.active::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  vertical-align: middle;
  background: #238557;
  border-radius: 50%;
}
.clear-filters, .empty-state, .search-empty { color: #646464; }
.study-card {
  --accent: #d43b77;
  padding: 5px;
  color: #252525;
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(255 255 255 / 95%);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--glass-line), var(--glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.study-card:nth-child(5n + 2) { --accent: #7e42cf; }
.study-card:nth-child(5n + 3) { --accent: #238557; }
.study-card:nth-child(5n + 4) { --accent: #d84245; }
.study-card:nth-child(5n) { --accent: #514dcc; }
.study-card:hover {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgb(30 30 30 / 16%), 0 12px 36px rgb(0 0 0 / 6%);
}
.study-card .card-image { border-radius: 13px; background-color: #fff; }
.study-card .card-image::after { display: none; }
.card-main .feed-card-top, .card-main .card-author,
.card-main .card-excerpt { color: #646464; }
.card-main .card-title { color: #252525; }
.card-main .card-technique { color: #484848; }
.feed-source::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--accent);
  border-radius: 50%;
}
.feed-card-bottom, .card-links {
  background: rgb(255 255 255 / 75%);
  color: #646464;
  border: 1px solid rgb(30 30 30 / 5%);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff;
}
.feed-card-bottom span:first-child, .card-links .card-source-link,
.card-links .card-demo-link, .card-source-link, .card-demo-link { color: #393939; }
.card-source-link:hover, .card-demo-link:hover { color: #a52572; }
.feed-card-bottom .broken-link-note { color: #9b3c51; }
.card-index, .study-card .card-index, .search-mini .card-index, .detail-cover span {
  color: #454545;
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(255 255 255 / 95%);
  border-radius: 7px;
  box-shadow: 0 2px 9px rgb(0 0 0 / 8%);
  backdrop-filter: blur(12px) saturate(0);
  -webkit-backdrop-filter: blur(12px) saturate(0);
}
.card-arrow, .study-card:hover .card-arrow {
  background: rgb(255 255 255 / 90%);
  color: #393939;
  border-color: rgb(255 255 255 / 95%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}
.catalog-pagination { color: #646464; }
.catalog-pagination button {
  background: var(--glass);
  color: #454545;
  border-color: var(--glass-line);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
}
.catalog-pagination button:disabled { color: #888; opacity: .55; }
.overlay-backdrop {
  background: rgb(255 255 255 / 65%);
  backdrop-filter: blur(18px) saturate(0);
  -webkit-backdrop-filter: blur(18px) saturate(0);
}
.search-dialog, .detail-dialog {
  color: #252525;
  background: rgb(255 255 255 / 95%);
  border: 1px solid #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--glass-line), 0 24px 90px rgb(0 0 0 / 12%), inset 0 1px 0 #fff;
}
.dialog-top, .dialog-footer, .search-summary { color: #646464; border-color: var(--glass-line); }
.dialog-close, .detail-close { color: #454545; background: #fff; border: 1px solid var(--glass-line); border-radius: 9px; }
.search-field svg { color: #646464; }
.search-field input { color: #252525; }
.search-field input::placeholder { color: #767676; }
.search-results button { color: #252525; border-radius: 10px; }
.search-results button:hover { background: rgb(0 0 0 / 3%); }
.search-results small { color: #707070; }
.search-results #show-all-results { color: #454545; border-color: var(--glass-line); }
.search-mini { background: #fff; border-radius: 8px; }
.detail-cover { background: #fff; }
.detail-body > p:not(.section-kicker), .detail-fields dd { color: #555; }
.detail-fields { border-color: var(--glass-line); }
.detail-fields dt { color: #707070; }
.detail-tags span { color: #646464; border-color: var(--glass-line); border-radius: 7px; }
.button-light, .button-dark, .button-outline {
  background: var(--glass);
  color: #252525;
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}
.button-light:hover, .button-dark:hover, .button-outline:hover, .header-cta:hover { background: #fff; color: #252525; }
.interlude { background: #fff; border-color: var(--glass-line); }
.interlude-image { filter: grayscale(1); opacity: .16; }
.interlude::after { background: rgb(255 255 255 / 72%); }
.interlude-content p, .interlude-content > span:last-child { color: #454545; }
.lab-grid, .lab-panel { background: #fff; border-color: var(--glass-line); border-radius: 18px; }
.lab-grid { overflow: hidden; box-shadow: var(--glass-shadow); }
.lab-stage { background: #fff; --stage-glow: #fff; }
.lab-stage::before, .lab-stage::after { border-color: var(--glass-line); }
.lab-stage-label, .lab-stage-hint, .lab-panel-head, .control-group h3, .lab-note, .lab-note > span { color: #707070; }
.lab-panel-head { border-color: var(--glass-line); }
.live-indicator { color: #555; }
.live-indicator i { background: #238557; box-shadow: none; }
.control-group h3 span, .shape-icon { color: #454545; }
.shape-option, .finish-option { background: var(--glass); color: #646464; border-color: var(--glass-line); border-radius: 10px; }
.shape-option.selected, .finish-option.selected { background: #fff; color: #252525; border-color: #8c8c8c; box-shadow: var(--glass-shadow); }
.finish-swatch { border-color: #cecece; }
.finish-ice { background: #f5f5f5; }
.finish-violet { background: #c9c9c9; }
.finish-gold { background: #fff; }
.closing-symbol { color: #e6e6e6; }
.hero h1, .hero-copy > p, .text-link, .hero-art-label, .hero-art-cross, .hero-bottom { color: #454545; }
.hero-art::before, .hero-art::after { border-color: var(--glass-line); }
.hero-art-halo { display: none; }
.intro-band { border-color: var(--glass-line); }
.intro-band p, .intro-band-inner > span, .intro-star, .tiny-star { color: #646464; }
.status-dot { background: #238557; box-shadow: none; }
.card-image.missing-cover, .detail-cover.missing-cover, .search-mini.missing-cover { background: #fff; color: #454545; }
.missing-cover-domain { color: #707070; }
.canvas-fallback { filter: grayscale(1); }
@media (max-width: 760px) {
  .catalog-sidebar .category-list .filter { border-color: var(--glass-line); background: var(--glass); }
  .catalog-sidebar .category-list .filter.active { background: #fff; box-shadow: var(--glass-shadow); }
}

/* A moving seven-color rim keeps the glass surface white. */
@property --rainbow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rainbow-rim {
  to { --rainbow-angle: 360deg; }
}
:is(button:not(.card-main), .header-cta, .button, .card-arrow) {
  isolation: isolate;
}
:is(button:not(.card-main):not(.detail-close), .header-cta, .button) {
  position: relative;
}
:is(button:not(.card-main), .header-cta, .button, .card-arrow)::after {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--rainbow-angle), #ff3b30, #ff9500, #ffd60a, #34c759, #00b8d9, #007aff, #af52de, #ff3b30);
  animation: rainbow-rim 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.catalog-sidebar .category-list .filter,
.catalog-sidebar .category-list .filter:hover,
.catalog-sidebar .category-list .filter.active {
  border: 0;
  box-shadow: none;
}
:is(button:not(.card-main), .header-cta, .button):focus-visible::after {
  padding: 2px;
}
.catalog-sidebar .category-list .filter { border-radius: 10px; }
.clear-filters { padding: 6px 10px; border-radius: 9px; text-decoration: none; }
.search-results button { margin-bottom: 8px; }
:is(button, .button):disabled::after { opacity: .3; animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  :is(button:not(.card-main), .header-cta, .button, .card-arrow)::after { animation: none; }
}

.showcase .gallery {
  display: block;
  columns: 3;
  column-gap: 16px;
}
.showcase .study-card {
  display: inline-flex;
  break-inside: avoid;
  width: 100%;
  margin: 0 0 16px;
}
.study-card .card-index,
.study-card .card-arrow { display: none; }
@media (max-width: 1100px) {
  .showcase .gallery { columns: 2; }
}
@media (max-width: 560px) {
  .showcase .gallery { columns: 1; }
}

.lang-switch { position: relative; }
.lang-trigger {
  height: 37px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #20232a;
  background: #fff;
  border-radius: 999px;
  white-space: nowrap;
}
.lang-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lang-chevron { width: 14px; height: 14px; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 220px;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 6px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 50px rgb(0 0 0 / 12%), 0 0 0 1px rgb(0 0 0 / 6%);
}
.lang-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #20232a;
  text-align: start;
}
.lang-menu button:hover,
.lang-menu button:focus-visible { background: #f4f4f4; }
.lang-menu button[aria-checked="true"] { background: #f3f3f3; font-weight: 650; }
.lang-check { color: #111; opacity: 0; }
.lang-menu button[aria-checked="true"] .lang-check { opacity: 1; }
@media (max-width: 760px) {
  .lang-current, #lang-current { display: none; }
}

/* Progressive taxonomy: eight topic entrances, expandable technical details. */
.technical-details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.technical-details summary { color: #565656; cursor: pointer; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.source-facets, .classification-controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.source-facets[hidden], #repo-state-field[hidden] { display: none; }
.source-facets label, .classification-controls label { display: flex; flex: 1 1 220px; min-width: 0; flex-direction: column; gap: 7px; color: #646464; font-size: 12px; }
.source-facets select, .classification-controls select { width: 100%; min-width: 0; min-height: 42px; padding: 10px 30px 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: #333; background: #fff; font: inherit; }
.facet-hint { color: #767676; font-size: 12px; line-height: 1.65; margin: 12px 0; }
.card-classification { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 9px; }
.card-classification:empty { display: none; }
.card-classification span { border: 1px solid #e8e8e8; border-radius: 7px; padding: 3px 7px; color: #666; background: #fafafa; font-size: 10px; }
.detail-fields dd { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .catalog-sidebar { max-height: none; overflow: visible; }
  #topic-list { display: flex; flex-wrap: wrap; max-height: none; overflow: visible; }
  #topic-list .filter { width: auto; flex: 0 1 auto; gap: 10px; }
  .technical-details .category-list { max-height: 280px; }
  .source-facets label, .classification-controls label { flex-basis: 100%; }
}

/* One filter tree on the left; the main column is reserved for search and results. */
.catalog-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; }
.catalog-main { min-width: 0; }
.catalog-sidebar { padding: 0 14px 20px 0; overscroll-behavior: contain; }
.sidebar-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 0 15px; background: #fff; }
.sidebar-heading strong { color: #292929; font-size: 14px; font-weight: 650; }
.sidebar-heading .clear-filters { flex: none; font-size: 11px; }
.filter-section { border-top: 1px solid var(--line); padding: 13px 0; }
.filter-section > summary, .filter-subsection > summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; color: #333; font-size: 12px; font-weight: 650; line-height: 1.5; }
.filter-section > summary::-webkit-details-marker, .filter-subsection > summary::-webkit-details-marker { display: none; }
.filter-section > summary::before, .filter-subsection > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); flex: none; transition: transform .15s; }
.filter-section[open] > summary::before, .filter-subsection[open] > summary::before { transform: rotate(45deg); }
.filter-section > summary { padding: 3px 2px 5px; }
.filter-section[open] > summary { margin-bottom: 9px; }
.catalog-sidebar .filter-list, .catalog-sidebar #topic-list, .catalog-sidebar .category-list { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 4px; overflow: visible; margin: 0; padding: 0; max-height: none; }
.catalog-sidebar .filter-list .filter, .catalog-sidebar #topic-list .filter { width: 100%; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: #666; font-size: 12px; line-height: 1.4; text-align: start; white-space: normal; }
.catalog-sidebar .filter-list .filter span { flex: none; margin: 0 0 0 auto; color: #868686; font: 10px var(--mono); }
.catalog-sidebar .filter-list .filter:hover { background: #f6f6f6; color: #222; }
.catalog-sidebar .filter-list .filter.active { background: #f2f4f3; color: #202924; font-weight: 650; box-shadow: none; }
.catalog-sidebar .filter-list .filter.active span { color: #57645d; }
.catalog-sidebar .filter-list .filter::after { opacity: .18; }
.catalog-sidebar .filter-list .filter.active::after, .catalog-sidebar .filter-list .filter:focus-visible::after { opacity: 1; }
.catalog-sidebar .filter-list .filter.active::before { display: none; }
.catalog-sidebar .filter-subsection { display: block; margin: 5px 0 9px 13px; border: 0; border-left: 1px solid #dedede; padding: 0 0 0 12px; }
.catalog-sidebar .filter-subsection > summary { margin: 0; padding: 7px 2px; color: #777; font-size: 11px; font-weight: 500; }
.catalog-sidebar .filter-subsection[open] > summary { margin-bottom: 5px; }
.catalog-sidebar .catalog-select-label { display: block; margin: 7px 0; color: #777; font-size: 11px; letter-spacing: 0; }
.catalog-sidebar select { width: 100%; min-width: 0; min-height: 38px; padding: 8px 24px 8px 10px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; color: #444; font-size: 12px; }
.catalog-sidebar #category-select { margin-bottom: 10px; }
.catalog-sidebar .classification-controls { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 14px; margin: 17px 0 0; }
.catalog-sidebar .classification-controls label { flex: none; font-size: 11px; }
.catalog-sidebar .facet-hint { font-size: 11px; margin: 12px 4px 0; line-height: 1.65; }
.catalog-sidebar .chip-heading { margin: 10px 2px; color: #777; font-size: 11px; letter-spacing: 0; }
.catalog-main .catalog-tools { grid-template-columns: minmax(0, 1fr); margin: 0 0 8px; gap: 8px; }
.catalog-main .catalog-search-label { grid-column: 1; grid-row: 1; }
.catalog-main #catalog-search { grid-column: 1; grid-row: 2; }
.catalog-main .toolbar { margin-bottom: 17px; padding: 13px 0; }
.filter-section > summary:focus-visible, .filter-subsection > summary:focus-visible { outline: 2px solid #758c80; outline-offset: 3px; border-radius: 3px; }
@media (max-width: 1100px) {
  .catalog-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 760px) {
  .catalog-layout { display: block; }
  .catalog-sidebar { position: static; padding: 0; max-height: none; overflow: visible; margin-bottom: 24px; }
  .catalog-sidebar .filter-list .filter { min-height: 38px; }
}
