/* ═══════════════════════════════════════════════════════════════
   styles.css — Colour Scheme Generator 2026
   ─────────────────────────────────────────────────────────────
   Typography:
     DM Serif Display — tool H1 only
     Inter             — all other text in the tool shell
     Fira Mono         — hex values, code, numeric data
   Shell palette: neutral light greys, does not compete
   with generated colours displayed inside the tool.
═══════════════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: #f5f5f3;
  color: #111;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* DM Serif Display used ONLY for the tool's own H1 */
.tool-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.25rem;
  color: #111;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* ── SHELL ── */
.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── TOOL HEADER ── */
.tool-header { margin-bottom: 1.75rem; }
.tool-header p {
  font-size: 13px;
  color: #777;
  margin-top: 6px;
  max-width: 580px;
  line-height: 1.6;
}

/* ── CARDS ── */
.card {
  background: #fff;
  border: 0.5px solid #e2e2e0;
  border-radius: 14px;
  padding: 1.5rem;
}
.gap { margin-top: 1.5rem; }

/* ── LABELS & SECTION TEXT ── */
.cs-lbl {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  font-weight: 500;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}
.sec-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #111;
  margin-bottom: 4px;
}
.sec-sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 1rem;
  line-height: 1.6;
  max-width: 700px;
}
.mode-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 600px;
}

/* ── MODE BAR ── */
.mode-bar {
  display: flex;
  border: 0.5px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
  background: #fafaf8;
  margin-bottom: 1rem;
}
.mode-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #888;
  transition: all 0.15s;
}
.mode-btn.active { background: #111; color: #fff; }

/* ── SEED ROW — all seeds in one flex row ── */
.seed-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.seed-grp {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.seed-name {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.seed-pair {
  display: flex;
  align-items: center;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fafaf8;
  height: 36px;
}
.seed-pair input[type="color"] {
  width: 36px; height: 36px;
  border: none; cursor: pointer;
  background: none; padding: 3px 2px; flex-shrink: 0;
}
.seed-pair input[type="text"] {
  border: none; background: transparent;
  font-family: 'Fira Mono', monospace;
  font-size: 12px; width: 82px; outline: none;
  color: #111; padding: 0 8px;
  text-transform: uppercase;
}
.seed-pair .rm {
  background: none; border: none; cursor: pointer;
  color: #ccc; font-size: 15px; padding: 0 8px; line-height: 1; flex-shrink: 0;
}
.seed-pair .rm:hover { color: #e44; }
.add-btn {
  border: 0.5px dashed #ccc; background: transparent;
  border-radius: 8px; padding: 0 14px; height: 36px;
  font-size: 12px; cursor: pointer; color: #999;
  font-family: 'Inter', sans-serif; white-space: nowrap;
}
.add-btn:hover { border-color: #aaa; color: #555; }

/* ── SEED WARNING (extreme value alert) ── */
.seed-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 0.5px solid #f5d76e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #6b4c00;
  line-height: 1.5;
  margin-top: 10px;
}
.seed-warning i { font-size: 15px; color: #b8860b; flex-shrink: 0; margin-top: 1px; }

/* ── HARMONY PILLS ── */
.h-row { display: flex; gap: 6px; flex-wrap: wrap; }
.h-pill {
  border: 0.5px solid #ddd; background: #fff;
  border-radius: 20px; padding: 5px 13px; font-size: 11px;
  cursor: pointer; color: #666; font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.h-pill.active { background: #111; color: #fff; border-color: #111; }

/* Harmony scope note (shown beside the label in build mode) */
.harmony-scope {
  font-size: 11px;
  color: #aaa;
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

/* ── GENERATE BUTTON ── */
.gen-btn {
  background: #111; color: #fff; border: none; border-radius: 9px;
  padding: 10px 26px; font-size: 13px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 500;
  margin-top: 1.25rem; transition: background 0.15s;
}
.gen-btn:hover { background: #333; }

/* ── RESULTS ── */
.results { display: none; }
.results.on { display: block; }

/* ── PALETTE HEADER ── */
.pal-hdr {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem;
}
.pal-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 500; color: #111; margin-bottom: 2px;
}
.pal-meta { font-size: 11px; color: #888; font-family: 'Fira Mono', monospace; }

/* ── THEME TOGGLE ── */
.theme-row { display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; }
.theme-tog {
  display: flex; border: 0.5px solid #e0e0e0;
  border-radius: 8px; overflow: hidden; background: #fafaf8;
}
.theme-btn {
  padding: 5px 14px; font-size: 11px; font-family: 'Inter', sans-serif;
  border: none; background: transparent; cursor: pointer; color: #888; transition: all 0.15s;
}
.theme-btn.active { background: #111; color: #fff; }

/* ── DARK MODE CALLOUT ── */
.dark-callout {
  display: flex; gap: 10px; align-items: flex-start;
  background: #f0f4ff; border: 0.5px solid #c0ceff;
  border-radius: 10px; padding: 10px 14px; font-size: 12px;
  color: #334; line-height: 1.6; margin-bottom: 1rem;
}
.dark-callout i { font-size: 16px; color: #5566cc; flex-shrink: 0; margin-top: 1px; }

/* ── COLOUR COLUMNS ── */
.cols-wrap {
  display: flex;
  border: 0.5px solid #e2e2e0;
  border-radius: 14px;
  overflow: hidden;
}
.col-pair { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.col-pair + .col-pair { border-left: 0.5px solid rgba(0,0,0,0.07); }

/* Top half — the colour itself, taller to fit usage text */
.col-top {
  padding: 12px; display: flex; flex-direction: column;
  cursor: pointer; transition: filter 0.12s; min-height: 155px;
}
.col-top:hover { filter: brightness(0.94); }

/* Bottom half — the on-colour */
.col-bot {
  padding: 10px 12px; display: flex; flex-direction: column;
  justify-content: space-between; cursor: pointer;
  transition: filter 0.12s; min-height: 78px;
  border-top: 0.5px solid rgba(0,0,0,0.07);
}
.col-bot:hover { filter: brightness(0.94); }

.col-role {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 500; opacity: 0.8; font-family: 'Inter', sans-serif;
}
.col-usage {
  font-size: 11px; font-family: 'Inter', sans-serif;
  opacity: 0.72; line-height: 1.4; margin-top: 5px; flex: 1;
}
.col-hex {
  font-family: 'Fira Mono', monospace; font-size: 11px;
  font-weight: 500; padding-top: 8px; margin-top: auto;
}
.col-cr { font-size: 10px; opacity: 0.6; margin-top: 1px; font-family: 'Inter', sans-serif; }

/* ── SEMANTIC STRIP ── */
.sem-wrap {
  display: flex; border: 0.5px solid #e2e2e0;
  border-radius: 14px; overflow: hidden; margin-top: 8px;
}
.sem-col {
  flex: 1; padding: 10px 12px; display: flex;
  flex-direction: column; cursor: pointer; min-height: 90px;
  transition: filter 0.12s;
}
.sem-col:hover { filter: brightness(0.94); }
.sem-col + .sem-col { border-left: 0.5px solid rgba(0,0,0,0.07); }
.sem-role {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 500; opacity: 0.8; font-family: 'Inter', sans-serif;
}
.sem-usage {
  font-size: 11px; font-family: 'Inter', sans-serif;
  opacity: 0.7; line-height: 1.4; margin-top: 4px; flex: 1;
}
.sem-hex {
  font-family: 'Fira Mono', monospace; font-size: 11px;
  font-weight: 500; padding-top: 6px; margin-top: auto;
}

/* ── DETAIL PANEL ── */
.det-card { border-left: 3px solid #111; }
.det-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.det-name { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 500; color: #111; margin-bottom: 3px; }
.det-usage { font-size: 12px; color: #888; font-family: 'Inter', sans-serif; }
.det-sw { width: 52px; height: 52px; border-radius: 10px; border: 0.5px solid rgba(0,0,0,0.1); flex-shrink: 0; }
.det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.d-item { background: #fafaf8; border-radius: 8px; padding: 8px 10px; }
.d-lbl { font-size: 10px; color: #aaa; text-transform: uppercase; letter-spacing: 0.06em; font-family: 'Inter', sans-serif; }
.d-val { font-family: 'Fira Mono', monospace; font-size: 12px; color: #111; margin-top: 3px; word-break: break-all; }

/* ── PREVIEW TABS ── */
.prev-tabs { display: flex; gap: 6px; margin-bottom: 1rem; }
.prev-tab {
  border: 0.5px solid #ddd; background: #fff; border-radius: 8px;
  padding: 6px 14px; font-size: 12px; cursor: pointer;
  color: #777; font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.prev-tab.active { background: #111; color: #fff; border-color: #111; }

/* ── PHONE FRAMES ── */
.phone-tray {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 1.5rem; background: #e6e5e1;
  border-radius: 14px; justify-content: center;
}
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.phone-frame {
  width: 195px;
  border-radius: 30px;
  border: 5px solid #1a1a1a;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.phone-screen {
  height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.phone-lbl { font-size: 11px; color: #888; font-family: 'Inter', sans-serif; text-align: center; }

/* ── WEB FRAME ── */
.web-outer { border-radius: 12px; overflow: hidden; border: 0.5px solid #ddd; }
.web-chrome {
  background: #ebebea; padding: 8px 12px;
  display: flex; align-items: center; gap: 6px; border-bottom: 0.5px solid #ddd;
}
.web-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.web-url {
  font-family: 'Fira Mono', monospace; font-size: 11px;
  background: #fff; border-radius: 5px; padding: 3px 10px;
  color: #999; flex: 1; text-align: center; max-width: 220px; margin: 0 auto;
}

/* ── ACCESSIBILITY ── */
.a11y-intro {
  background: #fafaf8; border: 0.5px solid #e2e2e0;
  border-radius: 10px; padding: 12px 14px; font-size: 12px;
  color: #444; line-height: 1.7; margin-bottom: 1rem;
}
.inline-fail {
  background: #fde8e8; color: #c0392b; font-size: 11px;
  padding: 1px 6px; border-radius: 4px; font-weight: 500;
}
.a11y-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.a11y-item { border-radius: 10px; padding: 10px 12px; border: 0.5px solid rgba(0,0,0,0.08); }
.a11y-item.fail-item { border: 1.5px solid rgba(200,50,50,0.55); }
.a11y-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.a11y-name { font-size: 11px; font-weight: 500; font-family: 'Inter', sans-serif; line-height: 1.3; }
.a11y-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 4px;
  font-weight: 500; font-family: 'Inter', sans-serif; flex-shrink: 0; margin-left: 4px;
}
.b-aaa { background: rgba(0,0,0,0.15); }
.b-aa  { background: rgba(0,0,0,0.10); }
.b-lg  { background: rgba(255,255,255,0.25); }
.b-fail{ background: rgba(220,80,80,0.25); color: #c0392b !important; }
.a11y-ratio { font-family: 'Fira Mono', monospace; font-size: 12px; opacity: 0.9; }
.a11y-note { font-size: 10px; opacity: 0.65; margin-top: 3px; font-family: 'Inter', sans-serif; line-height: 1.4; }
.a11y-action {
  font-size: 10px; color: #c0392b; font-weight: 500; margin-top: 5px;
  font-family: 'Inter', sans-serif;
  border-top: 0.5px solid rgba(200,50,50,0.2); padding-top: 5px; line-height: 1.4;
}

/* ── EXPORT ── */
.exp-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.exp-btn {
  border: 0.5px solid #ddd; background: #fafaf8; border-radius: 8px;
  padding: 7px 14px; font-size: 12px; cursor: pointer; color: #555;
  font-family: 'Inter', sans-serif; display: flex; align-items: center;
  gap: 5px; transition: all 0.15s;
}
.exp-btn:hover { border-color: #aaa; background: #f0f0ee; }
.exp-btn i { font-size: 14px; }
.exp-out {
  background: #fafaf8; border: 0.5px solid #e2e2e0;
  border-radius: 10px; padding: 1rem; position: relative;
}
.exp-out pre {
  font-family: 'Fira Mono', monospace; font-size: 12px; color: #333;
  line-height: 1.75; white-space: pre-wrap; word-break: break-all; margin-top: 2rem;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px; background: #fff;
  border: 0.5px solid #ddd; border-radius: 6px; padding: 4px 12px;
  font-size: 11px; cursor: pointer; color: #555;
  font-family: 'Inter', sans-serif; transition: background 0.15s;
}
.copy-btn:hover { background: #f5f5f3; }
