/* revive7 — editorial theme.
   Zero remote dependency: system font stacks only, so the page renders the same
   from file://, from a subpath preview and from the final host. */

:root {
  --primary: #8c3b52;
  --accent: #c9922f;
  --ink: #241d20;
  --paper: #fbf7f4;
  --ink-soft: color-mix(in srgb, var(--ink) 66%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 14%, var(--paper));
  --surface: #fff;
  --font-head: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shell: 1120px;
  --measure: 72ch;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 20, .05), 0 8px 28px -12px rgba(20, 24, 20, .18);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

.rv-shell { width: min(100% - 32px, var(--shell)); margin-inline: auto; }

.rv-skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.rv-skip:focus { left: 0; }

/* ── header ─────────────────────────────────────────────────────────────── */
.rv-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.rv-header .rv-shell {
  display: flex; align-items: center; gap: 16px;
  min-height: 68px; flex-wrap: wrap;
}
.rv-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  color: var(--ink); text-decoration: none; margin-right: auto; line-height: 1.2;
}
.rv-logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px; background: var(--primary); color: #fff; font-size: 1rem;
}
.rv-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.rv-nav a {
  display: inline-block; padding: 8px 12px; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.rv-nav a:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.rv-nav a.is-current { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }

.rv-burger { display: none; }
.rv-menu-toggle { display: none; }

@media (max-width: 860px) {
  .rv-header .rv-shell { min-height: 60px; }
  .rv-burger {
    display: grid; gap: 5px; padding: 10px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  }
  .rv-burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
  .rv-nav { display: none; width: 100%; padding: 8px 0 14px; flex-direction: column; }
  .rv-menu-toggle:checked ~ .rv-nav { display: flex; }
  .rv-nav a { padding: 10px 12px; border-radius: 10px; font-size: 1rem; }
}

/* ── hero ───────────────────────────────────────────────────────────────── */
.rv-hero { position: relative; background: var(--ink); }
.rv-hero-img {
  width: 100%; height: clamp(190px, 34vw, 340px);
  object-fit: cover; object-position: center 28%; opacity: .78;
}
.rv-hero-home .rv-hero-img { height: clamp(230px, 42vw, 440px); }
.rv-hero-text {
  position: absolute; inset: auto 0 0 0;
  padding: 28px max(16px, calc(50% - var(--shell) / 2));
  background: linear-gradient(to top, rgba(12, 14, 12, .82), rgba(12, 14, 12, 0));
  color: #fff;
}
.rv-hero-text h1 { font-size: clamp(1.6rem, 4.2vw, 2.6rem); margin: 0; color: #fff; }
.rv-hero-text p { margin: 8px 0 0; font-size: 1.05rem; opacity: .92; max-width: 60ch; }

.rv-hero-credit {
  position: absolute; right: 8px; bottom: 4px; margin: 0;
  font-size: .68rem; color: rgba(255, 255, 255, .72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
@media (max-width: 560px) { .rv-hero-credit { position: static; color: var(--ink-soft); text-shadow: none; padding: 4px 16px; } }

/* ── layout ─────────────────────────────────────────────────────────────── */
.rv-layout { padding: 28px 0 56px; }

.rv-breadcrumb { font-size: .875rem; color: var(--ink-soft); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.rv-breadcrumb a { color: var(--ink-soft); }

.rv-title { font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; margin: 0 0 20px; }

.rv-content { max-width: var(--measure); }
.rv-content h2 {
  font-family: var(--font-head); font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.3; margin: 2.2em 0 .6em; padding-top: .35em;
  border-top: 2px solid var(--line);
}
.rv-content h3 { font-family: var(--font-head); font-size: 1.18rem; margin: 1.8em 0 .4em; }
.rv-content p { margin: 0 0 1.05em; }
.rv-lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink); }

.rv-content ul, .rv-content ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.rv-content li { margin-bottom: .55em; }

.rv-quotes { list-style: none; padding-left: 0; counter-reset: q; }
.rv-quotes > li {
  counter-increment: q;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px 14px 52px;
  margin-bottom: 10px;
}
.rv-quotes > li::before {
  content: counter(q);
  position: absolute; left: 14px; top: 13px;
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  color: var(--accent); opacity: .85;
}

.rv-plain { list-style: disc; }
.rv-plain.rv-cols { columns: 2; column-gap: 32px; }
@media (max-width: 560px) { .rv-plain.rv-cols { columns: 1; } }

.rv-content blockquote {
  margin: 0 0 1.1em; padding: 16px 20px;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.rv-content blockquote p { margin: 0; font-size: 1.06rem; }
.rv-content blockquote cite { display: block; margin-top: 8px; font-size: .88rem; font-style: normal; color: var(--ink-soft); }

.rv-figure { margin: 28px 0; }
.rv-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--line); }
.rv-figure figcaption { margin-top: 8px; font-size: .86rem; color: var(--ink-soft); }

.rv-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: .95rem; }
.rv-content th, .rv-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.rv-content th { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); font-weight: 600; }

/* ── related ────────────────────────────────────────────────────────────── */
.rv-related { margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--line); }
.rv-related h2 { font-family: var(--font-head); font-size: 1.4rem; margin: 0 0 18px; }
.rv-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rv-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.rv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.rv-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.rv-card span { display: block; padding: 12px 14px; font-weight: 600; font-size: .98rem; line-height: 1.35; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.rv-footer {
  margin-top: 64px; padding: 32px 0 40px;
  background: var(--surface); border-top: 1px solid var(--line);
  font-size: .92rem; color: var(--ink-soft);
}
.rv-footer-brand { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 0 0 6px; font-size: 1.05rem; }
.rv-footer-note { margin: 0 0 14px; max-width: 70ch; }
.rv-footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rv-footer-nav a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv-card { transition: none; }
}
