/* Eberron public pages. Same type and colours as the Session Zero handout:
   parchment and Khyber ink, Siberys gold as the one accent, red for table changes. */
:root {
  --paper: #F5F3EE;
  --sheet: #FFFFFF;
  --ink: #1D2230;
  --ink-2: #4A5163;
  --ink-3: #7A8194;
  --rule: #D6D3CB;
  --rule-soft: #E7E4DD;
  --siberys: #9A6B12;
  --siberys-soft: #F6ECD6;
  --eberron: #8E2A2A;
  --eberron-soft: #F7E4E1;
  --night: #0b0c15;
  --display: "Marcellus SC", "Trajan Pro", Georgia, serif;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
  --label: "Alegreya Sans SC", "Gill Sans", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14161C; --sheet: #1B1E26; --ink: #ECEAE4; --ink-2: #B9BCC6; --ink-3: #8A8F9C;
    --rule: #333744; --rule-soft: #262A34; --siberys: #E0B45A; --siberys-soft: #2E2512;
    --eberron: #E88A84; --eberron-soft: #361B1B; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
a { color: var(--siberys); }
a:focus-visible { outline: 2px solid var(--siberys); outline-offset: 2px; }

/* Top bar shared by every Eberron page */
.topbar { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding: 12px 20px;
  font-family: var(--label); font-size: 15px; letter-spacing: .06em; border-bottom: 1px solid var(--rule); }
.topbar .home { margin-right: auto; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 18px; }
.topbar a { text-decoration: none; }
.topbar a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--siberys); }

/* ---------- Landing page ---------- */
.landing { background: var(--night); color: #ECEAE4; }
.landing .topbar { position: absolute; inset: 0 0 auto 0; z-index: 2; border-color: rgba(255,255,255,.12); }
.landing .topbar .home { color: #ECEAE4; }
.landing .topbar a { color: #E0B45A; }
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center;
  padding: 96px 16px 64px; background: var(--night) url("/eberron/sharn-skyline.svg") center bottom / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 46% 30% at 50% 48%, rgba(7,9,20,.72) 0%, rgba(7,9,20,0) 100%),
    linear-gradient(180deg, rgba(7,9,20,.15) 0%, rgba(7,9,20,.35) 55%, rgba(11,12,21,.92) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { margin: 0; font-family: var(--label); letter-spacing: .3em; text-transform: uppercase; font-size: 14px; color: #E0B45A; }
.hero h1 { margin: 10px 0 12px; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 8vw, 84px);
  line-height: 1.05; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.hero .lede { margin: 0 auto; max-width: 60ch; font-size: clamp(18px, 2.4vw, 21px); text-shadow: 0 1px 12px rgba(0,0,0,.8); }

.doors { position: relative; z-index: 1; max-width: 1040px; margin: -40px auto 0; padding: 0 16px 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.door { display: block; padding: 22px; border-radius: 10px; text-decoration: none; color: #ECEAE4;
  background: rgba(27,30,38,.92); border: 1px solid #333744; transition: border-color .15s, transform .15s; }
a.door:hover, a.door:focus-visible { border-color: #E0B45A; transform: translateY(-2px); outline: none; }
.door h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 24px; color: #E0B45A; }
.door p { margin: 0; color: #B9BCC6; }
.door .soon { display: inline-block; margin-top: 12px; font-family: var(--label); font-size: 13px; letter-spacing: .08em; color: #8A8F9C; }

.about { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; color: #B9BCC6; }
.about h2 { font-family: var(--display); font-weight: 400; color: #ECEAE4; font-size: 26px; margin: 0 0 8px; }
.about p { margin: 0 0 12px; }

.site-foot { border-top: 1px solid var(--rule); padding: 20px 16px; text-align: center; font-size: 14px; color: var(--ink-3); }
.landing .site-foot { border-color: #262A34; color: #8A8F9C; }

/* ---------- Rules page ---------- */
.rules-wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 72px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.rules-head { grid-column: 1 / -1; border-bottom: 3px double var(--ink); padding-bottom: 16px; }
.rules-head h1 { margin: 6px 0 8px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 6vw, 52px); line-height: 1; }
.rules-head p { margin: 0; max-width: 70ch; color: var(--ink-2); }
.rules-head .eyebrow { color: var(--siberys); }
.toc { position: sticky; top: 16px; align-self: start; font-family: var(--label); letter-spacing: .05em; font-size: 15px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover, .toc a:focus-visible, .toc a.active { color: var(--siberys); border-left-color: var(--siberys); outline: none; }
.rules section { margin: 0 0 48px; scroll-margin-top: 16px; }
.rules h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0 0 10px; }
.rules h3 { font-family: var(--label); font-weight: 700; font-size: 17px; letter-spacing: .07em; margin: 24px 0 8px; }
.rules p, .rules li { max-width: 74ch; }
.rules ul { padding-left: 22px; }
.rules li { margin: 0 0 6px; }
.rules table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.rules th { font-family: var(--label); font-size: 14px; letter-spacing: .07em; text-align: left; color: var(--ink-2); background: var(--rule-soft); padding: 8px 12px; }
.rules td { padding: 8px 12px; border-top: 1px solid var(--rule-soft); vertical-align: top; font-size: 16px; }
.table-scroll { overflow-x: auto; }
.rules .glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.glance li { margin: 0; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
.glance b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--siberys); }
.flag { display: inline-block; font-family: var(--label); font-size: 12px; letter-spacing: .08em; padding: 1px 8px; border-radius: 999px;
  color: var(--eberron); background: var(--eberron-soft); vertical-align: 2px; }
tr.changed td { background: var(--eberron-soft); }
.note { padding: 12px 16px; border-left: 3px solid var(--siberys); background: var(--siberys-soft); border-radius: 0 8px 8px 0; max-width: 74ch; }
.on { color: #2f7a3a; } .off { color: var(--eberron); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .on { color: #7fcf8a; } }

/* ---------- Player questions ---------- */
.question { margin: 0 0 24px; max-width: 74ch; }
.question label { display: block; font-weight: 700; margin: 0 0 6px; }
.question textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 8px; resize: vertical; }
.question textarea:focus-visible { outline: 2px solid var(--siberys); outline-offset: 1px; }
.save-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.save-row button { font-family: var(--label); font-size: 15px; letter-spacing: .06em; padding: 6px 18px; cursor: pointer;
  color: var(--sheet); background: var(--siberys); border: 0; border-radius: 999px; }
.save-row button:disabled { opacity: .6; cursor: wait; }
.saved { font-size: 15px; color: var(--ink-3); }

@media (max-width: 820px) {
  .rules-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-inline: 16px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { padding: 4px 12px; margin: 0; border: 1px solid var(--rule); border-radius: 999px; }
}
@media print { .topbar, .toc { display: none; } .rules-wrap { display: block; } }
