/* Coloring Lab. Color-block identity. System fonts only for speed. */
:root {
  --ink: #1b1033; --paper: #fffaf1; --white: #fff;
  --green: #3dbe29; --magenta: #b5179e; --yellow: #ffc93c; --blue: #2f5bea;
  --orange: #ff7a2f; --cyan: #19b5c8; --red: #e5383b; --lilac: #e9dcff; --mint: #d8f5cf;
  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --r: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Arial Black", "Segoe UI Black", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--font); color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; height: auto; }
a { color: #8a0f77; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font: 900 clamp(2rem, 6vw, 3.6rem)/1.05 var(--display); letter-spacing: -.02em; }
h2 { font: 900 clamp(1.45rem, 3.4vw, 2.1rem)/1.15 var(--display); letter-spacing: -.01em; margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 1em; }

/* Header */
.site-header { background: var(--white); border-bottom: var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo img { display: block; height: 38px; width: auto; }
.menu-btn { display: none; font: 800 .95rem var(--font); background: var(--yellow); color: var(--ink); border: var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }
.stripe { height: 8px; background: linear-gradient(90deg, var(--red) 0 16.6%, var(--orange) 0 33.3%, var(--yellow) 0 50%, var(--green) 0 66.6%, var(--blue) 0 83.3%, var(--magenta) 0); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: var(--line); padding: 8px 16px 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 14px; }
}

/* Buttons and tags */
.btn { display: inline-block; font: 800 1rem var(--font); background: var(--yellow); color: var(--ink); border: var(--line); border-radius: 12px; padding: 11px 20px; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: transform .08s, box-shadow .08s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.btn-green { background: var(--green); } .btn-magenta { background: var(--magenta); color: #fff; } .btn-magenta:hover { color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; border-radius: 9px; background: var(--white); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.tag { display: inline-block; font: 800 .72rem var(--font); letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px; }
.tag-calc { background: var(--mint); } .tag-edit { background: var(--lilac); }
.chip { display: inline-block; font-weight: 800; font-size: .8rem; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; }

/* Hero and bands */
.hero { background: var(--green); border-bottom: var(--line); position: relative; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; padding-top: 44px; padding-bottom: 44px; align-items: center; }
.hero p.lead { font-size: 1.2rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transform: rotate(-3deg); }
.blocks i { display: block; aspect-ratio: 1; border: var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
.blocks i:nth-child(1) { background: var(--magenta); border-radius: 50%; } .blocks i:nth-child(2) { background: var(--yellow); }
.blocks i:nth-child(3) { background: var(--blue); border-radius: 50% 50% 0 50%; } .blocks i:nth-child(4) { background: var(--orange); border-radius: 0 50% 50% 50%; }
.blocks i:nth-child(5) { background: var(--white); } .blocks i:nth-child(6) { background: var(--cyan); border-radius: 50%; }
.blocks i:nth-child(7) { background: var(--red); border-radius: 50% 0 50% 50%; } .blocks i:nth-child(8) { background: var(--lilac); } .blocks i:nth-child(9) { background: var(--ink); border-radius: 50%; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; } .blocks { max-width: 320px; } }
.band { padding: 48px 0; border-bottom: var(--line); }
.band-yellow { background: var(--yellow); } .band-white { background: var(--white); } .band-lilac { background: var(--lilac); }
.band-magenta { background: var(--magenta); color: #fff; } .band-magenta a { color: #fff; } .band-ink { background: var(--ink); color: #fff; } .band-ink a { color: var(--yellow); }
.band h2:first-child { margin-top: 0; }
.mini-palette { display: grid; grid-template-columns: repeat(5, 1fr); border: var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); margin: 18px 0; }
.mini-sw { min-height: 110px; display: flex; align-items: flex-end; padding: 8px; font: 800 .72rem var(--font); }
@media (max-width: 560px) { .mini-palette { grid-template-columns: repeat(5, 1fr); } .mini-sw { min-height: 80px; font-size: .62rem; padding: 4px; } }

/* Cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--white); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; transition: transform .1s; }
a.card:hover { transform: translate(-2px, -2px); color: var(--ink); }
.card-top { height: 92px; display: flex; align-items: flex-end; padding: 10px 14px; border-bottom: var(--line); font: 900 .75rem var(--display); letter-spacing: .06em; text-transform: uppercase; }
.card-body { padding: 14px 16px 18px; flex: 1; }
.card-body h3 { margin-bottom: .3em; font-size: 1.12rem; }
.card-body p { margin: 0 0 .6em; font-size: .96rem; }
.meta { font-size: .85rem; font-weight: 700; display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }

/* Page hero */
.page-hero { border-bottom: var(--line); padding: 36px 0 34px; }
.page-hero p.tagline { font-size: 1.2rem; max-width: 36em; margin: .6em 0 0; }
.byline { font-size: .9rem; font-weight: 700; margin-top: 14px; opacity: .9; }
.crumbs { background: var(--white); border-bottom: 2px solid var(--ink); font-size: .88rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 9px 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* Article */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding: 36px 16px 56px; }
.toc { position: sticky; top: 90px; align-self: start; font-size: .92rem; border: var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--white); }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 18px; } .toc li { margin: 5px 0; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 18px; } .toc { position: static; } }
.prose { max-width: 740px; min-width: 0; }
.prose h2 { scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .35em 0; }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border: var(--line); border-radius: 10px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #d9d1e6; vertical-align: top; }
th { background: var(--lilac); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.swatch-row { display: flex; border: var(--line); border-radius: 12px; overflow: hidden; margin: 1.2em 0; box-shadow: 4px 4px 0 var(--ink); }
.swatch-row div { flex: 1; min-height: 84px; display: flex; align-items: flex-end; padding: 6px 8px; font: 800 .74rem var(--font); }
.callout { border: var(--line); border-radius: var(--r); padding: 16px 18px; background: var(--white); margin: 1.4em 0; }
.callout.good { background: var(--mint); } .callout.warn { background: #ffe9c9; }
.callout h3 { margin-bottom: .4em; }
.callout ul { margin: 0; padding-left: 1.2em; }
.mistakes { display: grid; gap: 12px; }
.mistake { border: var(--line); border-left-width: 10px; border-left-color: var(--red); border-radius: 10px; padding: 12px 16px; background: var(--white); }
.mistake h3 { margin: 0 0 .2em; font-size: 1.05rem; } .mistake p { margin: 0; }
.combos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.combo { border: var(--line); border-radius: var(--r); overflow: hidden; background: var(--white); box-shadow: 4px 4px 0 var(--ink); }
.combo .swatch-row { margin: 0; border: 0; border-radius: 0; border-bottom: var(--line); box-shadow: none; }
.combo .swatch-row div { min-height: 64px; font-size: .66rem; }
.combo-body { padding: 12px 14px 14px; } .combo-body h3 { margin: 0 0 .2em; } .combo-body p { font-size: .94rem; margin: 0 0 .6em; }
details { border: var(--line); border-radius: 10px; background: var(--white); margin: 10px 0; }
summary { cursor: pointer; padding: 12px 16px; font-weight: 800; }
details p { padding: 0 16px; }
.steps { list-style: none; counter-reset: s; padding: 0 !important; }
.steps li { counter-increment: s; border: var(--line); border-radius: 12px; background: var(--white); padding: 14px 16px 14px 62px; position: relative; margin: 12px 0; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font: 900 .95rem var(--display); }
.steps h3 { margin: 0 0 .15em; font-size: 1.05rem; } .steps p { margin: 0; }
.facts { list-style: none; padding: 0 !important; margin: 0 0 1em; }
.keyfacts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 1.4em; }
.keyfacts div { border: var(--line); border-radius: 12px; background: var(--white); padding: 10px 14px; }
.keyfacts dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; } .keyfacts dd { margin: 0; font-weight: 800; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.pager a { border: var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--white); text-decoration: none; font-weight: 800; color: var(--ink); }
.pager a:hover { background: var(--yellow); } .pager small { display: block; font-weight: 700; opacity: .8; }
.pager a:last-child { text-align: right; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.pills a { display: inline-block; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; background: var(--white); text-decoration: none; font-weight: 800; color: var(--ink); }
.pills a:hover { background: var(--yellow); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { font: 800 .9rem var(--font); border: 2px solid var(--ink); background: var(--white); border-radius: 999px; padding: 6px 16px; cursor: pointer; color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Diagrams */
.diagram { border: var(--line); border-radius: var(--r); background: var(--white); padding: 18px; margin: 0 0 8px; box-shadow: var(--shadow); }
.diagram figcaption { font-size: .88rem; margin-top: 10px; font-weight: 600; }
.diagram svg { display: block; margin: 0 auto; max-width: 420px; width: 100%; }
.bars { display: grid; gap: 12px; }
.bar { height: 34px; border-radius: 8px; border: 2px solid var(--ink); }
.bar-label { font-weight: 800; font-size: .85rem; margin-bottom: 3px; }
.mini-wheels { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); text-align: center; font-weight: 800; font-size: .8rem; }
.scale { display: flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; margin: 4px 0 10px; }
.scale div { flex: 1; height: 44px; }
.proportion { display: flex; height: 64px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; font-weight: 800; font-size: .85rem; }
.proportion div { display: flex; align-items: center; justify-content: center; }

/* Tools */
.tool { border: var(--line); border-radius: var(--r); background: var(--white); padding: 18px; box-shadow: var(--shadow); margin-bottom: 28px; }
.controls { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: end; margin-bottom: 14px; }
.controls label, .cmp-row label { font-weight: 800; font-size: .9rem; display: block; }
input[type=color] { width: 100%; height: 48px; border: var(--line); border-radius: 10px; padding: 2px; background: var(--white); cursor: pointer; }
.cmp-row input[type=color] { width: 64px; }
input[type=text] { font: 700 1rem monospace; width: 100%; padding: 10px 12px; border: var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--magenta); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tabs button { font: 800 .92rem var(--font); border: 2px solid var(--ink); background: var(--white); border-radius: 999px; padding: 7px 16px; cursor: pointer; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--magenta); color: #fff; }
.swatch-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 12px 0; }
.sw-card { border: var(--line); border-radius: 12px; overflow: hidden; background: var(--white); padding-bottom: 10px; text-align: center; }
.sw-chip { height: 120px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 10px; text-align: left; }
.sw-label { font-size: .78rem; font-weight: 700; } .sw-hex { font: 900 1.15rem monospace; }
.sw-vals { margin: 8px 10px; font-size: .8rem; text-align: left; } .sw-vals div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #cfc6df; padding: 2px 0; }
.sw-vals dt { font-weight: 800; } .sw-vals dd { margin: 0; }
.notes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 14px 0; }
.notes > div { border: var(--line); border-radius: 12px; padding: 12px 14px; } .notes p { margin: .4em 0 0; font-size: .95rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.scene { --wall: #eee; --floor: #333; --big: #3a3; --mid: #a3a; --pop: #fc3; position: relative; height: 240px; border: var(--line); border-radius: 12px; overflow: hidden; background: var(--wall); max-width: 560px; }
.scene .s-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: var(--floor); }
.scene .s-sofa { position: absolute; left: 8%; bottom: 14%; width: 46%; height: 30%; background: var(--big); border: 3px solid var(--ink); border-radius: 14px 14px 6px 6px; }
.scene .s-pillow { position: absolute; left: 14%; top: -22%; width: 20%; height: 62%; background: var(--pop); border: 3px solid var(--ink); border-radius: 10px; }
.scene .s-frame { position: absolute; border: 3px solid var(--ink); }
.scene .f1 { left: 12%; top: 12%; width: 22%; height: 30%; background: var(--mid); } .scene .f2 { left: 38%; top: 8%; width: 16%; height: 22%; background: var(--pop); }
.scene .s-rug { position: absolute; right: 8%; bottom: 6%; width: 32%; height: 14%; background: var(--mid); border: 3px solid var(--ink); border-radius: 50%; }
.scene .s-pot { position: absolute; right: 12%; bottom: 24%; width: 12%; height: 18%; background: var(--pop); border: 3px solid var(--ink); border-radius: 4px 4px 14px 14px; }
.scene .s-lamp { position: absolute; right: 16%; top: 10%; width: 14%; height: 30%; background: var(--big); border: 3px solid var(--ink); border-radius: 50% 50% 8px 8px; }
.cmp-row { display: flex; align-items: end; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cmp-row .hexbox { width: 140px; }
.cmp-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border: var(--line); border-radius: 12px; overflow: hidden; margin: 12px 0; }
.cmp-sw { min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; font-family: monospace; }
.cmp-sw strong { font-family: var(--font); }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -3px; }
.pairs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pair { border: var(--line); border-radius: 12px; padding: 14px; background: var(--white); }
.pair h3 { margin-bottom: 10px; }
.pair-demo { padding: 14px; border-radius: 8px; border: 2px solid var(--ink); margin-bottom: 8px; font-weight: 700; }
.pair-demo .big { font: 900 1.8rem var(--display); margin-right: 8px; }
.pfs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pf { font-size: .72rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; }
.pf.pass { background: var(--mint); } .pf.fail { background: #ffd3d3; }
.pair .tagline { margin: 10px 0 6px; }

/* Footer */
.site-footer { background: var(--ink); color: #fff; padding: 40px 0 28px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h2 { font: 800 .85rem var(--font); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; color: var(--yellow); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; } .foot-grid li { margin: 6px 0; font-size: .95rem; }
.foot-note { border-top: 1px solid #4b3d70; margin-top: 28px; padding-top: 16px; font-size: .85rem; opacity: .85; }
.foot-logo { background: #fff; display: inline-block; border-radius: 10px; padding: 6px 10px; }
.foot-logo img { height: 30px; display: block; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .stripe { display: none; } body { background: #fff; } }
.mix { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0; font: 900 1.4rem var(--display); }
.mix i { display: block; width: 72px; height: 48px; border: 2px solid var(--ink); border-radius: 10px; }
.page-hero .chip { margin-bottom: 10px; }
