/* KyroSphere Editorial Pages - Stage C
   Light magazine layout. Accra Gold accent sparingly. */

:root {
  --ed-bg: #FCFAF7;
  --ed-bg-soft: #F5F1EA;
  --ed-card: #FFFFFF;
  --ed-text: #1A1523;
  --ed-text-2: #3D3832;
  --ed-muted: #7A746C;
  --ed-border: rgba(26, 21, 35, 0.10);
  --ed-border-strong: rgba(26, 21, 35, 0.16);
  --ed-brand: #6B21D4;
  --ed-brand-hover: #5A1BB4;
  --ed-brand-soft: rgba(107, 33, 212, 0.08);
  --ed-accent: #f59e0b;
  --ed-max-article: 760px;
  --ed-max-layout: 1120px;
  --ed-nav-h: 72px;
  --ed-radius: 4px;
  --ed-radius-btn: 2px;
  --ed-radius-panel: 6px;
  --ed-shadow: 0 8px 28px rgba(26, 21, 35, 0.06);
  --ed-font-display: "Cormorant Garamond", Georgia, serif;
  --ed-font-body: "Instrument Sans", system-ui, sans-serif;
  --ed-font-ui: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.editorial-page {
  font-family: var(--ed-font-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ed-text);
  background: var(--ed-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ed-brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ed-brand-hover); }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

.ed-container {
  width: min(100% - 2rem, var(--ed-max-layout));
  margin-inline: auto;
}

/* -- Nav -- */
.ed-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--ed-nav-h);
  display: flex;
  align-items: center;
  background: rgba(252, 250, 247, 0.94);
  border-bottom: 1px solid var(--ed-border);
  backdrop-filter: blur(12px);
}
.ed-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--ed-max-layout));
  margin-inline: auto;
}
.ed-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ed-text);
}
.ed-logo img { width: 36px; height: 36px; object-fit: contain; }
.ed-logo span {
  font-family: var(--ed-font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
.ed-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ed-nav-links a {
  font-family: var(--ed-font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ed-text-2);
  text-decoration: none;
}
.ed-nav-links a:hover { color: var(--ed-brand); }
.ed-nav-cta {
  font-family: var(--ed-font-ui) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--ed-brand);
  padding: 0.55rem 0.9rem;
  border-radius: var(--ed-radius-btn);
}
.ed-nav-cta:hover { background: var(--ed-brand-hover); color: #fff !important; }
.ed-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.ed-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ed-text);
}

/* -- Breadcrumb -- */
.ed-crumb {
  font-family: var(--ed-font-ui);
  font-size: 0.8125rem;
  color: var(--ed-muted);
  padding: 1.25rem 0 0.5rem;
}
.ed-crumb a { color: var(--ed-muted); text-decoration: none; }
.ed-crumb a:hover { color: var(--ed-brand); }
.ed-crumb span[aria-current="page"] { color: var(--ed-text-2); }

/* -- Hero -- */
.ed-hero {
  padding: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--ed-border);
}
.ed-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: end;
}
.ed-kicker {
  font-family: var(--ed-font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-brand);
  margin-bottom: 0.85rem;
}
.ed-hero h1 {
  font-family: var(--ed-font-display);
  font-weight: 400;
  font-size: clamp(2.375rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  color: var(--ed-text);
  margin-bottom: 1rem;
  max-width: 18ch;
}
.ed-lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ed-text-2);
  max-width: 38em;
  margin-bottom: 1.25rem;
}
.ed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-family: var(--ed-font-ui);
  font-size: 0.8125rem;
  color: var(--ed-muted);
  margin-bottom: 1.5rem;
}
.ed-meta strong { color: var(--ed-text-2); font-weight: 500; }
.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ed-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  padding: 0.9rem 1.35rem;
  border-radius: var(--ed-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.ed-btn-primary {
  background: var(--ed-brand);
  color: #fff !important;
}
.ed-btn-primary:hover {
  background: var(--ed-brand-hover);
  transform: translateY(-1px);
}
.ed-btn-ghost {
  background: transparent;
  color: var(--ed-text) !important;
  border-color: var(--ed-border-strong);
}
.ed-btn-ghost:hover { border-color: var(--ed-brand); color: var(--ed-brand) !important; }
.ed-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ed-hero-figure { margin: 0; }
.ed-hero-figure picture,
.ed-hero-figure img {
  width: 100%;
  border-radius: var(--ed-radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ed-bg-soft);
}
.ed-caption {
  font-family: var(--ed-font-ui);
  font-size: 0.75rem;
  color: var(--ed-muted);
  margin-top: 0.6rem;
  line-height: 1.45;
}

/* -- Layout shell -- */
.ed-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--ed-max-article)) minmax(220px, 280px);
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}
.ed-main { min-width: 0; }

/* -- At a glance -- */
.ed-glance {
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 1.35rem 1.5rem;
  margin: 0 0 2rem;
  box-shadow: var(--ed-shadow);
}
.ed-glance h2 {
  font-family: var(--ed-font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.85rem;
}
.ed-glance dl {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 0.55rem 1rem;
}
.ed-glance dt {
  font-family: var(--ed-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.ed-glance dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ed-text-2);
  line-height: 1.45;
}

/* -- Article prose -- */
.ed-article h2 {
  font-family: var(--ed-font-display);
  font-size: clamp(1.75rem, 2.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 2.5rem 0 0.85rem;
  scroll-margin-top: calc(var(--ed-nav-h) + 1rem);
}
.ed-article h3 {
  font-family: var(--ed-font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 1.75rem 0 0.6rem;
  scroll-margin-top: calc(var(--ed-nav-h) + 1rem);
}
.ed-article p {
  margin-bottom: 1rem;
  color: var(--ed-text-2);
  max-width: 68ch;
}
.ed-article ul,
.ed-article ol {
  margin: 0 0 1.25rem;
  color: var(--ed-text-2);
  max-width: 68ch;
}
.ed-figure {
  margin: 1.75rem 0 2rem;
}
.ed-figure img,
.ed-figure picture img {
  width: 100%;
  border-radius: var(--ed-radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* -- Callouts -- */
.ed-callout {
  border-left: 3px solid var(--ed-brand);
  background: var(--ed-brand-soft);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--ed-radius) var(--ed-radius) 0;
  max-width: 68ch;
}
.ed-callout strong {
  display: block;
  font-family: var(--ed-font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--ed-brand);
}
.ed-callout p { margin: 0; font-size: 0.95rem; }
.ed-callout-warn {
  border-left-color: var(--ed-accent);
  background: rgba(245, 158, 11, 0.12);
}
.ed-callout-warn strong { color: #92400E; }
.ed-pull {
  font-family: var(--ed-font-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--ed-text);
  border-top: 1px solid var(--ed-border);
  border-bottom: 1px solid var(--ed-border);
  padding: 1.25rem 0;
  margin: 2rem 0;
  max-width: 28ch;
}

/* -- Tables -- */
.ed-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  background: var(--ed-card);
  -webkit-overflow-scrolling: touch;
}
.ed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 480px;
}
.ed-table th,
.ed-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ed-border);
  vertical-align: top;
}
.ed-table th {
  font-family: var(--ed-font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
  background: var(--ed-bg-soft);
}
.ed-table tr:last-child td { border-bottom: none; }

/* -- Property cards -- */
.ed-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.ed-card {
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  overflow: hidden;
}
.ed-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.ed-card-body { padding: 1rem 1.1rem 1.2rem; }
.ed-card h3 {
  font-family: var(--ed-font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.ed-card p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  max-width: none;
}
.ed-card .ed-btn { width: 100%; }

/* -- FAQ -- */
.ed-faq details {
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-panel);
  background: var(--ed-card);
  padding: 0 1rem;
  margin-bottom: 0.6rem;
}
.ed-faq summary {
  cursor: pointer;
  font-family: var(--ed-font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.95rem 0;
  list-style: none;
}
.ed-faq summary::-webkit-details-marker { display: none; }
.ed-faq details[open] summary { border-bottom: 1px solid var(--ed-border); }
.ed-faq details p {
  padding: 0.85rem 0 1rem;
  margin: 0;
  font-size: 0.95rem;
}

/* -- CTA band -- */
.ed-cta-band {
  background: var(--ed-bg-soft);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-panel);
  padding: 1.75rem 1.5rem;
  margin: 2.5rem 0;
}
.ed-cta-band h2 {
  font-family: var(--ed-font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}
.ed-cta-band > p {
  color: var(--ed-text-2);
  margin-bottom: 1rem;
  max-width: 42em;
}

/* -- Forms -- */
.ed-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}
.ed-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.ed-field label {
  display: block;
  font-family: var(--ed-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 0.35rem;
}
.ed-field input,
.ed-field select,
.ed-field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ed-text);
  background: var(--ed-card);
  border: 1px solid var(--ed-border-strong);
  border-radius: var(--ed-radius);
  padding: 0.7rem 0.8rem;
}
.ed-field input:focus,
.ed-field select:focus,
.ed-field textarea:focus {
  outline: none;
  border-color: var(--ed-brand);
  box-shadow: 0 0 0 3px var(--ed-brand-soft);
}
.ed-field textarea { min-height: 110px; resize: vertical; }
.ed-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.ed-form-status {
  font-family: var(--ed-font-ui);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
.ed-form-status.ok { color: #15803d; }
.ed-form-status.err { color: #b91c1c; }

/* -- Related -- */
.ed-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ed-border);
}
.ed-related h2 {
  font-family: var(--ed-font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.ed-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.ed-related a {
  display: block;
  text-decoration: none;
  color: var(--ed-text);
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius);
  padding: 1rem 1.1rem;
}
.ed-related a:hover { border-color: var(--ed-brand); }
.ed-related a span {
  display: block;
  font-family: var(--ed-font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 0.35rem;
}
.ed-related a strong {
  font-family: var(--ed-font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

/* -- Sidebar -- */
.ed-aside {
  position: sticky;
  top: calc(var(--ed-nav-h) + 1rem);
}
.ed-toc {
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-panel);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}
.ed-toc h2 {
  font-family: var(--ed-font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 0.75rem;
}
.ed-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.ed-toc li {
  margin: 0;
  border-bottom: 1px solid var(--ed-border);
}
.ed-toc li:last-child { border-bottom: none; }
.ed-toc a {
  display: block;
  text-decoration: none;
  color: var(--ed-text-2);
  font-size: 0.875rem;
  line-height: 1.35;
  padding: 0.55rem 0;
}
.ed-toc a:hover,
.ed-toc a.is-active { color: var(--ed-brand); }
.ed-aside-cta {
  background: var(--ed-text);
  color: #FCFAF7;
  border-radius: var(--ed-radius-panel);
  padding: 1.25rem;
}
.ed-aside-cta p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
  color: rgba(252, 250, 247, 0.82);
}
.ed-aside-cta .ed-btn-primary { width: 100%; }

/* -- Footer -- */
.ed-footer {
  border-top: 1px solid var(--ed-border);
  padding: 2rem 0 2.5rem;
  font-size: 0.875rem;
  color: var(--ed-muted);
}
.ed-footer a { color: var(--ed-muted); text-decoration: none; }
.ed-footer a:hover { color: var(--ed-brand); }

/* -- Mid CTA -- */
.ed-mid-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--ed-card);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-panel);
}
.ed-mid-cta p {
  margin: 0;
  max-width: 36em;
  font-size: 0.95rem;
  color: var(--ed-text-2);
}

@media (max-width: 960px) {
  .ed-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ed-shell { grid-template-columns: 1fr; gap: 2rem; }
  .ed-aside { position: static; }
  .ed-hero h1 { max-width: none; }
}

@media (max-width: 640px) {
  body.editorial-page { font-size: 16px; }
  .ed-nav-links { display: none; }
  .ed-nav-links.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(252, 250, 247, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 40;
  }
  .ed-hamburger { display: flex; z-index: 60; }
  .ed-cards,
  .ed-related-grid,
  .ed-form-row { grid-template-columns: 1fr; }
  .ed-glance dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .ed-glance dd { margin-bottom: 0.65rem; }
  .ed-btn { width: 100%; }
  .ed-hero-actions { flex-direction: column; }
  .ed-mid-cta { flex-direction: column; align-items: stretch; }
}
