/* OutWrite Books: one page per Modern Edition. Swiss-Minimal, October 24, 2026.
   Loaded before /site.css, which supplies the colors, header and footer.
   Rule: one loud element per screen. The yellow edition number is the loud element at the top. */

* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
img { max-width: 100%; height: auto; display: block; }
em { font-style: italic; }

.ed-wrap { max-width: 1240px; margin: 0 auto; padding: 0 56px; }
.ed-label {
  margin: 0 0 18px; font-size: .7rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-mute);
}
.ed-h2 { margin: 0 0 28px; font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }

/* 1 · Top: number and title / hook and buying / cover */
.ed-top {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding-top: 44px; padding-bottom: 44px;
}
.ed-title-col { grid-column: 1 / 6; }
.ed-buy-col { grid-column: 6 / 10; padding-top: 6px; }
.ed-cover-col { grid-column: 10 / 13; }
.ed-num {
  display: inline-block; margin: 0; padding: 4px 14px 0 4px; background: var(--yellow);
  font-size: clamp(6rem, 13vw, 11.5rem); font-weight: 900; line-height: .78; letter-spacing: -.06em; font-stretch: 118%;
}
.ed-title-col h1 {
  margin: 30px 0 0; font-size: clamp(2.4rem, 4.4vw, 4rem); font-weight: 800; line-height: .96; letter-spacing: -.03em;
}
.ed-byline { margin: 18px 0 0; font-size: 1.05rem; line-height: 1.45; color: var(--ink-soft); }
.ed-byline strong { color: var(--ink); font-weight: 700; }
.ed-hook { margin: 0; font-size: 1.22rem; line-height: 1.42; font-weight: 500; text-wrap: pretty; }
.ed-buylist { margin: 32px 0 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.ed-buylist li { border-bottom: 1px solid var(--rule); }
.ed-buylist a, .ed-buylist span {
  display: flex; justify-content: space-between; gap: 16px; padding: 15px 0;
  font-weight: 700; font-size: 1rem; color: var(--ink); text-decoration: none;
}
.ed-buylist a:hover { background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 100% 6px no-repeat; }
.ed-buylist .ed-soon { color: var(--coral-text); }
.ed-direct { margin: 14px 0 0; font-size: .86rem; line-height: 1.55; color: var(--ink-mute); }
.ed-direct a { color: var(--ink); text-underline-offset: 2px; }
.ed-cover-col img { width: 100%; max-width: 380px; margin-left: auto; box-shadow: 0 18px 40px rgba(16,47,122,.18); }

/* 2 · Facts row */
.ed-facts {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 24px; margin: 0;
  padding: 16px 0 0; border-top: 3px solid var(--ink);
}
.ed-facts dt { margin: 0 0 6px; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.ed-facts dd { margin: 0; font-size: .98rem; font-weight: 600; line-height: 1.35; }

/* Sections */
.ed-sec { padding-top: 88px; }
.ed-sec + .ed-sec { }
.ed-two { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.ed-side { grid-column: 1 / 4; }
.ed-main { grid-column: 4 / 11; }
.ed-main.ed-main-wide { grid-column: 4 / 13; }
.ed-prose p { margin: 0 0 1.2em; font-size: 1.08rem; line-height: 1.7; color: var(--ink-soft); text-wrap: pretty; }
.ed-prose p:last-child { margin-bottom: 0; }

/* 3 · Read the opening: set in the book's own typeface */
.ed-opening { border-top: 3px solid var(--ink); padding-top: 22px; }
.ed-opening h3 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.ed-opening .ed-from { margin: 0 0 30px; font-size: .9rem; color: var(--ink-mute); }
.ed-excerpt p {
  margin: 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.68; color: #1d2540; text-wrap: pretty;
}
.ed-excerpt p + p { text-indent: 1.5em; }
.ed-excerpt details { margin-top: 0; }
.ed-excerpt details[open] summary { display: none; }
.ed-excerpt summary {
  list-style: none; cursor: pointer; display: inline-block; margin-top: 26px; padding: 13px 22px;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: .95rem;
}
.ed-excerpt summary::-webkit-details-marker { display: none; }
.ed-excerpt summary:hover { background: #1B3E95; }
.ed-excerpt .ed-end { margin-top: 26px; font-family: "Archivo", system-ui, sans-serif; font-size: .9rem; color: var(--ink-mute); text-indent: 0; }

.ed-excerpt sup { font-family: "Archivo", system-ui, sans-serif; font-size: .62em; font-weight: 700; color: var(--coral-text); line-height: 0; }
.ed-notes { margin: 22px 0 6px; padding: 14px 0 0 0; border-top: 1px solid var(--rule); list-style: none; counter-reset: none; }
.ed-notes li { position: relative; padding-left: 26px; margin: 0 0 10px; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.ed-notes li::before { content: attr(value); position: absolute; left: 0; top: 0; font-weight: 700; color: var(--coral-text); }
.ed-excerpt details p:first-of-type { text-indent: 1.5em; margin-top: 18px; }
.ed-author figure img.ed-color { filter: none; }

.ed-mapfig { margin: 40px 0 0; padding-top: 18px; border-top: 3px solid var(--ink); }
.ed-map { display: block; width: 100%; max-width: 460px; height: auto; }
.ed-mapfig figcaption { margin-top: 10px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }

/* 4 · Pull quote: the period voice, in the archival serif */
.ed-quote { padding-top: 96px; }
.ed-quote blockquote { margin: 0; padding-left: 28px; border-left: 6px solid var(--coral); grid-column: 2 / 11; }
.ed-quote p { margin: 0; font-family: var(--fell); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; text-wrap: balance; }
.ed-quote cite { display: block; margin-top: 22px; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }

/* 5 · What this edition includes, with the contents */
.ed-includes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.ed-includes li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.02rem; line-height: 1.5; font-weight: 600; }
.ed-includes li span { display: block; margin-top: 3px; font-weight: 400; font-size: .92rem; color: var(--ink-mute); }
.ed-contents { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.ed-contents li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.ed-contents li.ed-part { padding-top: 18px; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); border-bottom: 0; }
.ed-contents li span:last-child { color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.ed-incl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.ed-incl-grid > div:first-child { grid-column: 1 / 7; }
.ed-incl-grid > div:last-child { grid-column: 8 / 13; }

/* 6 · Who reads this book */
.ed-readers { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--rule); }
.ed-readers li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.02rem; line-height: 1.5; color: var(--ink-soft); }

/* 7 · About the author */
.ed-author figure { margin: 0; grid-column: 1 / 5; }
.ed-author figure img { width: 100%; filter: grayscale(1) contrast(1.05); }
.ed-author figcaption { margin-top: 10px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.ed-author .ed-author-text { grid-column: 6 / 12; }
.ed-author h3 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.ed-dates { margin: 6px 0 24px; font-size: .9rem; color: var(--ink-mute); }

/* 8 · Edition details */
.ed-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; margin: 0; border-top: 3px solid var(--ink); }
.ed-spec div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ed-spec dt { margin: 0 0 4px; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.ed-spec dd { margin: 0; font-size: .95rem; line-height: 1.45; }
.ed-spec .ed-wide { grid-column: 1 / -1; }

/* 9 · Previous and next */
.ed-next { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding: 28px 0; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); margin-top: 96px; margin-bottom: 96px; text-decoration: none; color: var(--ink); }
.ed-next .ed-next-num { grid-column: 1 / 3; font-size: 5rem; font-weight: 900; line-height: .8; letter-spacing: -.05em; font-stretch: 118%; }
.ed-next img { grid-column: 3 / 5; width: 100%; max-width: 130px; }
.ed-next .ed-next-text { grid-column: 5 / 11; }
.ed-next .ed-next-text p { margin: 0; }
.ed-next .ed-next-go { grid-column: 11 / 13; justify-self: end; font-weight: 700; }
.ed-next:hover .ed-next-num { background: var(--yellow); }

@media (max-width: 980px) {
  .ed-wrap { padding: 0 24px; }
  .ed-title-col { grid-column: 1 / 8; }
  .ed-cover-col { grid-column: 8 / 13; }
  .ed-buy-col { grid-column: 1 / 13; grid-row: 2; padding-top: 32px; max-width: 560px; }
  .ed-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .ed-side, .ed-main, .ed-main.ed-main-wide { grid-column: 1 / -1; }
  .ed-side { margin-bottom: 8px; }
  .ed-incl-grid > div:first-child, .ed-incl-grid > div:last-child { grid-column: 1 / -1; }
  .ed-incl-grid > div:last-child { margin-top: 40px; }
  .ed-author figure { grid-column: 1 / 6; }
  .ed-author .ed-author-text { grid-column: 7 / 13; }
}
@media (max-width: 620px) {
  .ed-top { padding-top: 28px; }
  .ed-title-col, .ed-cover-col, .ed-buy-col { grid-column: 1 / -1; }
  .ed-cover-col { grid-row: 1; margin-bottom: 28px; }
  .ed-cover-col img { max-width: 230px; margin: 0; }
  .ed-buy-col { grid-row: auto; }
  .ed-num { font-size: 6rem; }
  .ed-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-sec { padding-top: 64px; }
  .ed-quote { padding-top: 64px; }
  .ed-quote blockquote { padding-left: 18px; }
  .ed-readers { grid-template-columns: minmax(0, 1fr); }
  .ed-author figure, .ed-author .ed-author-text { grid-column: 1 / -1; }
  .ed-author figure { margin-bottom: 28px; max-width: 360px; }
  .ed-spec { grid-template-columns: minmax(0, 1fr); }
  .ed-next .ed-next-num { grid-column: 1 / 4; font-size: 3.4rem; }
  .ed-next img { grid-column: 4 / 7; }
  .ed-next .ed-next-text { grid-column: 7 / 13; }
  .ed-next .ed-next-go { grid-column: 1 / -1; justify-self: start; margin-top: 16px; }
}
