/* UtilityKit — design system
   Single-point deep tool site. Warm cream + coral editorial style. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;800&display=swap');

:root {
  --brand: #e8622e;          /* coral */
  --brand-dark: #c94a19;
  --brand-ink: #5a2410;
  --brand-soft: #fbe9df;
  --mint: #1fa88a;
  --amber: #f5a623;
  --bg: #ffffff;
  --surface: #fbf7f2;        /* warm cream */
  --surface-2: #f3ece3;
  --line: #ebe0d4;
  --text: #1f232b;
  --muted: #6b6f7a;
  --footer: #23201d;
  --footer-text: #c9c2b8;
  --danger: #d63b4a;
  --ok: #12926f;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 6px 26px rgba(80, 52, 32, 0.07);
  --shadow-lg: 0 20px 60px rgba(80, 52, 32, 0.13);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', 'Noto Sans SC', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 70; background: rgba(255,255,255,0.94); backdrop-filter: saturate(1.2) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--amber)); color: #fff; }
.logo-mark svg { width: 20px; height: 20px; }
.logo-sub { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { display: block; padding: 8px 13px; border-radius: 20px; color: var(--text); font-weight: 600; font-size: 0.92rem; transition: background .15s, color .15s; }
.nav-links a:hover, .nav-links a.active { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.hamburger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 6px 0; border-radius: 2px; transition: .2s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 28px; border: 0; font-weight: 700; font-size: .98rem; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; box-shadow: 0 8px 20px rgba(232,98,46,.28); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(232,98,46,.38); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* Hero (single point) */
.hero { padding: 66px 0 44px; background: linear-gradient(180deg, #fdf7f0 0%, #ffffff 100%); border-bottom: 1px solid var(--line); text-align: center; }
.hero .eyebrow { display: inline-block; padding: 5px 13px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1.16; margin: 0 0 18px; font-weight: 800; letter-spacing: -.03em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero .lede { font-size: 1.12rem; color: var(--muted); max-width: 660px; margin: 0 auto 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-note { font-size: .82rem; color: var(--muted); margin-top: 18px; }

/* Three-step card (like the approved site) */
.steps-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 44px 0 0; text-align: left; }
.steps-head { padding: 30px 34px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.steps-kicker { color: var(--brand); font-weight: 800; font-size: .78rem; letter-spacing: .12em; margin: 0 0 8px; }
.steps-head h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em; }
.steps-head p { color: var(--muted); margin: 0; max-width: 720px; }
.steps-head a { font-weight: 700; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.step { padding: 28px 30px 30px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step-num { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: 16px; }
.step h3 { font-size: 1.12rem; margin: 0 0 8px; font-weight: 800; }
.step p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.65; }
.steps-foot { padding: 18px 34px; border-top: 1px solid var(--line); background: #fff; }
.steps-foot a { font-weight: 700; color: var(--brand); }

/* Generic sections */
.section { padding: 58px 0; }
.section.soft { background: var(--surface); }
.section-tint { background: var(--surface); }
.section-title { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 800; margin: 0 0 10px; letter-spacing: -.02em; }
.section-sub { color: var(--muted); font-size: 1.02rem; max-width: 640px; margin: 0 0 30px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature .fi svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.08rem; margin: 0 0 8px; font-weight: 800; }
.feature p { margin: 0; font-size: .93rem; color: var(--muted); }

/* Tool hero */
.tool-hero { padding: 40px 0 28px; }
.tool-hero .tool-icon-lg { width: 60px; height: 60px; border-radius: 17px; margin-bottom: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tool-hero .tool-icon-lg svg { width: 30px; height: 30px; }
.tool-hero .date { color: var(--muted); font-size: .9rem; margin: 0 0 6px; }
.tool-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); margin: 0 0 10px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.tool-hero .lede { color: var(--muted); font-size: 1.06rem; max-width: 720px; margin: 0; }

/* Workspace / tool UI */
.workspace { padding: 10px 0 48px; }
.work-grid { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h3 { margin: 0 0 16px; font-size: 1.05rem; font-weight: 800; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.form-label { display: flex; justify-content: space-between; font-size: .84rem; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.form-label .val { color: var(--brand); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .94rem; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,98,46,.12); }
.form-hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1 1 auto; padding: 8px 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: .92rem; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }

.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .dz-ic { width: 52px; height: 52px; margin: 0 auto 12px; color: var(--brand); }
.dropzone h3 { margin: 0 0 6px; font-size: 1.08rem; }
.dropzone p { margin: 0; color: var(--muted); font-size: .9rem; }

.preview-panel { min-height: 420px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.preview-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 20px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; }
.chart-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #faf7f2; padding: 10px; }
#chartCanvas { display: block; margin: 0 auto; image-rendering: pixelated; }
.preview-empty { display: grid; place-items: center; min-height: 360px; color: var(--muted); text-align: center; }
.preview-empty svg { width: 64px; height: 64px; color: var(--line); margin-bottom: 12px; }
.status { font-size: .9rem; color: var(--muted); margin-top: 12px; min-height: 1.4em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }
.output-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Legend / result tables */
.result-block { margin-top: 20px; }
.result-block h4 { margin: 0 0 12px; font-size: .98rem; font-weight: 800; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: var(--surface); font-weight: 800; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
table.data tr:last-child td { border-bottom: 0; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); vertical-align: middle; margin-right: 8px; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; }

/* Article / guide body */
.article { padding: 30px 0 60px; }
.article-layout { display: grid; grid-template-columns: 230px 1fr; gap: 44px; align-items: start; }
.toc { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toc h4 { margin: 0 0 12px; font-size: .9rem; font-weight: 800; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 8px; font-size: .86rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--brand); }
.article-body h2 { font-size: 1.45rem; margin: 46px 0 14px; font-weight: 800; letter-spacing: -.01em; scroll-margin-top: 90px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.12rem; margin: 30px 0 10px; color: var(--brand-ink); }
.article-body p { margin: 0 0 16px; color: #34303a; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 24px; color: #34303a; }
.article-body li { margin-bottom: 9px; }
.article-body strong { color: var(--text); }
.callout { background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 10px; padding: 16px 20px; margin: 20px 0; font-size: .94rem; }
.callout.tip { background: #eaf6f2; border-left-color: var(--mint); }
.article-body figure { margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.article-body figcaption { font-size: .82rem; color: var(--muted); padding: 10px 16px; }
.mini-demo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 18px; background: #fff; }
.mini-grid { display: grid; gap: 2px; }
.mini-grid i { width: 14px; height: 14px; display: block; }

/* Color chart */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.palette-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.palette-card .pc-color { height: 66px; }
.palette-card .pc-meta { padding: 10px 12px; }
.palette-card .pc-code { font-weight: 800; font-size: .92rem; }
.palette-card .pc-name { font-size: .78rem; color: var(--muted); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item h3 { font-size: 1rem; margin: 0 0 8px; font-weight: 800; }
.faq-item p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface); color: var(--muted); padding: 54px 0 24px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 34px; }
.footer-col h4 { color: var(--text); font-size: .92rem; margin: 0 0 14px; font-weight: 800; }
.footer-col a { display: block; color: var(--muted); font-size: .88rem; margin-bottom: 9px; }
.footer-col a:hover { color: var(--brand); text-decoration: none; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand .logo-mark svg { width: 17px; height: 17px; }
.footer-about { font-size: .88rem; max-width: 260px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: .8rem; }
.footer-bottom a { color: var(--muted); }
.cookie-disclosure { font-size: .76rem; line-height: 1.5; margin-top: 12px; }

/* Cookie consent */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(40,28,18,.12); }
.cookie-banner[hidden], .cookie-panel[hidden] { display: none; }
.cookie-banner-inner { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.cookie-banner-copy { flex: 1 1 420px; }
.cookie-banner-copy strong { font-size: .94rem; }
.cookie-banner-copy p { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-panel { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.cookie-option { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }

/* Legal */
.legal { padding: 40px 0 60px; }
.legal h1 { font-size: 2rem; margin: 0 0 8px; font-weight: 800; }
.legal .updated { color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.legal h2 { font-size: 1.2rem; margin: 32px 0 12px; font-weight: 800; }
.legal p, .legal li { color: #34303a; }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal a { font-weight: 700; }

/* To top */
.to-top { position: fixed; right: 22px; bottom: 96px; z-index: 65; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.4rem; display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .25s; box-shadow: 0 6px 18px rgba(232,98,46,.3); }
.to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px) {
  .nav-links { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px 18px; display: none; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: var(--radius-sm); }
  .hamburger { display: block; }
  .work-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { padding: 11px 18px; font-size: .92rem; }
  .logo-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
