:root {
  --ink: #f4e8d4;
  --paper: #14080e;
  --wine: #3a1020;
  --gold: #c9a227;
  --mute: #b9a58f;
  --line: rgba(201, 162, 39, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 500px at 10% -10%, #3a1020, var(--paper) 55%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "Courier New", monospace; color: var(--gold); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 4, 8, 0.55);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.mark {
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.mark span { color: var(--gold); }
.top nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

main { max-width: 960px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.95;
  margin: 0.3rem 0 1rem;
}
.eyebrow { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; color: var(--gold); }
.lede { max-width: 38rem; font-size: 1.15rem; color: var(--mute); }
.cta { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }

.btn, button {
  background: var(--gold);
  color: #1a0a10;
  border: 0;
  padding: 0.55rem 1rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.btn.big { padding: 0.8rem 1.3rem; font-size: 1.15rem; }
.btn:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.ghost { border-bottom: 1px solid var(--gold); color: var(--gold); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}
.grid article {
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
}
.grid h2 { margin-top: 0; font-size: 1.1rem; color: var(--gold); }

.people { list-style: none; padding: 0; margin: 0; }
.people li { border-bottom: 1px solid var(--line); }
.people a { display: block; padding: 0.7rem 0; color: inherit; text-decoration: none; }
.people strong { display: block; }
.people span { color: var(--gold); font-size: 0.9rem; }
.people em { display: block; color: var(--mute); font-style: normal; }

.form-card, .edit, .prose {
  max-width: 720px;
}
form label { display: block; margin: 0.9rem 0; }
input, textarea, select {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.6rem;
  background: #0b0508;
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: Georgia, serif;
  font-size: 1rem;
}
textarea { font-family: "Courier New", monospace; font-size: 0.92rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.cols.colors { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .cols, .cols.colors { grid-template-columns: 1fr; }
}

.flashes {
  max-width: 960px;
  margin: 0.6rem auto 0;
  padding: 0 1.2rem;
  color: var(--gold);
}

.edit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.preview-box, .links-box {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.compiled img.ibens-img { max-width: 100%; height: auto; }
.ibens-yt { position: relative; padding-top: 56.25%; margin: 1rem 0; }
.ibens-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ibens-broken { color: #d36; font-size: 0.9rem; }
.ibens-code { overflow: auto; background: #000; padding: 0.6rem; }

.link-form { display: grid; grid-template-columns: 140px 1fr 140px auto; gap: 0.4rem; }
@media (max-width: 720px) { .link-form { grid-template-columns: 1fr; } }
.link-list { list-style: none; padding: 0; }
.link-list li { margin: 0.4rem 0; word-break: break-all; }
.link-list .inline { display: inline; }
.link-list .inline button { background: transparent; color: var(--mute); padding: 0 0.4rem; }
.hits { color: var(--mute); font-size: 0.85rem; }

.profile-card {
  max-width: 720px;
  margin: 1rem auto 3rem;
  padding: 1.4rem 1.5rem 2rem;
  border: 2px solid var(--gold);
  background: rgba(10, 4, 8, 0.72);
}
.profile-card h1 { margin: 0.2rem 0; font-size: 2.4rem; }
.handle { letter-spacing: 0.08em; text-transform: lowercase; opacity: 0.8; }
.status { font-style: italic; }
.profile-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-links a { border: 1px solid currentColor; padding: 0.2rem 0.5rem; }
.report-line { margin-top: 2rem; font-size: 0.85rem; opacity: 0.7; }
.yt-wrap.is-hidden { display: none; }

.gate {
  position: fixed;
  inset: 0;
  background: rgba(8, 2, 6, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  text-align: center;
}
.gate button {
  font-size: 1.6rem;
  padding: 0.8rem 1.6rem;
}
.gate p { color: var(--mute); }

.prose pre {
  white-space: pre-wrap;
  background: #0b0508;
  padding: 1rem;
  border: 1px solid var(--line);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.2rem 3rem;
  color: var(--mute);
  font-size: 0.88rem;
  text-align: center;
}
.credit { color: #7d6b58; }
