:root {
  --deep-purple: #4C2E8B;
  --vivid-purple: #7C3AED;
  --light-purple: #B397F3;
  --midnight: #1D2334;
  --ink: #1E293B;
  --muted: #697086;
  --tint-bg: #F4F1FC;
  --tint-border: #E3DAF6;
  --hairline: #E8EAF0;
  --white: #FFFFFF;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 860px;
  --shadow: 0 1px 2px rgba(29, 35, 52, .04), 0 8px 24px rgba(29, 35, 52, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  color: var(--midnight);
  line-height: 1.2;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--vivid-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--midnight);
  background: linear-gradient(160deg, #232a40 0%, var(--midnight) 60%, #191f2f 100%);
  color: #fff;
  padding: 56px 0 48px;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.header-logo { height: 64px; width: auto; display: block; }
.header-copy { min-width: 0; }
.kicker {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  color: var(--light-purple);
  margin: 0 0 8px;
}
.title { color: #fff; font-size: 38px; letter-spacing: -.02em; margin: 0 0 12px; }
.lede { color: #c7ccda; font-size: 18px; margin: 0; max-width: 46ch; }

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.progress {
  font-size: 13px;
  font-weight: 600;
  color: #c7ccda;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.progress #progressCount { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }

.btn-copy {
  background: var(--white);
  border-color: var(--tint-border);
  color: var(--deep-purple);
}
.btn-copy:hover { border-color: var(--light-purple); background: #fbfaff; }
.btn-copy.is-copied {
  background: var(--deep-purple);
  border-color: var(--deep-purple);
  color: #fff;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 4px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 20;
}
.tabs::after {
  content: "";
  position: absolute;
  left: 24px; right: 24px; bottom: 0;
  border-bottom: 1px solid var(--hairline);
}
.tab {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 4px;
  margin: 0 12px 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--deep-purple); border-bottom-color: var(--vivid-purple); }

/* ---------- Tier panels ---------- */
main { padding-top: 40px; padding-bottom: 80px; }
.tier-panel { margin-bottom: 8px; }
.tier-eyebrow {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  color: var(--vivid-purple);
  margin: 0 0 6px;
}
.tier-heading { font-size: 26px; margin: 0 0 24px; letter-spacing: -.01em; }

/* ---------- Cards / sections ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h3 { font-size: 20px; flex: 1; min-width: 0; }
.num {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--tint-bg);
  border: 1px solid var(--tint-border);
  color: var(--deep-purple);
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.tag-cc {
  flex: none;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--vivid-purple);
  background: var(--tint-bg);
  border: 1px solid var(--tint-border);
  padding: 4px 9px;
  border-radius: 999px;
}

.done {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.done input { accent-color: var(--vivid-purple); width: 16px; height: 16px; cursor: pointer; }
.section.is-done { border-color: var(--tint-border); background: #fdfcff; }
.section.is-done .num { background: var(--deep-purple); border-color: var(--deep-purple); color: #fff; }

/* ---------- Prompt cards ---------- */
.prompt-card {
  background: var(--tint-bg);
  border: 1px solid var(--tint-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 16px;
}
.prompt-label {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--deep-purple);
  margin-bottom: 10px;
}
.prompt-text {
  font-size: 15.5px;
  color: var(--ink);
  white-space: pre-wrap;
  margin: 0;
}
.prompt-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ---------- Context block ---------- */
.context-body p { font-size: 15.5px; margin: 0 0 4px; }
.field-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 6px 0 !important;
  font-weight: 600;
}
.ctx {
  flex: 1;
  min-width: 220px;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--tint-border);
  border-radius: 8px;
  padding: 7px 11px;
}
.ctx::placeholder { color: #a7a1c0; font-weight: 400; }
.ctx:focus { outline: none; border-color: var(--vivid-purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }

/* ---------- Example pair ---------- */
.example-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.ex-card {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  background: #fafafb;
}
.ex-card p { font-size: 15px; margin: 0; }
.ex-tag {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.ex-lazy .ex-tag { color: var(--muted); }
.ex-better { background: var(--tint-bg); border-color: var(--tint-border); }
.ex-better .ex-tag { color: var(--deep-purple); }

/* ---------- Screenshot slot ---------- */
.screenshot-slot {
  margin-top: 16px;
  border: 1.5px dashed var(--tint-border);
  border-radius: var(--radius-sm);
  background: var(--tint-bg);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--deep-purple);
  text-align: center;
}
.screenshot-slot span { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 15px; }
.screenshot-slot small { color: var(--muted); }

/* ---------- Lists ---------- */
.ten-list { margin: 6px 0 0; padding-left: 22px; }
.ten-list li { margin-bottom: 9px; padding-left: 4px; }
.ten-list li::marker { color: var(--vivid-purple); font-weight: 700; }

.link-list { list-style: none; margin: 16px 0 0; padding: 0; }
.link-list li {
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.link-list li:last-child { border-bottom: 1px solid var(--hairline); }
.link-list a { font-weight: 700; }
.link-list span { color: var(--muted); font-size: 15px; }

.crosscut { margin-top: 44px; padding-top: 8px; }
.crosscut::before {
  content: "The essentials";
  display: block;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--white);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo { height: 30px; width: auto; }
.footer-line { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--midnight);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 50;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { padding: 36px 0 32px; }
  .header-inner { grid-template-columns: 1fr; gap: 20px; }
  .header-logo { height: 52px; }
  .title { font-size: 30px; }
  .header-actions { align-items: flex-start; flex-direction: row; width: 100%; justify-content: space-between; }
  .tab { font-size: 14px; margin-right: 8px; }
  .card { padding: 22px 20px; }
  .section-head { flex-wrap: wrap; }
  .section-head h3 { flex-basis: 100%; order: 3; }
  .done { order: 2; margin-left: auto; }
  .example-pair { grid-template-columns: 1fr; }
  .ctx { min-width: 100%; }
}

/* ---------- Print ---------- */
@media print {
  :root { --maxw: 100%; }
  body { font-size: 12pt; color: #000; background: #fff; line-height: 1.45; }
  h1, h2, h3 { color: #000; }
  .site-header {
    background: #fff !important;
    color: #000;
    padding: 0 0 18px;
    border-bottom: 2px solid #000;
  }
  .header-inner { grid-template-columns: 1fr; gap: 6px; }
  .header-logo { display: none; }
  .kicker { color: #000; }
  .title { color: #000; font-size: 24pt; }
  .lede { color: #000; }
  .header-actions, .tabs, .btn, .prompt-actions, .done, .toast { display: none !important; }
  .tier-panel[hidden] { display: block !important; }
  .tier-panel { break-inside: auto; }
  .card {
    box-shadow: none;
    border: 1px solid #999;
    background: #fff !important;
    padding: 14px 16px;
    margin-bottom: 12px;
    break-inside: avoid;
  }
  .num, .tag-cc { background: #fff; border-color: #000; color: #000; }
  .prompt-card, .ex-card, .ex-better, .screenshot-slot, .context-body p, .field-line {
    background: #fff !important;
    border-color: #999;
  }
  .prompt-label, .tier-eyebrow, .ex-better .ex-tag { color: #000; }
  .ctx { border: 1px solid #999; }
  a { color: #000; text-decoration: underline; }
  .link-list a::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 10pt; }
  .site-footer { border-top: 1px solid #000; }
  .footer-logo { display: block; height: 26px; }
  .crosscut::before { color: #000; }
}
