/* editorial.css — the editorial look of the homepage (MAJ-695, adopted MAJ-698).
 *
 * Loaded after the homepage's own styles and scoped to .ed on <html>, so it
 * only restyles the drop page: same markup, same scripts. A large display
 * serif, mincho for Japanese, small-caps labels, hairline rules, square
 * corners, and text links instead of pills. */

.ed {
  --ed-ink: #22102a;
  --ed-paper: #efe6cc;
  --ed-rule: color-mix(in srgb, var(--ed-ink) 78%, transparent);
  --ed-faint: color-mix(in srgb, var(--ed-ink) 55%, transparent);
  --ed-accent: var(--teal);
  --ed-serif: "Instrument Serif", "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ed-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ed-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", Arial, sans-serif;

  /* drop.js reads these for the falling wordmark and the marks. */
  --fg: var(--ed-ink);
  --link: var(--ed-accent);
  --panel-solid: var(--ed-paper);
  --bg: var(--ed-paper);

  background: var(--ed-paper);
  color: var(--ed-ink);
  font-family: var(--ed-sans);
}

@media (prefers-color-scheme: dark) {
  .ed {
    --ed-ink: #efe6cc;
    --ed-paper: #170a1b;
    --ed-accent: var(--yellow);
  }
}

/* Small caps label: the one voice for every bit of metadata. */
.ed .ed-label,
.ed .site-nav a,
.ed .rail-meta,
.ed .rail-count,
.ed .drop-tools button,
.ed .drop-tools a,
.ed .rail-go,
.ed .footer-nav a {
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ===== Header: a masthead bar ===== */
.ed .site-header {
  background: color-mix(in srgb, var(--ed-paper) 92%, transparent);
  border-bottom: 1px solid var(--ed-rule);
}

.ed .logo {
  font-family: var(--ed-serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}

.ed .logo-mark { display: none; }
.ed .logo-accent { font-style: italic; color: var(--ed-accent); }
.ed .site-nav a { color: var(--ed-ink); }

/* ===== Cover ===== */
.ed .drop-stage { border-bottom: 1px solid var(--ed-rule); }

.ed .drop-copy { text-align: left; max-width: 1180px; padding-inline: 22px; }
.ed .drop-stage.is-live .drop-copy { padding-top: clamp(18px, 4svh, 40px); }

.ed .ed-masthead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 2px solid var(--ed-ink);
  border-bottom: 1px solid var(--ed-rule);
  color: var(--ed-ink);
}

.ed .ed-masthead span:nth-child(2) { text-align: center; }
.ed .ed-masthead span:last-child { text-align: right; }

@media (max-width: 560px) {
  .ed .ed-masthead span:nth-child(2) { display: none; }
}

/* The wordmark itself falls in drop.js in this face. */
.ed .drop-copy h1 {
  font-family: "Instrument Serif", var(--ed-serif);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.03em;
}

.ed .drop-copy p {
  max-width: 20em;
  margin: clamp(18px, 3svh, 30px) 0 0;
  font-family: var(--ed-mincho);
  font-size: clamp(1.7rem, 6.4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ed-ink);
}

.ed .drop-copy .hint {
  margin-top: 12px;
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ed-faint);
}

.ed .drop-tools {
  justify-content: flex-start;
  gap: 18px;
  max-width: 1180px;
  margin: 18px auto 0;
  padding-inline: 22px;
}

.ed .drop-tools button,
.ed .drop-tools a {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--ed-ink);
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  color: var(--ed-ink);
}

/* Popup card: an index card, not a bubble. */
.ed .drop-card {
  border: 1px solid var(--ed-ink);
  border-radius: 2px;
  background: var(--ed-paper);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--ed-ink) 18%, transparent);
}

.ed .drop-card img { border-radius: 4px; }
.ed .drop-card .name { font-family: var(--ed-serif); font-weight: 400; font-size: 1.7rem; line-height: 1.05; }
.ed .drop-card .desc { font-family: var(--ed-mincho); color: var(--ed-ink); }

.ed .drop-card .btn {
  border: 1px solid var(--ed-ink);
  border-radius: 0;
  background: none;
  color: var(--ed-ink);
  box-shadow: none;
}

.ed .drop-card .btn.primary { background: var(--ed-ink); color: var(--ed-paper); }

/* ===== Index (the rail) ===== */
.ed .rail-head h2 {
  align-items: baseline;
  font-family: var(--ed-serif);
  font-size: clamp(3rem, 11vw, 5.6rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.ed .rail-head h2::before {
  content: "Index —";
  align-self: center;
  margin-right: 4px;
  font-family: var(--ed-sans);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ed .rail-head p {
  margin-top: 8px;
  font-family: var(--ed-mincho);
  font-size: 1.05rem;
  opacity: 0.9;
}

.ed .rail-progress {
  height: 1px;
  border-radius: 0;
}

.ed .rail-nav button {
  border-radius: 0;
  border: 1px solid currentColor;
}

.ed .rail-card {
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  background: var(--c-bg);
}

/* A hairline frame inside each plate, like a printed card. */
.ed .rail-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--c-fg) 28%, transparent);
  pointer-events: none;
}

.ed .rail-meta { color: var(--c-fg); opacity: 0.85; }
.ed .rail-meta img { width: 28px; height: 28px; border-radius: 6px; }

.ed .rail-name {
  margin-top: 18px;
  font-family: var(--ed-serif);
  font-size: clamp(2.6rem, 10vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.ed .rail-card.is-web .rail-name { font-size: clamp(2rem, 8vw, 2.7rem); }

.ed .rail-desc {
  font-family: var(--ed-mincho);
  font-size: 0.98rem;
  line-height: 1.7;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--c-fg) 35%, transparent);
}

.ed .rail-go {
  right: 22px;
  bottom: 22px;
  padding: 0 0 3px;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid currentColor;
  color: var(--c-fg);
  box-shadow: none;
}

.ed .rail-abc {
  border-radius: 0;
  font-family: var(--ed-serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0;
}

.ed .rail-shot.is-type { font-family: var(--ed-serif); font-weight: 400; font-style: italic; }

/* ===== Footer ===== */
.ed .site-footer { border-top: 2px solid var(--ed-ink); color: var(--ed-ink); }
.ed .footer-nav a { color: var(--ed-ink); }
