/* ─────────────────────────────────────────────
   Kickoff Prompt Kit
   ───────────────────────────────────────────── */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --fg: #1c1b19;
  --muted: #615e58;
  --faint: #8d8a83;
  --line: #e6e3dd;
  --accent: #4f46e5;
  --accent-fg: #ffffff;
  --accent-soft: #eef0ff;
  --ok: #15803d;
  --warn-bg: #fff4dc;
  --warn-fg: #8a5300;
  --tip-bg: #f3f1ec;
  --field: #fcfbf9;
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 8px 24px -12px rgba(28, 27, 25, .12);
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214;
    --surface: #1b1b1e;
    --surface-2: #1f1f23;
    --fg: #ededee;
    --muted: #a6a5ab;
    --faint: #7c7b82;
    --line: #2c2c31;
    --accent: #8b84ff;
    --accent-fg: #0e0d1a;
    --accent-soft: #24223d;
    --ok: #4ade80;
    --warn-bg: #3a2c10;
    --warn-fg: #f8c76a;
    --tip-bg: #232327;
    --field: #161619;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121214;
  --surface: #1b1b1e;
  --surface-2: #1f1f23;
  --fg: #ededee;
  --muted: #a6a5ab;
  --faint: #7c7b82;
  --line: #2c2c31;
  --accent: #8b84ff;
  --accent-fg: #0e0d1a;
  --accent-soft: #24223d;
  --ok: #4ade80;
  --warn-bg: #3a2c10;
  --warn-fg: #f8c76a;
  --tip-bg: #232327;
  --field: #161619;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.is-done { background: var(--ok); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--fg); background: var(--surface-2); }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 15px;
}
.topbar-actions { display: flex; gap: 8px; }
@media (max-width: 560px) {
  .brand { font-size: 0; gap: 0; }
  .brand-mark { font-size: 15px; }
  #resetAll { display: none; }
}

/* ───────── Intro ───────── */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.intro { padding: 56px 0 24px; max-width: 760px; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin-top: 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  text-wrap: balance;
}
.lede { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 40em; }
.lede strong, .lede em { color: var(--fg); }

.how {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.how li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}
.how li strong { color: var(--fg); }
.how span {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.toc {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s;
}
.toc a:hover { border-color: var(--accent); }
.toc b { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ───────── Sections ───────── */
.section { padding-top: 48px; }
.section-head { margin-bottom: 18px; max-width: 720px; }
.section-head h2 { font-size: 24px; letter-spacing: -.02em; }
.section-head p { margin-top: 4px; color: var(--muted); }

/* ───────── Cards ───────── */
.card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 16px; }

.card-prompt { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.num {
  display: grid;
  place-items: center;
  min-width: 28px; height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card-top h3 { font-size: 17px; letter-spacing: -.01em; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-edit { background: var(--accent-soft); color: var(--accent); }

textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--fg);
  font: 15px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  resize: vertical;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card-actions { display: flex; gap: 8px; }
.card-actions .btn-copy { min-width: 96px; }

.card-explain {
  padding: 20px;
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.explain-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.explain-row p:last-child, .tip p:last-child { color: var(--fg); font-size: 15px; }
.tip {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--warn-bg);
}
.tip .explain-label { color: var(--warn-fg); }

@media (max-width: 820px) {
  .card { grid-template-columns: 1fr; }
  .card-explain { border-left: 0; border-top: 1px solid var(--line); }
}

/* ───────── Footer & toast ───────── */
.footer {
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 24px 16px 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
