/* ============================================================
   Stories from SFM — core stylesheet
   Sections: 1 tokens · 2 base · 3 topbar · 4 grid · 5 footer
   ============================================================ */

/* --- 1. Tokens ------------------------------------------- */

:root {
  --ink:        #0d0d0d;
  --ink-soft:   #1a1a1a;
  --paper:      #ffffff;
  --muted:      #6f6f6f;
  --accent:     #f2c94c;

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body:    "Source Serif 4", Georgia, serif;

  --bar-h:   74px;
  --gap:     2px;
}

/* --- 2. Base --------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: top .15s;
}
.skip:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- 3. Topbar ------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--bar-h);
  background: var(--ink);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100%;
  padding: 0 26px;
}

.masthead {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
}

.masthead__logo {
  height: 27px;
  width: auto;
}

.masthead__tag {
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav__link {
  position: relative;
  padding: 7px 0;
  color: rgba(255,255,255,.78);
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .15s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .18s;
}

.nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link.is-current::after { transform: scaleX(1); }
.nav__link.is-current { color: #fff; }

.search {
  margin-left: auto;
  flex: none;
  width: 34px; height: 34px;
  padding: 6px;
  border: 0;
  background: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
}
.search svg { width: 100%; height: 100%; }
.search:hover { color: #fff; }

/* --- 4. Grid --------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 66px;
  gap: var(--gap);
  padding-top: var(--bar-h);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--ink-soft);
}

.card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.55) 32%,
    rgba(0,0,0,.08) 66%,
    rgba(0,0,0,0) 100%
  );
}

.card:hover .card__img { transform: scale(1.045); }

.card__text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 18px 20px 16px;
  color: #fff;
}

.card__title {
  margin: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .015em;
  text-transform: uppercase;
  text-wrap: balance;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
}

.dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

/* Mosaic rhythm — repeats every 6 cards so every row closes at full
   width. Rows per cycle: 8+4 · 6+6 · 6+6
   Row unit is 66px: standard tiles span 4 (264px), features span 5 (330px). */

.card:nth-child(6n+1) { grid-column: span 8; grid-row: span 5; }
.card:nth-child(6n+2) { grid-column: span 4; grid-row: span 5; }
.card:nth-child(6n+3) { grid-column: span 6; grid-row: span 4; }
.card:nth-child(6n+4) { grid-column: span 6; grid-row: span 4; }
.card:nth-child(6n+5) { grid-column: span 6; grid-row: span 4; }
.card:nth-child(6n+6) { grid-column: span 6; grid-row: span 4; }

.card:nth-child(6n+1) .card__title { font-size: 24px; }
.card:nth-child(6n+2) .card__title { font-size: 16px; }
.card:nth-child(6n+3) .card__title,
.card:nth-child(6n+4) .card__title,
.card:nth-child(6n+5) .card__title,
.card:nth-child(6n+6) .card__title { font-size: 18px; }

/* --- 5. Footer ------------------------------------------- */

.footer {
  margin-top: var(--gap);
  background: var(--ink);
  color: rgba(255,255,255,.66);
}

.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  padding: 34px 26px;
}

.footer__logo { height: 30px; width: auto; }

.footer__note {
  max-width: 62ch;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* --- Responsive ------------------------------------------ */

@media (max-width: 1180px) {
  .card:nth-child(6n+1) .card__title { font-size: 20px; }
  .card:nth-child(6n+3) .card__title,
  .card:nth-child(6n+4) .card__title,
  .card:nth-child(6n+5) .card__title,
  .card:nth-child(6n+6) .card__title { font-size: 15.5px; }
  .card:nth-child(6n+2) .card__title { font-size: 14px; }
  .card__text { padding: 15px 16px 14px; }
}

@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 70px; }
  .grid > .card { grid-column: span 1; grid-row: span 4; }
  .card:nth-child(6n+1) { grid-column: span 2; grid-row: span 5; }
  .card:nth-child(6n+1) .card__title { font-size: 21px; }
  .card__title,
  .card:nth-child(6n+2) .card__title,
  .card:nth-child(6n+3) .card__title,
  .card:nth-child(6n+4) .card__title,
  .card:nth-child(6n+5) .card__title,
  .card:nth-child(6n+6) .card__title { font-size: 14px; }

  .topbar__inner { gap: 18px; padding: 0 16px; }
  .masthead__logo { height: 23px; }
  .masthead__tag { font-size: 8.5px; letter-spacing: .1em; }
  .nav { gap: 18px; }
  .nav__link { font-size: 11.5px; letter-spacing: .1em; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; grid-auto-rows: 64px; }
  .grid > .card, .card:nth-child(6n+1) { grid-column: span 1; grid-row: span 4; }
  .card__text { padding: 16px 18px 15px; }
  .card__title,
  .card:nth-child(6n+1) .card__title,
  .card:nth-child(6n+2) .card__title,
  .card:nth-child(6n+3) .card__title,
  .card:nth-child(6n+4) .card__title,
  .card:nth-child(6n+5) .card__title,
  .card:nth-child(6n+6) .card__title { font-size: 16px; }

  .masthead__logo { height: 21px; }
  .masthead__tag { display: none; }
  .footer__inner { padding: 26px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover .card__img { transform: none; }
}

/* --- 6. Search modal ------------------------------------- */

body.is-locked { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13,13,13,.96);
}
.modal[hidden] { display: none; }

.modal__inner { width: min(680px, 100%); }

.modal__label {
  display: block;
  margin-bottom: 14px;
  color: rgba(255,255,255,.6);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.modal__field {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 2px solid rgba(255,255,255,.35);
  background: none;
  color: #fff;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: .02em;
}
.modal__field::placeholder { color: rgba(255,255,255,.3); }
.modal__field:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.modal__close {
  position: absolute;
  top: 18px; right: 20px;
  width: 38px; height: 38px;
  padding: 7px;
  border: 0;
  background: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
}
.modal__close svg { width: 100%; height: 100%; }
.modal__close:hover { color: #fff; }

/* --- 7. Pagination --------------------------------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 46px 26px;
}

.pager__label {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.pager__link {
  position: relative;
  padding-bottom: 5px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pager__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .18s;
}
.pager__link:hover::after { transform: scaleX(.35); }

/* --- 8. Footer additions --------------------------------- */

.footer__top {
  margin-left: auto;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.66);
}
.footer__top:hover { color: #fff; }

@media (max-width: 560px) {
  .pager { padding: 34px 18px; }
  .footer__top { margin-left: 0; }
  .modal__field { font-size: 20px; }
}

/* --- 9. Article hero ------------------------------------- */

.hero {
  position: relative;
  height: 74vh;
  min-height: 420px;
  margin-top: var(--bar-h);
  overflow: hidden;
  background: var(--ink-soft);
}

.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.42) 0%,
    rgba(0,0,0,.30) 45%,
    rgba(0,0,0,.62) 100%
  );
}

.hero__text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.hero__title {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(26px, 4.2vw, 50px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .015em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__cue {
  position: absolute;
  left: 50%; bottom: 26px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-left: -20px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  color: #fff;
  animation: cue 2.4s ease-in-out infinite;
}
.hero__cue svg { width: 22px; height: 22px; }
.hero__cue:hover { border-color: var(--accent); color: var(--accent); }

@keyframes cue {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* --- 10. Article body ------------------------------------ */

.prose {
  max-width: 700px;
  margin: 0 auto;
  padding: 58px 24px 10px;
  font-size: 18px;
  line-height: 1.72;
}

.prose__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 34px;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot--dark { background: var(--ink); }

.prose h2 {
  margin: 46px 0 16px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .005em;
}
.prose h2:first-of-type { margin-top: 0; }

.prose p { margin: 0 0 22px; }

.prose a {
  border-bottom: 1px solid var(--accent);
}

.pull {
  margin: 38px 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
}
.pull p {
  margin: 0;
  font-size: 22px;
  font-style: italic;
  line-height: 1.42;
  color: #2a2a2a;
}

.figure {
  margin: 38px 0;
}
.figure img { width: 100%; }

.figure figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted);
}

.figure--right {
  float: right;
  width: 45%;
  margin: 8px 0 24px 30px;
}

.prose::after { content: ""; display: block; clear: both; }

/* --- 11. Share, byline, adjacent, respond ---------------- */

.share,
.byline,
.adjacent,
.respond {
  max-width: 700px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 30px;
  padding-bottom: 34px;
  border-bottom: 1px solid #e6e6e6;
}

.share__label {
  margin-right: 6px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.share__btn {
  padding: 7px 15px;
  border: 1px solid #d8d8d8;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: background .15s, border-color .15s, color .15s;
}
.share__btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.byline {
  display: flex;
  gap: 22px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid #e6e6e6;
}

.byline__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .06em;
}

.byline__kicker {
  margin: 0 0 3px;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.byline__name {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.byline__bio {
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #3a3a3a;
}

.byline__link {
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--accent);
}

.adjacent {
  display: flex;
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 40px;
}

.adjacent__item {
  flex: 1 1 0;
  min-width: 0;
}
.adjacent__item--next { text-align: right; }

.adjacent__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.adjacent__title {
  display: block;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.28;
  text-transform: uppercase;
}
.adjacent__item:hover .adjacent__title { color: #000; text-decoration: underline; text-underline-offset: 3px; }

.respond {
  padding-top: 36px;
  padding-bottom: 64px;
  border-top: 1px solid #e6e6e6;
}

.respond__title {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.respond__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.respond__field {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d8d8d8;
  background: #fbfbfb;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
}
.respond__field:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.respond__btn {
  margin-top: 14px;
  padding: 11px 26px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.respond__btn:hover { background: #333; }

@media (max-width: 680px) {
  .hero { height: 60vh; min-height: 340px; }
  .prose { padding-top: 40px; font-size: 17px; }
  .prose h2 { font-size: 21px; margin-top: 36px; }
  .pull p { font-size: 18px; }
  .figure--right { float: none; width: 100%; margin: 30px 0; }
  .adjacent { flex-direction: column; gap: 22px; }
  .adjacent__item--next { text-align: left; }
  .byline { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cue { animation: none; }
}

/* --- 12. Interior pages ---------------------------------- */

/* No banner: content begins directly under the fixed bar, the way
   the grid does on the home page. */

.prose--page {
  padding-top: calc(var(--bar-h) + 52px);
  padding-bottom: 70px;
}

.prose__h1 {
  margin: 0 0 26px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* --- 13. Authors ----------------------------------------- */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  max-width: 1400px;
  margin: 0 auto 70px;
  padding: calc(var(--bar-h) + 1px) 26px 1px;
  background: #e6e6e6;
  border-top: 1px solid #e6e6e6;
}

.person {
  padding: 30px 28px 32px;
  background: #fff;
}

.person__avatar {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  margin-bottom: 18px;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .06em;
}

.person__name {
  margin: 0 0 9px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.person__bio {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #3a3a3a;
}

.person__link {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--accent);
}
.person__link:hover { color: var(--ink); }

/* --- 14. Standalone page prose --------------------------- */
/* Spacing for .prose--page lives in section 12. Do not redeclare
   padding-top here: the later rule wins and the content slides up
   under the fixed top bar. */

/* The opening paragraph sits at body size. It leads by position,
   not by being set larger than everything after it. */
.lede { margin-bottom: 22px; }

@media (max-width: 680px) {
  .people { padding-left: 18px; padding-right: 18px; }
  .prose--page { padding-top: calc(var(--bar-h) + 38px); }
  .prose__h1 { font-size: 27px; }
}

/* --- 15. References list --------------------------------- */

.refs {
  margin: 0 0 26px;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #444;
}
.refs li { margin-bottom: 12px; }

/* Author card links */
.person__bio a { border-bottom: 1px solid #ddd; }
.person__bio a:hover { border-bottom-color: var(--accent); }

/* --- 16. About page photo -------------------------------- */

.about-photo {
  width: 100%;
  height: auto;
  /* one blank line of space before the text that follows */
  margin: 0 0 31px;
}

/* --- 17. Submit button in the bar ------------------------ */

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex: none;
}

.search { margin-left: 0; }

.submit-btn {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.submit-btn:hover,
.submit-btn--on {
  background: var(--accent);
  color: var(--ink);
}

/* --- 18. Submission portal ------------------------------- */

.portal {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--bar-h) + 54px) 24px 80px;
}

.portal__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.portal__intro {
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

/* progress */

.steps {
  display: flex;
  gap: 2px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.steps__item {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 12px;
  background: #f1f1f1;
  color: #9a9a9a;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.steps__n {
  display: grid;
  place-items: center;
  width: 21px; height: 21px;
  flex: none;
  border-radius: 50%;
  background: #d8d8d8;
  color: #fff;
  font-size: 11px;
}

.steps__item.is-on   { background: var(--ink); color: #fff; }
.steps__item.is-on .steps__n { background: var(--accent); color: var(--ink); }
.steps__item.is-done { background: #e3e3e3; color: #6a6a6a; }
.steps__item.is-done .steps__n { background: var(--ink); color: var(--accent); }

/* panels */

.panel__title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.panel__intro {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* fields */

.field { margin: 0 0 28px; }

.field--group {
  padding: 0;
  border: 0;
  margin-inline: 0;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  padding: 0;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.field__label--sm { font-size: 10.5px; font-weight: 400; color: var(--muted); }

.req {
  margin-left: 7px;
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: .12em;
  color: #b08900;
}

.field__hint {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.field__input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d4d4d4;
  background: #fcfcfc;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}
.field__input:focus { outline: none; border-color: var(--ink); background: #fff; }
.field__input.is-bad { border-color: #c0392b; background: #fdf6f5; }
.field__input--sm { max-width: 160px; }
.field__area { resize: vertical; }

.field__sub { margin-top: 14px; }

.field__file {
  width: 100%;
  padding: 16px;
  border: 1px dashed #c4c4c4;
  background: #fafafa;
  font-family: var(--body);
  font-size: 15px;
}

.field__note {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #2d7a3e;
}
.field__note--bad { color: #c0392b; }

.field__err {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: #c0392b;
}

/* options */

.radios { display: flex; gap: 24px; }

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 11px 20px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 15.5px;
  line-height: 1.45;
  cursor: pointer;
}
.opt input { margin: 3px 0 0; flex: none; width: 15px; height: 15px; accent-color: #111; }
.opt input:disabled + span { color: #b4b4b4; }

.opt--none {
  grid-column: 1 / -1;
  padding-top: 11px;
  border-top: 1px solid #e6e6e6;
}

/* terms */

.terms { display: flex; flex-direction: column; gap: 18px; }

.opt--term {
  padding: 16px 18px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  font-size: 15.5px;
  line-height: 1.6;
}
.opt--term:hover { border-color: #c4c4c4; }

/* under construction */

.wip {
  margin: 0 0 30px;
  padding: 22px 24px;
  border-left: 3px solid var(--accent);
  background: #fbf7e9;
  font-size: 15.5px;
  line-height: 1.65;
}
.wip p { margin: 0 0 12px; }
.wip p:last-child { margin-bottom: 0; }

.wip__tag {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a6d00;
}

.dump {
  margin: 14px 0 0;
  padding: 14px;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid #e8e0c4;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* confirmation */

.code {
  margin: 0 0 24px;
  padding: 26px;
  background: var(--ink);
  text-align: center;
}

.code__label {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}

.code__value {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--accent);
}

/* buttons */

.nav-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid #e6e6e6;
}

.btn {
  padding: 12px 28px;
  border: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn--go { background: var(--ink); color: #fff; }
.btn--go:hover { background: #333; border-color: #333; }
.btn--back:hover { background: #f0f0f0; }

@media (max-width: 880px) {
  .submit-btn { padding: 7px 12px; font-size: 10.5px; letter-spacing: .1em; }
  .topbar__actions { gap: 10px; }
}

@media (max-width: 680px) {
  .portal { padding-top: calc(var(--bar-h) + 34px); }
  .portal__title { font-size: 29px; }
  .steps__label { display: none; }
  .steps__item { justify-content: center; padding: 11px 6px; }
  .checks { grid-template-columns: 1fr; }
  .nav-btns { flex-direction: column-reverse; align-items: stretch; }
  .btn { width: 100%; text-align: center; }
  .code__value { font-size: 25px; }
}

@media (max-width: 560px) {
  .submit-btn { padding: 6px 10px; font-size: 9.5px; }
}
