/* superlayout.css — shared layout + form controls for the simpler Scroll of Fire
   pages (ledger, glossary, downloads). Loaded after codex.css, which supplies the
   design tokens (--bg, --card, --line, --gold, --cyan, --muted, --ink, --radius). */

:root {
  --sl-maxw: 760px;
}

/* ---- Top bar / nav -------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--sl-maxw);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 1.6rem);
  border-bottom: 1px solid var(--line, rgba(243, 201, 122, 0.22));
}
.topbar .brand {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--gold, #f3c97a);
  letter-spacing: .02em;
}
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.topnav a {
  text-decoration: none;
  color: var(--muted, #b7c0d4);
  padding: .45rem .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink, #f7f0de);
  background: rgba(122, 243, 255, .08);
  border-color: rgba(122, 243, 255, .2);
  outline: none;
}

/* ---- Page shell ----------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - clamp(1rem, 4vw, 1.6rem)), var(--sl-maxw));
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.8rem) 0 4rem;
}
.page.shell > h1 {
  margin: .2rem 0 .4rem;
}
.page > .eyebrow {
  color: var(--cyan, #7af3ff);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  margin: 0 0 .4rem;
}
.page .card + .card {
  margin-top: 1.1rem;
}

/* ---- Card grid ------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

/* ---- Form controls -------------------------------------------------------- */
.page label,
.card label {
  display: block;
  margin: .9rem 0 .35rem;
  font-size: .9rem;
  color: var(--muted, #b7c0d4);
  letter-spacing: .02em;
}
.page input,
.page textarea,
.page select,
.card input,
.card textarea,
.card select {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .85rem;
  font: inherit;
  color: var(--ink, #f7f0de);
  background: rgba(8, 12, 20, .6);
  border: 1px solid var(--line, rgba(243, 201, 122, 0.22));
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.page textarea,
.card textarea {
  resize: vertical;
  min-height: 120px;
}
.page input:focus,
.page textarea:focus,
.page select:focus,
.card input:focus,
.card textarea:focus,
.card select:focus {
  outline: none;
  border-color: rgba(122, 243, 255, .55);
  box-shadow: 0 0 0 3px rgba(122, 243, 255, .14);
}
.page input::placeholder,
.card input::placeholder,
.page textarea::placeholder,
.card textarea::placeholder {
  color: rgba(183, 192, 212, .55);
}

/* Buttons inside these pages that aren't already .btn */
.page button:not(.btn),
.card button:not(.btn) {
  appearance: none;
  cursor: pointer;
  font: inherit;
  margin: .8rem .5rem 0 0;
  padding: .6rem 1.05rem;
  color: var(--ink, #f7f0de);
  background: linear-gradient(180deg, rgba(122, 243, 255, .16), rgba(122, 243, 255, .06));
  border: 1px solid rgba(122, 243, 255, .28);
  border-radius: 999px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.page button:not(.btn):hover,
.card button:not(.btn):hover {
  background: linear-gradient(180deg, rgba(122, 243, 255, .26), rgba(122, 243, 255, .1));
  border-color: rgba(122, 243, 255, .5);
}
.page button:not(.btn):active,
.card button:not(.btn):active {
  transform: translateY(1px);
}
