/* ==========================================================================
   MAGES & MATERIA — PORTAL SITE STYLES
   ==========================================================================
   The aetherworn look, translated from the site's own tools (World Viewer,
   Staff Chat) and desktop/mv-ui: the near-black green ramp, gold lozenges,
   ink-lined panels, paper grain, small additive glow. One hand across the
   game, the admin GUI and this site.
   ========================================================================== */

@font-face {
  font-family: Cinzel;
  src: url(/font/cinzel.ttf) format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ---- the ramp ---- */
  --ink: #050608;
  --bg: #08090b;
  --panel: #071011;
  --panel-2: #0d1512;
  --seam: rgba(46, 140, 107, 0.45);
  --hair: rgba(46, 140, 107, 0.28);
  --gold: #ffd425;
  --gold-hi: #ffdf55;
  --aether: #30ff70;
  --text: #e8e2d2;
  --dim: #8b887f;
  --bad: #f27366;
  --warn: #ffb44d;
  --link: #8fd4ae;

  /* ---- type ---- */
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: system-ui, 'Segoe UI', Inter, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(ellipse at 50% -10%, #173225 0, #08090b 42rem);
  color: var(--text);
  font: 16px/1.55 var(--font-sans);
  margin: 0;
  padding: 0 1.25rem 4rem;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* Paper grain over everything, as the panels wear in egui and the tools. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

main {
  max-width: 66rem;
  width: 100%;
  position: relative;
  z-index: 1;
  padding-top: 1.4rem;
}

::selection {
  background: rgba(255, 212, 37, 0.25);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 212, 174, 0.25);
}

a:hover {
  color: var(--aether);
  border-bottom-color: rgba(48, 255, 112, 0.5);
}

/* --------------------------------------------------------------------------
   TOPBAR NAV — the same chrome the tools wear.
   -------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(0, 0, 0, 0.35),
    0 4px 18px rgba(0, 0, 0, 0.35);
  padding: 0.6rem 0.9rem;
  margin-bottom: 2.4rem;
  position: sticky;
  top: 0.8rem;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* The diamond mark: the gold lozenge frame from the viewer's logo. */
.logo-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 212, 37, 0.45);
  border-radius: 2px;
  background: rgba(255, 212, 37, 0.06);
  box-shadow: 0 0 10px rgba(255, 212, 37, 0.18);
}

.logo-icon span {
  transform: rotate(-45deg);
  font-size: 13px;
  line-height: 1;
  color: var(--gold);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text .title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 212, 37, 0.18);
}

.brand-text .subtitle {
  font-size: 0.62rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #9aa89b;
  border: 0;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-links a:hover {
  color: var(--gold);
  background: rgba(255, 212, 37, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 212, 37, 0.25);
  transform: translateY(-1px);
}

.nav-links a.cta {
  color: #141308;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(46, 140, 107, 0.35);
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.studio-actions .btn-primary {
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 0.42rem 0.7rem;
}

.nav-links a.cta:hover {
  background: var(--gold-hi);
  color: #141308;
  box-shadow: 0 0 0 1px var(--ink), 0 0 12px rgba(255, 212, 37, 0.3);
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2.2rem 0 0.7rem;
}

h2::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--gold);
  transform: rotate(45deg);
  margin-right: 0.55rem;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 212, 37, 0.35);
}

h3 {
  color: #bcd9c6;
  margin: 0.3rem 0;
  font-size: 1rem;
}

.subtitle {
  color: var(--dim);
  font-size: 1rem;
  max-width: 52rem;
}

.dim {
  color: var(--dim);
  font-size: 0.9rem;
}

code {
  background: var(--panel-2);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(46, 140, 107, 0.3);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

code.big {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--seam);
  box-shadow: 0 0 0 1px var(--ink);
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   THE INK-PANEL RECIPE — flat tone body, teal seam, INK LINE OUTSIDE.
   -------------------------------------------------------------------------- */
.card,
.ok,
.err,
form.boxy,
details,
.ink-panel {
  background: linear-gradient(135deg, rgba(18, 39, 30, 0.96), var(--panel));
  border: 1px solid var(--seam);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(0, 0, 0, 0.35);
  padding: 1rem 1.1rem;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 212, 37, 0.08);
  pointer-events: none;
}

.card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 37, 0.5);
  box-shadow: 0 0 0 1px var(--ink), 0 12px 30px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(46, 140, 107, 0.14);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.1rem 0;
}

.card b {
  font-family: var(--font-display);
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card p {
  font-size: 0.92rem;
  margin: 0.3rem 0;
  color: #cfcbc0;
}

.rule {
  height: 11px;
  margin: 2rem 0;
  position: relative;
  border-top: 1px solid var(--hair);
}

.rule::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 10px rgba(255, 212, 37, 0.35);
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.big,
button,
.btn {
  display: inline-block;
  background: var(--gold);
  color: #141308;
  padding: 0.65rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(46, 140, 107, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  line-height: 1.4;
}

.big:hover,
button:hover,
.btn:hover {
  background: var(--gold-hi);
  color: #141308;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--ink), 0 0 18px rgba(255, 212, 37, 0.35);
}

.big:active,
button:active {
  transform: translateY(1px);
}

a.big.ghost,
.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--seam);
  box-shadow: 0 0 0 1px var(--ink);
}

a.big.ghost:hover,
.btn.ghost:hover {
  background: rgba(255, 212, 37, 0.08);
  color: var(--gold-hi);
  box-shadow: 0 0 0 1px var(--ink), 0 0 14px rgba(46, 140, 107, 0.18);
}

button.small {
  background: var(--panel-2);
  border: 1px solid var(--hair);
  color: var(--dim);
  padding: 0.28rem 0.7rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px var(--ink);
}

button.small:hover {
  border-color: rgba(255, 212, 37, 0.45);
  color: var(--gold);
  background: rgba(255, 212, 37, 0.06);
  box-shadow: 0 0 0 1px var(--ink), 0 0 10px rgba(255, 212, 37, 0.2);
}

/* --------------------------------------------------------------------------
   FLAGS, PILLS, BADGES — the small status chips the tools use.
   -------------------------------------------------------------------------- */
.flag,
.badge,
.pill,
.tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  vertical-align: middle;
}

.flag.gold,
.badge.gold {
  background: rgba(255, 212, 37, 0.1);
  color: var(--gold);
  border-color: rgba(255, 212, 37, 0.35);
}

.flag.bad {
  background: rgba(242, 115, 102, 0.1);
  color: var(--bad);
  border-color: rgba(242, 115, 102, 0.35);
}

.flag.warn {
  background: rgba(255, 180, 77, 0.1);
  color: var(--warn);
  border-color: rgba(255, 180, 77, 0.35);
}

.pill {
  background: var(--panel-2);
  color: var(--dim);
  border-color: var(--hair);
}

.pill.aether {
  background: rgba(48, 255, 112, 0.08);
  color: var(--aether);
  border-color: rgba(48, 255, 112, 0.3);
}

.pill.gold {
  background: rgba(255, 212, 37, 0.1);
  color: var(--gold);
  border-color: rgba(255, 212, 37, 0.35);
}

/* --------------------------------------------------------------------------
   STEP CARDS (downloads, landing)
   -------------------------------------------------------------------------- */
.card.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.stepnum {
  flex: 0 0 2.1rem;
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: #141308;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--ink), 0 0 10px rgba(255, 212, 37, 0.25);
  font-size: 0.85rem;
}

.stepnum > * {
  transform: rotate(-45deg);
}

.stepbody {
  flex: 1;
  min-width: 0;
}

.stepbody b {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   FILE ROWS (downloads)
   -------------------------------------------------------------------------- */
.files {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: var(--panel-2);
  box-shadow: 0 0 0 1px var(--ink);
  overflow: hidden;
}

.file {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--hair);
}

.file:last-child {
  border-bottom: 0;
}

.file a {
  font-weight: 600;
}

.file .fname,
.file .size {
  font-size: 0.78rem;
  color: var(--dim);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   SCREENSHOTS
   -------------------------------------------------------------------------- */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.1rem 0 0;
}

figure.shot {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--seam);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

figure.shot:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 37, 0.45);
  box-shadow: 0 0 0 1px var(--ink), 0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(46, 140, 107, 0.16);
}

figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--hair);
}

figure.shot figcaption {
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
label {
  display: block;
  margin: 0.9rem 0 0.25rem;
  font-size: 0.9rem;
  color: #a8a49c;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem;
  background: #06090c;
  border: 1px solid var(--seam);
  border-radius: 3px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 212, 37, 0.14);
}

form.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0.5rem 0.3rem 0;
  flex-wrap: wrap;
}

form.inline input,
form.inline select {
  width: auto;
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
}

/* The apply-form honeypot: off-screen, unfocusable, ignored by humans. */
input.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
}

.err {
  border-left: 3px solid var(--bad);
}

.ok {
  border-left: 3px solid var(--aether);
}

/* --------------------------------------------------------------------------
   TABLES
   -------------------------------------------------------------------------- */
table.roles,
table.comm {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  margin: 0.8rem 0;
}

table.roles th,
table.roles td,
table.comm th,
table.comm td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}

table.roles th,
table.comm th {
  font-family: var(--font-display);
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

table.comm {
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink);
}

ul.comm {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0.8rem 0;
}

ul.comm li {
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: var(--dim);
}

ul.tight {
  margin: 0.4rem 0;
  padding-left: 1.1rem;
}

ul.tight li {
  margin: 0.28rem 0;
  color: #cfcbc0;
}

/* The FAQ's disclosure cards read as clickable, so the pointer should agree. */
summary {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   PATCH LOG (admin console) — the deploy pipeline's notes, grouped by date,
   scrollable so a hundred entries cannot swallow the console.
   -------------------------------------------------------------------------- */
.patchlog {
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.patchlog h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0.9rem 0 0.35rem;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.25rem;
}

.patchlog h3:first-child {
  margin-top: 0;
}

.patch-entry {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.22rem 0;
  font-size: 0.88rem;
  color: #cfcbc0;
}

.patch-entry code {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   STAT CARDS (console)
   -------------------------------------------------------------------------- */
.stat {
  display: flex;
  gap: 0.9rem;
  align-items: stretch;
}

.stat .bar {
  width: 3px;
  align-self: stretch;
  background: var(--gold);
  opacity: 0.75;
  box-shadow: 0 0 8px rgba(255, 212, 37, 0.3);
}

.stat .bar.teal {
  background: #2e8c6b;
  box-shadow: 0 0 8px rgba(46, 140, 107, 0.4);
}

.stat .label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1.2;
}

.stat .sub {
  font-size: 0.8rem;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   HERO & LANDING
   -------------------------------------------------------------------------- */
.hero {
  padding: 2.5rem 0 1rem;
}

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--aether);
}

.hero h1 {
  margin: 0 0 0.6rem;
  letter-spacing: 0.06em;
}

.hero .subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.6rem;
}

/* The live realm-status pill: a small dot + label, polled from /api/status. */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--ink);
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 8px transparent;
}

.status-pill.online .status-dot {
  background: var(--aether);
  box-shadow: 0 0 8px var(--aether);
}

.status-pill.asleep .status-dot {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}

.features h2 {
  margin-top: 0;
}

.feature-card {
  border-left: 3px solid var(--gold);
}

/* School chips — the five schools on the landing page and /world. */
.school-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.school-chip {
  display: inline-block;
  background: var(--panel-2);
  border: 1px solid var(--hair);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--ink);
  color: var(--text);
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.15s;
}

.school-chip:hover {
  border-color: rgba(255, 212, 37, 0.5);
  color: var(--gold);
  box-shadow: 0 0 0 1px var(--ink), 0 0 12px rgba(255, 212, 37, 0.2);
}

.school-chip small {
  display: block;
  font-size: 0.62rem;
  color: var(--dim);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   LIBRARY
   -------------------------------------------------------------------------- */
.library-hero {
  border-color: rgba(255, 212, 37, 0.35);
}

.library-tools {
  display: flex;
  gap: 0.7rem;
  margin: 1rem 0 0.4rem;
}

.library-tools input,
.library-tools select {
  margin: 0;
}

.library-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.library-entry {
  background: var(--panel);
  border: 1px solid var(--seam);
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--ink);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.library-entry:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--ink), 0 0 14px rgba(255, 212, 37, 0.18);
}

.library-entry h3 {
  margin: 0.2rem 0;
  color: var(--text);
  font-family: var(--font-sans);
}

.library-entry p {
  margin: 0;
  color: #bcb8ae;
  font-size: 0.85rem;
}

.library-kind {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.library-id {
  color: var(--dim);
  font: 0.72rem var(--font-mono);
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   SCROLLBARS — the same quiet teal rails as the tools.
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(46, 140, 107, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(46, 140, 107, 0.65);
}

/* --------------------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  body {
    padding: 0 0.8rem 3rem;
  }

  .cards,
  .library-results,
  .shots {
    grid-template-columns: 1fr;
  }

  .library-tools {
    flex-direction: column;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.7rem;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0.2rem;
  }

  .nav-links a {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  a.big {
    display: block;
    text-align: center;
  }

  .card {
    padding: 0.85rem;
  }

  .roles,
  .comm {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .card.step {
    flex-direction: column;
  }

  .file {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* --------------------------------------------------------------------------
   THE CONTENT DESK (/admin/content)
   One <details> per public page, one .cfield per editable string. Everything
   here is admin-only chrome -- no public page uses these classes except
   .sitefoot, which appears only once staff put something in the footer key.
   -------------------------------------------------------------------------- */
details.cgroup {
  padding: 0;
  margin: 1rem 0;
}

details.cgroup > summary {
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

details.cgroup > *:not(summary) {
  padding: 0 1rem;
}

details.cgroup > form {
  padding-bottom: 1.1rem;
}

.cfield {
  padding: 0.7rem 0.9rem;
  margin: 0.9rem 0;
  border-left: 2px solid var(--seam);
  background: rgba(255, 255, 255, 0.014);
  border-radius: 2px;
}

.cfield > label {
  margin-top: 0;
  color: var(--text);
  font-weight: 600;
}

.cfield textarea {
  line-height: 1.5;
}

.cfield input + textarea {
  margin-top: 0.4rem;
}

p.smallnote {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  line-height: 1.7;
}

p.smallnote code {
  font-size: 0.72rem;
}

details.shipped {
  margin: 0.5rem 0 0;
  padding: 0.4rem 0.7rem;
  background: none;
  border-style: dashed;
}

details.shipped > summary {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

details.shipped p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

/* The site footer: absent until an admin writes one, so it is styled to sit
   quietly under the last section rather than to announce itself. */
footer.sitefoot {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--seam);
  color: var(--dim);
  font-size: 0.85rem;
}

footer.sitefoot p {
  margin: 0.35rem 0;
}
