:root {
  color-scheme: dark;
  --matte: #10100e;
  --panel: #191814;
  --ink: #f2eee3;
  --muted: #bcb4a2;
  --gold: #dec497;
  --rule: #554735;
  --serif: Georgia, 'Times New Roman', serif;
  font: 16px/1.55 system-ui, sans-serif;
  background: var(--matte);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
a { color: var(--gold); }
button, input, textarea, select { font: inherit; }
button, input, textarea, select, .table-wrap { border-radius: 5px; }
button { background: var(--gold); color: #1d150b; border: 1px solid var(--gold); padding: .55rem .85rem; cursor: pointer; font-weight: 650; }
button:disabled { opacity: .65; cursor: wait; }
button.quiet { background: transparent; color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .table-wrap:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.masthead { min-height: 72px; border-bottom: 1px solid var(--rule); padding: 1rem clamp(1.2rem, 5vw, 5rem); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { text-decoration: none; letter-spacing: .19em; font-weight: 650; font-size: .86rem; }
.shell { max-width: 1440px; padding: 0 clamp(1.2rem, 5vw, 5rem) 4rem; margin: auto; }
.hero { padding: 3.3rem 0 1.8rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--rule); }
.hero nav { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; }
.hero nav a { text-underline-offset: .22em; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(2.65rem, 7vw, 5.2rem); line-height: 1; letter-spacing: -.035em; }
h2 { font-size: 1.75rem; margin-bottom: .85rem; }
h3 { font-size: 1rem; color: var(--gold); margin: 0 0 .15rem; }
.hero p, footer, #notice { color: var(--muted); }
#notice:empty { display: none; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1px; margin: 1.5rem 0; background: var(--rule); border: 1px solid var(--rule); }
.metric { background: var(--panel); padding: 1.1rem; }
.metric b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.7rem; overflow-wrap: anywhere; }
.metric span { color: var(--muted); font-size: .85rem; }
.grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 1rem; }
.panel { padding: clamp(1rem, 2.8vw, 2rem); border: 1px solid var(--rule); background: var(--panel); min-width: 0; }
.login, .membership .panel { max-width: 45rem; margin-top: 2rem; }
.login h1 { font-size: 3.5rem; margin-bottom: 1rem; }
form { display: grid; gap: .75rem; justify-items: start; }
label { display: block; color: var(--muted); font-size: .9rem; width: 100%; }
input, textarea, select { display: block; margin-top: .25rem; border: 1px solid var(--rule); padding: .55rem; color: var(--ink); background: var(--matte); width: 100%; }
textarea { resize: vertical; }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.table-wrap { overflow: auto; max-height: 26rem; }
table { border-collapse: collapse; font-size: .86rem; width: 100%; }
td, th { text-align: left; border-bottom: 1px solid var(--rule); padding: .5rem .5rem .5rem 0; }
th { color: var(--gold); font-weight: 650; }
td { min-width: 90px; overflow-wrap: anywhere; }
.drafts article { border-top: 1px solid var(--rule); margin-top: .9rem; padding-top: .85rem; }
.drafts p { white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
output { color: var(--gold); overflow-wrap: anywhere; }
footer { border-top: 1px solid var(--rule); padding: 1rem clamp(1.2rem, 5vw, 5rem); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1.7rem; }
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero { display: block; padding-top: 2.2rem; }
  .hero nav { margin-top: 1rem; }
}
