:root {
  --black: #080a09;
  --ink: #e6e8df;
  --muted: #8b9189;
  --line: #2b312e;
  --signal: #d94b32;
  --cyan: #61d6d0;
  --panel: #101411;
}

* { box-sizing: border-box; }

html { color-scheme: dark; background: var(--black); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(97, 214, 208, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 214, 208, .035) 1px, transparent 1px),
    var(--black);
  background-size: 36px 36px;
  color: var(--ink);
  font: 16px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

a { color: inherit; text-underline-offset: .25em; }
button, input, textarea, select { font: inherit; }

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 9, .9);
}

.wordmark { font-weight: 800; text-decoration: none; letter-spacing: .08em; }
.signal { color: var(--cyan); font-size: .78rem; letter-spacing: .1em; }
.warning { color: var(--signal); }

main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

.hero { padding: clamp(4.5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem); }
.hero.compact { padding-bottom: 2.5rem; }
.eyebrow, .index, .status-line { color: var(--signal); letter-spacing: .13em; font-size: .76rem; }

h1, h2, h3 { margin: 0; line-height: 1.05; text-wrap: balance; }
h1 { max-width: 10ch; font-size: clamp(3rem, 9vw, 7rem); letter-spacing: -.065em; }
h2 { font-size: clamp(1.55rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
.lede { max-width: 650px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.35rem); }

.panel {
  margin-bottom: 4rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  background: rgba(16, 20, 17, .94);
}
.panel.narrow { max-width: 780px; }
.panel-heading, .membership-box { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.membership-box { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--line); }
.membership-box.active { border-color: var(--cyan); }

label { display: block; margin-bottom: .5rem; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
input, textarea, select {
  width: 100%;
  border: 1px solid #444c47;
  border-radius: 0;
  padding: .85rem 1rem;
  background: var(--black);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
.stacked-form { display: grid; gap: .65rem; max-width: 760px; }
.stacked-form label:not(:first-child) { margin-top: .75rem; }
.check { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.check input { width: auto; }

button, .button-link {
  display: inline-block;
  border: 1px solid var(--signal);
  padding: .85rem 1.1rem;
  background: var(--signal);
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button-link:hover { filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: wait; }
button.secondary { border-color: var(--line); background: transparent; color: var(--ink); }

.notice { max-width: 780px; margin-top: 2rem; padding: 1rem; border-left: 3px solid var(--cyan); background: var(--panel); }
.notice.error { border-color: var(--signal); }
.notice.success { border-color: var(--cyan); }

.archive { padding-bottom: 7rem; }
.section-rule { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.top-gap { margin-top: 4rem; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 2rem; background: var(--line); }
.content-card { min-height: 310px; padding: 1.5rem; background: var(--black); }
.content-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 1rem; filter: saturate(.75) contrast(1.05); }
.content-card p:not(.index) { color: var(--muted); }
.content-card a { display: inline-block; margin-top: 1rem; color: var(--cyan); }
.empty { color: var(--muted); }

.admin-list { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.admin-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.admin-row span { color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .masthead, footer, .panel-heading, .membership-box { align-items: flex-start; flex-direction: column; }
  .inline-form { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero, .panel, .archive { animation: receive .55s ease-out both; }
  .panel { animation-delay: .08s; }
  .archive { animation-delay: .16s; }
  @keyframes receive {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
