/* ==========================================================================
   ToolGuest Color Palette Generator — shared stylesheet for the palette
   cluster. Used by /color-palette-generator and its six dedicated sub-tools.
   Light is the default; dark mode follows html.dark, html[data-theme="dark"]
   and body.dark so it works with every theme convention on the site.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --fg: #0a0b0d;
  --muted: #646b78;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d4d8de;
  --glass: rgba(255, 255, 255, 0.78);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.09);
  --accent-2: #0891b2;
  --ok: #059669;
  --bad: #dc2626;
  --shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.35);
  --radius: 18px;
  color-scheme: light;
}

html.dark,
html[data-theme="dark"],
body.dark {
  --bg: #07080a;
  --bg-soft: #0b0d10;
  --fg: #f4f5f7;
  --muted: #8d95a3;
  --card: #101216;
  --border: #1e2228;
  --border-strong: #2b3037;
  --glass: rgba(12, 14, 18, 0.75);
  --accent: #818cf8;
  --accent-soft: rgba(129, 140, 248, 0.14);
  --accent-2: #22d3ee;
  --ok: #34d399;
  --bad: #f87171;
  --shadow: 0 28px 70px -34px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body.pal-page {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pal-wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------- header --------------------------------- */
.pal-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pal-header-in {
  display: flex; align-items: center; gap: 12px;
  height: 56px; max-width: 1240px; margin: 0 auto; padding: 0 18px;
}
.pal-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); }
.pal-brand img { height: 28px; width: auto; }
.pal-brand span { font-size: 0.875rem; font-weight: 800; letter-spacing: -0.01em; }
.pal-nav { display: none; align-items: center; gap: 2px; margin-left: 14px; }
.pal-nav a {
  border-radius: 9px; padding: 6px 10px; font-size: 13px; font-weight: 500;
  color: var(--muted); text-decoration: none; transition: background 0.15s, color 0.15s;
}
.pal-nav a:hover { background: var(--bg-soft); color: var(--fg); }
.pal-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pal-pill {
  display: none; align-items: center; gap: 6px; border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 600;
  color: var(--muted); white-space: nowrap;
}
.pal-icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: transparent;
  color: var(--muted); transition: color 0.15s, background 0.15s;
}
.pal-icon-btn:hover { color: var(--fg); background: var(--bg-soft); }
.pal-icon-btn svg { width: 16px; height: 16px; }
.pal-cta {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 10px;
  background: var(--fg); color: var(--bg); padding: 8px 14px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: opacity 0.15s;
}
.pal-cta:hover { opacity: 0.88; }
@media (min-width: 860px) { .pal-nav { display: flex; } .pal-pill { display: inline-flex; } }

/* -------------------------------- hero ---------------------------------- */
.pal-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.pal-hero::before,
.pal-hero::after {
  content: ""; position: absolute; border-radius: 999px; filter: blur(90px);
  opacity: 0.42; pointer-events: none;
}
.pal-hero::before {
  width: 420px; height: 420px; top: -170px; left: -90px;
  background: radial-gradient(circle, #6366f1, transparent 65%);
}
.pal-hero::after {
  width: 380px; height: 380px; top: -140px; right: -70px;
  background: radial-gradient(circle, #22d3ee, transparent 65%);
}
html.dark .pal-hero::before, html[data-theme="dark"] .pal-hero::before, body.dark .pal-hero::before { opacity: 0.3; }
html.dark .pal-hero::after, html[data-theme="dark"] .pal-hero::after, body.dark .pal-hero::after { opacity: 0.22; }
.pal-hero-in { position: relative; z-index: 1; padding: 30px 0 34px; }
.pal-crumbs {
  display: flex; align-items: center; gap: 6px; margin-bottom: 22px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.pal-crumbs a { color: inherit; text-decoration: none; }
.pal-crumbs a:hover { color: var(--fg); }
.pal-crumbs svg { width: 12px; height: 12px; opacity: 0.7; }
.pal-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 4px 12px; font-size: 11px; font-weight: 700; color: var(--muted);
}
.pal-dot { position: relative; display: flex; width: 6px; height: 6px; }
.pal-dot::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: #34d399; opacity: 0.75; animation: palPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.pal-dot::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #10b981; }
@keyframes palPing { 75%, 100% { transform: scale(2.2); opacity: 0; } }

.pal-hero h1 {
  margin: 0; max-width: 24ch;
  font-size: clamp(2rem, 5.2vw, 3.15rem); font-weight: 900;
  line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance;
}
.pal-hero h1 .pal-grad {
  display: block;
  background: linear-gradient(90deg, #6366f1, #8b5cf6 45%, #06b6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pal-lede { margin: 18px 0 0; max-width: 62ch; font-size: 15px; line-height: 1.7; color: var(--muted); }
.pal-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pal-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 11px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}
.pal-btn:active { transform: translateY(1px); }
.pal-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; box-shadow: 0 16px 34px -18px rgba(79, 70, 229, 0.85);
}
.pal-btn-primary:hover { opacity: 0.94; }
.pal-btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.pal-btn-ghost:hover { background: var(--bg-soft); }
.pal-btn svg { width: 16px; height: 16px; }

.pal-chips {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px; margin: 26px 0 0; padding: 0; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--muted); max-width: 680px;
}
.pal-chips li { display: flex; align-items: center; gap: 8px; }
.pal-chips svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
@media (min-width: 640px) { .pal-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --------------------------------- tool --------------------------------- */
.pal-tool { padding: 26px 0 8px; }
.pal-tool-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.pal-tool-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.pal-tool-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.pal-kbd {
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 10px;
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px;
  background: var(--card);
}
.pal-kbd-hint { display: none; font-size: 11px; color: var(--muted); }
@media (min-width: 640px) { .pal-kbd-hint { display: block; } }

.pal-quick { margin: -4px 0 14px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.pal-quick a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.pal-quick a:hover { color: var(--fg); }

/* action bar */
.pal-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 16px; padding: 9px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--glass); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pal-seg {
  display: flex; flex-wrap: wrap; padding: 3px; gap: 2px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--card);
}
.pal-seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--muted);
  font-family: inherit; transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.pal-seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.pal-bar-right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pal-action {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: transparent;
  padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--fg);
  font-family: inherit; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pal-action:hover { background: var(--fg); color: var(--bg); }
.pal-action svg { width: 15px; height: 15px; }
.pal-action.is-primary {
  border-color: transparent; background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; font-weight: 700; box-shadow: 0 14px 30px -18px rgba(79, 70, 229, 0.9);
}
.pal-action.is-primary:hover { opacity: 0.94; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; }
.pal-action.is-icon { padding: 8px; }

/* base colour row */
.pal-base {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 16px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--card);
}
.pal-base-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.pal-base-swatch {
  width: 38px; height: 38px; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: none; overflow: hidden;
}
.pal-base-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.pal-base-swatch::-webkit-color-swatch { border: 0; border-radius: 9px; }
.pal-base-input {
  width: 116px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--card); color: var(--fg); padding: 8px 11px;
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 13px;
  font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; outline: none;
}
.pal-base-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pal-base-note { font-size: 12px; color: var(--muted); }
.pal-base-note b { color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .pal-base-note { width: 100%; } }

/* swatches */
.pal-swatches {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
}
@media (max-width: 900px) { .pal-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pal-swatches { grid-template-columns: minmax(0, 1fr); } }

.pal-swatch {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 232px; padding: 12px; border-radius: 16px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
  transition: background-color 0.25s ease, transform 0.15s ease;
}
.pal-swatch:hover { transform: translateY(-2px); }
@media (max-width: 900px) { .pal-swatch { min-height: 0; } }
.pal-swatch-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pal-swatch-index { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; opacity: 0.5; }
.pal-lock-btn {
  display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer;
  border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.18);
  color: inherit; opacity: 0.55; transition: opacity 0.15s, background 0.15s;
}
.pal-lock-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.3); }
.pal-swatch.is-locked .pal-lock-btn { opacity: 1; background: rgba(255, 255, 255, 0.34); }
.pal-lock-btn svg { width: 13px; height: 13px; }

.pal-swatch-codes { display: grid; gap: 4px; margin: 12px 0; }
.pal-code {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; border-radius: 8px; padding: 4px 6px; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: inherit; font-family: inherit;
  transition: background 0.15s;
}
.pal-code:hover { background: rgba(255, 255, 255, 0.28); }
.pal-code b {
  font-family: ui-monospace, "JetBrains Mono", monospace; font-weight: 700;
  letter-spacing: 0.01em; white-space: nowrap;
}
.pal-code.is-hex b { font-size: 15px; }
.pal-code.is-sub b { font-size: 10.5px; font-weight: 600; opacity: 0.92; }
.pal-code svg { width: 12px; height: 12px; flex: none; opacity: 0.7; }

.pal-swatch-tools { display: flex; align-items: center; gap: 4px; }
.pal-tool-btn {
  display: grid; place-items: center; width: 28px; height: 28px; cursor: pointer;
  border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.16);
  color: inherit; transition: background 0.15s;
}
.pal-tool-btn:hover { background: rgba(255, 255, 255, 0.32); }
.pal-tool-btn svg { width: 13px; height: 13px; }
.pal-edit {
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.16); cursor: pointer; overflow: hidden;
}
.pal-edit::-webkit-color-swatch-wrapper { padding: 0; }
.pal-edit::-webkit-color-swatch { border: 0; border-radius: 8px; }

/* contrast panel */
.pal-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px; }
@media (min-width: 900px) { .pal-panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pal-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 16px;
}
.pal-panel h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em;
}
.pal-panel h3 svg { width: 16px; height: 16px; color: var(--accent-2); flex: none; }
.pal-panel > p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.pal-panel.is-focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pal-contrast-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.pal-field { display: block; min-width: 0; }
.pal-field > span {
  display: block; margin-bottom: 5px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.pal-color-input {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.pal-color-input input[type="color"] {
  width: 24px; height: 24px; flex: none; padding: 0; cursor: pointer;
  border: 0; border-radius: 6px; background: none; overflow: hidden;
}
.pal-color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.pal-color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.pal-color-input input[type="text"] {
  width: 100%; min-width: 0; border: 0; background: none; color: var(--fg);
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12.5px;
  font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; outline: none;
}

.pal-preview { margin-top: 12px; border-radius: 12px; padding: 16px; border: 1px solid var(--border); }
.pal-preview .big { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.pal-preview .small { font-size: 13px; margin-top: 4px; opacity: 0.88; }

.pal-ratio-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px;
}
.pal-ratio {
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 24px;
  font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.pal-ratio small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.pal-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pal-pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted);
  padding: 4px 9px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pal-pill.pass { background: var(--ok); border-color: transparent; color: #06110c; }
.pal-pill.fail { background: rgba(220, 38, 38, 0.09); border-color: rgba(220, 38, 38, 0.35); color: var(--bad); }
html.dark .pal-pill.fail, html[data-theme="dark"] .pal-pill.fail, body.dark .pal-pill.fail { background: rgba(248, 113, 113, 0.12); }

.pal-contrast-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pal-mini {
  cursor: pointer; border: 1px solid var(--border); border-radius: 9px;
  background: transparent; color: var(--fg); padding: 6px 10px;
  font-size: 11.5px; font-weight: 700; font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.pal-mini:hover { background: var(--bg-soft); }

/* code output */
.pal-code-out {
  margin: 12px 0 0; padding: 12px; border-radius: 10px; max-height: 210px;
  overflow: auto; background: var(--bg-soft); border: 1px solid var(--border);
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12px;
  line-height: 1.6; white-space: pre; color: var(--fg);
}

/* hint bar */
.pal-hints {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px; font-size: 11.5px; color: var(--muted);
}
.pal-hints .keys { display: flex; flex-wrap: wrap; gap: 14px; }
.pal-hints span { display: inline-flex; align-items: center; gap: 5px; }

/* ------------------------------ content --------------------------------- */
.pal-sec { padding: 46px 0 0; }
.pal-sec > .pal-eyebrow { display: block; margin-bottom: 10px; }
.pal-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--accent);
}
.pal-sec h2 {
  margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; max-width: 30ch;
}
.pal-sec h3 { margin: 20px 0 6px; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.pal-sec p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.72; color: var(--muted); max-width: 74ch; }
.pal-sec ul, .pal-sec ol { margin: 0 0 14px; padding-left: 20px; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.pal-sec li { margin-bottom: 6px; }
.pal-sec code {
  font-family: ui-monospace, "JetBrains Mono", monospace; font-size: 12.5px;
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--bg-soft);
}
.pal-sec a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* AI summary box */
.pal-summary {
  display: flex; gap: 12px; margin: 22px 0 0; padding: 16px 18px;
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 14px; background: var(--bg-soft);
}
.pal-summary svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.pal-summary p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--fg); max-width: none; }
.pal-summary b { font-weight: 800; }

/* tables */
.pal-tablewrap {
  margin: 14px 0 0; border: 1px solid var(--border); border-radius: 14px;
  overflow-x: auto; background: var(--card);
}
.pal-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13.5px; text-align: left; }
.pal-table caption {
  padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.pal-table th, .pal-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pal-table thead th {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); background: var(--bg-soft);
}
.pal-table tbody tr:last-child th, .pal-table tbody tr:last-child td { border-bottom: 0; }
.pal-table th[scope="row"] { font-weight: 700; color: var(--fg); white-space: nowrap; }
.pal-table td { color: var(--muted); }
.pal-table .yes { color: var(--ok); font-weight: 700; }
.pal-table .no { color: var(--muted); }
.pal-table .us { color: var(--fg); font-weight: 700; }

/* cards */
.pal-cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
.pal-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pal-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .pal-cards.cols-2, .pal-cards.cols-3 { grid-template-columns: minmax(0, 1fr); } }
.pal-card-soft {
  border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 14px 16px;
}
.pal-card-soft .pal-city {
  display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.pal-card-soft h3 { margin: 0 0 4px; font-size: 14px; }
.pal-card-soft p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: none; }

/* steps */
.pal-steps { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 0; padding: 0; list-style: none; }
@media (max-width: 820px) { .pal-steps { grid-template-columns: minmax(0, 1fr); } }
.pal-steps li { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 14px 16px; }
.pal-steps .num {
  display: inline-block; margin-bottom: 8px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; color: var(--accent);
}
.pal-steps h3 { margin: 0 0 4px; font-size: 14px; }
.pal-steps p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: none; }

/* FAQ */
.pal-faq { display: grid; gap: 10px; margin-top: 14px; max-width: 900px; }
.pal-faq details {
  border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 0 16px;
}
.pal-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; cursor: pointer; font-size: 14px; font-weight: 700;
  letter-spacing: -0.01em; list-style: none;
}
.pal-faq summary::-webkit-details-marker { display: none; }
.pal-faq summary::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--muted); }
.pal-faq details[open] summary::after { content: "\2013"; }
.pal-faq p { margin: 0; padding: 0 0 14px; font-size: 13.8px; line-height: 1.7; color: var(--muted); max-width: 80ch; }

/* cluster grid */
.pal-cluster { padding: 52px 0 0; }
.pal-cluster-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
@media (max-width: 900px) { .pal-cluster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pal-cluster-grid { grid-template-columns: minmax(0, 1fr); } }
.pal-cluster-card {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--card);
  text-decoration: none; color: var(--fg); transition: border-color 0.15s, background 0.15s;
}
.pal-cluster-card:hover { border-color: var(--border-strong); background: var(--bg-soft); }
.pal-cluster-card[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
.pal-cluster-card .name { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.pal-cluster-card .desc { font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.pal-cluster-card .tag {
  align-self: flex-start; margin-top: 5px; font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}

/* toasts */
.pal-toasts { position: fixed; left: 50%; bottom: 22px; z-index: 200; transform: translateX(-50%); display: grid; gap: 8px; }
.pal-toast {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-radius: 10px; background: #111318; color: #f4f5f7;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  font-size: 12.5px; font-weight: 600; animation: palToast 0.2s ease;
}
.pal-toast svg { width: 14px; height: 14px; color: #34d399; }
@keyframes palToast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
