/* ===========================================================
   LOCKED — GUIDE EDITORIAL SYSTEM (APPROVED)
   Do not casually redesign. Treat like hubs / bond pages:
   structure and Tier2 schema wiring via layout --site-* are frozen.

   Guides = brief (read & understand). Hubs = find & file.
   Paper accents match hub Tier1 chrome; hero may use lighter Tier2 gradient.

   Reference pattern: License & Permit Bond Guide
   (src/hubs/license-permit-bond-guide.md → .guide-ed.guide-ed--license).
   Other guides follow .guide-ed + category theme from themes.js /
   commonPages. Bond-page and hub-editorial are locked separately.
   =========================================================== */

.guide-ed *,
.guide-ed *::before,
.guide-ed *::after{
  box-sizing:border-box;
}

.guide-ed{
  /* Token roles match locked hub-editorial (Tier1 accents on paper). */
  --guide-ink:#0f172a;
  --guide-muted:#334155;
  --guide-line:color-mix(in srgb,var(--guide-ink) 18%,var(--guide-border,#c0caf0));
  --guide-paper:#ffffff;
  --guide-paper-soft:var(--site-soft,#f3f5fc);
  --guide-paper-deep:var(--site-soft-2,#e8ecf8);
  --guide-accent:var(--site-accent,#b4c4ff);
  --guide-accent-dark:var(--site-accent-dark,color-mix(in srgb,var(--guide-accent) 45%,#0b1220));
  --guide-accent-on-paper:var(--site-accent-strong,#1a2a8a);
  --guide-accent-soft:color-mix(in srgb,var(--guide-accent-on-paper) 32%,transparent);
  --guide-accent-wash:color-mix(in srgb,var(--guide-accent-on-paper) 9%,transparent);
  --guide-accent-soft-on-dark:color-mix(in srgb,var(--guide-accent) 45%,transparent);
  --guide-hover:var(--site-hover,#6b7fe0);
  --guide-border:var(--site-border,#c0caf0);
  --guide-hero-gradient:var(--site-gradient,linear-gradient(135deg,#05071a 0%,#0c1648 26%,#1a2a8a 55%,#2438b8 78%,#3550e0 100%));
  --guide-max:720px;
  --guide-max-wide:960px;

  color:var(--guide-ink);
  font-family:inherit;
  margin:0 calc(-50vw + 50%);
  width:100vw;
  padding:0;
  background:var(--guide-paper);
}

.guide-ed .guide-inner{
  max-width:var(--guide-max);
  margin:0 auto;
  padding:0 24px;
}

.guide-ed .guide-inner--wide{
  max-width:var(--guide-max-wide);
}

/* ----- Hero (quiet brief opening) ----- */

.guide-ed .guide-hero{
  background-color:#05071a;
  background-image:
    radial-gradient(ellipse 65% 70% at 90% 10%,color-mix(in srgb,var(--guide-accent) 22%,transparent) 0%,transparent 55%),
    var(--guide-hero-gradient);
  padding:clamp(52px,7vh,80px) 0 clamp(44px,6vh,64px);
  position:relative;
}

.guide-ed .guide-hero::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:3px;
  background:linear-gradient(90deg,var(--guide-accent) 0%,color-mix(in srgb,var(--guide-accent) 30%,transparent) 45%,transparent 100%);
}

.guide-ed .guide-eyebrow{
  margin:0 0 16px;
  color:var(--guide-accent-on-paper);
  font-size:11px;
  font-weight:700;
  letter-spacing:.16em;
  line-height:1.4;
  text-transform:uppercase;
}

.guide-ed .guide-hero .guide-eyebrow{
  color:var(--guide-accent);
}

.guide-ed .guide-hero h1{
  max-width:16em;
  margin:0 0 16px!important;
  color:#fff!important;
  font-family:Georgia,"Times New Roman",Times,serif!important;
  font-size:clamp(1.75rem,2.8vw,2.4rem)!important;
  font-weight:500!important;
  line-height:1.18!important;
  letter-spacing:-.02em;
}

.guide-ed .guide-lede{
  max-width:46ch;
  margin:0 0 24px;
  color:rgba(230,236,255,.82);
  font-size:1.0625rem;
  font-weight:400;
  line-height:1.65;
}

.guide-ed .guide-hero-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:16px 28px;
}

.guide-ed .guide-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 26px;
  border:1px solid #fff;
  border-radius:2px;
  background:#fff;
  color:var(--guide-ink)!important;
  font-size:.9375rem;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.2;
  text-decoration:none!important;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}

.guide-ed .guide-btn:hover{
  background:var(--guide-accent);
  border-color:var(--guide-accent);
  color:var(--guide-ink)!important;
}

.guide-ed .guide-btn-ghost{
  color:rgba(230,236,255,.88)!important;
  font-size:.875rem;
  font-weight:500;
  text-decoration:none!important;
  border-bottom:1px solid var(--guide-accent-soft-on-dark);
  padding-bottom:2px;
}

.guide-ed .guide-btn-ghost:hover{
  color:#fff!important;
  border-bottom-color:var(--guide-accent);
}

/* ----- Quiet anchors (not floating TOC) ----- */

.guide-ed .guide-anchors{
  border-bottom:1px solid var(--guide-line);
  background:var(--guide-paper);
}

.guide-ed .guide-anchors-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px 24px;
  margin:0;
  padding:16px 0;
  list-style:none;
}

.guide-ed .guide-anchors a{
  color:var(--guide-muted);
  font-size:.8125rem;
  font-weight:600;
  letter-spacing:.03em;
  text-decoration:none;
}

.guide-ed .guide-anchors a:hover{
  color:var(--guide-accent-on-paper);
}

/* ----- Sections ----- */

.guide-ed .guide-sec{
  padding:clamp(24px,3.5vh,36px) 0;
  background:var(--guide-paper);
}

.guide-ed .guide-sec + .guide-sec{
  border-top:1px solid var(--guide-line);
}

.guide-ed .guide-sec-soft{
  background:var(--guide-paper-soft);
  /* Same soft-section rule as hubs — readable on periwinkle/cream paper. */
  --guide-line:color-mix(in srgb,var(--guide-ink) 22%,var(--guide-border));
}

.guide-ed .guide-sec .guide-eyebrow{
  color:var(--guide-accent-on-paper);
}

.guide-ed .guide-sec h2{
  max-width:18em;
  margin:0 0 12px!important;
  color:var(--guide-ink)!important;
  font-family:Georgia,"Times New Roman",Times,serif!important;
  font-size:clamp(1.35rem,2vw,1.7rem)!important;
  font-weight:500!important;
  line-height:1.22!important;
  letter-spacing:-.015em;
}

.guide-ed .guide-desc{
  max-width:52ch;
  margin:0 0 16px;
  color:var(--guide-muted);
  font-size:1rem;
  line-height:1.7;
}

/* Reading prose */

.guide-ed .guide-prose{
  max-width:60ch;
  margin:0;
  color:var(--guide-ink);
  font-size:1.015625rem;
  line-height:1.75;
}

.guide-ed .guide-prose + .guide-prose,
.guide-ed .guide-prose--spaced{
  margin-top:1.25em;
}

.guide-ed .guide-prose a{
  color:var(--guide-accent-on-paper);
  font-weight:600;
  text-decoration:none;
  border-bottom:1px solid var(--guide-accent-soft);
}

.guide-ed .guide-prose a:hover{
  border-bottom-color:var(--guide-hover);
}

/* Plain lists (no check emoji / pills) */

.guide-ed .guide-list{
  margin:8px 0 0;
  padding:0;
  list-style:none;
  max-width:52ch;
}

.guide-ed .guide-list li{
  position:relative;
  padding:14px 0;
  border-top:1px solid var(--guide-line);
  color:var(--guide-ink);
  font-size:.96875rem;
  line-height:1.55;
}

.guide-ed .guide-list li:first-child{
  border-top:2px solid var(--guide-accent-soft);
}

.guide-ed .guide-list li:last-child{
  border-bottom:1px solid var(--guide-line);
}

.guide-ed .guide-list--tight li{
  padding:8px 0;
}

/* Industry / topic chips as plain text rows */

.guide-ed .guide-topics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 40px;
  margin:8px 0 0;
  padding:0;
  list-style:none;
}

.guide-ed .guide-topics li{
  padding:14px 0;
  border-top:1px solid var(--guide-line);
  color:var(--guide-ink);
  font-size:.9375rem;
  font-weight:600;
  line-height:1.4;
}

.guide-ed .guide-topics li:nth-child(-n+2){
  border-top:2px solid var(--guide-accent-soft);
}

.guide-ed .guide-topics li:nth-last-child(-n+2){
  border-bottom:1px solid var(--guide-line);
}

/* Process steps — editorial, not cards */

.guide-ed .guide-steps{
  margin:12px 0 0;
  padding:0;
  list-style:none;
  counter-reset:guide-step;
}

.guide-ed .guide-steps li{
  display:grid;
  grid-template-columns:2.5rem minmax(0,1fr);
  gap:12px 16px;
  padding:20px 0;
  border-top:1px solid var(--guide-line);
  counter-increment:guide-step;
}

.guide-ed .guide-steps li:first-child{
  border-top:2px solid var(--guide-accent-soft);
}

.guide-ed .guide-steps li:last-child{
  border-bottom:1px solid var(--guide-line);
}

.guide-ed .guide-steps li::before{
  content:counter(guide-step);
  color:var(--guide-accent-on-paper);
  font-family:Georgia,"Times New Roman",Times,serif;
  font-size:1.25rem;
  font-weight:500;
  line-height:1.2;
}

.guide-ed .guide-step-title{
  margin:0 0 4px;
  color:var(--guide-ink);
  font-size:1.015625rem;
  font-weight:600;
  line-height:1.35;
}

.guide-ed .guide-step-body{
  margin:0;
  color:var(--guide-muted);
  font-size:.875rem;
  line-height:1.55;
}

/* Restrained callout / trust moment */

.guide-ed .guide-callout{
  margin:28px 0 0;
  padding:20px 0 0;
  border-top:2px solid var(--guide-accent-on-paper);
  max-width:52ch;
}

.guide-ed .guide-callout--flush{
  margin-top:0;
  padding-top:0;
  border-top:none;
}

.guide-ed .guide-callout-label{
  margin:0 0 8px;
  color:var(--guide-accent-on-paper);
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.guide-ed .guide-callout p{
  margin:0;
  color:var(--guide-ink);
  font-family:Georgia,"Times New Roman",Times,serif;
  font-size:1.125rem;
  font-weight:500;
  line-height:1.55;
}

/* Related / type index — editorial rows */

.guide-ed .guide-resource{
  margin:0;
  padding:0;
  list-style:none;
}

.guide-ed .guide-resource li{
  border-top:1px solid var(--guide-line);
}

.guide-ed .guide-resource li:first-child{
  border-top:2px solid var(--guide-accent-soft);
}

.guide-ed .guide-resource li:last-child{
  border-bottom:1px solid var(--guide-line);
}

.guide-ed .guide-resource a{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:baseline;
  padding:16px 0;
  text-decoration:none;
  color:inherit;
}

.guide-ed .guide-resource-title{
  margin:0 0 4px;
  color:var(--guide-ink);
  font-size:1rem;
  font-weight:600;
}

.guide-ed .guide-resource-summary{
  margin:0;
  max-width:48ch;
  color:var(--guide-muted);
  font-size:.875rem;
  line-height:1.5;
}

.guide-ed .guide-resource-action{
  color:var(--guide-accent-on-paper);
  font-size:.8125rem;
  font-weight:600;
  white-space:nowrap;
}

.guide-ed .guide-resource a:hover .guide-resource-title{
  color:var(--guide-accent-on-paper);
}

.guide-ed .guide-resource a:hover .guide-resource-action{
  color:var(--guide-hover);
}

/* Glossary / definition blocks */

.guide-ed .guide-term{
  margin:0;
  padding:16px 0;
  border-top:1px solid var(--guide-line);
}

.guide-ed .guide-term:first-of-type{
  border-top:2px solid var(--guide-accent-soft);
}

.guide-ed .guide-term:last-of-type{
  border-bottom:1px solid var(--guide-line);
}

.guide-ed .guide-term dt{
  margin:0 0 4px;
  color:var(--guide-ink);
  font-size:1rem;
  font-weight:600;
  line-height:1.35;
}

.guide-ed .guide-term dd{
  margin:0;
  max-width:52ch;
  color:var(--guide-muted);
  font-size:.90625rem;
  line-height:1.55;
}

.guide-ed .guide-letter{
  margin:28px 0 8px;
  color:var(--guide-accent-on-paper);
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.guide-ed .guide-letter:first-child{
  margin-top:0;
}

/* Closing CTA */

.guide-ed .guide-close{
  padding:clamp(36px,5.5vh,56px) 0;
  border-top:3px solid var(--guide-hover);
  background:
    radial-gradient(ellipse 50% 80% at 0% 100%,var(--guide-accent-wash) 0%,transparent 55%),
    var(--guide-paper-deep);
}

.guide-ed .guide-close .guide-eyebrow{
  color:var(--guide-accent-on-paper);
}

.guide-ed .guide-close h2{
  max-width:16em;
  margin:0 0 12px!important;
  color:var(--guide-ink)!important;
  font-family:Georgia,"Times New Roman",Times,serif!important;
  font-size:clamp(1.35rem,2vw,1.7rem)!important;
  font-weight:500!important;
  line-height:1.22!important;
}

.guide-ed .guide-close .guide-desc{
  margin-bottom:24px;
}

.guide-ed .guide-close .guide-btn{
  background:var(--guide-ink);
  border-color:var(--guide-ink);
  color:#fff!important;
}

.guide-ed .guide-close .guide-btn:hover{
  background:var(--guide-accent-on-paper);
  border-color:var(--guide-hover);
  color:#fff!important;
}

.guide-ed .guide-close-meta{
  margin:16px 0 0;
  color:var(--guide-muted);
  font-size:.8125rem;
  line-height:1.55;
}

.guide-ed .guide-close-meta a{
  color:var(--guide-ink);
  text-decoration:none;
  border-bottom:1px solid var(--guide-hover);
}

@media (max-width:720px){
  .guide-ed .guide-topics{
    grid-template-columns:1fr;
  }

  .guide-ed .guide-topics li:nth-child(-n+2){
    border-top:1px solid var(--guide-line);
  }

  .guide-ed .guide-topics li:first-child{
    border-top:2px solid var(--guide-accent-soft);
  }

  .guide-ed .guide-topics li:nth-last-child(-n+2){
    border-bottom:none;
  }

  .guide-ed .guide-topics li:last-child{
    border-bottom:1px solid var(--guide-line);
  }

  .guide-ed .guide-resource a{
    grid-template-columns:1fr;
    gap:6px;
  }

  .guide-ed .guide-hero{
    padding:44px 0 40px;
  }

  .guide-ed .guide-sec{
    padding:28px 0;
  }

  .guide-ed .guide-close{
    padding:32px 0;
  }
}
