@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-500-italic.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/literata-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/literata-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/literata-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/literata-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #f4f1e8; --surface: #fbf9f3; --ink: #23271f; --muted: #5c6154; --line: #d9d4c4; --water: #cfdde3;
  --early: #7a5a12; --medieval: #8c2f2f; --tudor-stuart: #2c6248; --modern: #34508a; --home: #6e2c4a; --accent: var(--home); --accent-ink: #fff;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --col: 44rem; --wide: 70rem; color-scheme: light;
}
/* Android edge-to-edge (Capacitor): leave room for the status and gesture bars. All four are 0 in ordinary browsers. */
:root {
  --sat: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --sar: max(env(safe-area-inset-right, 0px), var(--safe-area-inset-right, 0px));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --sal: max(env(safe-area-inset-left, 0px), var(--safe-area-inset-left, 0px));
}
.theme-home { --accent: var(--home); }
.theme-early { --accent: var(--early); }
.theme-medieval { --accent: var(--medieval); }
.theme-tudor-stuart { --accent: var(--tudor-stuart); }
.theme-modern { --accent: var(--modern); }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161914; --surface: #1d211a; --ink: #e9e7dc; --muted: #a6ab9b; --line: #333929; --water: #24323a;
    --early: #e0b45c; --medieval: #e08c85; --tudor-stuart: #86cfa8; --modern: #a9bdf0; --home: #e5a3c3; --accent-ink: #14170f; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { overscroll-behavior-y: none; font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(5rem + var(--sat)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: 2.5rem; margin: 0.2em 0 0.3em; }
h2 { font-size: 1.6rem; margin: 1.6em 0 0.4em; }
h3 { font-size: 1.2rem; margin: 0 0 0.3em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: max(0.5rem, var(--sal)); top: calc(0.5rem + var(--sat)); background: var(--surface); padding: 0.4rem 0.8rem; z-index: 1000; }
.muted { color: var(--muted); } .small { font-size: 0.85rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 900; display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; padding: calc(0.55rem + var(--sat)) max(1.2rem, var(--sar)) 0.55rem max(1.2rem, var(--sal)); background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .parent { font-size: 1.15rem; line-height: 1; text-decoration: none; }
.site-header .brand { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.top-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.9rem; }
.top-links a { text-decoration: none; color: var(--ink); padding: 0.1rem 0; border-bottom: 2px solid transparent; }
.top-links a:hover, .top-links a[aria-current] { border-bottom-color: var(--accent); }

/* page columns */
main { min-height: 60vh; }
.col { max-width: var(--col); margin: 0 auto; padding: 1.5rem max(1.2rem, var(--sar)) 3rem max(1.2rem, var(--sal)); }
.col.wide-col { max-width: 56rem; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 1rem max(1.2rem, var(--sar)) 3rem max(1.2rem, var(--sal)); }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.eyebrow a { color: inherit; }
.lede { font-size: 1.15rem; color: var(--ink); }
.alt-name { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--muted); margin: -0.3rem 0 0.6rem; }
.count { font-size: 0.55em; color: var(--muted); font-weight: 500; }
.section-h { text-align: center; margin-top: 2.4rem; }

/* hero */
.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--home) 16%, var(--bg)), color-mix(in srgb, var(--modern) 14%, var(--bg))); border-bottom: 1px solid var(--line); }
.hero-in { max-width: 52rem; margin: 0 auto; padding: 3.5rem 1.2rem 3rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.button, button, select, input[type=search] { font: inherit; }
.button { display: inline-block; padding: 0.55rem 1.2rem; border-radius: 6px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.button.ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.button:hover { filter: brightness(1.08); }

/* era cards and cards */
.era-grid, .card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 1.6rem; }
.era-card, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.2rem; }
.era-card { border-top: 5px solid var(--early); }
.era-card.era-medieval { border-top-color: var(--medieval); } .era-card.era-tudor-stuart { border-top-color: var(--tudor-stuart); } .era-card.era-modern { border-top-color: var(--modern); }
.era-card h2 { margin: 0.1em 0 0.3em; } .era-card h2 a { text-decoration: none; color: var(--ink); }
.era-dates { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0; }
.era-counts { list-style: none; display: flex; gap: 0.3rem 1rem; flex-wrap: wrap; padding: 0; margin: 0.6rem 0; font-size: 0.9rem; color: var(--muted); }
.era-counts strong { color: var(--ink); }
.card { text-decoration: none; color: var(--ink); display: block; } .card:hover { border-color: var(--accent); } .card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* chips, facts */
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.chip { display: inline-block; font-size: 0.75rem; padding: 0.1rem 0.6rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); }
.chip.era-early { color: var(--early); border-color: var(--early); } .chip.era-medieval { color: var(--medieval); border-color: var(--medieval); } .chip.era-tudor-stuart { color: var(--tudor-stuart); border-color: var(--tudor-stuart); } .chip.era-modern { color: var(--modern); border-color: var(--modern); }
.chip.acc-uncertain { border-style: dashed; } .chip-legend { font-style: italic; }
.glance { display: grid; grid-template-columns: 8rem 1fr; gap: 0.3rem 1rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin: 1rem 0; }
.glance dt { color: var(--muted); font-size: 0.85rem; } .glance dd { margin: 0; }
.plain { list-style: none; padding: 0; } .plain li { margin: 0.25rem 0; } .when { display: inline-block; min-width: 5.5rem; color: var(--muted); font-size: 0.9rem; }
.waypoints { columns: 2; font-size: 0.95rem; }
.pager { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* lists and filters */
.filters { display: flex; gap: 0.8rem 1.2rem; flex-wrap: wrap; align-items: end; padding: 0.8rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; font-size: 0.9rem; }
.filters label { display: flex; flex-direction: column; gap: 0.2rem; color: var(--muted); }
select, input[type=search] { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 0.35rem 0.5rem; }
button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 0.35rem 0.8rem; cursor: pointer; }
button:hover { border-color: var(--accent); }
.rec-list .rec-sum a { font-size: 0.9rem; }
.rec-list { list-style: none; padding: 0; margin: 0; }
.rec-list li { padding: 0.7rem 0 0.7rem 0.9rem; border-bottom: 1px solid var(--line); border-left: 4px solid var(--early); }
.rec-list li.era-medieval { border-left-color: var(--medieval); } .rec-list li.era-tudor-stuart { border-left-color: var(--tudor-stuart); } .rec-list li.era-modern { border-left-color: var(--modern); }
.rec-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-decoration: none; }
.rec-meta { display: block; font-size: 0.8rem; color: var(--muted); } .rec-sum { display: block; font-size: 0.95rem; }
.search-form { display: flex; gap: 0.5rem; } .search-form input { flex: 1; min-width: 0; }

/* timeline */
.jump { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin: 1rem 0 0.5rem; font-size: 0.9rem; }
.jump a { text-decoration: none; padding: 0.15rem 0.7rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
/* The Timeline page's list of periods: a bulleted stack under a "Jump to..." title. */
.jump-list { margin: 1rem 0 0.5rem; font-size: 0.95rem; }
.jump-title { margin: 0 0 0.3rem; font-weight: 600; color: var(--muted); }
.jump-list ul { margin: 0; padding-left: 1.3rem; list-style: disc; }
.jump-list li { margin: 0.15rem 0; }
.jump-list a { text-decoration: none; }
.jump-list a:hover { text-decoration: underline; }
/* Floating button on the Timeline page: appears once the Jump to list has scrolled out of view and takes the reader back to it. */
.to-jump { position: fixed; right: max(1rem, var(--sar)); bottom: calc(1rem + var(--sab)); z-index: 800; padding: 0.55rem 1rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.95rem; text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); opacity: 0; visibility: hidden; transform: translateY(0.6rem); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
.to-jump.show { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .to-jump { transition: none; } }
.period h2 { border-bottom: 3px solid var(--early); padding-bottom: 0.2rem; } .period.era-medieval h2 { border-color: var(--medieval); } .period.era-tudor-stuart h2 { border-color: var(--tudor-stuart); } .period.era-modern h2 { border-color: var(--modern); }
.tl { list-style: none; padding: 0; margin: 0; } .tl li { padding: 0.45rem 0; border-bottom: 1px dotted var(--line); }
.tl-year { display: inline-block; min-width: 8.2rem; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-sum { display: block; margin-left: 8.2rem; font-size: 0.92rem; color: var(--muted); }
.chart-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lifespans { width: 100%; min-width: 760px; height: auto; display: block; }
.lifespans .lbl { font-size: 11px; font-weight: 600; font-family: var(--font-body); } .lifespans .tick { font-size: 10px; fill: var(--muted); font-family: var(--font-body); } .lifespans .pl { font-size: 10px; fill: var(--ink); font-family: var(--font-body); } .lifespans .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.lifespans a:hover rect, .lifespans a:focus rect { stroke: var(--ink); stroke-width: 1.5; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.6rem max(1.2rem, var(--sar)) calc(2.4rem + var(--sab)) max(1.2rem, var(--sal)); text-align: center; background: var(--surface); }
.footer-nav { display: flex; gap: 0.4rem 1.2rem; justify-content: center; flex-wrap: wrap; margin: 0.8rem 0; font-size: 0.9rem; }
.footer-search { max-width: 22rem; margin: 0.8rem auto; }
@media (max-width: 600px) { h1 { font-size: 2rem; } .glance { grid-template-columns: 1fr; } .tl-sum { margin-left: 0; } .tl-year { display: block; min-width: 0; margin-bottom: 0.1rem; } .waypoints { columns: 1; } .site-header { position: static; } }
@media print { .site-header, .site-footer, .filters, .jump, .jump-list, .to-jump { display: none; } body { background: #fff; color: #000; } }

/* Sources and identifiers on record pages */
.sources { padding-left: 1.2em; }
.sources li { margin: 0 0 .45em; }
.sources .locator { font-variant-numeric: tabular-nums; }
.ids .chip { margin-right: .35em; }

/* Editing area (/admin) */
.admin-bar { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: center; padding: 0.6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.admin-bar form { margin-left: auto; }
.admin-form { display: grid; gap: 0.9rem; max-width: 46rem; margin: 1rem 0; }
.admin-form label { display: flex; flex-direction: column; gap: 0.25rem; color: var(--muted); font-size: 0.92rem; }
.admin-form label.check { flex-direction: row; align-items: center; gap: 0.6rem; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form textarea, .admin-form select { width: 100%; box-sizing: border-box; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 0.45rem 0.6rem; font: inherit; }
.admin-form small { color: var(--muted); font-size: 0.82rem; }
.admin-form.danger { border-left: 4px solid #a33; padding-left: 0.8rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table .diff { margin: 0.3rem 0 0; font-size: 0.8rem; white-space: pre-wrap; color: var(--muted); }
form.inline { display: inline; margin: 0; }
a.button { display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); text-decoration: none; }
.flash { margin: 0.8rem 1rem; padding: 0.6rem 0.9rem; border-radius: 5px; border: 1px solid var(--line); }
.flash-ok { border-left: 4px solid #3a7; } .flash-err { border-left: 4px solid #a33; }

/* Phones and narrow windows: the menu folds into a button on the title line. Without JavaScript the links stay visible. */
.nav-toggle { display: none; }
@media (max-width: 800px), (max-height: 500px) and (pointer: coarse) {
  .js .site-header { position: sticky; top: 0; flex-wrap: nowrap; align-items: center; gap: 0 0.7rem; padding: calc(0.35rem + var(--sat)) max(0.8rem, var(--sar)) 0.35rem max(0.8rem, var(--sal)); }
  .js .site-header .brand { margin-right: 0; font-size: 1.3rem; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .js .nav-toggle { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0.4rem 0.9rem; font-size: 0.9rem; }
  .js .nav-toggle::after { content: ""; width: 0.42em; height: 0.42em; margin: -0.2em 0 0 0.55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
  .js .nav-toggle[aria-expanded="true"]::after { margin-top: 0.25em; transform: rotate(-135deg); }
  .js .site-header .top-links { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 1200; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 0.2rem max(0.8rem, var(--sar)) 0.5rem max(0.8rem, var(--sal)); background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); overflow: visible; }
  .js .site-header.nav-open .top-links { display: flex; }
  .js .site-header .top-links a { padding: 0.75rem 0.2rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .js .site-header .top-links a:last-child { border-bottom: 0; }
  .js .site-header .top-links a[aria-current] { color: var(--accent); font-weight: 600; }
}

/* glossary */
.gl-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin: 1rem 0 0.2rem; border-bottom: 1px solid var(--line); }
.gl-tabs a { text-decoration: none; padding: 0.45rem 1rem; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface); color: var(--muted); font-weight: 600; }
.gl-tabs a[aria-current="page"] { color: var(--ink); background: var(--bg, #fff); border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.gl-az { padding: 0.5rem 0; }
.gl-az a { padding: 0.1rem 0.55rem; }
.gl-letter { margin: 1.4rem 0 0.2rem; border-bottom: 3px solid var(--accent); padding-bottom: 0.1rem; scroll-margin-top: calc(4rem + var(--sat)); }

/* Limes page */
.limes-list { list-style: none; padding-left: 1.2em; }
.limes-list.limes-root { padding-left: 0; }
.limes-list li { margin: 0.8em 0; }
.limes-list h2, .limes-list h3, .limes-list h4, .limes-list h5, .limes-list h6 { margin-bottom: 0.1em; }
.limes-list p { margin: 0.2em 0; }
.limes-list .lm-leaf { margin: 0.15em 0; font-size: 0.95em; }
.limes-list details > summary { cursor: pointer; }
.limes-list details > summary > h4, .limes-list details > summary > h5, .limes-list details > summary > h6 { display: inline; }

/* Growth page: tables and charts (the era bands and gridlines share the Timeline chart's look). */
.growth h2 { margin-top: 1.8rem; }
.growth-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 38rem; }
.growth-table th, .growth-table td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); }
.growth-table thead th { font-weight: 600; background: var(--surface); }
.growth-table tbody th { font-weight: 500; }
.gchart .lbl { font-size: 11px; font-weight: 600; font-family: var(--font-body); } .gchart .tick { font-size: 10px; fill: var(--muted); font-family: var(--font-body); } .gchart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.gchart .line-main { stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; } .gchart .line-pale { stroke: var(--accent); stroke-width: 2; opacity: 0.35; stroke-linejoin: round; } .gchart .dot { fill: var(--accent); }
/* Header tab shown on desktop and tablet only; phones keep their menu as it was (same test as the folding menu above). */
@media (max-width: 800px), (max-height: 500px) and (pointer: coarse) { .top-links a.nav-desk { display: none; } }
.gchart .pop-e { stroke: var(--accent); fill: var(--accent); } .gchart .pop-i { stroke: #b5651d; fill: #b5651d; } .gchart .pop-bar { stroke-width: 6; stroke-linecap: round; opacity: 0.5; } .gchart .pop-dot { stroke: none; } .gchart .plague { fill: var(--muted); opacity: 0.18; stroke: none; }

/* ---- Monarchs in maps additions ---- */
.reigns { min-width: 900px; }
.reigns .lane-lbl { font: 600 13px var(--font-display); fill: var(--ink); letter-spacing: .02em; }
.reigns .lane-rule { stroke: var(--line); stroke-width: 1; }
.reigns .bar-in { font-size: 8.5px; fill: #fff; font-family: var(--font-body); pointer-events: none; }
.reigns .under { color: var(--ink); }
@media (min-width: 1100px) { .era-grid { grid-template-columns: repeat(4, 1fr); } }
.history h2 { margin-top: 2.4rem; }
.history .period-dates { color: var(--muted); font-size: 0.95rem; margin-top: -0.6rem; }
.history .see { font-size: 0.92rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 0.8rem; }
.history figure.map-fig { margin: 1.2rem 0; }
.history figure.map-fig a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.history figure.map-fig img { display: block; width: 100%; height: auto; }
.history figure.map-fig figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.35rem; }
.mon-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.mon-table th, .mon-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.mon-table th { font-family: var(--font-display); font-size: 1.05rem; }
.mon-table td.yrs { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.mon-table tr.era-early td:first-child { box-shadow: inset 4px 0 var(--early); } .mon-table tr.era-medieval td:first-child { box-shadow: inset 4px 0 var(--medieval); }
.mon-table tr.era-tudor-stuart td:first-child { box-shadow: inset 4px 0 var(--tudor-stuart); } .mon-table tr.era-modern td:first-child { box-shadow: inset 4px 0 var(--modern); }
.mon-table td:first-child { padding-left: 0.8rem; }
.table-wrap { overflow-x: auto; }
.house { display: block; font-size: 0.85rem; color: var(--muted); }
