/* Prompt Library and AI Ideas pages. Same system as the Prompt to Product
   deck's white slides: Inter and Inter Tight, the four accent colours, red
   kicker labels, canvas motifs and the deck's rise-in build. */
:root {
  --ink: #17181c;
  --ink-2: #3c4043;
  --muted: #5c6068;
  --line: #e8eaed;
  --paper: #ffffff;
  --soft: #f8f9fa;
  --blue: #1a73e8;
  --green: #188038;
  --red: #d93025;
  --yellow: #f9ab00;
  --gold: #ffc72c;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --text: Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex: none; }
.brand__boss { width: 32px; height: 32px; }
.brand__txt { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.2px; line-height: 1.1; }
.brand__txt small { display: block; font-family: var(--text); font-weight: 500; font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 13px; border-radius: 999px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--soft); }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }

/* Hero: a white title slide with the floating dots */
.hero { position: relative; overflow: hidden; padding: 88px 0 56px; }
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; }
.kicker { font-weight: 700; font-size: 14px; letter-spacing: 4px; text-transform: uppercase; color: var(--red); margin: 0 0 18px; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -2.5px; line-height: 1; margin: 0; font-size: clamp(44px, 7.5vw, 96px); max-width: 900px; }
.lede { font-size: clamp(18px, 2.1vw, 22px); color: var(--ink-2); max-width: 680px; margin: 24px 0 0; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.byline b { display: block; font-size: 16px; }
.byline span { color: var(--muted); font-size: 14px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.hero__stats div { font-size: 14px; color: var(--muted); }
.hero__stats b { display: block; font-family: var(--display); font-size: 56px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.hero__stats div:nth-child(1) b { color: var(--blue); }
.hero__stats div:nth-child(2) b { color: var(--green); }
.hero__stats div:nth-child(3) b { color: var(--red); }
.hero__stats div:nth-child(4) b { color: var(--yellow); }

/* Three-part prompt, as on the deck slide */
.anatomy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 48px 0 0; }
.anatomy div { border-top: 4px solid var(--blue); padding-top: 14px; }
.anatomy div:nth-child(2) { border-color: var(--green); }
.anatomy div:nth-child(3) { border-color: var(--red); }
.anatomy b { font-family: var(--display); font-size: 24px; display: block; margin-bottom: 4px; }
.anatomy p { margin: 0; color: var(--ink-2); }

/* Filters */
.filters { position: sticky; top: 64px; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filters__in { padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.filters__in > *, .chiprows > * { min-width: 0; }
.searchrow { display: flex; gap: 12px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--ink); padding: 0 2px; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; font: inherit; font-size: 17px; padding: 10px 0; width: 100%; background: transparent; color: var(--ink); }
.search kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.reset { font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--red); cursor: pointer; padding: 6px; white-space: nowrap; }
.chiprows { display: flex; gap: 24px; flex-wrap: wrap; }
.chiprow { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; align-items: center; max-width: 100%; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow--wide { flex: 1 1 100%; }
.chiprow__label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--red); flex: none; margin-right: 8px; }
.chip { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 6px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; flex: none; transition: background .2s var(--ease), color .2s var(--ease); }
.chip:hover { color: var(--ink); background: var(--soft); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[data-level="basic"][aria-pressed="true"] { background: var(--green); }
.chip[data-level="intermediate"][aria-pressed="true"] { background: var(--blue); }
.chip[data-level="advanced"][aria-pressed="true"] { background: var(--red); }
.chip[data-level="novel"][aria-pressed="true"] { background: var(--gold); color: var(--ink); }

/* Sections and cards */
main { padding: 32px 0 80px; }
.jump { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 20px; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; white-space: nowrap; background: var(--soft); }
.jump a:hover { color: var(--ink); }
.group { margin: 0 0 72px; }
.group__head { margin-bottom: 24px; }
.group__head .kicker { margin-bottom: 8px; }
.group__head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 4vw, 48px); letter-spacing: -1.5px; margin: 0; line-height: 1.05; }
.group__head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card:hover { box-shadow: 0 12px 32px rgba(23,24,28,.08); transform: translateY(-2px); }
.card:target { outline: 3px solid var(--gold); outline-offset: 3px; }
.card__art { display: block; width: 100%; height: 112px; background: var(--soft); }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.18; margin: 0; }
.card p { margin: 0; color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.lv::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.lv--basic { color: var(--green); }
.lv--intermediate { color: var(--blue); }
.lv--advanced { color: var(--red); }
.lv--novel { color: #b07800; }
.prompt { font-family: var(--mono); font-size: 14px; line-height: 1.65; background: var(--soft); border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); margin: 0; }
.prompt mark { background: none; color: var(--blue); font-weight: 600; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; color: var(--ink-2); }
.card__foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; transition: background .2s var(--ease); }
.btn--copy { background: var(--ink); color: #fff; }
.btn--copy.done { background: var(--green); }
.btn--ghost { background: var(--soft); color: var(--ink); }
.btn--ghost:hover { background: var(--line); }
.btn svg { width: 16px; height: 16px; }
.src { font-size: 13px; color: var(--muted); }
.src a { color: var(--muted); }
.empty { text-align: center; padding: 72px 0; color: var(--muted); }
.empty b { display: block; font-family: var(--display); font-size: 28px; color: var(--ink); }

/* The deck's build: rise 48px and fade in */
.rise { opacity: 0; transform: translateY(48px); transition: opacity .38s var(--ease), transform .38s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* Rules and sources */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0 0 64px; }
.rules div { border-top: 4px solid var(--blue); padding-top: 14px; }
.rules div:nth-child(2) { border-color: var(--green); }
.rules div:nth-child(3) { border-color: var(--red); }
.rules b { display: block; font-family: var(--display); font-size: 22px; margin-bottom: 4px; }
.rules p { margin: 0; font-size: 15px; color: var(--ink-2); }
.srclist { columns: 2 320px; column-gap: 32px; padding-left: 18px; margin: 0; font-size: 15px; color: var(--ink-2); }
.srclist li { margin: 0 0 8px; break-inside: avoid; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; align-items: start; }
.foot h4 { font-family: var(--display); font-size: 18px; margin: 0 0 10px; }
.foot p { margin: 0 0 10px; font-size: 15px; color: var(--ink-2); }
.foot a { color: var(--ink); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.foot__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.foot__brand img.boss { width: 44px; height: 44px; }
.foot__brand img.face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 22%; }
.foot__dots { width: 180px; margin-top: 18px; }
.foot__base { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.totop { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.14); opacity: 0; pointer-events: none; transition: opacity .2s; }
.totop.on { opacity: 1; pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: .2s; z-index: 70; pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .anatomy, .rules, .foot__in { grid-template-columns: 1fr; gap: 24px; }
  .brand__txt small { display: none; }
  .hero { padding: 56px 0 40px; }
  .grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  html { scroll-padding-top: 76px; }
  .search kbd { display: none; }
  .chiprows { gap: 8px; flex-direction: column; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .topbar__in { gap: 10px; }
  .brand__txt { font-size: 15px; }
  .tabs a { padding: 8px 9px; font-size: 14px; }
  .count { display: none; }
  .hero__stats { gap: 24px; }
  .hero__stats b { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
}
@media print {
  .topbar, .filters, .totop, .card__foot, .hero__art, .card__art { display: none !important; }
  .card { break-inside: avoid; }
  .rise { opacity: 1; transform: none; }
}
