/* Avon News — site and control panel styles
   Avon purple and gold, with depth: film grain, soft light glows, layered shadows and 3D buttons. */

:root {
  --paper: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #fbf9fd;
  --ink: #1d1729;
  --ink-soft: #3c3349;
  --muted: #6b6378;
  --line: #e4ddeb;
  --line-soft: #eee9f3;
  --p950: #160c27;
  --p900: #221238;
  --p800: #2e1a4e;
  --p700: #3d2268;
  --p600: #4f2d86;
  --p500: #6a43a8;
  --p300: #b9a3df;
  --p100: #efe8fa;
  --p50: #f7f3fd;
  --g700: #8a6417;
  --g600: #a97c22;
  --g500: #c99a32;
  --g400: #ddb553;
  --g300: #ecd08a;
  --g100: #faf0d6;
  --link: #4f2d86;
  --ok: #2f6b3a;
  --warn-bg: #fbf3dc;
  --warn-ink: #6b4e00;
  --error: #a3262a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(29, 16, 48, .06), 0 2px 6px -2px rgba(29, 16, 48, .06);
  --shadow-2: 0 2px 4px rgba(29, 16, 48, .05), 0 12px 28px -8px rgba(29, 16, 48, .18);
  --shadow-3: 0 6px 12px rgba(29, 16, 48, .08), 0 28px 60px -16px rgba(29, 16, 48, .42);
  /* 3D button faces */
  --btn-top: #ffffff;
  --btn-bottom: #f1ecf7;
  --btn-edge: #d6cde2;
  --btn-ink: #2e2440;
  --grain-opacity: .05;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #110c19;
    --surface: #1b1527;
    --surface-2: #211a2f;
    --ink: #f1ecf8;
    --ink-soft: #d6cde4;
    --muted: #a99fba;
    --line: #342a47;
    --line-soft: #2a2239;
    --p100: #2b2142;
    --p50: #1e1730;
    --g100: #3a2e17;
    --link: #cfbaf3;
    --ok: #82c58d;
    --warn-bg: #3a2e17;
    --warn-ink: #edd48c;
    --error: #f1949a;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 28px -8px rgba(0, 0, 0, .6);
    --shadow-3: 0 6px 12px rgba(0, 0, 0, .35), 0 28px 60px -16px rgba(0, 0, 0, .75);
    --btn-top: #2d2440;
    --btn-bottom: #231c33;
    --btn-edge: #0d0914;
    --btn-ink: #ece5f7;
    --grain-opacity: .07;
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 16px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 92% -6%, rgba(201, 154, 50, .13), transparent 62%),
    radial-gradient(900px 520px at -8% 18%, rgba(106, 67, 168, .11), transparent 60%),
    var(--paper);
  background-repeat: no-repeat;
}
/* Film grain over everything, for a printed-paper texture */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background-image: var(--noise); opacity: var(--grain-opacity);
}
body > main { flex: 1; width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s ease; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.16; margin: 0 0 .5rem; letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 2.8rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
code { font-size: .9em; background: var(--p100); padding: .15em .4em; border-radius: 5px; }
.icon { flex: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 200; border-radius: var(--radius-sm); box-shadow: var(--shadow-2); }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--g400); outline-offset: 2px; border-radius: 6px; }
.eyebrow { margin: 0 0 6px; font: 700 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--g600); }

/* --------------------------------------------------------------------------
   Masthead: the blurred reading room behind a deep purple gradient
   -------------------------------------------------------------------------- */
.masthead {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    linear-gradient(100deg, rgba(22, 12, 39, .95) 0%, rgba(46, 26, 78, .86) 42%, rgba(79, 45, 134, .58) 100%),
    url("room.webp") center 42% / cover no-repeat,
    var(--p800);
}
.masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(560px 220px at 90% -10%, rgba(236, 208, 138, .32), transparent 70%),
    radial-gradient(520px 320px at -5% 130%, rgba(106, 67, 168, .45), transparent 70%);
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--g600), var(--g300) 30%, #fff3cf 50%, var(--g300) 70%, var(--g600));
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.brand-badge {
  display: inline-flex; border-radius: 50%; padding: 3px;
  background: linear-gradient(145deg, #f7dd98, #b9862a 60%, #f0cf7c);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .05), 0 10px 26px rgba(0, 0, 0, .5), 0 0 36px rgba(236, 208, 138, .28);
  transition: transform .25s ease;
}
.brand-badge img { display: block; border-radius: 50%; }
.brand:hover .brand-badge { transform: rotate(-6deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 2.2rem; letter-spacing: -.015em; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.brand-tag {
  margin-top: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase;
  background: linear-gradient(90deg, #f7dd98, #dcae4f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dateline {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: .84rem; font-weight: 500; color: #ece4f7;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dateline .icon { color: var(--g300); }
.nav { position: relative; background: rgba(10, 5, 20, .38); border-top: 1px solid rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.nav-row { display: flex; gap: 6px; padding-top: 9px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.nav-row::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  color: #e9e1f6; text-decoration: none; font-size: .9rem; font-weight: 600;
  transition: background-color .15s ease, color .15s ease, transform .12s ease, box-shadow .12s ease;
}
.nav a .icon { opacity: .85; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a[aria-current="page"] {
  color: var(--p950);
  background: linear-gradient(180deg, #f8e2a3 0%, #e6b956 52%, #cf9a35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 3px 0 #8a6417, 0 8px 16px rgba(0, 0, 0, .35);
}
.nav a[aria-current="page"] .icon { opacity: 1; }
.nav a[aria-current="page"]:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 1px 0 #8a6417, 0 3px 8px rgba(0, 0, 0, .3); }

main.wrap { padding-top: 36px; padding-bottom: 64px; }

/* --------------------------------------------------------------------------
   Buttons: 3D, with a highlight on top, a solid edge below, and a press on click
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .9rem/1 var(--sans); padding: 11px 18px; border-radius: 11px; cursor: pointer;
  color: var(--btn-ink); text-decoration: none; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--btn-top) 0%, var(--btn-bottom) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 3px 0 var(--btn-edge), 0 6px 14px rgba(29, 16, 48, .10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.button:hover { transform: translateY(-1px); color: var(--btn-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 0 var(--btn-edge), 0 12px 22px rgba(29, 16, 48, .14); }
.button:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 var(--btn-edge), 0 2px 6px rgba(29, 16, 48, .12); }
.button-primary {
  color: #fff; border-color: var(--p800);
  background: linear-gradient(180deg, #7d55bd 0%, #5a3596 48%, #46286f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 0 var(--p900), 0 8px 18px rgba(46, 26, 78, .35);
}
.button-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 0 var(--p900), 0 12px 24px rgba(46, 26, 78, .4); }
.button-primary:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 var(--p900), 0 2px 6px rgba(46, 26, 78, .3); }
.button-gold {
  color: #2a1700; border-color: var(--g600); text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
  background: linear-gradient(180deg, #f9e4a8 0%, #e6b956 52%, #cf9a35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 3px 0 var(--g700), 0 8px 18px rgba(138, 100, 23, .35);
}
.button-gold:hover { color: #2a1700; filter: brightness(1.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 0 var(--g700), 0 12px 24px rgba(138, 100, 23, .4); }
.button-gold:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 0 var(--g700), 0 2px 6px rgba(138, 100, 23, .3); }
.button-danger { color: var(--error); border-color: rgba(163, 38, 42, .35); }
.button-danger:hover { color: #fff; background: linear-gradient(180deg, #c8474b, #a3262a); border-color: #7d1c1f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 0 #6a1416, 0 10px 20px rgba(163, 38, 42, .3); }

/* --------------------------------------------------------------------------
   Front page
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-bottom: 40px; padding: clamp(26px, 4.4vw, 52px); border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(640px 320px at 100% 0%, rgba(236, 208, 138, .34), transparent 62%),
    radial-gradient(620px 420px at 0% 110%, rgba(130, 86, 200, .55), transparent 65%),
    linear-gradient(135deg, var(--p800) 0%, var(--p600) 55%, var(--p700) 100%);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.3px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%); mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -140px; top: -160px; width: 440px; height: 440px; border-radius: 50%;
  border: 1px solid rgba(236, 208, 138, .3);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, .035), 0 0 0 92px rgba(255, 255, 255, .025), 0 0 0 138px rgba(255, 255, 255, .018);
}
.hero-art { position: absolute; z-index: -1; right: 5%; top: 50%; color: rgba(255, 255, 255, .075); transform: translateY(-62%) rotate(-8deg); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 6px 13px 6px 11px; border-radius: 999px;
  font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--g300);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--g300); box-shadow: 0 0 0 0 rgba(236, 208, 138, .7); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(236, 208, 138, .65); } 70% { box-shadow: 0 0 0 10px rgba(236, 208, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(236, 208, 138, 0); } }
.hero h2 { max-width: 28ch; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.1; font-weight: 800; margin-bottom: 14px; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero h2 a { color: #fff; text-decoration: none; }
.hero h2 a:hover { text-decoration: underline; text-decoration-color: var(--g300); text-decoration-thickness: 2px; }
.hero-dek { max-width: 62ch; margin: 0 0 26px; font-size: 1.1rem; color: rgba(255, 255, 255, .86); }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hero-meta { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: rgba(255, 255, 255, .78); }
.hero-meta .icon { color: var(--g300); }

.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: -16px 0 40px; }
.card-grid .card { margin: 0; }
.section-title {
  display: flex; align-items: center; gap: 11px; margin: 0 0 18px;
  font: 700 .8rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.icon-chip {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff;
  background: linear-gradient(145deg, var(--p500), var(--p700));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 3px 0 var(--p900), 0 6px 12px rgba(61, 34, 104, .3);
}
.icon-chip-gold { color: #2a1700; background: linear-gradient(145deg, #f7dd98, #cf9a35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 var(--g700), 0 6px 12px rgba(138, 100, 23, .3); }

/* Story cards */
.card {
  position: relative; margin: 0 0 16px; padding: 20px 22px 18px 28px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--p500), var(--p700));
}
.card.kind-preview::before { background: linear-gradient(180deg, var(--g300), var(--g600)); }
.card.kind-notice::before { background: linear-gradient(180deg, #c58be0, #7a3fb0); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line); }
.card h3 { font-size: 1.28rem; margin-bottom: 8px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* the whole card is the link */
.card:hover h3 a { color: var(--link); }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 9px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.dek { margin: 0 0 10px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .84rem; color: var(--muted); }
.meta .icon { opacity: .75; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--p600); background: var(--p100); box-shadow: inset 0 0 0 1px rgba(79, 45, 134, .12);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-preview { color: var(--g700); background: var(--g100); box-shadow: inset 0 0 0 1px rgba(169, 124, 34, .2); }
.tag-notice { color: #7a3fb0; background: #f5ecfb; box-shadow: inset 0 0 0 1px rgba(122, 63, 176, .15); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag { color: #d6c4f7; }
  :root:not([data-theme="light"]) .tag-preview { color: var(--g300); }
  :root:not([data-theme="light"]) .tag-notice { color: #e2b8f5; background: #33203f; }
}
.more { margin: 22px 0 0; }

/* Sidebar: the weather card (data from lib/weather.php's cache) */
.wx-widget {
  position: relative; overflow: hidden; isolation: isolate; margin-bottom: 24px; padding: 20px 20px 18px; color: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(236, 208, 138, .3), transparent 70%),
    linear-gradient(160deg, #24427a 0%, #3d2f7a 55%, var(--p800) 100%);
}
.wx-widget-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--g300); }
.wx-widget-alert {
  display: block; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; font-size: .86rem; color: #fff; text-decoration: none;
  background: rgba(208, 59, 59, .85); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.wx-widget-alert:hover { background: rgba(208, 59, 59, 1); }
.wx-widget-now { display: flex; align-items: center; gap: 14px; }
.wx-widget-temp { font: 800 3.2rem/1 var(--sans); letter-spacing: -.04em; text-shadow: 0 2px 16px rgba(0, 0, 0, .25); }
.wx-widget-cond { display: grid; gap: 2px; font-size: .88rem; color: rgba(255, 255, 255, .82); }
.wx-widget-cond strong { font-size: 1.05rem; color: #fff; }
.wx-widget-next { margin: 14px 0 16px; padding-top: 12px; font-size: .9rem; color: rgba(255, 255, 255, .86); border-top: 1px solid rgba(255, 255, 255, .14); }
.wx-widget-next strong { color: #fff; }
.wx-widget-src { margin: 12px 0 0; font-size: .74rem; color: rgba(255, 255, 255, .6); }

/* Sidebar: upcoming meetings with calendar tiles, and the promo card */
.panel {
  position: relative; overflow: hidden; padding: 22px 20px 12px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--p50) 100%);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-2);
}
.panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--g600), var(--g300), var(--g600)); }
.upcoming { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px dashed var(--line); }
.upcoming:first-of-type { border-top: 0; padding-top: 4px; }
.upcoming h3 { font-size: 1.02rem; margin: 0; }
.upcoming h3 a { color: var(--ink); text-decoration: none; }
.upcoming h3 a::after { content: ""; position: absolute; inset: 0; }
.upcoming:hover h3 a { color: var(--link); }
.upcoming .kicker { margin-bottom: 4px; }
.date-tile {
  flex: 0 0 56px; overflow: hidden; text-align: center; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: inset 0 -1px 0 var(--line-soft), 0 3px 0 var(--btn-edge), 0 6px 14px rgba(29, 16, 48, .10);
  transition: transform .15s ease;
}
.upcoming:hover .date-tile { transform: translateY(-2px) rotate(-3deg); }
.dt-mon { display: block; padding: 4px 0 3px; color: #fff; font: 700 .62rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; background: linear-gradient(180deg, var(--p500), var(--p700)); }
.dt-day { display: block; padding-top: 5px; font: 800 1.5rem/1 var(--serif); color: var(--ink); }
.dt-dow { display: block; padding: 3px 0 6px; font: 600 .6rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.promo {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 24px; padding: 26px 22px 24px; text-align: center; color: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  background:
    radial-gradient(300px 200px at 50% 0%, rgba(236, 208, 138, .3), transparent 70%),
    linear-gradient(180deg, rgba(34, 18, 56, .82), rgba(22, 12, 39, .96)),
    url("room.webp") center / cover;
}
.promo img { display: block; margin: 0 auto 14px; border-radius: 50%; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55)); transition: transform .3s ease; }
.promo:hover img { transform: rotate(-5deg) scale(1.04); }
.promo h2 { font-size: 1.35rem; margin-bottom: 8px; }
.promo p { margin: 0 0 18px; font-size: .92rem; color: rgba(255, 255, 255, .8); }

/* --------------------------------------------------------------------------
   Section pages: title banner, filters, pager
   -------------------------------------------------------------------------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 24px;
  margin-bottom: 28px; padding: clamp(22px, 3.6vw, 38px); border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(236, 208, 138, .28), transparent 62%),
    linear-gradient(135deg, var(--p800) 0%, var(--p600) 70%, var(--p700) 100%);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .2) 1px, transparent 1.3px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(100deg, transparent 45%, #000 95%); mask-image: linear-gradient(100deg, transparent 45%, #000 95%);
}
.banner::after {
  content: ""; position: absolute; z-index: -1; right: -110px; bottom: -190px; width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(236, 208, 138, .28); box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 80px rgba(255, 255, 255, .02);
}
.banner-icon {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; color: #2a1700;
  background: linear-gradient(145deg, #f9e4a8, #cf9a35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 0 var(--g700), 0 12px 24px rgba(0, 0, 0, .35);
  transform: rotate(-4deg);
}
.banner .eyebrow { color: var(--g300); }
.banner h1 { margin: 0 0 6px; text-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
.banner .lede { margin: 0; max-width: 70ch; color: rgba(255, 255, 255, .84); font-size: 1.04rem; }
.lede { color: var(--muted); max-width: 70ch; margin: 0; font-size: 1.05rem; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.filters a {
  padding: 8px 15px; border-radius: 999px; text-decoration: none; font-size: .84rem; font-weight: 600; color: var(--btn-ink);
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 2px 0 var(--btn-edge), 0 4px 10px rgba(29, 16, 48, .06);
  transition: transform .12s ease, box-shadow .12s ease, color .12s ease;
}
.filters a:hover { transform: translateY(-1px); color: var(--link); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 3px 0 var(--btn-edge), 0 8px 16px rgba(29, 16, 48, .10); }
.filters a:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 var(--btn-edge); }
.filters a[aria-current="true"] {
  color: #fff; border-color: var(--p800); background: linear-gradient(180deg, #7d55bd, #46286f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 0 var(--p900), 0 6px 14px rgba(61, 34, 104, .3);
}
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.empty { text-align: center; padding: 56px 0 72px; color: var(--muted); }
.empty img { display: block; margin: 0 auto 20px; filter: drop-shadow(0 14px 26px rgba(29, 16, 48, .3)); }
.empty h1 { color: var(--ink); }

/* --------------------------------------------------------------------------
   A single story
   -------------------------------------------------------------------------- */
.story { max-width: 780px; margin: 0 auto; }
.story-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: .88rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.story-back:hover { color: var(--link); }
.story-back .icon { transition: transform .15s ease; }
.story-back:hover .icon { transform: translateX(-3px); }
.story h1 { margin-bottom: 14px; font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.08; }
.story-meta { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); }
.story-summary {
  position: relative; margin: 26px 0; padding: 24px 26px 24px 30px; border-radius: var(--radius);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.55; color: var(--ink);
  background: linear-gradient(135deg, var(--p50), var(--surface) 65%); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1);
}
.story-summary::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 0 5px 5px 0; background: linear-gradient(180deg, var(--g300), var(--g600)); }
.story h2 { display: flex; align-items: center; gap: 12px; margin-top: 44px; font-size: 1.4rem; }
.story h2::before { content: ""; width: 24px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--g400), var(--g600)); }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.highlights li {
  position: relative; padding: 13px 16px 13px 50px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1);
}
.highlights li::before {
  content: ""; position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(145deg, var(--g300), var(--g600)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 5px rgba(138, 100, 23, .35);
}
.highlights li::after { content: ""; position: absolute; left: 22px; top: 20px; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; background: linear-gradient(180deg, var(--p50), var(--p100)); }
tbody tr:nth-child(even) td { background: var(--surface-2); }
tbody tr:hover td { background: var(--p50); }
tr:last-child td { border-bottom: 0; }
.source-box {
  position: relative; margin-top: 48px; padding: 20px 24px 14px; border-radius: var(--radius);
  font-size: .94rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.source-box p { margin: 0 0 10px; }
.source-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--g600); }
.doc-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 4px !important; }
.prose p { max-width: 68ch; }
.admin-banner { background: var(--warn-bg); color: var(--warn-ink); padding: 11px 15px; border-radius: var(--radius-sm); font-size: .9rem; }
.admin-banner-quiet { background: var(--p100); color: var(--ink); }

/* About page */
.about-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: clamp(20px, 4vw, 44px);
  max-width: 980px; margin: 0 auto 36px; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(420px 300px at 18% 50%, rgba(236, 208, 138, .26), transparent 70%),
    linear-gradient(100deg, rgba(22, 12, 39, .9), rgba(46, 26, 78, .82) 50%, rgba(79, 45, 134, .7)),
    url("room.webp") center / cover;
  box-shadow: var(--shadow-3);
}
.about-hero img { flex: none; width: clamp(140px, 22vw, 240px); height: auto; border-radius: 50%; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55)); }
.about-hero h1 { margin-bottom: 10px; }
.about-hero .eyebrow { color: var(--g300); }
.about-hero .lede { color: rgba(255, 255, 255, .86); font-size: 1.1rem; }

/* On X: the embedded lists, side by side on wide screens */
.x-lists { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.x-list-frame { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); max-height: 900px; overflow-y: auto; padding: 0 12px; box-shadow: var(--shadow-2); }
.x-empty { padding: 10px 4px; }
/* A post before X's widget replaces it, or for good if the widget is blocked */
.x-post { margin: 12px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; overflow-wrap: anywhere; background: var(--surface-2); }
.x-post p { margin: 0 0 8px; }
.x-post a { font-size: .85rem; }
.x-list .meta { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative; isolation: isolate; color: #cfc4df; font-size: .9rem;
  background:
    radial-gradient(700px 280px at 92% 0%, rgba(236, 208, 138, .14), transparent 62%),
    radial-gradient(600px 300px at 0% 100%, rgba(106, 67, 168, .3), transparent 65%),
    linear-gradient(180deg, var(--p900) 0%, var(--p950) 100%);
}
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--g600), var(--g300) 30%, #fff3cf 50%, var(--g300) 70%, var(--g600)); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 36px; padding-top: 44px; padding-bottom: 28px; }
.footer-brand { display: flex; gap: 18px; align-items: flex-start; }
.footer-brand img { flex: none; border-radius: 50%; box-shadow: 0 0 0 3px rgba(236, 208, 138, .55), 0 10px 22px rgba(0, 0, 0, .5); }
.footer-name { margin: 0 0 6px !important; font: 800 1.35rem/1.1 var(--serif); color: #fff; }
.footer p { margin: 0; max-width: 60ch; }
.footer-head { margin: 4px 0 12px !important; font: 700 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--g300); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.footer a:hover { color: var(--g300); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 28px; font-size: .8rem; color: #a99cbd; border-top: 1px solid rgba(255, 255, 255, .08); }

@media (max-width: 860px) {
  .columns { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .dateline { display: none; }
  .brand { gap: 12px; }
  .brand-name { font-size: 1.6rem; }
  .brand-tag { font-size: .62rem; letter-spacing: .12em; }
  .brand img { width: 52px; height: 52px; }
  .hero-art { display: none; }
  .hero-dek { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.02rem; }
  .banner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .banner-icon { width: 56px; height: 56px; border-radius: 16px; }
  .about-hero { flex-direction: column; text-align: center; }
  .card { padding: 18px 18px 16px 22px; }
  .story-summary { font-size: 1.15rem; padding: 20px 20px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .button:hover, .filters a:hover, .upcoming:hover .date-tile, .brand:hover .brand-badge, .promo:hover img { transform: none; }
}

/* --------------------------------------------------------------------------
   Control panel
   -------------------------------------------------------------------------- */
.admin-bar { position: relative; color: #fff; background: radial-gradient(500px 120px at 90% 0%, rgba(236, 208, 138, .18), transparent 70%), linear-gradient(160deg, var(--p800) 0%, var(--p950) 100%); }
.admin-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--g600), var(--g300) 45%, var(--g600)); }
.admin-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 12px; }
.brand-small img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(236, 208, 138, .6); }
.brand-small span { font-weight: 600; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.admin-nav a { color: #e9e2f3; text-decoration: none; padding: 7px 13px; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: background-color .15s ease; }
.admin-nav a:hover { background: rgba(255, 255, 255, .1); }
.admin-nav a[aria-current="page"] { color: var(--p950); background: linear-gradient(180deg, #f8e2a3, #cf9a35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 0 #8a6417; }
.admin-user { display: flex; align-items: center; gap: 14px; font-size: .88rem; }
.admin-user a, .link-button { color: #e9e2f3; }
.link-button { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--g400); color: #2a1a00; font-size: .75rem; font-weight: 700; text-align: center; }
.admin-main h1 { font-size: 1.9rem; margin-bottom: 18px; }
.admin-main h2 { margin-top: 36px; font-size: 1.25rem; }
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 20px 20px 18px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-1); transition: box-shadow .15s ease, transform .15s ease;
}
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--p500), var(--p700)); }
.stat:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--serif); font-size: 1.85rem; font-weight: 800; line-height: 1.1; }
.stat-value small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: .92rem; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.notice-ok { border-color: var(--ok); color: var(--ok); }
.notice-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.notice-error { color: var(--error); border-color: var(--error); }
.error-text { color: var(--error); font-size: .85rem; }
.status { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--p100); }
.status-published { color: var(--ok); }
.status-review { background: var(--warn-bg); color: var(--warn-ink); }
.status-hidden { color: var(--muted); }
.stories-table td:first-child a { font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.search input { min-width: 240px; }
input[type="text"], input[type="search"], input[type="number"], input[type="url"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 11px; box-shadow: inset 0 1px 2px rgba(29, 16, 48, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--p500); box-shadow: 0 0 0 4px var(--p100); }
.edit-form { display: grid; gap: 18px; max-width: 760px; }
.edit-form.narrow { max-width: 540px; }
.edit-form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.edit-form .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.form-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: end; }
.form-row label:first-child { min-width: 220px; }
.form-actions { margin-top: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.crumbs { margin: 0 0 6px; font-size: .9rem; }
.raw { margin-top: 26px; }
.raw pre { white-space: pre-wrap; font-size: .82rem; background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius-sm); }
.danger-zone { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-list { padding-left: 1.1em; }
.admin-list li { margin-bottom: 6px; }

.admin-login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card {
  position: relative; overflow: hidden; width: 100%; max-width: 420px; text-align: center; padding: 38px 28px 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
}
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--p600), var(--g400), var(--p600)); }
.login-card img { border-radius: 50%; box-shadow: 0 0 0 3px rgba(201, 154, 50, .6), 0 12px 26px rgba(29, 16, 48, .3); }
.login-card h1 { font-size: 1.6rem; margin: 18px 0 8px; }
.login-card .g_id_signin { display: flex; justify-content: center; margin: 22px 0; }
