/* resources.css — styles for /resources (index + guide pages).
   Loaded after commitcontrol.css; reuses its theme-aware variables so the
   library renders correctly in light and dark. No new colours introduced. */

/* ─── Resource index: card grid ─────────────────────────── */
.res-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 8px 0 24px;
}
.res-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.res-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(10, 99, 255, .10);
}
.res-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-tint);
  padding: 5px 10px; border-radius: 999px; margin-bottom: 16px;
}
.res-card h3 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 21px; letter-spacing: -.02em; line-height: 1.2;
  color: var(--ink-900); margin-bottom: 10px;
}
.res-card p { color: var(--ink-500); font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
.res-card .res-open {
  margin-top: auto; font-size: 14px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 7px;
}
.res-card .res-open .arrow { transition: transform .15s; }
.res-card:hover .res-open .arrow { transform: translateX(3px); }

/* ─── Guide page: two-column layout ─────────────────────── */
.guide-body { padding: 8px 0 72px; }
.guide-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start;
}
.guide-main { min-width: 0; }
.guide-main h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 24px; letter-spacing: -.02em; color: var(--ink-900);
  margin: 40px 0 12px;
}
.guide-main h2:first-child { margin-top: 0; }
.guide-main p { color: var(--ink-700); font-size: 16px; line-height: 1.65; margin-bottom: 16px; }
.guide-main ul { margin: 0 0 16px; padding-left: 4px; list-style: none; }
.guide-main ul li {
  position: relative; padding-left: 26px; margin-bottom: 12px;
  color: var(--ink-700); font-size: 16px; line-height: 1.55;
}
.guide-main ul li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 8px; height: 8px;
  border-radius: 2px; background: var(--primary);
}
.guide-kicker {
  border-left: 3px solid var(--primary); padding: 4px 0 4px 18px; margin: 0 0 28px;
}
.guide-kicker span {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-400);
}
.guide-kicker p { color: var(--ink-500); font-size: 15px; margin: 4px 0 0; }

/* Inside-the-guide contents preview */
.guide-toc { background: var(--ink-100); border-radius: 14px; padding: 24px 26px; margin: 28px 0; }
.guide-toc h3 { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 14px; }
.guide-toc ol { margin: 0; padding-left: 20px; color: var(--ink-800); }
.guide-toc ol li { margin-bottom: 8px; font-size: 15px; line-height: 1.5; }

/* ─── The gate card (sticky) ────────────────────────────── */
.gate-card {
  position: sticky; top: 92px;
  background: var(--surface); border: 1px solid var(--ink-200);
  border-radius: 18px; padding: 30px; box-shadow: 0 8px 28px rgba(10, 22, 40, .06);
}
.gate-card .gate-lede { font-size: 14px; color: var(--ink-500); margin-bottom: 4px; }
.gate-card h3 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 22px;
  letter-spacing: -.02em; color: var(--ink-900); margin-bottom: 18px; line-height: 1.2;
}
.gate-field { margin-bottom: 14px; }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate-field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-700);
  margin-bottom: 6px; letter-spacing: .01em;
}
.gate-field input, .gate-field select {
  width: 100%; height: 44px; padding: 0 13px; font-family: inherit; font-size: 14px;
  color: var(--ink-900); background: var(--bg);
  border: 1px solid var(--ink-200); border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
.gate-field input:focus, .gate-field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint);
}
.gate-field input[aria-invalid="true"], .gate-field select[aria-invalid="true"] { border-color: var(--danger); }
.gate-err { display: block; color: var(--danger); font-size: 12px; margin-top: 5px; min-height: 1px; }
.gate-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gate-card .btn { width: 100%; margin-top: 6px; }
.gate-turnstile { margin: 14px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gate-turnstile [data-turnstile-msg] { font-size: 12px; color: var(--danger); }
.gate-fineprint { font-size: 12px; color: var(--ink-400); line-height: 1.5; margin-top: 14px; text-align: center; }

/* Success panel (revealed after submit) */
.rg-success { text-align: center; padding: 8px 0; }
.rg-success .rg-check {
  width: 52px; height: 52px; border-radius: 14px; background: var(--teal-tint);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.rg-success h3 { font-family: "Fraunces", Georgia, serif; font-size: 21px; color: var(--ink-900); margin-bottom: 8px; }
.rg-success p { font-size: 14px; color: var(--ink-500); margin-bottom: 20px; line-height: 1.55; }

/* ─── Upsell + tier-why block (bottom of guide) ─────────── */
.guide-upsell {
  margin-top: 64px; padding: 44px; border-radius: 20px;
  background: var(--ink-900); color: var(--ink-100);
}
:root[data-theme="oled"] .guide-upsell {
  background: var(--surface); border: 1px solid var(--ink-200);
}
.guide-upsell .eyebrow { color: var(--primary-light); }
.guide-upsell h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 28px;
  letter-spacing: -.02em; color: #fff; margin: 10px 0 12px; line-height: 1.15;
}
:root[data-theme="oled"] .guide-upsell h2 { color: var(--ink-900); }
.guide-upsell > p { color: var(--ink-300); font-size: 16px; max-width: 60ch; margin-bottom: 28px; line-height: 1.6; }
.tier-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.tier-why .tier {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px; padding: 20px;
}
:root[data-theme="oled"] .tier-why .tier {
  background: var(--bg); border-color: var(--ink-200);
}
.tier-why .tier .tier-name { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-light); margin-bottom: 8px; }
.tier-why .tier .tier-price { font-size: 15px; color: var(--ink-300); margin-bottom: 10px; }
:root[data-theme="oled"] .tier-why .tier .tier-price { color: var(--ink-500); }
.tier-why .tier .tier-line { font-size: 14px; line-height: 1.5; color: #fff; }
:root[data-theme="oled"] .tier-why .tier .tier-line { color: var(--ink-800); }
.guide-upsell .btn-primary { background: var(--primary); color: #fff; }
.guide-upsell .btn-primary:hover { background: var(--primary-dark); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .guide-grid { grid-template-columns: 1fr; gap: 36px; }
  .gate-card { position: static; }
  .res-grid { grid-template-columns: 1fr; }
  .tier-why { grid-template-columns: 1fr; }
  .guide-upsell { padding: 32px 24px; }
}
