/* ============================================================
   newtwelve — guides (catalog, sales page, account, reader)
   builds on main.css tokens
   ============================================================ */

/* ---- guide cover (CSS-only product visual) ---- */
.guide-cover {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(90% 70% at 90% 0%, rgba(255, 74, 31, 0.32), transparent 60%),
    radial-gradient(80% 80% at 0% 100%, rgba(108, 92, 231, 0.28), transparent 60%),
    linear-gradient(160deg, #16161d, #0b0b0f);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}
.guide-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 6%);
  pointer-events: none;
}
.guide-cover .cover-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-cover .cover-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(5rem, 13vw, 9.5rem);
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: var(--ink);
}
.guide-cover .cover-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 0.8rem;
}
.guide-cover .cover-title .serif-it { color: var(--accent); }
.guide-cover .cover-foot {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.guide-cover .cover-foot b { font-weight: 700; }
.guide-cover .cover-foot span { color: var(--accent); }
.guide-cover--sm { box-shadow: none; }
.guide-cover--sm .cover-num { font-size: clamp(4rem, 9vw, 6.5rem); }
.guide-cover--sm .cover-title { font-size: clamp(1.15rem, 2vw, 1.5rem); }

/* ---- sales hero ---- */
.guide-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
@media (max-width: 900px) { .guide-hero-grid { grid-template-columns: 1fr; } }
.guide-hero-grid .guide-cover { max-width: 440px; width: 100%; justify-self: end; }
@media (max-width: 900px) { .guide-hero-grid .guide-cover { justify-self: start; max-width: 360px; } }
.buy-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}
.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.03em;
}
.price small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}
.buy-note {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.buy-note a { color: var(--ink-dim); border-bottom: 1px solid var(--line-strong); }
.buy-note a:hover { color: var(--accent); border-color: var(--accent); }

/* ---- what's inside ---- */
.inside-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .inside-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 700px) { .cat-list { grid-template-columns: 1fr; } }
.cat-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.cat-item:nth-child(odd) { padding-right: 2rem; }
.cat-item .service-num { padding-top: 0.3rem; }
.cat-item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.cat-item p { color: var(--muted); font-size: 0.9rem; }

/* ---- hook list (sales samples + reader) ---- */
.hook-list { border-top: 1px solid var(--line); }
.hook {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  gap: clamp(0.8rem, 2vw, 1.8rem);
  align-items: center;
  padding: clamp(1.1rem, 2vw, 1.5rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.hook:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.hook-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-left: 0.2rem;
}
.hook-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.02rem, 1.8vw, 1.3rem);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.hook-meta { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.copy-btn:hover { color: #0a0a0c; background: var(--accent); border-color: var(--accent); }
.copy-btn.is-copied { color: #0a0a0c; background: var(--ink); border-color: var(--ink); }
@media (max-width: 700px) {
  .hook { grid-template-columns: 2.2rem 1fr; align-items: start; }
  .hook-meta { grid-column: 2; justify-content: flex-start; }
}
.hook-locked {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

/* ---- steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--bg-2); padding: clamp(1.5rem, 3vw, 2.2rem); }
.step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin: 0.8rem 0 0.4rem;
}
.step p { color: var(--muted); font-size: 0.92rem; }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 1.5rem; max-width: 60ch; }

/* ---- catalog ---- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 960px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: border-color 0.35s, transform 0.35s var(--ease-out), background 0.35s;
}
.guide-card:hover { border-color: var(--line-strong); transform: translateY(-5px); background: var(--panel-2); }
.guide-card-body { padding: 0 0.6rem 0.6rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.guide-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; letter-spacing: -0.02em; }
.guide-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.guide-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.guide-card-foot .price { font-size: 1.3rem; }
.guide-card--soon {
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  background:
    radial-gradient(70% 90% at 90% 10%, rgba(108, 92, 231, 0.12), transparent 60%),
    var(--panel);
}

/* ---- account ---- */
.account-box {
  max-width: 34rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(70% 120% at 90% 10%, rgba(255, 74, 31, 0.09), transparent 60%),
    var(--panel);
  padding: clamp(1.8rem, 4vw, 2.8rem);
}
.account-box h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.account-box > p { color: var(--muted); margin-bottom: 1.6rem; }
.auth-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.auth-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 1.3rem;
  outline: none;
  transition: border-color 0.3s;
}
.auth-form input[type="email"]:focus { border-color: var(--accent); }
.auth-form .form-status { width: 100%; margin-top: 0.6rem; }
.notice {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--ink-dim);
  margin-bottom: 1.6rem;
  font-size: 0.95rem;
}
.owned-list { border-top: 1px solid var(--line); margin: 0.4rem 0 1.6rem; }
.owned-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.owned-item h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; letter-spacing: -0.015em; }
.owned-actions { display: flex; gap: 1.2rem; align-items: center; }
.text-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  transition: color 0.25s;
}
.text-btn:hover { color: var(--accent); }
[hidden] { display: none !important; }

/* ---- reader ---- */
.reader-hero { padding-bottom: clamp(2rem, 4vw, 3rem); }
.reader-hero h1 { max-width: 18ch; }
.reader-intro p { color: var(--ink-dim); font-size: 1.05rem; line-height: 1.75; margin-bottom: 1.2rem; max-width: 62ch; }
.howto {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 2.4rem;
}
@media (max-width: 1100px) {
  .howto { grid-template-columns: repeat(2, 1fr); }
  .howto > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 620px) { .howto { grid-template-columns: 1fr; } }
.howto > div { background: var(--bg-2); padding: 1.4rem 1.3rem; }
.howto h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; letter-spacing: -0.01em; margin: 0.6rem 0 0.35rem; }
.howto p { color: var(--muted); font-size: 0.88rem; }
.compliance { margin-top: 1.6rem; color: var(--faint); font-size: 0.85rem; max-width: 70ch; }
.compliance b { color: var(--muted); font-weight: 500; }

.reader-toolbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(9, 9, 11, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}
.toolbar-inner { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.reader-search {
  flex: 0 1 300px;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.6rem 1.1rem;
  outline: none;
}
.reader-search:focus { border-color: var(--accent); }
.chips {
  display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  padding-right: 2rem;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 100px;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.is-active { color: #0a0a0c; background: var(--ink); border-color: var(--ink); }
.reader-count { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }

.reader-cat { padding-top: clamp(3rem, 6vw, 4.5rem); scroll-margin-top: 4.5rem; }
.reader-cat-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  align-items: end;
  margin-bottom: 1.4rem;
}
.reader-cat-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.reader-cat-head p { grid-column: 1; color: var(--muted); max-width: 60ch; }
.reader-cat-head .copy-btn { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
@media (max-width: 700px) {
  .reader-cat-head { grid-template-columns: 1fr; }
  .reader-cat-head .copy-btn { grid-column: 1; grid-row: auto; justify-self: start; }
}
.reader-empty { padding: 3rem 0; color: var(--muted); }
.reader-closing {
  margin-top: clamp(4rem, 8vw, 6rem);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: radial-gradient(70% 120% at 90% 10%, rgba(255, 74, 31, 0.09), transparent 60%), var(--panel);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.reader-closing p { font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.4rem); letter-spacing: -0.015em; max-width: 44ch; }
.reader-footnote {
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* keep the reader toolbar clear of the site header when it slides back in */
.reader-toolbar { transition: top 0.45s var(--ease-out); }
body:has(.site-header.is-scrolled:not(.is-hidden)) .reader-toolbar { top: 70px; }

/* ---- playbook extras (yap-style guides) ---- */
.blank {
  display: inline-block;
  width: 3.2em;
  height: 0.9em;
  border-bottom: 2px solid var(--accent);
  vertical-align: baseline;
  margin: 0 0.12em;
}
.hook-example { margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.reader-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 1.2rem; }
.reader-h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.45rem); letter-spacing: -0.02em; margin: clamp(2.4rem, 5vw, 3.4rem) 0 1rem; }
.reader-h3 + .howto { margin-top: 0; }

.contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
@media (max-width: 700px) { .contrast { grid-template-columns: 1fr; } }
.contrast-side { background: var(--bg-2); padding: 1.5rem 1.4rem; }
.contrast-side p { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -0.015em; line-height: 1.3; margin-top: 0.7rem; }
.contrast-side.is-avoid p { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(255, 74, 31, 0.6); }
.contrast-side.is-instead { background: linear-gradient(90deg, var(--accent-soft), transparent 80%), var(--bg-2); }
.contrast-side.is-instead .eyebrow { color: var(--accent); }
.contrast-note { margin-top: 1rem; color: var(--muted); max-width: 64ch; font-size: 0.95rem; }

.howto.anatomy { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .howto.anatomy { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .howto.anatomy { grid-template-columns: 1fr; } }
.anatomy-example {
  margin-top: 1.2rem;
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.3rem;
  display: grid;
  gap: 0.55rem;
}
.anatomy-example .eyebrow { margin-bottom: 0.3rem; }
.anatomy-row { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; }
.anatomy-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.anatomy-row p { color: var(--ink-dim); }

.cat-tagline { font-size: 0.62em; color: var(--muted); letter-spacing: -0.01em; }
.cat-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 3rem;
  align-items: start;
  margin: 0.4rem 0 1.6rem;
}
@media (max-width: 800px) { .cat-info { grid-template-columns: 1fr; } }
.cat-bestfor .eyebrow { margin-bottom: 0.7rem; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cat-tags .tag { white-space: normal; }
.cat-example {
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink);
}

.repurpose-grid {
  display: grid;
  grid-template-columns: 9rem repeat(var(--cols, 3), 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.repurpose-grid > div { background: var(--bg-2); padding: 1.1rem 1.2rem; }
.rp-colhead, .rp-rowhead, .rp-cell-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.rp-colhead { color: var(--accent); }
.rp-rowhead { color: var(--ink); font-size: 0.68rem; }
.rp-cell p { color: var(--ink-dim); font-size: 0.93rem; line-height: 1.5; }
.rp-cell-label { display: none; color: var(--accent); margin-bottom: 0.3rem; }
@media (max-width: 800px) {
  .repurpose-grid { grid-template-columns: 1fr; }
  .rp-corner, .rp-colhead { display: none; }
  .rp-rowhead { padding-top: 1.6rem !important; }
  .rp-cell-label { display: block; }
}
@media (max-width: 860px) {
  .reader-search { flex: 1 1 0; }
  .chips { order: 3; flex: 1 1 100%; }
}
