/* Nijatva component styles. Design tokens live in assets/tokens.css (generated). */

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { letter-spacing: -.022em; line-height: 1.15; }
p { margin: 0 0 14px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--surface-quiet);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--indigo-solid); color: var(--on-indigo); padding: 12px 20px;
  border-radius: 0 0 10px 0; font-size: 14px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.025em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 2px; }

.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav a { font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--ink-soft); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-bright); }

.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.nav-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(420px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.nav-menu-panel a {
  padding: 14px 16px; border-radius: 10px; text-decoration: none;
  font-size: 16.5px; font-weight: 600; color: var(--ink);
}
.nav-menu-panel a:hover { background: var(--surface-quiet); }
.nav-menu-panel a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.button:hover { border-color: var(--accent-bright); }
.button.primary { background: var(--accent-pill); color: #fff; border-color: var(--accent-pill); }
.button.primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button.subtle { background: var(--surface-quiet); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.actions .button svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.actions .button.primary svg path, .actions .button.primary svg circle { stroke: currentColor; }

.chip-link {
  display: inline-block; font-size: 13.5px; font-weight: 600; text-decoration: none;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft);
}
.chip-link:hover { border-color: var(--accent-bright); color: var(--ink); }

/* ---------------------------------------------------------------- typography blocks */
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
.hero-title { font-size: clamp(40px, 6vw, 62px); margin: 0 0 18px; font-weight: 700; }
.page-title { font-size: clamp(32px, 4.4vw, 46px); margin: 0 0 16px; font-weight: 700; }
.lead { font-size: clamp(16.5px, 1.9vw, 19px); color: var(--ink-soft); max-width: 62ch; }
.lede-narrow { max-width: 52ch; }
.section-title { font-size: clamp(23px, 2.6vw, 30px); margin: 0 0 10px; }
.section-link { font-size: 14.5px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 68px 0 60px; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center;
}
.hero-metrics {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 8px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); overflow: hidden;
}
.metric { padding: 20px 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.metric strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.metric span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* icon wall in place of screenshots */
.icon-wall {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent-pill);
  border-radius: 24px; padding: 26px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 14px;
}
.wall-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.wall-tile img { width: 46px; height: 46px; border-radius: 12px; }
.wall-tile span {
  font-size: 10.5px; color: var(--muted); letter-spacing: -.01em; line-height: 1.2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------------------------------------- sections */
.section { padding: 62px 0; border-bottom: 1px solid var(--line); }
.section-band { background: var(--surface-quiet); }
.section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  flex-wrap: wrap; margin-bottom: 30px;
}
.section-heading > div:last-child { max-width: 42ch; }
.section-heading .lead { font-size: 15.5px; margin-bottom: 8px; }

.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- app card */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.app-card { padding: 0; overflow: hidden; gap: 0; }
.app-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); box-shadow: var(--shadow); }
.app-card-preview {
  display: grid; place-items: center; padding: 26px 0;
  background: var(--accent-soft); border-bottom: 1px solid var(--line);
}
.app-card-preview img {
  width: 76px; height: 76px; border-radius: 19px;
  box-shadow: 0 10px 24px rgba(20, 22, 43, .16);
  transition: transform .18s ease;
}
.app-card:hover .app-card-preview img { transform: translateY(-2px) scale(1.03); }
.app-card-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; flex: 1; }
.app-card-header { display: flex; align-items: flex-start; gap: 14px; }
.app-icon { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.app-card-title-block { min-width: 0; }
.app-card h3 { font-size: 17px; margin: 0 0 7px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge, .status-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 6px; padding: 3px 8px; white-space: nowrap;
}
.badge { background: var(--surface-quiet); color: var(--ink-soft); border: 1px solid var(--line); }
.status-badge.shipped { background: var(--green-soft); color: var(--green); }
.status-badge.progress { background: var(--accent-soft); color: var(--accent); }
.status-badge.planned { background: var(--blue-soft); color: var(--blue); }
.app-card p { font-size: 14.6px; color: var(--ink-soft); margin: 0; flex: 1; }
.app-card-actions { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.app-card-actions .button { width: 100%; padding: 11px 15px; font-size: 14.5px; margin-top: 2px; }
.app-card-note { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- panels */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.panel h2, .panel h3 { font-size: 19px; margin: 0; }
.panel p { font-size: 14.8px; color: var(--ink-soft); margin: 0; }
.panel .button, .panel .text-link-list { margin-top: auto; }
.text-link-list { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 6px; }
.text-link-list a { font-size: 14.5px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }

.panel.status-key dl { margin: 4px 0 12px; display: flex; flex-direction: column; gap: 12px; }
.panel.status-key dt { margin-bottom: 5px; }
.panel.status-key dd { margin: 0; font-size: 14px; color: var(--ink-soft); }
.panel.status-key a { font-size: 14.5px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.principle h3 { font-size: 16.5px; margin: 0 0 8px; }
.principle p { font-size: 14.6px; color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------------- app detail page */
.breadcrumb { font-size: 14px; color: var(--muted); padding: 26px 0 0; }
.breadcrumb a { text-decoration: none; color: var(--accent); font-weight: 600; }
.app-hero { padding: 26px 0 52px; border-bottom: 1px solid var(--line); }
.app-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 44px; align-items: start; }
.app-hero-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.app-hero-head img { width: 84px; height: 84px; border-radius: 20px; flex: none; }
.app-hero-head h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 8px; }
.app-meta { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.app-meta div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.app-meta div:last-child { border-bottom: 0; }
.app-meta dt { color: var(--muted); }
.app-meta dd { margin: 0; font-weight: 600; text-align: right; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 30px; font-size: 15.4px; color: var(--ink-soft); }
.feature-list li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 11px; height: 6px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 44px 0 64px; }
.pager a {
  display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 20px; background: var(--surface);
}
.pager a:hover { border-color: var(--accent-bright); }
.pager span { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.pager strong { font-size: 15.5px; }
.pager .next { text-align: right; }

/* ---------------------------------------------------------------- architecture page */
.layers { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 10px 0 12px; }
.layer {
  width: 100%; max-width: 560px; background: var(--indigo-solid); color: #eef0fa;
  border-radius: 14px; padding: 17px 22px; text-align: center;
}
.layer b { display: block; font-size: 15px; }
.layer code { font-size: 12.5px; color: #f0b566; background: transparent; border: 0; padding: 0; }
.layer small { display: block; color: #b9bcd8; font-size: 12.8px; margin-top: 5px; line-height: 1.45; }
.layer.mid { background: var(--surface); color: var(--ink); border: 1px solid var(--line); max-width: none; flex: 1; }
.layer.mid code { color: var(--accent); }
.layer.mid small { color: var(--ink-soft); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; }
.connector { width: 2px; height: 16px; background: var(--line); }

.phone {
  max-width: 430px; margin: 8px auto 0; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow);
}
.p-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.p-top .off { font-size: 11.5px; font-weight: 600; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 4px 9px; }
.p-banner { padding: 10px 17px; background: var(--surface-quiet); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 14px; flex-wrap: wrap; }
.p-body {
  padding: 28px 17px; min-height: 150px; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 13.5px;
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 9px, var(--surface-quiet) 9px, var(--surface-quiet) 18px);
}
.p-nav { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.p-nav div { padding: 12px 6px; text-align: center; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); }
.p-nav div:last-child { border-right: 0; }
.p-nav div.on { color: var(--accent); font-weight: 700; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
caption { caption-side: bottom; text-align: left; font-size: 13px; color: var(--muted); padding-top: 10px; }
th { background: var(--indigo-solid); color: var(--on-indigo); text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; padding: 12px 13px; font-weight: 700; }
td { padding: 12px 13px; border-top: 1px solid var(--line); vertical-align: top; }
td.ph { font-weight: 700; white-space: nowrap; }
td.num { white-space: nowrap; color: var(--muted); }
td.apps { color: var(--ink-soft); font-size: 13.5px; }
td.no { color: #a23432; }
td.yes { color: var(--green); }
@media (prefers-color-scheme: dark) { td.no { color: #ef9a96; } }
.st { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.st-done { background: var(--green-soft); color: var(--green); }
.st-active { background: var(--accent-soft); color: var(--accent); }
.st-idle { background: var(--surface-quiet); color: var(--ink-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 16px; }
.fix { border-left: 3px solid var(--accent-bright); padding-left: 18px; margin-bottom: 22px; }
.fix b { display: block; margin-bottom: 5px; font-size: 15.5px; }
.fix p { margin: 0; color: var(--ink-soft); font-size: 14.8px; }
.note { background: var(--surface-quiet); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 14.8px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 52px 0 44px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 34px; }
.site-footer h2 { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--footer-muted); margin: 0 0 12px; font-weight: 700; }
.site-footer p { color: var(--footer-muted); font-size: 14.2px; margin: 0 0 10px; }
.site-footer a { color: var(--footer-ink); text-decoration: none; font-size: 14.2px; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 9px; }
.footer-legal {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--footer-muted);
}

/* ---------------------------------------------------------------- 404 */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.notfound h1 { font-size: clamp(64px, 12vw, 110px); margin: 0; letter-spacing: -.04em; color: var(--accent-bright); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero-grid, .app-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .nav-menu { display: block; }
  .row3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .chip-link { font-size: 12.5px; padding: 6px 11px; }
  .actions { gap: 8px; }
  .header-inner { height: 62px; }
  .brand small { display: none; }
  .hero { padding: 44px 0 40px; }
  .section { padding: 46px 0; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .icon-wall { grid-template-columns: repeat(3, 1fr); padding: 20px; gap: 14px 10px; }
  .wall-tile img { width: 40px; height: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .app-hero-head { gap: 16px; }
  .app-hero-head img { width: 64px; height: 64px; border-radius: 16px; }
  table { font-size: 13px; }
}

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

/* ---------------------------------------------------------------- appearance control */
.appearance { position: relative; margin-left: 6px; }
.appearance summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.appearance summary::-webkit-details-marker { display: none; }
.appearance summary:hover { border-color: var(--accent-bright); color: var(--ink); }
.appearance summary svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.appearance[open] summary { border-color: var(--accent-bright); color: var(--ink); }

.appearance-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 362px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 20px; z-index: 40;
}
.appearance-panel .eyebrow { margin-bottom: 14px; }
.appearance-panel fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.appearance-panel fieldset:last-of-type { margin-bottom: 6px; }
.appearance-panel legend {
  font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 9px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pill span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1;
  background: var(--surface-quiet); color: var(--ink-soft);
  border: 1px solid var(--line); transition: background .12s ease, color .12s ease;
}
.pill span:hover { border-color: var(--accent-bright); }
.pill input:checked + span {
  background: var(--accent-pill); color: #fff; border-color: var(--accent-pill);
}
.pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the accent swatches always show their own colour, like the settings screen */
.pill[data-swatch="saffron"] span { background: #8a4b0f; color: #fff; border-color: #8a4b0f; }
.pill[data-swatch="green"] span { background: #1f5130; color: #fff; border-color: #1f5130; }
.pill[data-swatch="indigo"] span { background: #262a5c; color: #fff; border-color: #262a5c; }
.pill[data-swatch] input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.appearance-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }

/* ---------------------------------------------------------------- developer card */
.dev-card {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px;
  padding: 14px 16px; margin-top: 18px; background: rgba(255, 255, 255, .04);
}
.dev-avatar {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--accent-pill); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: .02em;
}
.dev-card p { margin: 0; }
.dev-name { font-size: 15px; font-weight: 700; color: var(--footer-ink); }
.dev-role { font-size: 13px; color: var(--footer-muted); margin-top: 2px !important; }
.dev-card a { font-size: 13.5px; font-weight: 600; color: var(--footer-ink); }

@media (max-width: 640px) {
  /* anchor the panel to the header, not the button, so it cannot run off-screen */
  .appearance { position: static; }
  .appearance-panel {
    position: absolute; left: 12px; right: 12px; width: auto; top: calc(100% + 8px);
  }
  .appearance summary span { display: none; }
  .appearance summary { padding: 9px 11px; }
}

/* ---------------------------------------------------------------- developer page */
.dev-top { padding: 26px 0 0; }
.dev-back { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; font-weight: 700; color: var(--ink); }
.dev-back svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dev-back:hover { color: var(--accent); }

.dev-hero { text-align: center; padding: 40px 0 52px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 136px; height: 136px; border-radius: 50%; margin: 0 auto 22px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--accent-pill); color: #fff;
  font-size: 44px; font-weight: 700; letter-spacing: -.02em;
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.dev-hero h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 6px; }
.dev-handle { font-size: 16px; color: var(--muted); margin: 0 0 18px; }
.dev-bio { max-width: 46ch; margin: 0 auto 6px; font-size: 16px; color: var(--ink-soft); }

.dev-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface-quiet); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 10px; max-width: 620px; margin: 30px auto 0; text-align: center;
}
.dev-stats div + div { border-left: 1px solid var(--line); }
.dev-stats b { display: block; font-size: 27px; letter-spacing: -.02em; }
.dev-stats span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

.dev-rows { max-width: 620px; margin: 30px auto 0; display: flex; flex-direction: column; gap: 16px; }
.dev-row { display: flex; align-items: center; gap: 14px; font-size: 15.5px; color: var(--ink-soft); text-decoration: none; }
.dev-row svg { width: 21px; height: 21px; flex: none; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dev-row a, a.dev-row:hover { color: var(--accent); }

.btn-github {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  max-width: 620px; margin: 34px auto 0; padding: 17px 24px;
  border-radius: 999px; text-decoration: none; font-size: 16px; font-weight: 600;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
}
.btn-github svg { width: 21px; height: 21px; fill: currentColor; }
.btn-github:hover { background: var(--accent-pill); border-color: var(--accent-pill); color: #fff; }

.maintains { max-width: 620px; margin: 44px auto 0; text-align: left; }
.maintains h2 { font-size: 17px; margin: 0 0 14px; }
.maintain-icons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.maintain-icons img { width: 46px; height: 46px; border-radius: 12px; }
.maintain-more {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-quiet); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.maintain-note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

@media (max-width: 640px) {
  .dev-stats { grid-template-columns: 1fr; padding: 6px; }
  .dev-stats div { padding: 16px 0; }
  .dev-stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .avatar { width: 112px; height: 112px; font-size: 36px; }
}

a.dev-card { text-decoration: none; color: inherit; transition: border-color .14s ease, background .14s ease; }
a.dev-card:hover { border-color: var(--accent-pill); background: rgba(255, 255, 255, .08); }
.dev-link { font-size: 13.5px; font-weight: 600; color: var(--footer-ink); border-bottom: 1px solid rgba(255, 255, 255, .35); }

/* ---------------------------------------------------------------- search */
.header-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-left: 8px; flex: none;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  color: var(--ink-soft); text-decoration: none;
}
.header-search:hover { border-color: var(--accent-bright); color: var(--ink); }
.header-search svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

.search-wrap { max-width: 760px; }
.search-box {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 16px; box-shadow: var(--shadow);
}
.search-box:focus-within { border-color: var(--accent-bright); }
.search-box svg { width: 20px; height: 20px; flex: none; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.search-box input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; padding: 14px 0; min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { filter: grayscale(1); }

.search-count { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

.search-results { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.search-hit a {
  display: flex; align-items: flex-start; gap: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; transition: border-color .14s ease, transform .14s ease;
}
.search-hit a:hover { border-color: var(--accent-bright); transform: translateY(-1px); }
.search-hit img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.search-hit div { min-width: 0; }
.search-hit strong { font-size: 16px; }
.search-hit p { margin: 3px 0 0; font-size: 14.2px; color: var(--ink-soft); }
.search-kind {
  display: inline-block; margin-left: 9px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; vertical-align: 2px;
}
.search-hit mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 22px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 15px; }
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82em;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; background: var(--surface-quiet); color: var(--ink-soft);
}

@media (max-width: 640px) {
  .header-search { width: 34px; height: 34px; margin-left: 4px; }
  .search-box input { font-size: 16px; }
}
