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

   Reference pattern: License & Permit Bond Hub
   (src/hubs/license-permit-bond-hub.md → .hub-ed.hub-ed--license).
   Other category hubs follow .hub-ed + category theme from
   themes.js / commonPages. Bond-page.css / bond-page.njk are
   locked separately — do not touch them here.
   =========================================================== */

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

.hub-ed{
  /* Defaults = License & Permit Tier1; themed pages override via body --site-* */
  --hub-ink:#0f172a;
  /* Slate-700: AA on soft periwinkle (#f3f5fc / #e8ecf8); #475569 felt washed there. */
  --hub-muted:#334155;
  --hub-line:color-mix(in srgb,var(--hub-ink) 12%,transparent);
  --hub-paper:#ffffff;
  --hub-paper-soft:var(--site-soft,#f3f5fc);
  --hub-paper-deep:var(--site-soft-2,#e8ecf8);
  /* Schema roles: light accent on dark only; strong chrome on paper. */
  --hub-accent:var(--site-accent,#b4c4ff);
  --hub-accent-dark:var(--site-accent-dark,color-mix(in srgb,var(--hub-accent) 45%,#0b1220));
  /* Paper labels/links: #1a2a8a (chromeAccent) — clears AA; periwinkle does not. */
  --hub-accent-on-paper:var(--site-accent-strong,#1a2a8a);
  --hub-accent-soft:color-mix(in srgb,var(--hub-accent-on-paper) 32%,transparent);
  --hub-accent-wash:color-mix(in srgb,var(--hub-accent-on-paper) 9%,transparent);
  --hub-accent-soft-on-dark:color-mix(in srgb,var(--hub-accent) 45%,transparent);
  --hub-hover:var(--site-hover,#6b7fe0);
  --hub-border:var(--site-border,#c0caf0);
  --hub-hero-gradient:var(--site-gradient,linear-gradient(135deg,#05071a 0%,#0c1648 26%,#1a2a8a 55%,#2438b8 78%,#3550e0 100%));
  --hub-max:1040px;

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

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

/* ----- Hero ----- */

.hub-ed .hub-hero{
  background-color:#05071a;
  background-image:
    radial-gradient(ellipse 65% 70% at 90% 10%,color-mix(in srgb,var(--hub-accent) 22%,transparent) 0%,transparent 55%),
    var(--hub-hero-gradient);
  padding:clamp(48px,7vh,76px) 0 clamp(40px,5.5vh,60px);
  position:relative;
}

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

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

/* Light accent only on the dark hero */
.hub-ed .hub-hero .hub-eyebrow{
  color:var(--hub-accent);
}

.hub-ed .hub-hero h1{
  max-width:15em;
  margin:0 0 16px!important;
  color:#fff!important;
  font-family:Georgia,"Times New Roman",Times,serif!important;
  font-size:clamp(1.85rem,3vw,2.65rem)!important;
  font-weight:500!important;
  line-height:1.15!important;
  letter-spacing:-.02em;
}

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

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

.hub-ed .hub-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:14px 28px;
  border:1px solid #fff;
  border-radius:2px;
  background:#fff;
  color:var(--hub-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;
}

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

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

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

/* ----- In-page anchors (quiet strip, not floating card) ----- */

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

.hub-ed .hub-anchors-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px 28px;
  margin:0;
  padding:14px 0;
  list-style:none;
}

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

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

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

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

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

.hub-ed .hub-sec-soft{
  background:var(--hub-paper-soft);
  /* 12% ink washes out on periwinkle soft paper; lean toward schema border. */
  --hub-line:color-mix(in srgb,var(--hub-ink) 22%,var(--hub-border));
}

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

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

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

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

.hub-ed .hub-prose + .hub-prose{
  margin-top:1em;
}

.hub-ed .hub-note{
  max-width:56ch;
  margin:20px 0 0;
  padding-top:16px;
  border-top:1px solid var(--hub-line);
  color:var(--hub-muted);
  font-size:.875rem;
  line-height:1.6;
}

.hub-ed .hub-placeholder{
  max-width:56ch;
  margin:0;
  padding:20px 0 0;
  border-top:1px solid var(--hub-line);
  color:var(--hub-muted);
  font-size:.875rem;
  font-style:italic;
  line-height:1.6;
}

/* ----- Pathfinder (jump into groups) ----- */

.hub-ed .hub-paths{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:12px 0 0;
  padding:0;
  list-style:none;
}

.hub-ed .hub-paths a{
  display:block;
  padding:18px 18px 18px 16px;
  border:1px solid var(--hub-border);
  border-left:3px solid var(--hub-accent-soft);
  background:var(--hub-paper);
  color:var(--hub-ink);
  font-size:.9375rem;
  font-weight:600;
  line-height:1.35;
  text-decoration:none;
  transition:border-color .15s ease,background .15s ease;
}

.hub-ed .hub-paths a span{
  display:block;
  margin-top:6px;
  color:var(--hub-muted);
  font-size:.8125rem;
  font-weight:400;
  line-height:1.45;
}

.hub-ed .hub-paths a:hover{
  background:var(--hub-accent-wash);
  border-color:var(--hub-hover);
  border-left-color:var(--hub-hover);
}

.hub-ed .hub-paths a:hover span{
  color:var(--hub-ink);
}

/* ----- Featured entries ----- */

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

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

.hub-ed .hub-feature a{
  display:block;
  padding:20px 0;
  text-decoration:none;
  color:inherit;
}

.hub-ed .hub-feature .hub-index-title{
  font-family:Georgia,"Times New Roman",Times,serif;
  font-size:1.125rem;
  font-weight:500;
}

.hub-ed .hub-feature a:hover .hub-index-title{
  color:var(--hub-accent-on-paper);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-color:var(--hub-hover);
}

/* ----- Grouped library ----- */

.hub-ed .hub-group{
  margin:0 0 24px;
}

.hub-ed .hub-group:last-child{
  margin-bottom:0;
}

.hub-ed .hub-group-title{
  margin:0 0 4px;
  padding-bottom:10px;
  border-bottom:2px solid var(--hub-accent-soft);
  color:var(--hub-accent-on-paper);
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.hub-ed .hub-group-title-link{
  color:inherit;
  text-decoration:none;
}

.hub-ed .hub-group-title-link:hover{
  color:var(--hub-ink);
}

.hub-ed .hub-group-intro{
  margin:0 0 8px;
  color:var(--hub-muted);
  font-size:.875rem;
  line-height:1.5;
}

.hub-ed .hub-index{
  margin:0;
  padding:0;
  list-style:none;
}

.hub-ed .hub-index--split{
  columns:2;
  column-gap:48px;
}

.hub-ed .hub-index--split .hub-index-item{
  break-inside:avoid;
}

.hub-ed .hub-index-item{
  border-top:1px solid var(--hub-line);
}

.hub-ed .hub-index-item:last-child{
  border-bottom:1px solid var(--hub-line);
}

.hub-ed .hub-index--split .hub-index-item:last-child{
  border-bottom:1px solid var(--hub-line);
}

.hub-ed .hub-index-link{
  display:block;
  padding:14px 0;
  text-decoration:none;
  color:inherit;
}

.hub-ed .hub-index-link:hover .hub-index-title{
  color:var(--hub-accent-on-paper);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-color:var(--hub-hover);
}

.hub-ed .hub-index-title{
  margin:0 0 3px;
  color:var(--hub-ink);
  font-size:.96875rem;
  font-weight:600;
  line-height:1.35;
  letter-spacing:-.01em;
}

.hub-ed .hub-index-summary{
  margin:0;
  max-width:48ch;
  color:var(--hub-muted);
  font-size:.8125rem;
  font-weight:400;
  line-height:1.5;
}

/* ----- Guide cards as editorial rows ----- */

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

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

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

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

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

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

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

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

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

/* ----- Guide / resource index ----- */

.hub-ed .hub-link-list{
  margin:0;
  padding:0;
  list-style:none;
  columns:2;
  column-gap:48px;
}

.hub-ed .hub-link-list li{
  break-inside:avoid;
  border-top:1px solid var(--hub-line);
}

.hub-ed .hub-link-list a{
  display:block;
  padding:14px 0;
  color:var(--hub-ink);
  font-size:.9375rem;
  font-weight:500;
  line-height:1.4;
  text-decoration:none;
}

.hub-ed .hub-link-list a:hover{
  color:var(--hub-ink);
  text-decoration:underline;
  text-underline-offset:3px;
}

/* ----- Closing CTA ----- */

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

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

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

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

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

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

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

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

/* Category class hooks (.hub-ed--license, etc.) are optional;
   palette comes from .hub-ed --site-* / --hub-* injected by layout
   from themes.js (header stays warm factory chrome). */

@media (max-width:900px){
  .hub-ed .hub-paths,
  .hub-ed .hub-feature{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:720px){
  .hub-ed .hub-link-list,
  .hub-ed .hub-index--split{
    columns:1;
  }

  .hub-ed .hub-paths,
  .hub-ed .hub-feature{
    grid-template-columns:1fr;
  }

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

  .hub-ed .hub-hero{
    padding:40px 0 36px;
  }

  .hub-ed .hub-sec{
    padding:22px 0;
  }

  .hub-ed .hub-close{
    padding:28px 0;
  }
}
