/* Shared semantic color system: parchment is the default; dark responds only
   to the operating-system preference. These values do not change geometry. */
:root {
  color-scheme: light;
  --theme-paper: #e8dab4;
  --theme-paper-light: #f6edcf;
  --theme-paper-deep: #d2bf91;
  --theme-ink: #17150f;
  --theme-muted: #625b4a;
  --theme-faint: #8c8067;
  --theme-rule: rgba(23, 21, 15, .42);
  --theme-rule-strong: rgba(23, 21, 15, .72);
  --theme-soft-rule: rgba(23, 21, 15, .18);
  --theme-accent: #795126;
  --theme-accent-hover: #6c481d;
  --theme-gold: #c9994d;
  --theme-gold-light: #e4c27f;
  --theme-dark: #171a13;
  --theme-surface: rgba(246, 237, 207, .96);
  --theme-shadow: rgba(44, 32, 13, .14);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --theme-paper: #17130f;
    --theme-paper-light: #2a2119;
    --theme-paper-deep: #3d3023;
    --theme-ink: #f3e8cf;
    --theme-muted: #cabba1;
    --theme-faint: #a89d86;
    --theme-rule: rgba(243, 232, 207, .42);
    --theme-rule-strong: rgba(243, 232, 207, .46);
    --theme-soft-rule: rgba(243, 232, 207, .18);
    --theme-accent: #d6aa5b;
    --theme-accent-hover: #6c481d;
    --theme-gold: #d6aa5b;
    --theme-gold-light: #e4c27f;
    --theme-dark: #120f0c;
    --theme-surface: rgba(23, 19, 15, .96);
    --theme-shadow: rgba(0, 0, 0, .30);
  }
}

.imire-preview-banner {
  position: sticky;
  top: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  gap: .75rem;
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--border, #8b6b3f);
  background: var(--accent-soft, #eadbbd);
  color: var(--ink, #2f2418);
  font-size: .9rem;
}

.imire-preview-banner a { color: inherit; font-weight: 700; }

.access-fieldset {
  display: grid;
  gap: .55rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border, #b6a27f);
}

.access-fieldset label { display: flex; align-items: flex-start; gap: .55rem; }
.access-fieldset input[type="checkbox"] { width: auto; margin-top: .2rem; }

body {
  color: var(--theme-ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 251, 232, .85), transparent 31rem),
    radial-gradient(circle at 88% 27%, rgba(120, 80, 31, .11), transparent 35rem),
    repeating-linear-gradient(7deg, rgba(80, 56, 25, .027) 0 1px, transparent 1px 6px),
    linear-gradient(105deg, #dfcfa5 0%, var(--theme-paper) 38%, #e4d6ad 69%, #d8c69b 100%);
}

a { color: var(--theme-ink); }
.site-header, .site-footer { color: var(--theme-ink); border-color: var(--theme-rule); background: var(--theme-surface); }
.site-header a, .site-footer a { color: var(--theme-ink); }
.site-header input { color: var(--theme-ink); border-color: var(--theme-rule); background: var(--theme-paper-light); }

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 12% 18%, rgba(132, 88, 45, .22), transparent 25%),
      radial-gradient(circle at 82% 9%, rgba(166, 119, 51, .11), transparent 28%),
      repeating-linear-gradient(4deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 5px),
      linear-gradient(112deg, #120f0c 0%, var(--theme-paper) 38%, #211a13 70%, #100d0b 100%);
  }
}

/* Shared authenticated surfaces. These classes are used by sign-in, account,
   Campaign, and Admin pages only; public article layouts remain page-local. */
.auth-page,
.admin-page {
  min-height: 100vh;
  margin: 0;
  color: var(--theme-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.auth-page *,
.admin-page * { box-sizing: border-box; }

.auth-shell,
.admin-shell {
  width: min(calc(100% - 2rem), 72rem);
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.auth-shell { width: min(calc(100% - 2rem), 40rem); }

.auth-card,
.admin-card,
.admin-page section {
  border: 1px solid var(--theme-rule);
  background: var(--theme-surface);
  box-shadow: .55rem .65rem 0 var(--theme-shadow);
}

.auth-card { padding: clamp(1.5rem, 5vw, 3rem); }

.auth-emblem {
  width: clamp(3.5rem, 9vw, 5.25rem);
  margin: 0 0 1.25rem;
}

.auth-emblem img {
  display: block;
  width: 100%;
  height: auto;
  opacity: .78;
}

.auth-page .eyebrow,
.admin-page .eyebrow {
  margin: 0 0 .7rem;
  color: var(--theme-accent);
  font: 800 .72rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-page h1,
.admin-page h1,
.admin-page h2,
.admin-page h3 { margin-top: 0; color: var(--theme-ink); }

.auth-page h1,
.admin-page h1 {
  margin-bottom: .8rem;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.02;
}

.auth-page .lede,
.admin-page .lede {
  max-width: 48rem;
  margin: 0;
  color: var(--theme-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: .55rem;
  margin-top: 1.5rem;
}

.auth-form label {
  margin-top: .35rem;
  font: 800 .72rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  min-width: 0;
  padding: .72rem .8rem;
  color: var(--theme-ink);
  border: 1px solid var(--theme-rule);
  border-radius: 2px;
  background: var(--theme-paper-light);
  font: inherit;
}

.auth-form button,
.auth-page button,
.admin-page button,
.admin-page .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.7rem;
  margin-top: .55rem;
  padding: .65rem 1rem;
  color: var(--theme-paper-light);
  border: 1px solid var(--theme-accent);
  border-radius: 2px;
  background: var(--theme-accent-hover);
  font: 800 .72rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-page .button.secondary {
  color: var(--theme-ink);
  background: var(--theme-paper-light);
}

.field-help,
.auth-footnote,
.auth-message {
  color: var(--theme-muted);
  line-height: 1.55;
}

.auth-message {
  padding: .75rem 1rem;
  border-left: 3px solid var(--theme-accent);
  background: var(--theme-paper-light);
}

.auth-footnote { margin: 1.35rem 0 0; }
.optional-label { color: var(--theme-faint); font-weight: 400; }

.admin-welcome {
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px solid var(--theme-rule);
  background: var(--theme-surface);
  box-shadow: .55rem .65rem 0 var(--theme-shadow);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  margin-top: 1.35rem;
}

.admin-section-heading { margin: clamp(2.5rem, 6vw, 4.5rem) 0 1.25rem; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}

.admin-card {
  display: block;
  min-width: 0;
  padding: 1.35rem;
  color: var(--theme-ink);
  text-decoration: none;
}

a.admin-card:hover,
a.admin-card:focus-visible {
  border-color: var(--theme-rule-strong);
  transform: translateY(-2px);
}

.admin-card > span,
.private-badge {
  color: var(--theme-accent);
  font: 800 .68rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-card h3 { margin: .65rem 0 .55rem; font-size: 1.35rem; }
.admin-card p { margin: 0; color: var(--theme-muted); line-height: 1.55; }

.admin-page section {
  margin-top: 1.25rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
}

.invite-list {
  display: grid;
  gap: .8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-item,
.invite-code-panel {
  padding: 1rem;
  border: 1px solid var(--theme-soft-rule);
  background: var(--theme-paper-light);
}

.invite-code { overflow-wrap: anywhere; }

.auth-page .site-footer,
.admin-page .site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  margin-top: 2rem;
  padding: 1.2rem clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--theme-rule);
}

.auth-page .site-footer p,
.admin-page .site-footer p { margin: 0; }

.auth-page .site-footer nav,
.admin-page .site-footer nav { display: flex; flex-wrap: wrap; gap: .8rem; }

@media (max-width: 600px) {
  .auth-shell,
  .admin-shell { width: min(calc(100% - 1.25rem), 72rem); padding-block: 2.25rem; }
  .auth-card { padding: 1.25rem; }
  .admin-welcome { padding: 1.25rem; }
  .admin-card { padding: 1.1rem; }
}

/* ========================================================================== */
/* Realm of Imïré — desktop-first homepage                                    */
/* Append to the END of styles.css. Uses atlas-* classes to avoid collisions. */
/* ========================================================================== */

.atlas-home {
  --atlas-wide: 1480px;
  --atlas-reading: 760px;
  --atlas-ink: var(--theme-ink);
  --atlas-paper: var(--theme-paper);
  --atlas-paper-light: var(--theme-paper-light);
  --atlas-muted: var(--theme-muted);
  --atlas-rule: var(--theme-rule);
  --atlas-soft-rule: var(--theme-soft-rule);
  --atlas-accent: var(--theme-accent-hover);
  --atlas-dark: var(--theme-dark);
  --atlas-gold: var(--theme-gold);
  color: var(--atlas-ink);
}

.atlas-wide {
  width: min(calc(100% - 5rem), var(--atlas-wide));
  margin-inline: auto;
}

.atlas-home h1,
.atlas-home h2,
.atlas-home h3 {
  color: var(--atlas-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.atlas-home p { color: var(--atlas-muted); }

.atlas-overline {
  margin: 0 0 .9rem;
  color: var(--atlas-accent) !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.atlas-overline-light { color: var(--atlas-gold) !important; }

.atlas-large-copy {
  margin: 0 0 1.5rem;
  color: var(--atlas-ink) !important;
  font-size: clamp(1.25rem, 1.55vw, 1.58rem);
  line-height: 1.45;
}

.atlas-large-copy-light { color: #eee2c8 !important; }

/* HERO -------------------------------------------------------------------- */
.atlas-hero {
  padding: 3.4rem 0 4rem;
}

.atlas-hero-layout {
  min-height: min(760px, calc(100vh - 7rem));
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(480px, .97fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--atlas-rule);
}

.atlas-hero-copy {
  max-width: 780px;
  padding-left: clamp(0rem, 1.5vw, 1.5rem);
}

.atlas-hero h1 {
  max-width: 13ch;
  margin: 0 0 1.45rem;
  font-size: clamp(4.6rem, 6.4vw, 7.7rem);
  line-height: .9;
  letter-spacing: -.052em;
}

.atlas-hero h1 em {
  color: var(--atlas-accent);
  font-style: italic;
  font-weight: 400;
}

.atlas-hero-lede {
  max-width: 680px;
  margin: 0;
  color: #2f2c24 !important;
  font-size: clamp(1.18rem, 1.45vw, 1.42rem);
  line-height: 1.58;
}

.atlas-hero-subcopy {
  max-width: 650px;
  margin: .95rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
}

.atlas-map-panel {
  margin: 0;
  align-self: stretch;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 560px;
}

.atlas-map-panel > a {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(1.4rem, 2vw, 2rem);
  border: 1px solid var(--atlas-ink);
  background: var(--atlas-paper-light);
  box-shadow: .8rem .8rem 0 rgba(17, 17, 14, .11);
  overflow: hidden;
}

.atlas-map-panel img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: contain;
  filter: saturate(.78) sepia(.08) contrast(.97);
  mix-blend-mode: multiply;
}

.atlas-map-panel figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .8rem;
  color: var(--atlas-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.atlas-map-panel figcaption a { color: inherit; text-decoration: none; }
.atlas-map-panel figcaption a:hover { text-decoration: underline; }

/* ACTIONS ----------------------------------------------------------------- */
.atlas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  align-items: center;
  margin-top: 1.9rem;
}

.atlas-btn {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.08rem;
  border: 1px solid var(--atlas-ink);
  border-radius: 2px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.atlas-btn:hover,
.atlas-btn:focus-visible { transform: translateY(-2px); }
.atlas-btn-solid { background: var(--atlas-ink); color: var(--atlas-paper-light); }
.atlas-btn-solid:hover { background: var(--atlas-accent); color: #fff9eb; }
.atlas-btn-outline { background: transparent; color: var(--atlas-ink); }
.atlas-btn-outline:hover { background: var(--atlas-ink); color: var(--atlas-paper-light); }
.atlas-btn-light { border-color: #eee2c8; background: #eee2c8; color: #171812; }
.atlas-btn-light:hover { background: #fff9eb; color: #171812; }

.atlas-text-link {
  display: inline-block;
  padding-bottom: .15rem;
  border-bottom: 1px solid currentColor;
  color: var(--atlas-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}
.atlas-text-link:hover { border-color: transparent; }
.atlas-text-link-light { color: #eee2c8; }

/* STATEMENT --------------------------------------------------------------- */
.atlas-statement {
  padding: 5.8rem 0 6.2rem;
}

.atlas-statement-layout {
  display: grid;
  grid-template-columns: minmax(350px, .75fr) minmax(0, 1.25fr);
  gap: clamp(4rem, 7vw, 8rem);
  align-items: start;
}

.atlas-statement-title h2 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.4rem, 4.9vw, 5.8rem);
  line-height: .95;
  letter-spacing: -.04em;
}

.atlas-statement-copy {
  max-width: 880px;
  padding-top: .35rem;
}

.atlas-copy-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.6rem;
}

.atlas-copy-columns p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
}

.atlas-statement-copy .atlas-text-link { margin-top: 1.7rem; }

/* PATHS ------------------------------------------------------------------- */
.atlas-paths {
  padding: 0 0 6.5rem;
}

.atlas-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .55fr);
  gap: 4rem;
  align-items: end;
  margin-bottom: 2.25rem;
  padding-top: 2.1rem;
  border-top: 1px solid var(--atlas-rule);
}

.atlas-section-head h2 {
  margin: 0;
  font-size: clamp(2.8rem, 3.8vw, 4.55rem);
  line-height: .98;
  letter-spacing: -.035em;
}

.atlas-section-head > p {
  max-width: 470px;
  margin: 0;
  justify-self: end;
  font-size: .98rem;
  line-height: 1.65;
}

.atlas-path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--atlas-ink);
  border-left: 1px solid var(--atlas-ink);
}

.atlas-path {
  min-height: 210px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem 1.3rem;
  border-right: 1px solid var(--atlas-ink);
  border-bottom: 1px solid var(--atlas-ink);
  color: var(--atlas-ink);
  text-decoration: none;
  transition: background .17s ease, color .17s ease;
}

.atlas-path:hover {
  background: var(--atlas-ink);
  color: var(--atlas-paper-light);
}

.atlas-path-no {
  justify-self: end;
  color: var(--atlas-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.atlas-path h3 {
  margin: 0 0 .45rem;
  color: inherit;
  font-size: clamp(1.55rem, 1.9vw, 2.1rem);
}

.atlas-path p {
  margin: 0;
  color: inherit;
  opacity: .72;
  font-size: .9rem;
  line-height: 1.5;
}

.atlas-path-go {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* LITHAEA ----------------------------------------------------------------- */
.atlas-lithaea {
  background:
    radial-gradient(circle at 87% 20%, rgba(214, 170, 91, .13), transparent 25rem),
    linear-gradient(118deg, #20251a 0%, #151811 66%, #10130e 100%);
  color: #eee2c8;
}

.atlas-lithaea-layout {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(430px, .88fr) minmax(0, 1.12fr);
  gap: clamp(4rem, 7vw, 8rem);
  align-items: center;
  padding: 6.5rem 0;
}

.atlas-lithaea-heading h2 {
  max-width: 8ch;
  margin: 0;
  color: #f3e8cf;
  font-size: clamp(4.4rem, 6vw, 7.2rem);
  line-height: .89;
  letter-spacing: -.05em;
}

.atlas-lithaea-tagline {
  max-width: 360px;
  margin: 1.2rem 0 0;
  color: #bfb39a !important;
  font-size: 1rem;
  line-height: 1.6;
}

.atlas-lithaea-copy {
  max-width: 850px;
}

.atlas-copy-columns-light p { color: #cec2aa; }
.atlas-copy-columns-light strong { color: #fff7e4; }

/* BEYOND ------------------------------------------------------------------ */
.atlas-beyond {
  padding: 6.2rem 0;
}

.atlas-beyond-layout {
  display: grid;
  grid-template-columns: minmax(430px, .9fr) minmax(0, 1.1fr);
  gap: clamp(4rem, 8vw, 9rem);
  align-items: start;
}

.atlas-beyond-title h2 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(3.4rem, 4.8vw, 5.7rem);
  line-height: .95;
  letter-spacing: -.04em;
}

.atlas-beyond-copy {
  max-width: 820px;
}

.atlas-beyond-copy > p:not(.atlas-large-copy) {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

/* PUBLISHING -------------------------------------------------------------- */
.atlas-publishing {
  padding: 1rem 0 6.5rem;
}

.atlas-section-head-publishing {
  padding-top: 3rem;
  border-top: 1px solid var(--atlas-rule);
}

.atlas-pub-table {
  border-top: 1px solid var(--atlas-ink);
}

.atlas-pub-row {
  display: grid;
  grid-template-columns: 90px minmax(250px, .85fr) minmax(0, 1.6fr) 36px;
  gap: 1.6rem;
  align-items: center;
  min-height: 96px;
  padding: 1.25rem .5rem;
  border-bottom: 1px solid var(--atlas-ink);
  color: var(--atlas-ink);
  text-decoration: none;
  transition: padding-left .16s ease, background .16s ease;
}

.atlas-pub-row:hover {
  padding-left: 1rem;
  background: rgba(17, 17, 14, .045);
}

.atlas-pub-type {
  color: var(--atlas-accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.atlas-pub-row h3 {
  margin: 0;
  color: inherit;
  font-size: 1.45rem;
}

.atlas-pub-row p {
  max-width: none;
  margin: 0;
  color: var(--atlas-muted);
  font-size: .9rem;
  line-height: 1.5;
}

.atlas-pub-arrow {
  justify-self: end;
  font-size: 1.15rem;
}

/* FOOTER ZONE ------------------------------------------------------------- */
.atlas-footer-zone {
  padding: 0 0 6rem;
}

.atlas-footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  border: 1px solid var(--atlas-ink);
  background: var(--atlas-paper-light);
  box-shadow: .8rem .8rem 0 rgba(17, 17, 14, .10);
}

.atlas-members,
.atlas-closing {
  min-height: 330px;
  padding: clamp(2.3rem, 3vw, 3.7rem);
}

.atlas-members {
  border-right: 1px solid var(--atlas-ink);
}

.atlas-members h2,
.atlas-closing h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 3vw, 3.6rem);
  line-height: .98;
  letter-spacing: -.03em;
}

.atlas-members p,
.atlas-closing p {
  max-width: 620px;
  line-height: 1.65;
}

.atlas-members .atlas-btn { margin-top: .8rem; }
.atlas-closing { display: flex; flex-direction: column; justify-content: center; }
.atlas-closing > p:not(.atlas-overline) { font-size: 1.1rem; font-style: italic; }
.atlas-closing .atlas-text-link { align-self: flex-start; margin-top: .5rem; }

/* DARK SYSTEM ------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .atlas-home {
    --atlas-ink: var(--theme-ink);
    --atlas-paper: var(--theme-paper);
    --atlas-paper-light: var(--theme-paper-light);
    --atlas-muted: var(--theme-muted);
    --atlas-rule: var(--theme-rule);
    --atlas-soft-rule: var(--theme-soft-rule);
    --atlas-accent: var(--theme-accent);
  }

  .atlas-hero-lede { color: #e3d6bd !important; }
  .atlas-map-panel > a,
  .atlas-footer-layout { box-shadow: .8rem .8rem 0 rgba(0, 0, 0, .30); }
  .atlas-map-panel img { mix-blend-mode: normal; }
  .atlas-pub-row:hover { background: rgba(243, 232, 207, .045); }
}

/* TABLET ------------------------------------------------------------------ */
@media (max-width: 1180px) {
  .atlas-wide { width: min(calc(100% - 3rem), var(--atlas-wide)); }

  .atlas-hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr);
    gap: 3rem;
  }

  .atlas-hero h1 { font-size: clamp(4rem, 7vw, 6.6rem); }
  .atlas-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-path { min-height: 180px; }

  .atlas-statement-layout,
  .atlas-lithaea-layout,
  .atlas-beyond-layout { gap: 4rem; }

  .atlas-pub-row {
    grid-template-columns: 70px minmax(210px, .8fr) minmax(0, 1.3fr) 28px;
    gap: 1rem;
  }
}

/* SMALL TABLET / MOBILE --------------------------------------------------- */
@media (max-width: 820px) {
  .atlas-wide { width: min(calc(100% - 2rem), var(--atlas-wide)); }

  .atlas-hero-layout,
  .atlas-statement-layout,
  .atlas-section-head,
  .atlas-lithaea-layout,
  .atlas-beyond-layout,
  .atlas-footer-layout {
    grid-template-columns: 1fr;
  }

  .atlas-hero-layout { min-height: 0; }
  .atlas-hero-copy { padding-left: 0; }
  .atlas-hero h1 { max-width: 11ch; font-size: clamp(3.6rem, 14vw, 5.6rem); }
  .atlas-map-panel { min-height: 0; }
  .atlas-map-panel > a { min-height: 320px; }

  .atlas-copy-columns { grid-template-columns: 1fr; gap: 1rem; }
  .atlas-section-head > p { justify-self: start; max-width: 650px; }
  .atlas-path-grid { grid-template-columns: 1fr; }
  .atlas-path { min-height: 150px; }

  .atlas-lithaea-heading h2,
  .atlas-beyond-title h2,
  .atlas-statement-title h2 { max-width: none; }

  .atlas-pub-row {
    grid-template-columns: 72px 1fr 28px;
  }
  .atlas-pub-row p { grid-column: 2 / 4; }

  .atlas-members { border-right: 0; border-bottom: 1px solid var(--atlas-ink); }
  .atlas-members, .atlas-closing { min-height: 0; }
}

@media (max-width: 560px) {
  .atlas-hero { padding-top: 2.5rem; }
  .atlas-actions { align-items: stretch; }
  .atlas-btn { width: 100%; }
  .atlas-path-grid { border-left: 0; }
  .atlas-path { border-left: 1px solid var(--atlas-ink); }
  .atlas-pub-row { grid-template-columns: 1fr auto; gap: .45rem 1rem; }
  .atlas-pub-type { grid-column: 1 / 2; }
  .atlas-pub-row h3 { grid-column: 1 / 2; }
  .atlas-pub-row p { grid-column: 1 / -1; }
  .atlas-pub-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

/* ========================================================================== */
/* Shared site header — supplied by site.js on every public page.             */
/* The html selector deliberately outranks older page-specific shell rules.   */
/* ========================================================================== */
:root {
  --header-surface: var(--theme-surface);
  --header-ink: var(--theme-ink);
  --header-muted: var(--theme-muted);
  --header-rule: var(--theme-rule);
  --header-field: var(--theme-paper-light);
  --header-active-background: var(--theme-ink);
  --header-active-ink: var(--theme-paper-light);
}

html .site-header,
html .site-header * { box-sizing: border-box; }

html .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  padding: 0 clamp(1rem, 2.2vw, 2.4rem);
  color: var(--header-ink);
  border: 0;
  border-bottom: 1px solid var(--header-rule);
  background: var(--header-surface);
  box-shadow: 0 4px 18px var(--theme-shadow);
  backdrop-filter: blur(8px);
}

/* Some older documents retain a browser body margin for their content. The
   shared script measures that margin and marks only those headers, keeping the
   full-width header geometry independent of each page's body layout. */
html .site-header.site-header-viewport-edge {
  width: calc(100% + (var(--site-header-inline-inset) * 2));
  margin-inline: calc(var(--site-header-inline-inset) * -1);
}

html .site-nav {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 3.7rem;
  margin: 0;
  gap: clamp(.6rem, 1.5vw, 1.35rem);
}

html .site-brand {
  display: block;
  justify-self: start;
  color: var(--header-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 700;
  font-variant: normal;
  letter-spacing: .025em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

html .site-brand img { display: none !important; }

html .nav-toggle {
  display: none;
  min-height: 2.1rem;
  padding: .38rem .66rem;
  color: var(--header-active-ink);
  border: 1px solid var(--header-ink);
  border-radius: 1px;
  background: var(--header-active-background);
  font: 800 .68rem Arial, Helvetica, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html .nav-links {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

html .nav-links .nav-mobile-only { display: none; }

html .nav-links a {
  display: block;
  padding: .5rem .72rem;
  color: var(--header-ink);
  border: 1px solid transparent;
  border-radius: 1px;
  font: 800 .68rem Arial, Helvetica, sans-serif;
  letter-spacing: .09em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

html .nav-links a:hover,
html .nav-links a:focus-visible,
html .nav-links a.active,
html .nav-links a[aria-current="page"] {
  color: var(--header-active-ink);
  border-color: var(--header-active-background);
  background: var(--header-active-background);
}

html .nav-auth {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: .65rem;
  min-width: 0;
  font: 800 .7rem Arial, Helvetica, sans-serif;
  letter-spacing: .075em;
  text-transform: uppercase;
}

html .nav-auth a,
html .nav-login { color: var(--header-ink); text-decoration: none; white-space: nowrap; }
html .nav-auth a:hover,
html .nav-auth a:focus-visible { color: var(--header-muted); }

html .site-header .nav-search {
  display: flex;
  align-items: center;
  gap: .32rem;
  min-width: 0;
  margin: 0;
}

html .site-header .nav-search input {
  width: clamp(6.25rem, 10vw, 9rem);
  min-width: 0;
  min-height: 2.1rem;
  padding: .37rem .58rem;
  color: var(--header-ink);
  border: 1px solid var(--header-rule);
  border-radius: 1px;
  background: var(--header-field);
  font: 600 .73rem Arial, Helvetica, sans-serif;
}

html .site-header .nav-search input::placeholder { color: var(--header-muted); opacity: 1; }

html .site-header .nav-search button {
  min-height: 2.1rem;
  padding: .37rem .56rem;
  color: var(--header-active-ink);
  border: 1px solid var(--header-active-background);
  border-radius: 1px;
  background: var(--header-active-background);
  font: 800 .65rem Arial, Helvetica, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}

html .site-header .nav-search button:hover,
html .site-header .nav-search button:focus-visible {
  color: var(--header-ink);
  background: var(--header-field);
}

@media (max-width: 900px) {
  html .site-nav { grid-template-columns: minmax(0, 1fr) auto auto; }
  html .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  html .site-header .nav-search label { display: none; }
  html .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    padding: .75rem;
    border: 1px solid var(--header-rule);
    background: var(--header-surface);
    box-shadow: .45rem .55rem 0 var(--theme-shadow);
  }
  html .nav-links.open { display: flex; }
  html .nav-links .nav-mobile-only { display: list-item; }
  html .nav-login { display: none; }
}

@media (max-width: 600px) {
  html .site-header { padding-inline: .75rem; }
  html .site-nav { grid-template-columns: minmax(0, 1fr) auto; min-height: 3.45rem; gap: .45rem; }
  html .site-brand { font-size: .98rem; }
  html .nav-auth { display: none; }
}
