.site-header { position: sticky; z-index: 30; top: 0; height: var(--header-height); background: rgba(16,17,20,.94); border-bottom: 1px solid rgba(255,255,255,.065); backdrop-filter: blur(16px); }
.header-inner { width: min(var(--content-width), calc(100% - 56px)); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; min-width: 205px; }
.brand-mark { width: 31px; height: 31px; position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid #3a3b46; border-radius: 9px; background: #1d1e25; transform: rotate(-4deg); }
.brand-mark i { display: block; border-radius: 2px; }
.brand-mark i:nth-child(1) { background: #9487ff; }
.brand-mark i:nth-child(2) { background: #e09cb8; }
.brand-mark i:nth-child(3) { background: #d9b468; }
.brand-mark i:nth-child(4) { background: #77aeba; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.brand-copy strong { font-size: 13px; font-weight: 700; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.primary-nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.primary-nav a { position: relative; height: 100%; display: inline-flex; align-items: center; padding: 0 13px; color: var(--muted); font-size: 12px; font-weight: 560; transition: color .16s ease; }
.primary-nav a::after { content: ""; position: absolute; right: 13px; bottom: -1px; left: 13px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .16s ease; }
.primary-nav a:hover, .primary-nav a.is-active { color: var(--text); }
.primary-nav a.is-active::after { transform: scaleX(1); }
.header-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(129,198,167,.10); }
main { min-height: calc(100vh - var(--header-height) - 76px); }
.home-shell, .workspace-shell { width: min(var(--content-width), calc(100% - 56px)); margin: 0 auto; }
.home-shell { padding-top: 56px; padding-bottom: 66px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .82fr); align-items: center; gap: clamp(42px, 7vw, 104px); padding: 12px 0 58px; }
.hero-copy { max-width: 620px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #b0a8f9; font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 20px; height: 1px; background: var(--accent); }
.eyebrow-index { margin-left: 7px; color: var(--muted-2); font: 500 10px var(--font-mono); letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); }
.hero-copy h1 { margin: 25px 0 21px; font-size: clamp(42px, 5.05vw, 68px); font-weight: 650; line-height: 1.03; letter-spacing: -.065em; }
.hero-copy h1 span { color: #9790b7; }
.hero-lede { max-width: 535px; margin-bottom: 27px; color: var(--text-soft); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 31px; color: var(--muted); font-size: 11px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 16px; height: 16px; color: #a49aef; }
.hero-art { position: relative; border: 1px solid #34313f; border-radius: 18px; padding: 16px; background: linear-gradient(145deg,#1c1c24,#15161b 70%); box-shadow: 0 30px 80px rgba(0,0,0,.23); transform: rotate(.65deg); }
.hero-art-top, .hero-art-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .12em; }
.tiny-status { padding: 5px 7px; border: 1px solid #363744; border-radius: 5px; color: #aaa2ef; font-size: 8px; letter-spacing: .1em; }
.hero-color-main { min-height: 220px; position: relative; margin-top: 13px; overflow: hidden; border-radius: 9px; background: #7468df; }
.hero-color-overlay { position: absolute; right: 14px; bottom: 14px; left: 14px; display: flex; flex-direction: column; gap: 5px; color: white; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.hero-color-overlay span { font-size: 9px; letter-spacing: .14em; }
.hero-color-overlay strong { font: 600 21px var(--font-mono); letter-spacing: -.04em; }
.hero-shades { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin: 8px 0 15px; }
.hero-shades i { height: 28px; border-radius: 4px; }
.hero-art-bottom { border-top: 1px solid #30313a; padding-top: 14px; font-size: 10px; letter-spacing: 0; }
.hero-art-bottom a { color: var(--text-soft); font-weight: 600; }
.hero-art-bottom a span { margin-left: 6px; color: var(--accent-strong); }
.art-index { position: absolute; right: -31px; top: 54%; writing-mode: vertical-rl; color: #55505e; font: 10px var(--font-mono); letter-spacing: .16em; }
.section-heading { margin-bottom: 21px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 26px; }
.section-heading h2 { margin: 9px 0 0; font-size: 23px; font-weight: 600; letter-spacing: -.035em; }
.section-heading > p { max-width: 330px; margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.tool-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; min-height: 285px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(160deg,#1b1d22,#17181c 75%); transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.tool-card:hover { border-color: #4a455d; background: linear-gradient(160deg,#202129,#18191f 75%); transform: translateY(-2px); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; }
.tool-number { color: var(--muted-2); font: 11px var(--font-mono); }
.tool-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #373741; border-radius: 10px; color: #b6adff; background: #24232e; }
.tool-icon svg { width: 18px; height: 18px; }
.mini-spectrum, .mini-palette { display: grid; grid-template-columns: repeat(12,1fr); gap: 3px; height: 30px; margin: 22px 0 20px; }
.mini-spectrum i { border-radius: 2px; background: hsl(calc(var(--i, 0) * 30),70%,59%); }
.mini-spectrum i:nth-child(1){background:#8577ec}.mini-spectrum i:nth-child(2){background:#8b8af4}.mini-spectrum i:nth-child(3){background:#6b9bea}.mini-spectrum i:nth-child(4){background:#6ab8c5}.mini-spectrum i:nth-child(5){background:#75c49e}.mini-spectrum i:nth-child(6){background:#bad274}.mini-spectrum i:nth-child(7){background:#e2c66f}.mini-spectrum i:nth-child(8){background:#de9d6f}.mini-spectrum i:nth-child(9){background:#dc8e9f}.mini-spectrum i:nth-child(10){background:#be8bbf}.mini-spectrum i:nth-child(11){background:#998bda}.mini-spectrum i:nth-child(12){background:#787ad0}
.mini-gradient { height: 30px; margin: 22px 0 20px; border-radius: 3px; background: linear-gradient(112deg,#7569e1 0%,#b887ce 46%,#e9a17f 100%); }
.mini-palette { grid-template-columns: repeat(5,1fr); grid-template-rows: repeat(2,1fr); }
.mini-palette i:nth-child(1){background:#423c58}.mini-palette i:nth-child(2){background:#6c628f}.mini-palette i:nth-child(3){background:#a49bc6}.mini-palette i:nth-child(4){background:#d6b9cb}.mini-palette i:nth-child(5){background:#b985a4}.mini-palette i:nth-child(6){background:#2e383a}.mini-palette i:nth-child(7){background:#55777c}.mini-palette i:nth-child(8){background:#7e9da0}.mini-palette i:nth-child(9){background:#becac1}.mini-palette i:nth-child(10){background:#e0d5bd}
.tool-card h3 { margin: 0 0 9px; font-size: 17px; font-weight: 620; letter-spacing: -.025em; }
.tool-card p { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.tool-card-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid #30323a; color: var(--text-soft); font-size: 11px; font-weight: 650; }
.tool-card-link b { color: var(--accent-strong); font-size: 16px; font-weight: 400; }
.home-note { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 18px 20px; border: 1px solid #292a32; border-radius: 12px; background: #15161a; }
.note-mark { color: var(--accent-strong); font: 18px var(--font-mono); }
.home-note strong { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 650; }
.home-note p { margin: 0; color: var(--muted); font-size: 11px; }
.home-note-meta { margin-left: auto; color: var(--muted-2); font: 10px var(--font-mono); text-align: right; white-space: nowrap; }
.workspace-shell { padding-top: 36px; padding-bottom: 60px; }
.tool-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid #292b32; }
.tool-heading h1 { margin: 11px 0 6px; font-size: 31px; font-weight: 620; line-height: 1.2; letter-spacing: -.05em; }
.tool-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.tool-heading-side { display: flex; align-items: center; gap: 15px; padding-bottom: 5px; }
.mini-caption { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.heading-mark { color: var(--accent-strong); font: 19px var(--font-mono); }
.heading-mark span { color: var(--muted-2); font-size: 11px; }
.explorer-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; align-items: start; gap: 16px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 20px 16px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 15px; font-weight: 620; letter-spacing: -.025em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.count-pill { flex: 0 0 auto; border: 1px solid #343741; border-radius: 100px; padding: 5px 8px; color: var(--muted); font: 10px var(--font-mono); }
.inspector-index { color: var(--muted-2); font: 11px var(--font-mono); }
.gradient-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: start; gap: 16px; }
.gradient-side-column { display: grid; gap: 14px; }
.palette-toolbar { display: flex; align-items: center; gap: 20px; padding: 12px 15px; margin-bottom: 16px; }
.palette-search-wrap { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; gap: 11px; }
.palette-search-wrap > svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--muted); }
.palette-search-wrap kbd { flex: 0 0 auto; padding: 3px 6px; border: 1px solid #343741; border-radius: 5px; color: var(--muted-2); font: 9px var(--font-mono); }
.palette-filter-wrap { display: flex; align-items: center; gap: 10px; }
.filter-label { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
.palette-result-count { min-width: 95px; color: var(--muted); font: 10px var(--font-mono); text-align: right; white-space: nowrap; }
.palette-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; align-items: start; gap: 16px; }
.palette-groups { min-width: 0; display: grid; gap: 10px; }
.palette-inspector { position: sticky; top: calc(var(--header-height) + 16px); }
.site-footer { border-top: 1px solid rgba(255,255,255,.07); background: #0e0f12; }
.footer-inner { width: min(var(--content-width), calc(100% - 56px)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; gap: 22px; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 10px; font-weight: 650; white-space: nowrap; }
.footer-brand > span:not(.footer-mark) { color: var(--muted-2); }
.footer-mark { display: inline-grid; grid-template-columns: repeat(2,5px); grid-template-rows: repeat(2,5px); gap: 2px; margin-right: 2px; }
.footer-mark i:nth-child(1){background:#9487ff}.footer-mark i:nth-child(2){background:#e09cb8}.footer-mark i:nth-child(3){background:#d9b468}
.footer-inner > p { margin: 0; color: var(--muted-2); font-size: 10px; }
.footer-meta { display: flex; gap: 8px; margin-left: auto; color: var(--muted-2); font-size: 10px; }
.not-found-shell { width: min(660px, calc(100% - 48px)); min-height: calc(100vh - var(--header-height) - 76px); margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 70px 0; }
.not-found-number { margin-bottom: 22px; color: #292633; font: 700 clamp(86px,15vw,160px)/.9 var(--font-mono); letter-spacing: -.1em; }
.not-found-shell h1 { max-width: 560px; margin: 16px 0 12px; font-size: clamp(30px,5vw,48px); line-height: 1.06; letter-spacing: -.06em; }
.not-found-shell p { max-width: 455px; margin-bottom: 24px; color: var(--muted); line-height: 1.8; }
@media (max-width: 1050px) {
  .header-inner, .home-shell, .workspace-shell, .footer-inner { width: min(var(--content-width), calc(100% - 40px)); }
  .brand { min-width: 175px; }
  .header-inner { gap: 18px; }
  .primary-nav a { padding: 0 9px; }
  .primary-nav a::after { right: 9px; left: 9px; }
  .home-hero { grid-template-columns: minmax(0,1fr) minmax(330px,.86fr); gap: 44px; }
  .hero-color-main { min-height: 190px; }
  .explorer-layout { grid-template-columns: minmax(0,1fr) 312px; }
  .gradient-layout { grid-template-columns: minmax(0,1fr) 300px; }
  .palette-layout { grid-template-columns: minmax(0,1fr) 280px; }
}
@media (max-width: 820px) {
  :root { --header-height: auto; }
  .site-header { position: relative; height: auto; }
  .header-inner { min-height: 66px; flex-wrap: wrap; gap: 0 14px; padding: 12px 0 0; }
  .brand { min-width: 0; margin-bottom: 11px; }
  .header-status { margin-bottom: 11px; }
  .primary-nav { order: 3; width: 100%; height: 42px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,.06); }
  .primary-nav a { flex: 0 0 auto; padding: 0 12px; }
  .primary-nav a::after { right: 12px; left: 12px; }
  main { min-height: calc(100vh - 130px); }
  .home-shell { padding-top: 36px; }
  .home-hero { grid-template-columns: 1fr; gap: 35px; padding-bottom: 42px; }
  .hero-copy { max-width: 700px; }
  .hero-art { width: min(560px, calc(100% - 15px)); margin: 0 auto 0 0; }
  .tool-cards { gap: 10px; }
  .tool-card { padding: 15px; }
  .tool-card p { font-size: 11px; }
  .explorer-layout, .gradient-layout, .palette-layout { grid-template-columns: 1fr; }
  .inspector-panel, .palette-inspector { position: static; }
  .inspector-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); align-items: start; }
  .inspector-panel > .panel-heading, .inspector-panel > .color-entry-row, .inspector-panel > .field-error, .inspector-panel > .inspector-color-chip, .inspector-panel > .value-list, .inspector-panel > .inspector-section, .inspector-panel > .inspector-bottom { grid-column: auto; }
  .inspector-panel > .panel-heading { grid-column: 1 / -1; }
  .inspector-panel > .inspector-section { grid-column: 1 / -1; }
  .inspector-panel > .inspector-bottom { grid-column: 1 / -1; }
  .gradient-side-column { grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); }
  .palette-inspector { grid-row: 1; }
  .palette-toolbar { flex-wrap: wrap; }
  .palette-search-wrap { flex-basis: 100%; }
  .footer-inner { padding: 18px 0; flex-wrap: wrap; gap: 9px 18px; }
  .footer-meta { margin-left: 0; }
}
@media (max-width: 590px) {
  .header-inner, .home-shell, .workspace-shell, .footer-inner { width: calc(100% - 28px); }
  .brand-copy strong { font-size: 12px; }
  .header-status { font-size: 10px; }
  .home-shell { padding-top: 27px; padding-bottom: 38px; }
  .home-hero { gap: 28px; }
  .hero-copy h1 { margin-top: 19px; font-size: clamp(39px, 11vw, 54px); }
  .hero-lede { font-size: 13px; }
  .hero-facts { gap: 11px 14px; margin-top: 23px; }
  .hero-art { width: calc(100% - 9px); padding: 12px; }
  .hero-color-main { min-height: 170px; }
  .hero-shades { gap: 2px; }
  .hero-shades i { height: 21px; }
  .art-index { right: -15px; font-size: 8px; }
  .section-heading-row { display: block; }
  .section-heading h2 { font-size: 21px; }
  .section-heading > p { margin-top: 9px; }
  .tool-cards { grid-template-columns: 1fr; }
  .tool-card { min-height: 240px; padding: 18px; }
  .tool-card p { font-size: 12px; }
  .home-note { align-items: flex-start; padding: 14px; }
  .home-note-meta { display: none; }
  .workspace-shell { padding-top: 26px; padding-bottom: 38px; }
  .tool-heading { align-items: flex-start; margin-bottom: 16px; padding-bottom: 17px; }
  .tool-heading h1 { font-size: 28px; }
  .tool-heading p { max-width: 380px; line-height: 1.7; }
  .tool-heading-side { display: none; }
  .panel-heading { padding: 15px 15px 13px; }
  .range-toolbar { padding: 0 12px 12px; }
  .range-grid-wrap { padding: 12px; }
  .range-grid { grid-template-columns: repeat(10,minmax(0,1fr)); gap: 4px; }
  .range-swatch { border-radius: 4px; }
  .range-footer { align-items: flex-start; gap: 8px; flex-direction: column; padding: 10px 13px; }
  .inspector-panel { display: block; }
  .gradient-side-column { grid-template-columns: 1fr; }
  .gradient-preview { min-height: 170px; margin: 0 13px; }
  .gradient-under-preview { margin: 10px 13px 20px; }
  .gradient-track-section { padding: 0 14px; }
  .stop-list { padding: 0 14px; }
  .gradient-controls-bottom { margin: 19px 14px 0; }
  .gradient-presets { margin: 20px 14px 15px; }
  .palette-toolbar { gap: 11px; padding: 12px; }
  .palette-filter-wrap { flex: 1; }
  .custom-select { min-width: 0; width: 100%; }
  .palette-result-count { min-width: 75px; font-size: 9px; }
  .palette-search-wrap kbd { display: none; }
  .palette-group { padding: 0; }
  .palette-group-summary { padding: 14px; }
  .palette-group-body { padding: 0 11px 13px; }
  .palette-colors { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .footer-inner > p { flex-basis: 100%; order: 3; }
  .footer-meta { gap: 5px; font-size: 9px; }
}

/* Product-depth layout overrides */
.explorer-layout { align-items:start; }
.range-panel { min-width:0; }
.inspector-panel { min-width:0; }
.palette-toolbar { gap:14px; }
.palette-search-wrap { flex:1 1 310px; min-width:220px; }
.palette-filter-wrap { flex:0 0 210px; }
.palette-layout { grid-template-columns:minmax(0,1fr) 318px; }
@media (max-width:1050px) {
  .palette-layout { grid-template-columns:minmax(0,1fr) 284px; }
  .palette-filter-wrap { flex-basis:190px; }
}
@media (max-width:820px) {
  .palette-layout { grid-template-columns:minmax(0,1fr); }
  .palette-inspector { grid-row:auto; }
  .palette-toolbar-actions { margin-left:0; }
}
@media (max-width:590px) {
  .palette-search-wrap { min-width:0; }
  .palette-filter-wrap { flex-basis:100%; }
  .palette-layout { gap:12px; }
  .palette-group-summary { gap:8px; }
  .palette-group-meta { gap:5px; }
}
/* Shared account control: preserve the existing header layout at phone widths. */
@media (max-width: 590px) {
  .header-status span:last-child { display: none; }
  .header-inner > .sb-account { margin-left: 0; margin-bottom: 11px; }
}
