/* ============================================================
   IMAGE COLOR PICKER — Page Styles
   HtmlColor.Codes · image-color-picker.css
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  --brand: #e8400a;
  --brand-bg: rgba(232,64,10,.09);
  --brand-border: rgba(232,64,10,.22);
  --bg: #ffffff;
  --bg2: #f7f7f7;
  --bg3: #efefef;
  --border: #e0e0e0;
  --text: #111111;
  --text2: #444444;
  --muted: #777777;
  --card: #ffffff;
  --nav-bg: rgba(255,255,255,.96);
  --shadow: 0 2px 14px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 36px rgba(0,0,0,.13);
  --shadow-xl: 0 16px 56px rgba(0,0,0,.16);
  --radius: 12px;
  --radius-lg: 18px;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --fs-nav: 16px;
  --fs-body: 21px;
  --fs-small: 16px;
  --fs-h1: 50px;
  --fs-h2: 40px;
  --fs-h3: 24px;
}

html.dark {
  --bg: #111111;
  --bg2: #1a1a1a;
  --bg3: #252525;
  --border: #333333;
  --text: #eeeeee;
  --text2: #cccccc;
  --muted: #888888;
  --card: #1a1a1a;
  --nav-bg: rgba(17,17,17,.96);
  --shadow: 0 2px 14px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 36px rgba(0,0,0,.6);
  --shadow-xl: 0 16px 56px rgba(0,0,0,.7);
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
}
code {
  font-family: var(--mono);
  font-size: .84em;
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand);
}

/* ── NAVIGATION ── */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 62px;
  box-shadow: var(--shadow);
  gap: 12px;
}
.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-logo .hash { color: var(--brand); font-size: 1.35rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: var(--fs-nav);
  font-weight: 600;
  color: var(--text2);
  transition: background .15s, color .15s;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--bg3);
  color: var(--brand);
}
.nav-links svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}
.tbtn {
  width: 30px;
  height: 30px;
  border-radius: 50px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  color: var(--muted);
}
.tbtn.act { background: var(--brand); color: #fff; }

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px 0;
  font-size: var(--fs-small);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--brand); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── PAGE HERO ── */
.page-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 24px 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-text .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-bg);
  color: var(--brand);
  border: 1px solid var(--brand-border);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-text h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 16px;
  max-width: 560px;
}
.hero-text h1 em { color: var(--brand); font-style: normal; }
.hero-text .lead {
  font-size: var(--fs-body);
  color: var(--text2);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.72;
}
.hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand);
  color: white;
  padding: 11px 22px;
  border-radius: 9px;
  font-weight: 700;
  font-size: var(--fs-small);
  font-family: var(--sans);
  transition: opacity .2s, transform .15s;
  cursor: pointer;
  border: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text2);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); opacity: 1; }
.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat .n {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -.04em;
}
.hero-stat .l {
  font-size: var(--fs-small);
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
}

/* Hero visual — mini preview card */
.hero-visual {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-visual-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8400a 0%, #ffd700 30%, #00c897 60%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}
.hero-visual-img .crosshair {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2.5px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.4);
  top: 38%;
  left: 55%;
  pointer-events: none;
}
.hero-visual-img .crosshair::before,
.hero-visual-img .crosshair::after {
  content: '';
  position: absolute;
  background: white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3);
}
.hero-visual-img .crosshair::before {
  width: 1.5px;
  height: 10px;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
}
.hero-visual-img .crosshair::after {
  width: 10px;
  height: 1.5px;
  top: 50%;
  left: -14px;
  transform: translateY(-50%);
}
.hero-swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-swatch {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: #3b82f6;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.hero-swatch-vals { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.hero-swatch-vals span {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text2);
}
.hero-swatch-vals span b { color: var(--brand); font-weight: 700; }
.copy-badge {
  background: var(--brand);
  color: white;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
}

/* ── DIVIDER ── */
.hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── MAIN TOOL ── */
.tool-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tool-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Tab bar */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  font-size: var(--fs-nav);
  font-weight: 700;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  font-family: var(--sans);
}
.tab-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-pane { display: none; padding: 32px 0; }
.tab-pane.active { display: block; }

/* ── IMAGE UPLOAD AREA ── */
.upload-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.upload-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.drop-zone {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin: 16px;
  padding: 32px;
  transition: border-color .2s, background .2s;
  background: var(--bg2);
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-bg);
}
.drop-zone svg {
  width: 48px;
  height: 48px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s;
}
.drop-zone:hover svg,
.drop-zone.drag-over svg { stroke: var(--brand); }
.drop-zone h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 4px;
}
.drop-zone p {
  font-size: var(--fs-body);
  color: var(--muted);
  text-align: center;
  max-width: 380px;
  line-height: 1.6;
}
.drop-zone .formats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}
.format-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  font-family: var(--mono);
}
.upload-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Canvas */
.canvas-wrap {
  position: relative;
  display: none;
}
#imageCanvas {
  width: 100%;
  display: block;
  cursor: crosshair;
  border-radius: var(--radius);
}
.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg3);
  border-radius: 7px;
  padding: 2px;
}
.zoom-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text2);
  transition: background .15s;
  font-family: var(--sans);
}
.zoom-btn:hover { background: var(--brand); color: white; }
.zoom-label {
  font-size: var(--fs-small);
  color: var(--muted);
  font-weight: 700;
  font-family: var(--mono);
  min-width: 40px;
  text-align: center;
}
.toolbar-sep { width: 1px; height: 20px; background: var(--border); }
.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg3);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--sans);
}
.toolbar-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); }
.toolbar-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.magnifier-overlay {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  pointer-events: none;
  display: none;
  overflow: hidden;
  z-index: 10;
}
#magCanvas {
  position: absolute;
  top: 0;
  left: 0;
}

/* ── COLOR RESULT PANEL ── */
.result-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-swatch-large {
  height: 80px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: background .1s;
  background: #e8400a;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.result-swatch-large::after {
  content: 'Click to copy Hex';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
  font-weight: 700;
  font-family: var(--sans);
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .2s;
  background: rgba(0,0,0,.15);
}
.result-swatch-large:hover::after { opacity: 1; }

.panel-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.val-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.val-row label {
  width: 52px;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.val-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: .82rem;
  transition: border-color .2s;
  min-width: 0;
}
.val-row input:focus { outline: none; border-color: var(--brand); }
.copy-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  color: var(--muted);
}
.copy-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.copy-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panel-divider { border: none; border-top: 1px solid var(--border); margin: 2px 0; }

/* History */
.history-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hist-swatch {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform .15s;
  flex-shrink: 0;
}
.hist-swatch:hover { transform: scale(1.15); }

/* Nearest named color */
.nearest-color {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.nearest-dot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.nearest-info { display: flex; flex-direction: column; }
.nearest-name { font-size: var(--fs-small); font-weight: 700; color: var(--text); }
.nearest-dist { font-size: .72rem; color: var(--muted); margin-top: 1px; }

/* Quick actions */
.qa-row { display: flex; gap: 7px; flex-wrap: wrap; }
.qa-btn {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg3);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--sans);
}
.qa-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-bg); }
.qa-btn.primary { background: var(--brand); color: white; border-color: var(--brand); }
.qa-btn.primary:hover { opacity: .88; }

/* ── PALETTE EXTRACTOR TAB ── */
.palette-extractor {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pal-upload-hint {
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: var(--fs-body);
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pal-upload-hint svg {
  width: 20px;
  height: 20px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.pal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pal-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: var(--fs-small);
  font-weight: 600;
  font-family: var(--sans);
}
.extracted-palette {
  display: flex;
  gap: 0;
  height: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pal-swatch {
  flex: 1;
  cursor: pointer;
  transition: flex .3s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5px;
}
.pal-swatch:hover { flex: 2.5; }
.pal-swatch span {
  font-size: .5rem;
  font-family: var(--mono);
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  opacity: 0;
  transition: opacity .2s;
}
.pal-swatch:hover span { opacity: 1; }
.extracted-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.ext-card {
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s;
}
.ext-card:hover { transform: translateY(-2px); }
.ext-swatch { height: 48px; }
.ext-info { padding: 6px 9px; background: var(--card); }
.ext-info code {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--brand);
  display: block;
}
.ext-info small { font-size: .68rem; color: var(--muted); }

/* ── COLOR ANALYSIS TAB ── */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.analysis-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.analysis-card h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 14px;
}
.temp-bar {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, #3b82f6, #f97316);
  position: relative;
  margin: 12px 0 6px;
}
.temp-indicator {
  position: absolute;
  top: -4px;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--brand);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: left .3s;
  box-shadow: var(--shadow);
}
.temp-labels {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
}
.channel-bars { display: flex; flex-direction: column; gap: 8px; }
.channel { display: flex; align-items: center; gap: 10px; }
.ch-label {
  width: 20px;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--muted);
  font-family: var(--mono);
}
.ch-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--bg3);
  border-radius: 5px;
  overflow: hidden;
}
.ch-bar { height: 100%; border-radius: 5px; transition: width .3s; }
.ch-val {
  width: 32px;
  font-size: .75rem;
  font-family: var(--mono);
  color: var(--text2);
  text-align: right;
}
.color-props { display: flex; flex-direction: column; gap: 8px; }
.prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-small);
}
.prop-row:last-child { border-bottom: none; }
.prop-label { color: var(--muted); font-weight: 600; }
.prop-val { font-family: var(--mono); color: var(--text); font-weight: 700; font-size: .82rem; }
.shades-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.shade-dot {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: transform .15s;
}
.shade-dot:hover { transform: scale(1.15); }

/* ── CONTENT SECTIONS ── */
.content-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}
.content-section h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 16px;
}
.section-intro {
  font-size: var(--fs-body);
  color: var(--text2);
  max-width: 760px;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* ── FEATURES GRID ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-card h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.66;
}

/* ── HOW IT WORKS STEPS ── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.how-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 700;
  font-size: var(--fs-body);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  margin-bottom: 14px;
}
.how-step h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 7px;
}
.how-step p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.65;
}

/* ── USE CASES ── */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.use-case {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.uc-icon { font-size: 1.7rem; margin-bottom: 10px; }
.use-case h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 7px;
}
.use-case p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.62;
}

/* ── TIPS TWO COL ── */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tip-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.tip-card h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 8px;
}
.tip-card p {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.65;
}
.tip-card ul {
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.8;
  padding-left: 18px;
  margin-top: 6px;
}
.tip-card li { margin-bottom: 3px; }

/* ── PROSE ARTICLE ── */
.prose-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}
.prose {
  max-width: 820px;
}
.prose h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 14px;
  margin-top: 44px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--brand);
}
.prose p {
  font-size: var(--fs-body);
  color: var(--text2);
  margin-bottom: 16px;
  line-height: 1.79;
}
.prose ul, .prose ol {
  font-size: var(--fs-body);
  color: var(--text2);
  padding-left: 22px;
  line-height: 1.82;
  margin-bottom: 16px;
}
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--text); font-weight: 700; }
.callout {
  background: var(--brand-bg);
  border-left: 4px solid var(--brand);
  border-radius: 0 9px 9px 0;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: var(--fs-body);
  color: var(--text2);
  line-height: 1.72;
}
.callout strong { color: var(--brand); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 9px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 17px 20px;
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .15s;
  font-family: var(--sans);
}
.faq-q:hover { background: var(--bg2); }
.faq-arr {
  font-size: .85rem;
  color: var(--muted);
  transition: transform .25s;
  flex-shrink: 0;
}
.faq-q.open .faq-arr { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 20px 16px;
  font-size: var(--fs-body);
  color: var(--text2);
  line-height: 1.76;
}
.faq-a.show { display: block; }

/* ── COMPARISON TABLE ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.compare-table thead tr { background: var(--bg2); }
.compare-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare-table tbody tr { border-top: 1px solid var(--border); }
.compare-table tbody tr:hover { background: var(--bg2); }
.compare-table td { padding: 11px 16px; color: var(--text2); }
.compare-table td:first-child { font-weight: 700; color: var(--text); }
.check { color: #16a34a; font-weight: 700; }
.cross { color: #dc2626; }

/* ── RELATED TOOLS ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--brand);
}
.rc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rc-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.related-card h4 { font-size: var(--fs-nav); font-weight: 700; margin-bottom: 2px; }
.related-card p { font-size: var(--fs-small); color: var(--muted); }

/* ── FOOTER ── */
.ft-wrap {
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
footer {
  padding: 44px 24px 28px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
}
footer h4 {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 7px; }
footer ul li a {
  font-size: var(--fs-small);
  color: var(--muted);
  transition: color .15s;
  font-weight: 500;
}
footer ul li a:hover { color: var(--brand); }
.ft-brand p {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 7px;
  max-width: 210px;
  line-height: 1.55;
}
.ft-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  background: var(--text);
  color: var(--bg);
  border-radius: 9px;
  padding: 10px 16px;
  font-size: var(--fs-small);
  font-weight: 600;
  transform: translateY(60px);
  opacity: 0;
  transition: .28s;
  pointer-events: none;
  font-family: var(--sans);
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── AD PLACEHOLDER ── */
.ad-slot {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
  text-align: center;
}
.ad-slot-inner {
  min-height: 90px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .page-hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .upload-area { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  :root {
    --fs-h1: 36px;
    --fs-h2: 28px;
    --fs-body: 18px;
  }
}
@media (max-width: 560px) {
  nav { padding: 0 16px; }
  .page-hero { padding: 36px 16px 32px; }
  .content-section { padding: 44px 16px; }
  .hero-stats { gap: 16px; }
  :root {
    --fs-h1: 30px;
    --fs-h2: 24px;
  }
}