:root {
  --bg: #ffffff;
  --ink: #101114;
  --muted: #5d6570;
  --line: #e6e9ee;
  --soft: #f4f6f8;
  --blue: #00a2ff;
  --blue-2: #0086d6;
  --pad: 20px;
  --font: "Onest", "Segoe UI", sans-serif;
  --shadow: 0 16px 40px rgba(16, 17, 20, 0.08);
  --header: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - var(--pad) * 2)); margin-inline: auto; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.loader i {
  display: block;
  height: 3px;
  background: var(--blue);
  transform-origin: left center;
  animation: load 0.7s ease both;
}
body.is-ready .loader { opacity: 0; visibility: hidden; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 var(--pad);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.top.is-stuck { border-bottom-color: var(--line); }
.brand { font-weight: 700; font-size: 22px; letter-spacing: -0.05em; }
.desk-nav { display: none; gap: 18px; font-weight: 500; }
.desk-nav a:hover { color: var(--blue-2); }
.search-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  min-width: 0;
}
.search-btn svg { width: 18px; height: 18px; flex: none; }
.search-btn span { flex: 1; text-align: left; }
.search-btn kbd {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}
.menu-btn {
  display: inline-flex;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
}
@media (min-width: 880px) {
  .desk-nav { display: flex; }
  .menu-btn { display: none; }
  .search-btn { width: min(320px, 34vw); }
}

.nav {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  transform: translateY(-102%);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
body.nav-open .nav { transform: none; }
body.nav-open { overflow: hidden; }
.nav-close {
  position: absolute;
  top: 18px;
  right: var(--pad);
  font-weight: 600;
}
.nav-links { display: grid; }
.nav-links a {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.nav-links a:hover { color: var(--blue); }
.nav-foot { color: var(--muted); }

.palette-back {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(16, 17, 20, 0.28);
  display: flex;
  justify-content: center;
  padding: 12vh 16px 16px;
}
.palette-back[hidden] { display: none; }
.palette {
  width: min(680px, 100%);
  align-self: flex-start;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(16, 17, 20, 0.18);
  overflow: hidden;
}
.palette-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.palette-field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.palette-field input { width: 100%; font-size: 18px; outline: none; }
.palette-list { max-height: min(420px, 50vh); overflow: auto; }
.hit, .suggest a, .empty-hit {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
}
.hit.is-on, .hit:hover, .suggest a:hover { background: var(--soft); }
.hit img, .suggest img, .logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--soft);
}
.hit b, .suggest b { display: block; font-weight: 600; }
.hit span, .suggest span, .empty-hit { color: var(--muted); font-size: 13px; }
.mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--soft);
  font-weight: 700;
  color: var(--blue-2);
}

.hero { padding: 48px 0 8px; }
.hero h1, .page-head h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 0.98;
}
.lede { max-width: 46ch; margin: 16px 0 0; font-size: 18px; color: #2a3038; }
.home-search { position: relative; margin-top: 28px; max-width: 640px; }
.home-search input, .tool-search {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='6.5' fill='none' stroke='%235d6570' stroke-width='1.8'/><path d='M16 16.5L20 20.5' fill='none' stroke='%235d6570' stroke-width='1.8' stroke-linecap='round'/></svg>") 16px 50% / 20px no-repeat;
}
.home-search input:focus, .tool-search:focus, .palette-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 162, 255, 0.16);
  outline: none;
}
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 5;
}
.suggest:empty { display: none; }
.suggest a { grid-template-columns: 36px 1fr; }

.rail-wrap { margin-top: 36px; }
.rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 16px;
  scrollbar-color: #d5dbe3 transparent;
}
.rail-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.rail-card span {
  display: block;
  padding: 12px 14px 14px;
  font-weight: 600;
}

.section { padding: 28px 0 56px; }
.setup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.setup h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.setup .lede { margin-top: 10px; }
.setup-kicker { margin: 0; color: var(--blue-2); font-size: 13px; font-weight: 700; }
.setup-dl { width: auto; min-width: 220px; padding: 0 22px; flex: none; }
.band { background: var(--soft); }
.kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.kicker h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.more { font-weight: 600; color: var(--blue-2); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .cats a {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 14px;
}
.chip:hover, .cats a:hover { border-color: var(--blue); color: var(--blue-2); }
.chip.is-on, .chip.is-on:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.shot {
  height: 150px;
  background: var(--soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.45s ease; }
.card:hover .shot img { transform: scale(1.04); }
.shot-mark img { width: 72px; height: 72px; }
.shot-mark b { font-size: 28px; color: var(--blue-2); }
.card-meta {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
}
.card-meta b { display: block; font-size: 15px; letter-spacing: -0.02em; }
.card-meta span { color: var(--muted); font-size: 13px; }

.page-head { padding: 28px 0 8px; }
.crumbs { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.crumbs a:hover { color: var(--blue-2); }
.toolbar {
  position: sticky;
  top: var(--header);
  z-index: 15;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tool-search { max-width: none; }
.count { margin: 14px 0; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 28px 0; }

.detail { display: grid; gap: 28px; margin-top: 22px; }
@media (min-width: 900px) {
  .detail { grid-template-columns: 1.4fr 0.7fr; align-items: start; }
}
.hero-shot {
  border-radius: 20px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  min-height: 240px;
  display: grid;
  place-items: center;
}
.hero-shot img { width: 100%; height: 100%; max-height: 460px; object-fit: contain; }
.hero-shot.shot-mark img { width: min(160px, 40%); height: auto; padding: 36px 0; }
.prose { font-size: 18px; max-width: 62ch; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.fact { padding-top: 10px; border-top: 1px solid var(--line); }
.fact span { display: block; color: var(--muted); font-size: 13px; }
.fact b { display: block; margin-top: 4px; font-weight: 600; }
.panel {
  position: sticky;
  top: calc(var(--header) + 16px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.panel-id { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.panel-id img, .panel-id .mark { width: 48px; height: 48px; border-radius: 12px; }
.panel-id b { display: block; font-size: 18px; }
.panel-id span { color: var(--muted); font-size: 13px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}
.btn:hover { background: var(--blue-2); }
a.btn.setup-dl { width: auto; min-width: 220px; padding: 0 22px; flex: none; white-space: nowrap; }
.btn small { display: none; }
.fine { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.owner { margin: 8px 0 0; color: var(--muted); }

.steps { display: grid; gap: 14px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.step b { display: block; margin: 8px 0; font-size: 18px; }
.step p { margin: 0; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 700; font-size: 18px; cursor: pointer; }
.faq p { margin: 8px 0 0; max-width: 68ch; color: #2a3038; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 18px; }
.foot-grid { display: grid; gap: 22px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 0.6fr 1fr; } }
.foot p, .foot a { color: var(--muted); }
.foot a { display: block; margin-top: 6px; }
.foot a:hover { color: var(--blue-2); }
.foot .brand { color: var(--ink); display: inline-block; margin-bottom: 8px; }
.foot-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }

@media (max-width: 720px) {
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 42px; padding: 0; justify-content: center; }
  .facts { grid-template-columns: 1fr 1fr; }
  .panel { position: static; }
  .setup { flex-direction: column; align-items: stretch; }
  a.btn.setup-dl { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
