/* The public pages (design §11), on the shared theme (theme.css). The home page
   adds home.css and home.js.

   Story and epic pages (body.narrative) are where a forwarded link lands. They
   use no JavaScript and their text and markup stay under 50 KB. On a phone
   they name no web font, so a phone downloads none: every face on them comes
   from --pub-text and --pub-display, which point at the system's own fonts
   below 48rem and at the theme's fonts only inside the min-width query below
   (Article XII). Other public pages use the theme's fonts everywhere. */

body.public {
  --pub-text: var(--text);
  --pub-display: var(--display);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.65 var(--pub-text);
  -webkit-font-smoothing: antialiased;
}
body.narrative { --pub-text: var(--serif); --pub-display: var(--serif); }
@media (min-width: 48rem) {
  body.narrative { --pub-text: var(--text); --pub-display: var(--display); }
}
.public a.wordmark { font-family: var(--pub-display); }

/* The label stays on screen while scrolling, so a screenshot of any paragraph carries it (Article V). */
.fiction-label { position: sticky; top: 0; z-index: 2; margin: 0; padding: .45rem .9rem; background: var(--ink); color: #fff; font: 600 .82rem/1.35 var(--sans); }

.site-masthead { max-width: 44rem; margin: 0 auto; padding: 1rem 1.1rem .4rem; }
.site-masthead a.wordmark { font-size: 1.1rem; }
.site-masthead .wordmark svg { width: 1.6rem; height: 1.6rem; }

.public-main { max-width: 44rem; margin: 0 auto; padding: 1rem 1.1rem 2.5rem; }

/* Reading pages: the story, the epic index, the constitution, terms and replies. */
.doc h1, .doc h2, .doc h3 { font-family: var(--pub-display); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.doc h1 { margin: .5rem 0 .7rem; font-size: clamp(2rem, 1.35rem + 2.6vw, 2.9rem); line-height: 1.08; }
.doc h2 { margin: 2.6rem 0 .7rem; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); line-height: 1.18; }
.doc h3 { margin: 1.6rem 0 .5rem; font-size: 1.15rem; line-height: 1.3; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc code { font-size: .85em; word-break: break-all; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font: .9rem/1.45 var(--sans); }
.doc td, .doc th { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc blockquote { margin: 1rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--accent-soft); color: var(--ink-2); }
.doc hr { margin: 2.2rem 0; border: 0; border-top: 1px solid var(--line); }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); }

.meta, .epic-link, .nav-links { font: .88rem/1.5 var(--sans); color: var(--muted); }
.epic-link { margin: .2rem 0 .8rem; }
.epic-link a, .nav-links a { font-weight: 600; }
.previously { margin: 1.2rem 0 1.4rem; padding: .15rem 0 .15rem 1rem; border-left: 3px solid var(--accent-soft); color: var(--ink-2); font-style: italic; }
.corrected { display: inline-block; margin: .3rem 0; padding: .4rem .75rem; border-radius: 8px; background: var(--warn-tint); color: var(--warn); font: .85rem/1.4 var(--sans); }
.withdrawn { color: var(--muted); font-style: italic; }

/* The story. Images show whole, never cropped: the fiction mark is in a corner (Article V). */
.story > p:not([class]) { font-size: 1.06rem; line-height: 1.75; }
.story img { display: block; width: 100%; max-width: 100%; height: auto; margin: 1.4rem 0 .45rem; border-radius: 6px; background: var(--paper-2); }
.caption { margin: 0 0 1.4rem; font: .8rem/1.45 var(--sans); color: var(--muted); }

/* The real news behind a story (Article VI), in the colours of the news clip on the home page. */
.real-news { margin: 2.6rem 0 1.5rem; padding: 1.3rem 1.25rem .6rem; border: 1px solid var(--news-line); border-radius: 14px; background: var(--news); color: var(--news-ink); }
.doc .real-news h2 { margin: 0 0 .35rem; color: #15302a; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
.real-news .meta { color: #4d625b; }
.doc .real-news h3 { margin: 1.2rem 0 .5rem; font: 700 .7rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--news-ink); }
.sources { margin: 0 0 .8rem; padding: 0; list-style: none; }
.sources li { margin: 0 0 .6rem; padding: .7rem .85rem; border: 1px solid var(--news-line); border-radius: 10px; background: rgba(255, 255, 255, .55); font: .9rem/1.45 var(--sans); word-break: break-word; }
.sources a { color: var(--news-ink); font-size: .82rem; }

.after-story { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1.4rem 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font: .88rem/1 var(--sans); color: var(--muted); }
.share a { padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 600; }
.share a:hover { border-color: var(--ink); color: var(--ink); }
.support { font: .88rem/1.5 var(--sans); color: var(--muted); }
.doc .button { padding: .8rem 1.2rem; font-size: .9rem; }

/* The epic index. */
.epic-head { margin: .4rem 0 1.4rem; }
.epic-head .eyebrow { margin-bottom: .6rem; color: var(--news-ink); }
.doc .facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.doc .facts li { padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: 500 .78rem/1 var(--sans); }
.doc a.latest-card { display: block; margin: 1.4rem 0 .6rem; padding: 1rem 1.15rem 1.1rem; border-left: 3px solid var(--accent); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.doc a.latest-card:hover { background: #fffaf0; }
.latest-card .kicker { color: var(--accent); }
.latest-card strong { display: block; margin-top: .4rem; font: 600 1.3rem/1.2 var(--pub-display); }
.index { margin: .4rem 0 0; padding: 0; list-style: none; counter-reset: none; }
.index li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .2rem .9rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.index li > * { grid-column: 2; }
.index li::before { content: attr(value); grid-row: 1 / span 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--accent); font: 500 1rem/1 var(--pub-display); }
.index a { font: 600 1.12rem/1.3 var(--pub-display); text-decoration: none; }
.index a:hover { text-decoration: underline; }
.index .meta { display: block; margin-top: .2rem; }

/* Forms: the reader's reply. */
.doc textarea { display: block; width: 100%; min-height: 9rem; margin: .8rem 0; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 1rem/1.55 var(--sans); }
.doc textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--highlight); }
.doc label { font: .92rem/1.4 var(--sans); }
.doc button { font: inherit; }

.beacon { position: absolute; width: 1px; height: 1px; }
.agent-note { font: .85rem/1.5 var(--sans); color: var(--muted); }

body.public .site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; max-width: 44rem; margin: 0 auto; padding: 2rem 1.1rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font: .85rem/1.6 var(--sans); }
body.public .site-footer p { margin: 0; }

/* The account request form (limited alpha). */
.request-form label { display: block; margin: 1.2rem 0 .35rem; font: 600 .92rem/1.35 var(--sans); }
.request-form input[type=text], .request-form input[type=email] { display: block; width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 1rem/1.4 var(--sans); }
.request-form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--highlight); }
.request-form textarea { margin: 0; }
.request-form .hint { margin: .35rem 0 0; font: .84rem/1.45 var(--sans); color: var(--muted); }
.form-errors { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid #ecc4bc; border-radius: 12px; background: #f7e3de; color: #8f2418; font: .92rem/1.45 var(--sans); }
.form-errors p { margin: .2rem 0; }
/* Kept off screen: only a bot fills it in. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
