/* LetsAskIt chakra theme layer — Vishuddha (throat), expressive side.
 *
 * Token-driven: every color mode re-derives from the brief palette and the
 * site's neuroscience principle — "self-expression triggers reward circuitry;
 * vibrant-but-harmonious color sustains creative energy without tipping into
 * visual anxiety." Future palette tweaks live in the three token blocks
 * below; components reference tokens only, never raw hex.
 *
 *   dark   — full expressive Vishuddha: deep teal-dark #042f2e, vibrant
 *            turquoise #2dd4bf accents, warm gold #fbbf24 sparks. Joy of
 *            expression at full bloom.
 *   bright — turquoise stays vibrant but harmonious: text accents deepen to
 *            teal #0f766e on warm white so they stay readable and calm; gold
 *            sparks deepen to amber #d97706 for reward-circuitry delight
 *            without neon harshness. Playful energy, no visual anxiety.
 *   night  — Night-Shift style: warm dim amber-tinted base, low blue light;
 *            turquoise becomes a gentle glow (#6fc7bb) rather than a vivid
 *            pop; gold sparks stay as soft warmth. Creative energy, rested.
 */

/* ============ dark (default) — full expressive Vishuddha ============ */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #042f2e;
  --surface: #073b3a;
  --ink: #eaf6f4;
  --muted: #9fc6c0;
  --accent: #2dd4bf;
  --accent-deep: #14b8a6;
  --accent-ink: #042f2e;
  --gold: #fbbf24;
  --gold-ink: #3a2a00;
  --border: rgba(45, 212, 191, 0.28);
  --glow: 0 10px 36px rgba(45, 212, 191, 0.22);
  --code-bg: rgba(45, 212, 191, 0.09);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --link: #5eead4;
}

/* ============ bright — vibrant-but-harmonious on warm white ============ */
html[data-theme="bright"] {
  color-scheme: light;
  --bg: #fffdf8;
  --surface: #fef9f0;
  --ink: #0c3432;
  --muted: #4d6b68;
  --accent: #0f766e;
  --accent-vivid: #14b8a6;
  --accent-ink: #ffffff;
  --gold: #d97706;
  --gold-spark: #fbbf24;
  --gold-ink: #ffffff;
  --border: rgba(15, 118, 110, 0.24);
  --glow: 0 10px 30px rgba(20, 184, 166, 0.16);
  --code-bg: rgba(15, 118, 110, 0.08);
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --link: #0f766e;
}

/* ============ night — warm dim, low blue, gentle glow ============ */
html[data-theme="night"] {
  color-scheme: dark;
  --bg: #16100a;
  --surface: #231a10;
  --ink: #e7dabf;
  --muted: #a3936f;
  --accent: #6fc7bb;
  --accent-deep: #4fa89d;
  --accent-ink: #16100a;
  --gold: #f0b429;
  --gold-ink: #2e2005;
  --border: rgba(240, 180, 41, 0.2);
  --glow: 0 10px 32px rgba(240, 180, 41, 0.12);
  --code-bg: rgba(240, 180, 41, 0.08);
  --ok: #7dd3a8;
  --warn: #f0b429;
  --bad: #e88a8a;
  --link: #8fd9cf;
}

/* ============ base ============ */
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--ink);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Expressive ambient glow behind the hero (dark mode only). */
html[data-theme="dark"] body {
  background-image: radial-gradient(60rem 30rem at 50% -8rem, rgba(45, 212, 191, 0.14), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--link); }

/* ============ header / nav ============ */
header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

nav {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

nav .brand {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-size: 1.1rem;
}

nav .brand:hover { color: var(--accent); }

nav .links a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: inherit;
  font-size: 0.95rem;
  opacity: 0.85;
}

nav .links a:hover { opacity: 1; text-decoration: underline; }

/* ============ theme toggle (segmented control) ============ */
.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface);
  flex: 0 0 auto;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.theme-toggle-btn:hover { color: var(--ink); }

.theme-toggle-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.theme-toggle-glyph { font-size: 0.85em; }

@media (max-width: 560px) {
  .theme-toggle-label { display: none; }
  .theme-toggle-btn { padding: 0.3rem 0.55rem; }
}

/* ============ main content ============ */
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 { margin-top: 2.5rem; }

.tagline {
  font-size: 1.25rem;
  opacity: 0.85;
  margin-top: 0;
  color: var(--muted);
}

ol { padding-left: 1.25rem; }

.pill {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink) !important;
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.5rem;
  box-shadow: var(--glow);
}

.cta:hover { filter: brightness(1.06); }

.hero-art { margin: 2.5rem 0 0; }

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}

.card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.card h3 { margin: 0 0 0.4rem; }
.card p { margin: 0.4rem 0; }

.meta { font-size: 0.9rem; opacity: 0.7; color: var(--muted); }

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th { text-align: left; border-bottom: 2px solid var(--border); padding: 0.4rem; }
td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

ol.steps > li, ul.steps > li { margin-bottom: 0.75rem; }

footer { margin-top: 3rem; font-size: 0.85rem; opacity: 0.7; }

.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 2rem; }
.post-list h2 { margin: 0.25rem 0 0.4rem; font-size: 1.5rem; }
.post-list h2 a { color: inherit; text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); text-decoration: underline; }

.faq dt { font-weight: 700; margin-top: 1.25rem; }
.faq dd { margin: 0.25rem 0 0; }

/* ============ studio page ============ */
body.studio header .wrap,
body.studio main,
body.studio footer .wrap {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

body.studio header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.studio header h1 { font-size: 1.25rem; margin: 0; }
body.studio header a { font-size: 0.9rem; }
body.studio main { padding-top: 1.5rem; padding-bottom: 3rem; }
body.studio section { margin-bottom: 2.5rem; }
body.studio h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }

.hint { font-size: 0.9rem; opacity: 0.75; margin-top: 0.25rem; color: var(--muted); }

label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }

select, input[type="text"], textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

textarea { min-height: 7rem; resize: vertical; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
}

fieldset legend { font-weight: 600; padding: 0 0.4rem; }

.formats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.formats label { font-weight: 400; margin: 0; display: flex; gap: 0.4rem; align-items: center; }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1.1rem;
  background: var(--surface);
  color: var(--ink);
  margin-top: 1rem;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: var(--glow);
}

button:disabled { opacity: 0.5; cursor: default; }
button.small { padding: 0.3rem 0.7rem; font-size: 0.85rem; margin-top: 0.5rem; }
button.btn-ghost { background: transparent; border: 1px solid currentColor; padding: 0.15rem 0.55rem; font-size: 0.8rem; margin-left: 0.4rem; }

.status { margin-top: 0.75rem; font-size: 0.95rem; min-height: 1.6em; }
.status.error { color: var(--bad); }
.status.ok { color: var(--ok); }

[hidden] { display: none !important; }

body.studio .card { padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
body.studio .card.approved { opacity: 0.75; border-style: dashed; }
.card-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 1.05rem; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.tone-good { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 55%, transparent); }
.tone-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); }
.tone-bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); }

.scores { font-size: 0.85rem; opacity: 0.8; margin: 0.35rem 0 0; }

.flags, .fit-issues { list-style: none; padding: 0; margin: 0.6rem 0; font-size: 0.88rem; }

.flags li {
  border-left: 3px solid var(--warn);
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.35rem;
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border-radius: 0 6px 6px 0;
}

.flags .verify { font-weight: 700; color: var(--warn); }
.fit-issues li { color: var(--bad); }
.fit-issues li::before { content: "\2715  "; }

.card textarea { margin-top: 0.5rem; min-height: 9rem; font-size: 0.92rem; }
.card-actions { display: flex; gap: 0.75rem; align-items: center; }

#approvedList { list-style: none; padding: 0; }
#approvedList li {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
}

#approvedList .snippet { font-size: 0.88rem; opacity: 0.8; margin: 0.3rem 0; white-space: pre-wrap; }
#profileList { list-style: none; padding: 0; }
#profileList li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
#profileList .meta { opacity: 0.7; font-size: 0.85rem; }

body.studio footer { border-top: 1px solid var(--border); font-size: 0.85rem; opacity: 0.7; }
body.studio footer code { font-size: 0.8rem; }
