/* Edition family — layout only. Colour comes from tokens: the Atlas discovery
 * roles (dark skin) for the grounds and ink, the production tokens for the rest. */
:root {
  --frame-x: 0.95in;
  --ed-ground: var(--ah-discovery-color-paper);
  --ed-ink: var(--ah-discovery-color-ink);
  --ed-muted: var(--ah-discovery-color-muted);
  --ed-accent: var(--ah-discovery-color-accent);
  --ed-line: var(--ah-discovery-color-line);
  --ed-cream: var(--ah-discovery-color-ink);
  --ed-cream-ink: var(--ah-discovery-color-on-selected);
}

.ed { padding: 0; }
.ed--dark { background: var(--ed-ground); color: var(--ed-ink); }
.ed--cream { background: var(--ed-cream); color: var(--ed-cream-ink); }
.ed .eyebrow { color: var(--ed-accent); }
.ed--cream .eyebrow { color: var(--ah-discovery-color-heart); }

/* ------------------------------------------------------------- pictures */
.ed-band { position: relative; width: 100%; height: 3.7in; overflow: hidden; flex: none; }
.ed-band--short { height: 2.3in; }
.ed--dark .ed-band--short { height: 3.5in; }
.ed-band--strip { height: 1.5in; }
.ed-img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); display: block; }
.ed-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, transparent 45%, var(--ed-ground) 100%);
}
.ed-band--cream::after { background: linear-gradient(to bottom, transparent 0%, transparent 55%, var(--ed-cream) 100%); }
.ed-band--card::after { display: none; }
.ed-band--field { background: var(--ah-color-surface-inverse); }
.ed-field { position: absolute; inset: 0; }
.ed-field svg { width: 100%; height: 100%; display: block; }
.ed-band--number { height: 4.4in; }
.ed-band--number::after { background: linear-gradient(to bottom, transparent 70%, var(--ed-ground) 100%); }

/* ------------------------------------------------------------------ type */
.ed-body { flex: 1; min-height: 0; padding: 0.35in var(--frame-x) 0.9in; display: flex; flex-direction: column; }
.ed-title { margin: 0.12in 0 0; font-size: 27pt; line-height: 1.12; color: inherit; max-width: 17em; }
.ed-lead { margin: 0.16in 0 0; font-family: var(--ah-font-editorial); font-size: 13pt; line-height: 1.5; color: var(--ed-muted); max-width: 30em; }
.ed--cream .ed-lead { color: var(--ah-discovery-color-stone-wet); }
.ed-prose { margin-top: 0.2in; max-width: 33em; }
.ed-prose p { margin: 0 0 0.13in; font-size: 11.5pt; line-height: 1.62; color: var(--ah-discovery-color-body); }
.ed-subhead { margin: 0.2in 0 0; font-family: var(--ah-font-editorial); font-weight: 400; font-size: 14pt; color: var(--ed-accent); }
.ed-signoff { margin-top: 0.2in; font-family: var(--ah-font-editorial); font-size: 13pt; color: var(--ed-accent); }
.ed-note { margin: auto 0 0; padding-top: 0.2in; font-size: 9.5pt; color: var(--ed-muted); max-width: 34em; }
.ed--cream .ed-note { color: var(--ah-discovery-color-stone-wet); }

.ed-marks { list-style: none; margin: 0.22in 0 0; padding: 0; max-width: 33em; }
.ed-marks li { display: flex; gap: 0.14in; align-items: baseline; padding: 0.09in 0; border-top: 0.5pt solid var(--ed-line); font-size: 11pt; line-height: 1.5; color: var(--ah-discovery-color-body); }
.ed-marks__dot { flex: none; width: 5pt; height: 5pt; border-radius: 50%; background: var(--ed-accent); transform: translateY(-1pt); }

.ed-foot { position: absolute; left: var(--frame-x); right: var(--frame-x); bottom: 0.42in; display: flex; justify-content: space-between; font-size: 8pt; letter-spacing: var(--ah-font-tracking-caps); text-transform: uppercase; color: var(--ed-muted); }
.ed--cream .ed-foot { color: var(--ah-discovery-color-stone-wet); }

/* ----------------------------------------------------------------- cover */
.ed--cover { position: relative; }
.ed-band--cover { height: 6.9in; position: absolute; top: 0; left: 0; }
.ed-band--cover::after { background: linear-gradient(to bottom, var(--ah-discovery-color-veil-top) 0%, transparent 28%, transparent 62%, var(--ed-ground) 100%); }
.ed-mark { display: flex; flex-direction: column; position: absolute; top: 0.7in; left: var(--frame-x); z-index: 2; }
.ed-mark .wordmark, .ed-mark .wordmark__endorse { color: var(--ed-ink); }
.ed-cover__type { position: absolute; left: var(--frame-x); right: var(--frame-x); top: 6.15in; z-index: 2; }
.ed-cover__title { margin: 0.14in 0 0; font-size: 40pt; line-height: 1.06; color: var(--ed-ink); max-width: 11em; }
.ed-cover__subtitle { margin: 0.2in 0 0; font-family: var(--ah-font-editorial); font-size: 14pt; line-height: 1.45; color: var(--ed-muted); max-width: 22em; }
.ed-cover__meta { position: absolute; left: var(--frame-x); bottom: 0.7in; z-index: 2; display: flex; flex-direction: column; gap: 3pt; font-size: 8pt; letter-spacing: var(--ah-font-tracking-micro); color: var(--ed-muted); }

/* ---------------------------------------------------------------- number */
.ed-number__id { position: absolute; left: var(--frame-x); bottom: 0.3in; z-index: 2; }
.ed-number__row { display: flex; align-items: baseline; gap: 0.2in; }
.ed-numeral { font-size: 74pt; line-height: 1; color: var(--ed-ink); }
.ed-number__label { font-size: 11pt; letter-spacing: var(--ah-font-tracking-caps); text-transform: uppercase; color: var(--ed-accent); }
.ed-number__line { margin: 0.08in 0 0; font-family: var(--ah-font-editorial); font-size: 13pt; color: var(--ed-muted); max-width: 26em; }
.ed-practice { margin-top: auto; padding: 0.16in 0.2in; border-left: 1.5pt solid var(--ed-accent); background: var(--ah-discovery-color-world); }
.ed-practice__text { margin: 0.04in 0 0; font-family: var(--ah-font-editorial); font-size: 12pt; line-height: 1.5; color: var(--ed-ink); }

/* ----------------------------------------------------------------- steps */
.ed-steps { list-style: none; margin: 0.2in 0 0; padding: 0; max-width: 36em; }
.ed-steps li { display: flex; gap: 0.2in; padding: 0.11in 0; border-top: 0.5pt solid var(--ed-line); }
.ed-steps__ord { flex: none; width: 0.3in; font-size: 9pt; color: var(--ah-discovery-color-heart); padding-top: 2pt; }
.ed-steps__label { margin: 0; font-size: 8.5pt; letter-spacing: var(--ah-font-tracking-caps); text-transform: uppercase; color: var(--ah-discovery-color-heart); }
.ed-steps__text { margin: 0.03in 0 0; font-size: 10.5pt; line-height: 1.5; }

/* --------------------------------------------------------------- prompts */
.ed-prompt { margin-top: 0.12in; }
.ed-prompt__q { margin-top: 0.18in; }
.ed-prompt__ask { margin: 0 0 0.04in; font-family: var(--ah-font-editorial); font-size: 12.5pt; line-height: 1.4; }
.ed-prompt__line { display: block; height: 0.3in; border-bottom: 0.5pt solid var(--ah-discovery-color-stone); }

/* ------------------------------------------------------------------ card */
.ed-body--card { padding-top: 0.7in; }
.ed-card { margin-top: 0.26in; width: 4.4in; border: 1.5pt dashed var(--ah-discovery-color-heart); outline: 0.1in solid var(--ed-cream); border-radius: 0.1in; overflow: hidden; background: var(--ed-ground); color: var(--ed-ink); align-self: center; }
.ed-band--card { height: 1.7in; }
.ed-card__body { padding: 0.2in 0.3in 0.28in; text-align: center; }
.ed-card__num { margin: 0; font-family: var(--ah-font-editorial); font-size: 40pt; line-height: 1; color: var(--ed-ink); }
.ed-card__word { margin: 0.04in 0 0.14in; font-size: 9pt; letter-spacing: var(--ah-font-tracking-caps); text-transform: uppercase; color: var(--ed-accent); }
.ed-marks--card { margin: 0; text-align: left; }
.ed-marks--card li { font-size: 9.5pt; padding: 0.06in 0; }
.ed-card__sign { margin: 0.16in 0 0; font-size: 7.5pt; letter-spacing: var(--ah-font-tracking-caps); text-transform: uppercase; color: var(--ed-muted); }

/* --------------------------------------------------------------- actions */
.ed-actions { list-style: none; margin: 0.2in 0 0; padding: 0; max-width: 36em; }
.ed-actions li { padding: 0.14in 0; border-top: 0.5pt solid var(--ah-discovery-color-stone); }
.ed-actions__label { margin: 0; font-family: var(--ah-font-editorial); font-size: 14pt; }
.ed-actions__detail { margin: 0.04in 0 0; font-size: 10pt; line-height: 1.5; color: var(--ah-discovery-color-stone-wet); }
.ed-actions__url { margin: 0.04in 0 0; font-size: 9.5pt; color: var(--ah-discovery-color-heart); }

/* ------------------------------------------------------------------ back */
.ed--colophon { position: relative; }
.ed-band--back { position: absolute; top: 0; left: 0; height: 6.4in; }
.ed-band--back::after { background: linear-gradient(to bottom, var(--ah-discovery-color-veil-top) 0%, transparent 30%, transparent 62%, var(--ed-ground) 100%); }
.ed-back { position: absolute; left: var(--frame-x); right: var(--frame-x); top: 6.4in; z-index: 2; }
.ed-back__tag { margin: 0; font-family: var(--ah-font-editorial); font-size: 22pt; line-height: 1.25; color: var(--ed-ink); max-width: 14em; }
.ed-back__lines { position: absolute; top: 3.5in; display: flex; flex-direction: column; gap: 3pt; font-size: 8pt; letter-spacing: var(--ah-font-tracking-micro); color: var(--ed-muted); }

/* Typesetting: avoid one-word last lines (German especially). */
.ed-prose p, .ed-lead, .ed-note, .ed-back__tag, .ed-cover__subtitle, .ed-number__line { text-wrap: pretty; }
.ed-title, .ed-cover__title { text-wrap: balance; }
.ed-note { max-width: 38em; }

.ed-band--tall { height: 4.6in; }
.ed-dateline { display: block; width: 2.2in; height: 0.28in; border-bottom: 0.5pt solid var(--ah-discovery-color-stone); margin-top: 0.1in; }
.ed-cutout { position: absolute; left: 50%; top: 1.3in; width: 4.2in; transform: translateX(-50%); }
.ed-cutout img { width: 100%; height: auto; display: block; }
.ed-back__tag { text-align: center; max-width: none; }
.ed--colophon .ed-back { top: 6.2in; }
.ed-body--card { padding-top: 0.9in; }
.ed-card { width: 4.9in; }
.ed-band--card { height: 2.3in; }
.ed-band--number::after { background: linear-gradient(to bottom, transparent 0%, var(--ah-discovery-color-veil-mid) 42%, var(--ed-ground) 92%); }

/* Batch adapter: inherit link styling; no palette/type/layout changes. */
.ed-actions__url a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* Small cream-page type and writing rules use the existing darker palette role. */
.ed--cream .eyebrow, .ed-steps__ord, .ed-steps__label, .ed-actions__url { color: var(--ah-discovery-color-stone-wet); }
.ed-prompt__line, .ed-dateline { border-bottom-color: var(--ah-discovery-color-stone-wet); }
