/* ============================================================
   POMODEV — EDITORIAL SYSTEM
   Shared premium layer for content pages (guide, about, blog):
   reuses premium.css's tokens/fonts so every page on the site,
   not just the landing page, reads as one coherent product.
   ============================================================ */

body.ed {
  font-family: var(--font-sans);
  background: var(--ink-900);
  color: var(--bone);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

/* ---------- nav (trimmed pv-nav, real site links instead of anchors) ---------- */
.ed-nav {
  position: sticky; top: 0; z-index: 500;
  /* A solid (not translucent-blurred) background is intentional: this
     header sits above scrolling article text, and some Chromium builds
     composite backdrop-filter + position:sticky incorrectly, letting
     content bleed through almost undimmed. Full opacity has no such
     failure mode. */
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
}
.ed-nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.ed-brand { display: flex; align-items: center; gap: 10px; }
.ed-brand img { width: 46px; height: 46px; border-radius: 11px; }
.ed-brand span { font-family: var(--font-serif); font-size: 21px; letter-spacing: -.01em; color: var(--bone); }
.ed-nav__links { display: flex; align-items: center; gap: 6px; }
.ed-nav__link {
  font-size: 13.5px; font-weight: 550; color: var(--muted);
  padding: 9px 14px; border-radius: 999px;
  transition: color .25s, background-color .25s;
}
.ed-nav__link:hover { color: var(--bone); background: var(--surface); }
.ed-nav__link.is-active { color: var(--bone); background: var(--surface-2); }
.ed-nav__right { display: flex; align-items: center; gap: 10px; }
.ed-iconbtn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted);
  transition: border-color .25s, color .25s, transform .3s var(--ease);
}
.ed-iconbtn:hover { color: var(--bone); border-color: var(--line-2); transform: translateY(-1px); }
.ed-iconbtn svg { width: 17px; height: 17px; }
.ed-iconbtn .ed-sun { display: none; }
[data-theme="light"] .ed-iconbtn .ed-moon { display: none; }
[data-theme="light"] .ed-iconbtn .ed-sun { display: block; }

.ed-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tomato); color: #fff; font-weight: 600; font-size: 13.5px;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--tomato) 70%, transparent);
  transition: transform .3s var(--ease), filter .3s;
}
.ed-cta-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.ed-nav__burger { display: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.ed-nav__burger i, .ed-nav__burger i::before, .ed-nav__burger i::after {
  content: ''; position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--bone);
}
.ed-nav__burger i { top: 50%; transform: translateY(-50%); }
.ed-nav__burger i::before { top: -6px; }
.ed-nav__burger i::after { top: 6px; }

@media (max-width: 780px) {
  .ed-nav__links { display: none; }
  .ed-nav__burger { display: block; }
}

.ed-drawer {
  position: fixed; inset: 72px 0 auto 0; z-index: 499;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column; padding: 10px var(--pad) 20px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: transform .3s var(--ease), opacity .3s, visibility .3s;
}
.ed-drawer.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.ed-drawer a { padding: 13px 4px; color: var(--bone-2); font-size: 15px; border-bottom: 1px solid var(--line); }
.ed-drawer a:last-child { border-bottom: none; }

/* ---------- shared page shell ---------- */
.ed-main { max-width: var(--maxw); margin-inline: auto; padding: 0 var(--pad) 100px; }
.ed-breadcrumb {
  display: flex; align-items: center; gap: 8px; margin: 36px 0 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2);
}
.ed-breadcrumb a { color: var(--muted-2); transition: color .2s; }
.ed-breadcrumb a:hover { color: var(--bone); }

/* ---------- hero (article header) ---------- */
.ed-hero { max-width: 780px; margin: 28px 0 56px; }
.ed-hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tomato-lit); background: color-mix(in srgb, var(--tomato) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tomato) 30%, transparent);
  border-radius: 999px; padding: 6px 13px; margin-bottom: 22px;
}
.ed-hero h1 {
  font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; color: var(--bone);
}
.ed-hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); margin-top: 20px; max-width: 58ch; line-height: 1.6;
}
.ed-hero__meta {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); letter-spacing: .02em;
}
.ed-hero__meta span { display: flex; align-items: center; gap: 6px; }
.ed-hero__meta span:not(:last-child)::after { content: '·'; margin-left: 14px; color: var(--line-2); }

/* ---------- article prose ---------- */
.ed-article { max-width: 700px; }
.ed-article h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  color: var(--bone); margin: 52px 0 18px; letter-spacing: -0.005em;
}
.ed-article h3 {
  font-size: 1.15rem; font-weight: 650; color: var(--bone); margin: 32px 0 12px;
}
.ed-article p { font-size: 1.02rem; line-height: 1.85; color: var(--bone-2); margin-bottom: 18px; }
.ed-article p strong, .ed-article li strong { color: var(--bone); font-weight: 620; }
.ed-article a:not(.ed-cta-btn) {
  color: var(--tomato-lit); text-underline-offset: 3px; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--tomato-lit) 40%, transparent);
}
.ed-article a:not(.ed-cta-btn):hover { text-decoration-color: currentColor; }
.ed-article ul, .ed-article ol { margin: 0 0 20px; padding-left: 0; list-style: none; }
.ed-article ul li, .ed-article ol li {
  position: relative; padding-left: 30px; margin-bottom: 13px; font-size: 1.02rem; line-height: 1.75; color: var(--bone-2);
}
.ed-article ul li::before {
  content: ''; position: absolute; left: 6px; top: .68em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--tomato-lit);
}
.ed-article ol { counter-reset: ed-ol; }
.ed-article ol li { counter-increment: ed-ol; }
.ed-article ol li::before {
  content: counter(ed-ol); position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--tomato-lit);
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--tomato-lit) 45%, transparent);
  display: grid; place-items: center;
}

.ed-callout {
  background: linear-gradient(168deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2); border-left: 3px solid var(--tomato-lit);
  border-radius: 4px 14px 14px 4px; padding: 22px 26px; margin: 30px 0;
}
.ed-callout strong { color: var(--tomato-lit); }
.ed-callout p:last-child, .ed-callout ul:last-child, .ed-callout ol:last-child { margin-bottom: 0; }
.ed-callout h4 { margin-top: 0; }
.ed-callout--warn { border-left-color: var(--ember); }
.ed-callout--warn strong { color: var(--ember); }
.ed-article h4 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase; margin: 24px 0 12px;
}

/* ---------- rank cards (comparison articles) ---------- */
.ed-rank-card {
  background: linear-gradient(168deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px; margin: 24px 0;
}
.ed-rank-card.is-top { border-color: color-mix(in srgb, var(--tomato) 40%, transparent); }
.ed-rank-card h3 { font-size: 1.15rem; margin: 0 0 6px; }
.ed-rating {
  font-family: var(--font-mono); font-size: 12px; color: var(--tomato-lit);
  letter-spacing: .04em; margin-bottom: 14px;
}
.ed-rank-card h4 { margin-top: 20px; }
.ed-rank-card ul { margin-bottom: 0; }

.ed-inline-cta {
  background: radial-gradient(120% 160% at 15% 0%, color-mix(in srgb, var(--tomato) 14%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 28px; margin: 30px 0; text-align: center;
}
.ed-inline-cta h3 { margin: 0 0 8px; font-size: 1.1rem; }
.ed-inline-cta p { color: var(--muted); margin-bottom: 16px; }

.ed-byline {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); line-height: 1.9;
}

.ed-toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 26px; margin: 36px 0;
}
.ed-toc__title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.ed-toc ol { counter-reset: toc; margin: 0; }
.ed-toc ol li { padding-left: 26px; margin-bottom: 8px; font-size: .93rem; }
.ed-toc ol li::before { width: 16px; height: 16px; font-size: 10px; }
.ed-toc a { color: var(--bone-2); transition: color .2s; }
.ed-toc a:hover { color: var(--tomato-lit); }

/* ---------- feature grid (about.html) ---------- */
.ed-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 30px 0 40px; }
.ed-feature-card {
  background: linear-gradient(168deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  transition: border-color .35s, transform .4s var(--ease), box-shadow .4s;
}
.ed-feature-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ed-feature-card__icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tomato) 14%, transparent); font-size: 1.15rem; margin-bottom: 14px;
}
.ed-feature-card h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--bone); }
.ed-feature-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* ---------- post grid (blog.html index) ---------- */
.ed-post-grid { display: grid; gap: 16px; margin-top: 40px; }
.ed-post-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  background: linear-gradient(168deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px;
  transition: border-color .35s, transform .4s var(--ease), box-shadow .4s;
}
.ed-post-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.ed-post-card.is-featured { border-color: color-mix(in srgb, var(--tomato) 40%, transparent); }
.ed-post-card__num { font-family: var(--font-serif); font-size: 2.4rem; color: var(--line-2); line-height: 1; }
.ed-post-card.is-featured .ed-post-card__num { color: color-mix(in srgb, var(--tomato) 55%, transparent); }
.ed-post-card__body h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; color: var(--bone); margin-bottom: 8px; }
.ed-post-card__body p { font-size: .92rem; color: var(--muted); line-height: 1.6; margin: 0 0 12px; max-width: 62ch; }
.ed-post-card__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--muted-2); }
.ed-post-card__meta .ed-badge {
  color: var(--tomato-lit); border: 1px solid color-mix(in srgb, var(--tomato-lit) 40%, transparent);
  border-radius: 999px; padding: 2px 9px; margin-right: 8px;
}
.ed-post-card__arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: 1.1rem;
  transition: transform .35s var(--ease), border-color .3s, color .3s;
}
.ed-post-card:hover .ed-post-card__arrow { transform: translateX(4px); border-color: var(--tomato-lit); color: var(--tomato-lit); }

@media (max-width: 640px) {
  .ed-post-card { grid-template-columns: 1fr; }
  .ed-post-card__num, .ed-post-card__arrow { display: none; }
}

/* ---------- CTA banner ---------- */
.ed-cta-banner {
  margin-top: 64px; padding: 48px var(--pad);
  background: radial-gradient(120% 140% at 20% 0%, color-mix(in srgb, var(--tomato) 16%, transparent), transparent 60%), var(--surface);
  border: 1px solid var(--line-2); border-radius: 24px;
  text-align: center;
}
.ed-cta-banner h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.ed-cta-banner p { color: var(--muted); margin-bottom: 26px; }
.ed-cta-banner .ed-cta-btn { padding: 13px 30px; font-size: 14.5px; }

/* ---------- footer ---------- */
.ed-footer {
  border-top: 1px solid var(--line); margin-top: 90px; padding: 32px var(--pad);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: 12.5px; color: var(--muted-2);
}
.ed-footer a { color: var(--muted-2); transition: color .2s; }
.ed-footer a:hover { color: var(--bone); }
.ed-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- scoped selection/scroll ---------- */
body.ed ::selection { background: var(--tomato); color: #fff; }
body.ed { scrollbar-color: var(--line-2) transparent; }
