/* =====================================================================
   AutoColorCode design system
   ===================================================================== */
@font-face { font-family: "Sora"; src: url(/fonts/sora-latin.woff2) format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --ink: #0b0f1a;
  --ink-2: #121a2e;
  --ink-3: #1b2542;
  --paper: #f6f5f1;
  --card: #ffffff;
  --line: #e6e3da;
  --line-2: #d6d2c5;
  --text: #1c2233;
  --muted: #5b6474;
  --accent: #e5173f;
  --link: #b4122b;
  --grad: linear-gradient(100deg, #ff3d5a 0%, #ff9a1f 46%, #7b5cff 100%);
  --r: 14px;
  --r-lg: 22px;
  --shadow-s: 0 1px 2px rgba(11, 15, 26, .06), 0 2px 10px rgba(11, 15, 26, .05);
  --shadow-m: 0 18px 40px -18px rgba(11, 15, 26, .35);
  --wrap: 1200px;
  --head: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; }
button { font: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid #7b5cff; outline-offset: 2px; border-radius: 4px; }

.eyebrow { font: 700 .74rem/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--link); margin: 0 0 14px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--body); cursor: pointer; text-decoration: none !important;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { color: #fff; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(255, 61, 90, .7); }
.btn--primary:hover { box-shadow: 0 14px 28px -10px rgba(255, 61, 90, .85); }
.btn--ghost { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.16); }
.btn--dark { color: #fff; background: var(--ink); }
.btn--sm { padding: 10px 16px; font-size: .88rem; border-radius: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 15, 26, .88); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none !important; flex: 0 0 auto; }
.logo__mark { flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(123, 92, 255, .35)); }
.logo__text { font: 800 1.22rem/1 var(--head); letter-spacing: -.03em; color: #fff; }
.logo__text b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.nav { display: none; margin-left: auto; align-items: center; gap: 4px; }
.nav a { color: rgba(255,255,255,.78); font: 500 .93rem/1 var(--body); padding: 10px 12px; border-radius: 9px; text-decoration: none; transition: color .15s, background .15s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); }
.header__cta { display: none; }
.nav-toggle { margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4.5px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-nav { display: none; padding: 8px 20px 22px; border-top: 1px solid rgba(255,255,255,.08); background: var(--ink); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; color: #fff; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 500; text-decoration: none; }
.mobile-nav .btn { margin-top: 16px; width: 100%; }
@media (min-width: 1040px) {
  .nav { display: flex; }
  .header__cta { display: inline-flex; margin-left: 8px; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 100; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 22px; padding: 0; font-size: .84rem; color: rgba(255,255,255,.65); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 8px; opacity: .5; }
.breadcrumbs a { color: rgba(255,255,255,.85); }
.breadcrumbs [aria-current] { color: #fff; }

/* ---------- Home hero ---------- */
.hero-home { position: relative; color: #fff; background: var(--ink); overflow: hidden; isolation: isolate; }
.hero-home__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; opacity: .7; }
.hero-home::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(55% 90% at 88% 5%, rgba(255,61,90,.34), transparent 62%), radial-gradient(50% 80% at 8% 105%, rgba(123,92,255,.36), transparent 60%), linear-gradient(180deg, #0b0f1a 0%, #0e1426 100%); }
.hero-home::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 100%); }
.hero-collage { position: absolute; z-index: 0; display: none; top: 50%; right: max(20px, calc((100vw - 1200px) / 2 + 20px)); width: min(500px, 40vw); height: 440px; transform: translateY(-50%); }
.hc { position: absolute; width: 300px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; border: 5px solid #fff; box-shadow: 0 34px 60px -22px rgba(0,0,0,.75); background: var(--ink-3); }
.hc--1 { top: 0; right: 0; transform: rotate(5deg); }
.hc--2 { top: 150px; left: 0; transform: rotate(-6deg); z-index: 2; }
.hc--3 { bottom: 0; right: 26px; transform: rotate(2deg); z-index: 1; }
.hc-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(11,15,26,.85); color: #fff; font: 600 .8rem var(--body); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(6px); }
.hc-chip i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; }
.hc-chip--1 { top: 18px; right: 210px; }
.hc-chip--2 { top: 300px; left: 196px; }
.hc-chip--3 { bottom: 22px; right: 12px; }
@media (min-width: 1000px) { .hero-collage { display: block; } }
.hero-home__inner { position: relative; z-index: 1; }
.hero-home__inner { padding: 92px 20px 84px; max-width: var(--wrap); margin: 0 auto; }
.hero-home h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -.028em; max-width: 16ch; margin: 0 0 22px; font-weight: 800; }
.hero-home h1 .grad-text { display: block; }
.hero-home .lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.8); max-width: 54ch; margin-bottom: 30px; }
.finder { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.finder select { flex: 1 1 200px; min-width: 0; height: 52px; padding: 0 16px; border-radius: 12px; border: 0; background: #fff; color: var(--ink); font: 500 1rem var(--body); }
.finder .btn { height: 52px; }
.finder__hint { margin: 12px 4px 0; font-size: .86rem; color: rgba(255,255,255,.62); }
.stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 52px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.14); }
.stat b { display: block; font: 800 2rem/1 var(--head); letter-spacing: -.03em; }
.stat span { font-size: .84rem; color: rgba(255,255,255,.62); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section--tight { padding: 52px 0; }
.section--dark { background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: #ff8fa3; }
.section--white { background: #fff; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-head h2 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.sec-head p { margin: 8px 0 0; color: var(--muted); max-width: 56ch; }
.section--dark .sec-head p { color: rgba(255,255,255,.65); }
.link-more { font-weight: 600; white-space: nowrap; }

/* ---------- Colour chip strip ---------- */
.chipstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 18px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.chip { flex: 0 0 auto; width: 84px; text-align: center; scroll-snap-align: start; color: var(--text); font-size: .78rem; font-weight: 500; text-decoration: none !important; }
.chip i { display: block; width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 9px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-2), 0 10px 18px -8px rgba(0,0,0,.45), inset 0 -10px 16px -6px rgba(0,0,0,.35), inset 0 8px 12px -6px rgba(255,255,255,.4); transition: transform .2s; }
.chip:hover i { transform: translateY(-4px) scale(1.06); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; transition: transform .25s, box-shadow .25s, border-color .25s; text-decoration: none !important; }
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); border-color: var(--line-2); }
.pcard__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.pcard:hover .pcard__img img { transform: scale(1.06); }
.pcard__tag { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(11,15,26,.78); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(6px); }
.pcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pcard__title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 700 1.05rem/1.25 var(--head); color: var(--ink); }
.pcard__text { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.pcard__more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .9rem; color: var(--link); }
.dot { width: 15px; height: 15px; flex: 0 0 15px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 0 0 2px #fff, 0 0 0 3px var(--line-2); }

/* ---------- Page hero (hubs) & detail hero ---------- */
.page-hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 92% -20%, rgba(255,61,90,.35), transparent 60%), radial-gradient(50% 100% at 0% 120%, rgba(123,92,255,.35), transparent 60%); }
.page-hero__inner { padding: 48px 20px 56px; max-width: var(--wrap); margin: 0 auto; }
.page-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.026em; max-width: 20ch; margin-bottom: 14px; }
.page-hero .lede { color: rgba(255,255,255,.78); font-size: 1.15rem; max-width: 62ch; margin: 0; }
.page-hero .eyebrow { color: #ff8fa3; }

.detail-hero { position: relative; color: #fff; background: var(--ink); isolation: isolate; overflow: hidden; }
.detail-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.detail-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,15,26,.38) 0%, rgba(11,15,26,.58) 45%, rgba(11,15,26,.94) 100%), radial-gradient(60% 100% at 100% 0%, rgba(255,61,90,.2), transparent 60%); }
.detail-hero__inner { padding: 40px 20px 60px; max-width: var(--wrap); margin: 0 auto; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; }
.detail-hero .eyebrow { color: #ff8fa3; }
.detail-hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.028em; max-width: 22ch; margin-bottom: 14px; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.detail-hero__sub { color: rgba(255,255,255,.82); font-size: 1.12rem; max-width: 64ch; margin: 0; }
.hero-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; padding: 7px 16px 7px 7px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 600 .88rem var(--body); letter-spacing: .02em; }
.hero-chip i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: inset 0 -6px 10px -4px rgba(0,0,0,.4); }

/* ---------- Article layout + sidebar ---------- */
.page-layout { max-width: var(--wrap); margin: 0 auto; padding: 48px 20px 88px; display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) {
  .page-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; }
  .page-layout--solo { grid-template-columns: minmax(0, 760px); justify-content: start; }
}
.sidebar { display: none; }
@media (min-width: 1040px) {
  .sidebar { display: grid; gap: 18px; align-self: start; position: sticky; top: 92px; }
}
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-s); }
.side-card h3 { font: 700 .74rem/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 52vh; overflow: auto; }
.toc__list a { display: block; padding: 7px 10px; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; font-size: .88rem; line-height: 1.35; color: var(--muted); text-decoration: none; }
.toc__list a:hover { color: var(--ink); background: var(--paper); }
.toc__list a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); background: var(--paper); }
.side-cta { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--r); padding: 22px; }
.side-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 90% at 100% 0%, rgba(255,61,90,.5), transparent 60%); }
.side-cta > * { position: relative; }
.side-cta h3 { color: #fff; font-size: 1.1rem; letter-spacing: -.01em; text-transform: none; margin: 0 0 8px; }
.side-cta p { color: rgba(255,255,255,.75); font-size: .9rem; margin-bottom: 16px; }
.toc-mobile { margin: 0 0 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.toc-mobile summary { cursor: pointer; padding: 14px 18px; font: 700 .9rem var(--head); list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile[hidden] { display: none; }
.toc-mobile .toc__list { padding: 0 8px 10px; }
@media (min-width: 1040px) { .toc-mobile { display: none; } }

/* ---------- Prose ---------- */
.prose { font-size: 1.07rem; line-height: 1.78; color: #263044; min-width: 0; }
.prose > p:first-of-type { font-size: 1.24rem; line-height: 1.65; color: var(--ink); }
.prose h2 { position: relative; scroll-margin-top: 92px; margin: 2.7em 0 .8em; padding-left: 20px; font-size: clamp(1.45rem, 2.6vw, 1.95rem); letter-spacing: -.025em; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .16em; bottom: .16em; width: 5px; border-radius: 5px; background: var(--grad); }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.2rem; }
.prose p { margin: 0 0 1.25em; }
.prose a { text-decoration: underline; text-decoration-color: rgba(180,18,43,.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul { list-style: none; padding: 0; margin: 0 0 1.4em; }
.prose ul li { position: relative; padding-left: 26px; margin: 0 0 .7em; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .66em; width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
.prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose ol li { margin: 0 0 .8em; padding-left: 6px; }
.prose ol li::marker { color: var(--accent); font-weight: 700; }
.prose .btn { text-decoration: none; }

.swatch-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 2.2em; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-s); }
.swatch-box { width: 108px; height: 108px; flex: 0 0 108px; border-radius: 20px; box-shadow: inset 0 -22px 34px -14px rgba(0,0,0,.4), inset 0 14px 22px -10px rgba(255,255,255,.4), 0 14px 26px -14px rgba(0,0,0,.5); }
.swatch-box--matte { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 14px 26px -14px rgba(0,0,0,.4); filter: saturate(.75); }
.swatch-box--flat { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); filter: saturate(.7); }
.swatch-box--metallic { background-image: linear-gradient(135deg, rgba(255,255,255,.4) 0%, transparent 45%, rgba(255,255,255,.18) 100%); background-blend-mode: overlay; }
.swatch-box--pearl { background-image: linear-gradient(135deg, rgba(255,255,255,.55) 0%, transparent 55%, rgba(255,255,255,.25) 100%); background-blend-mode: overlay; }
.swatch-box--candy { background-image: linear-gradient(160deg, rgba(255,255,255,.5) 0%, transparent 38%); background-blend-mode: soft-light; }
.swatch-meta { flex: 1 1 260px; min-width: 0; }
.swatch-meta p { margin: 0 0 .5em; font-size: .95rem; }
.swatch-meta code { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--ink); color: #fff; font: 600 .84rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.swatch-note { font-size: .84rem !important; color: var(--muted); line-height: 1.5; }

.disclaimer-box { margin: 1.6em 0; padding: 16px 20px; border-radius: var(--r); background: #fff8e6; border: 1px solid #f2dfa6; border-left: 5px solid #f2b400; font-size: .94rem; line-height: 1.6; }

.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.4em; }
.related-links a { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .15s; }
.related-links a:hover { border-color: var(--accent); box-shadow: 0 6px 16px -8px rgba(229,23,63,.5); transform: translateY(-1px); text-decoration: none; }

.faq-item { margin: 0 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { border-color: var(--line-2); box-shadow: var(--shadow-s); }
.faq-item summary { position: relative; cursor: pointer; list-style: none; padding: 17px 54px 17px 20px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0f1a' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item > p, .faq-item > div { margin: 0; padding: 0 20px 6px; color: #3a4459; font-size: 1rem; line-height: 1.7; }
.faq-item > p:last-child { padding-bottom: 20px; }

.table-wrap { overflow-x: auto; margin: 1.4em 0 2em; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-s); }
.code-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.code-table th { text-align: left; padding: 13px 16px; background: var(--ink); color: #fff; font: 600 .78rem var(--head); letter-spacing: .08em; text-transform: uppercase; }
.code-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.code-table tbody tr:nth-child(even) { background: #faf9f6; }
.code-table code { padding: 3px 10px; border-radius: 8px; background: var(--ink); color: #fff; font: 600 .86rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-swatch-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mini-swatch { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.confidence-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 700 .72rem var(--body); letter-spacing: .04em; text-transform: uppercase; background: #eef0f4; color: #3a4459; }
.conf-high { background: #dff7ea; color: #0b6b3a; }
.conf-medium { background: #fff1d3; color: #8a5a00; }

.form-field { margin: 0 0 20px; }
.form-field label { display: block; font: 600 .84rem var(--head); letter-spacing: .04em; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; }
.searchbar { position: relative; max-width: 560px; }
.searchbar input { width: 100%; height: 56px; padding: 0 20px 0 52px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6474' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 18px center / 20px no-repeat; font: 500 1rem var(--body); color: var(--ink); box-shadow: var(--shadow-s); }
.searchbar input:focus { outline: none; border-color: #7b5cff; box-shadow: 0 0 0 4px rgba(123,92,255,.18); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.filter { padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 600 .88rem var(--body); cursor: pointer; transition: all .15s; }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Steps & feature blocks ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px 24px; box-shadow: var(--shadow-s); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px; border-radius: 13px; background: var(--grad); color: #fff; font: 800 1.1rem var(--head); box-shadow: 0 10px 20px -10px rgba(255,61,90,.7); }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.cta-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 44px; border-radius: 26px; background: var(--ink); color: #fff; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 140% at 100% 0%, rgba(255,61,90,.45), transparent 60%), radial-gradient(50% 120% at 0% 120%, rgba(123,92,255,.4), transparent 60%); }
.cta-band h2 { color: #fff; margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { margin: 0; color: rgba(255,255,255,.75); max-width: 52ch; }
.brand-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink); color: rgba(255,255,255,.7); margin-top: 0; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.footer__inner { display: grid; gap: 40px; padding: 64px 20px 44px; max-width: var(--wrap); margin: 0 auto; grid-template-columns: 1fr; }
@media (min-width: 820px) { .footer__inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer__brand p { margin: 16px 0 0; max-width: 34ch; font-size: .94rem; line-height: 1.65; }
.site-footer h4 { color: #fff; font: 700 .74rem/1 var(--head); letter-spacing: .16em; text-transform: uppercase; margin: 0 0 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer li a { color: rgba(255,255,255,.7); font-size: .94rem; text-decoration: none; }
.site-footer li a:hover { color: #fff; text-decoration: underline; }
.footer__bottom { max-width: var(--wrap); margin: 0 auto; padding: 22px 20px 30px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; line-height: 1.6; color: rgba(255,255,255,.5); }

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero-home__inner { padding: 64px 20px 56px; }
  .cta-band { padding: 30px 24px; }
  .detail-hero__inner { min-height: 280px; padding-bottom: 44px; }
  .swatch-box { width: 84px; height: 84px; flex-basis: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* TOC inside prose (mobile) must not inherit list styling */
.prose .toc-mobile .toc__list { list-style: none; margin: 0; padding: 0 8px 10px; }
.prose .toc-mobile .toc__list li { margin: 0; padding: 0; }
.prose .toc-mobile .toc__list li::before { display: none; }

/* Hero photos that contain legible text: blur + darken so they read as texture */
.detail-hero--soft .detail-hero__img { filter: blur(9px) brightness(.75) saturate(1.1); transform: scale(1.1); }
.detail-hero--soft::after { background: linear-gradient(180deg, rgba(11,15,26,.55) 0%, rgba(11,15,26,.7) 55%, rgba(11,15,26,.95) 100%), radial-gradient(60% 100% at 100% 0%, rgba(255,61,90,.25), transparent 60%); }

/* Compact hero (legal pages) + contact card */
.detail-hero--compact .detail-hero__inner { min-height: 0; padding-top: 32px; padding-bottom: 44px; }
.detail-hero--compact { background: linear-gradient(135deg, #0b0f1a 0%, #121a2e 100%); }
.prose .meta { display: inline-block; margin: 0 0 1.6em; padding: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .84rem; font-weight: 500; }
.contact-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 2.2em; padding: 28px; border-radius: var(--r-lg); background: var(--ink); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.contact-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 140% at 100% 0%, rgba(255,61,90,.4), transparent 60%), radial-gradient(60% 120% at 0% 120%, rgba(123,92,255,.35), transparent 60%); }
.contact-card__icon { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; border-radius: 18px; background: var(--grad); box-shadow: 0 12px 24px -10px rgba(255,61,90,.7); }
.contact-card__label { margin: 0 0 4px; font: 700 .72rem var(--head); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.contact-card__mail { display: block; font: 800 clamp(1.25rem, 3.4vw, 1.8rem)/1.2 var(--head); letter-spacing: -.02em; color: #fff !important; text-decoration: none !important; word-break: break-all; }
.contact-card__mail:hover { text-decoration: underline !important; }

/* ---------- Color code tool ---------- */
.mk-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.mk-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none !important; transition: border-color .2s, transform .2s, box-shadow .2s; }
.mk-card b { font: 700 1rem var(--head); letter-spacing: -.01em; }
.mk-card span { font-size: .8rem; color: var(--muted); }
.mk-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.mk-card--pop { background: linear-gradient(180deg, #fff, #fbfaf6); }
.bigsearch { position: relative; max-width: 720px; margin-top: 26px; }
.bigsearch input { width: 100%; height: 62px; padding: 0 22px 0 58px; border: 0; border-radius: 16px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0f1a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 20px center / 22px no-repeat; font: 500 1.05rem var(--body); color: var(--ink); box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); }
.bigsearch input:focus { outline: 3px solid #7b5cff; }
.search-hint { margin: 12px 4px 0; font-size: .86rem; color: rgba(255,255,255,.65); }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.result:hover { border-color: var(--accent); box-shadow: var(--shadow-s); }
.result__dot { width: 30px; height: 30px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.result__name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.result__meta { font-size: .84rem; color: var(--muted); }
.code-chip { display: inline-block; padding: 4px 11px; border-radius: 8px; background: var(--ink); color: #fff; font: 600 .86rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; white-space: nowrap; }
.results-count { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.compare { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.compare__card { padding: 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.compare__card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.compare__card p { margin: 0 0 .8em; color: var(--muted); font-size: .96rem; }
.compare__card--good { border-color: #b7e4cb; background: linear-gradient(180deg, #f4fcf8, #fff); }
.model-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 0 0 1.6em; }
.model-card { display: flex; flex-direction: column; gap: 2px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.prose .model-card { text-decoration: none; }
.model-card b { font: 700 .96rem var(--head); }
.model-card span { font-size: .8rem; color: var(--muted); }
.model-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tbl-controls { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; align-items: stretch; }
.tbl-controls .searchbar { flex: 1 1 260px; max-width: none; }
.tbl-controls select { height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 1rem var(--body); box-shadow: var(--shadow-s); }
.tbl-count { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.variants { display: block; margin-top: 5px; font-size: .76rem; color: var(--muted); letter-spacing: .02em; }
.hl-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0 0 1.8em; }
.hl-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.hl-card h3 { margin: 0 0 10px; font: 700 .74rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hl-card ul { margin: 0; padding: 0; list-style: none; }
.prose .hl-card ul li { padding-left: 0; margin: 0 0 8px; font-size: .95rem; }
.prose .hl-card ul li::before { display: none; }
.hl-card small { color: var(--muted); }
.data-note { margin: 2em 0 0; padding: 14px 18px; border-radius: 12px; background: #f0eee7; color: #4a5263; font-size: .86rem; line-height: 1.6; }

/* ---------- Interactive finder ---------- */
.finder-card { margin-top: 26px; max-width: 900px; }
.finder-card .bigsearch { margin-top: 0; max-width: none; }
.search-hint button { font: 600 .8rem var(--body); color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 4px 11px; margin: 3px 2px; cursor: pointer; }
.search-hint button:hover { background: rgba(255,255,255,.2); }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; margin-top: 18px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.stepper__col label { display: block; font: 700 .72rem var(--head); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin: 0 0 6px 2px; }
.stepper select { width: 100%; height: 50px; padding: 0 14px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); font: 500 1rem var(--body); }
.stepper select:disabled { opacity: .55; }
.stepper select:focus { outline: 3px solid #7b5cff; }
.stepper__reset { height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; font: 600 .9rem var(--body); cursor: pointer; }
.stepper__reset:hover { background: rgba(255,255,255,.12); }
.finder-out { margin: 0 0 40px; scroll-margin-top: 90px; }
.fo__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.fo__head h2 { margin: 0; }
.fo__count { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.fo__none { color: var(--muted); grid-column: 1 / -1; }
.cgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ccard { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; font: inherit; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ccard:hover, .ccard:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--accent); outline: none; }
.ccard__sw { display: block; height: 74px; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }
.ccard__name { display: block; padding: 11px 13px 4px; font: 700 .95rem/1.25 var(--head); }
.ccard__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 13px 13px; }
.ccard__yrs { font-size: .76rem; color: var(--muted); text-align: right; }
.model-grid--sm { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
button.result { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.code-table--click tbody tr { cursor: pointer; }
.code-table--click tbody tr:hover td { background: #fff4f6; }
.code-table--click tbody tr:focus-visible { outline: 2px solid #7b5cff; outline-offset: -2px; }
@media (max-width: 720px) {
  .stepper { grid-template-columns: 1fr 1fr; }
  .stepper__col:first-child { grid-column: 1 / -1; }
  .stepper__reset { grid-column: 1 / -1; }
  .cgrid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Colour detail panel ---------- */
html.pp-open { overflow: hidden; }
.pp { position: fixed; inset: 0; z-index: 300; }
.pp[hidden] { display: none; }
.pp__scrim { position: absolute; inset: 0; background: rgba(11,15,26,.6); backdrop-filter: blur(3px); }
.pp__sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); overflow-y: auto; box-shadow: -30px 0 60px -20px rgba(0,0,0,.5); outline: none; animation: ppIn .22s ease-out; }
@keyframes ppIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.pp__x { position: sticky; top: 10px; float: right; margin: 10px 12px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 2; }
.pp__body { padding: 26px 26px 40px; }
.pp__head { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.pp__sw { flex: 0 0 84px; height: 84px; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 10px 24px -12px rgba(0,0,0,.5); }
.pp__crumb { margin: 0; font: 600 .78rem var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--link); }
.pp h3 { margin: 2px 0 6px; font-size: 1.5rem; }
.pp__code { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pp__copy { font: 600 .8rem var(--body); border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; color: var(--ink); }
.pp__yrs { font-size: .85rem; color: var(--muted); }
.pp h4 { margin: 26px 0 10px; font-size: 1.1rem; }
.pp__hint { font-size: .85rem; color: var(--muted); margin: 8px 0; }
.pp__var { font-size: .9rem; margin: 6px 0; }
.pp__opts details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.pp__opts summary { cursor: pointer; padding: 13px 0; list-style: none; }
.pp__opts summary::-webkit-details-marker { display: none; }
.pp__opts summary span { display: block; font-size: .82rem; color: var(--muted); }
.pp__opts details p { margin: 0 0 14px; font-size: .95rem; }
.pp__layers { margin: 6px 0; padding-left: 22px; font-size: .95rem; }
.pp__req { white-space: pre-wrap; background: #fff; border: 1px dashed var(--line-2); border-radius: 12px; padding: 14px; font: 500 .84rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); margin: 8px 0 12px; }
.pp__list { padding-left: 20px; font-size: .95rem; }
.pp__foot { margin-top: 22px; }
@media (max-width: 720px) {
  .pp__sheet { top: 8vh; width: 100%; border-radius: 22px 22px 0 0; animation: ppUp .22s ease-out; }
  @keyframes ppUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pp__body { padding: 20px 18px 40px; }
}
