:root {
  --bg: #0b1112;
  --silver: #d9d8d8;
  --muted: #8a9194;
  --blue: #215cee;
  --red: #eb2229;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--silver);
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: Barlow, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.5rem;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  display: block;
  height: 1.15rem;
  width: auto;
  flex-shrink: 0;
}

.brand-icon img {
  display: block;
  height: 1.15rem;
  width: auto;
}

.brand-name,
.domain,
.foot span,
.name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-name,
.domain,
.foot span {
  font-size: 0.78rem;
}

.domain,
.foot span:last-child {
  color: var(--muted);
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

body[data-tab="blog"] main,
body[data-tab="jobs"] main {
  display: block;
  place-items: unset;
  padding: 0 1.5rem 4rem;
}

.hero {
  width: min(44rem, 100%);
  text-align: center;
}

.wordmark {
  display: block;
  width: min(38rem, 92vw);
  height: auto;
  margin: 0 auto;
}

.name {
  margin-top: 0.35rem;
  font-size: clamp(1.15rem, 3.4vw, 1.55rem);
}

.line {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 2px;
  margin: 1.35rem auto 0;
  background: linear-gradient(90deg, var(--blue), var(--silver) 50%, var(--red));
}

.foot {
  border-top: 1px solid rgba(217, 216, 216, 0.08);
}

.mast {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(217, 216, 216, 0.12);
}

.paper-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 1.5rem;
  border-top: 1px solid rgba(217, 216, 216, 0.08);
}

.paper-tabs a,
.desk-open {
  appearance: none;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem 0.75rem;
  border-bottom: 2px solid transparent;
}

.paper-tabs a[aria-current="page"] {
  color: var(--silver);
  border-bottom-color: var(--red);
}

.desk-open {
  display: none;
  margin-left: auto;
}

body.desk-ok:not(.is-admin) .desk-open {
  display: block;
}

.desk-open:hover,
.paper-tabs a:hover {
  color: var(--silver);
}

.desk-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: 6.5rem 1.5rem 2rem;
  background: rgba(11, 17, 18, 0.78);
}

.desk-panel[hidden] {
  display: none;
}

.desk-panel form {
  background: #101618;
  border: 1px solid rgba(217, 216, 216, 0.14);
  padding: 1.25rem 1.35rem 1.4rem;
}

.desk-panel form,
.composer {
  display: grid;
  gap: 0.65rem;
  width: min(36rem, 100%);
}

.desk-kicker {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

.desk-panel input,
.composer input,
.composer textarea {
  width: 100%;
  background: #0b1112;
  border: 1px solid rgba(217, 216, 216, 0.18);
  color: var(--silver);
  font: inherit;
  padding: 0.65rem 0.75rem;
}

.composer textarea {
  resize: vertical;
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.45;
}

.desk-panel button,
.composer button {
  justify-self: start;
  background: var(--silver);
  color: var(--bg);
  border: 0;
  cursor: pointer;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
}

.desk-error {
  color: var(--red);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.desk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.5rem;
  background: rgba(33, 92, 238, 0.12);
  color: var(--silver);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}

body.is-admin .desk-bar {
  display: flex;
}

body.is-admin .composer {
  display: grid;
  margin: 0 0 2rem;
  padding: 1.15rem 0 1.4rem;
  border-bottom: 1px solid rgba(217, 216, 216, 0.12);
}

.composer {
  display: none;
}

.ghost {
  appearance: none;
  background: none;
  border: 1px solid rgba(217, 216, 216, 0.28);
  color: var(--silver);
  cursor: pointer;
  font: inherit;
  padding: 0.3rem 0.65rem;
}

.ghost.danger {
  color: var(--red);
  border-color: rgba(235, 34, 41, 0.45);
  font-size: 0.75rem;
}

.paper {
  width: min(52rem, 100%);
  margin: 0 auto;
  padding-top: 2rem;
}

.section-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--silver);
}

.section-head h1 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head p {
  margin-top: 0.35rem;
  color: var(--muted);
}

.stories,
.jobs {
  display: grid;
  gap: 1.75rem;
}

.story,
.job {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(217, 216, 216, 0.12);
}

.item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.story h2,
.job h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
}

.story p,
.job p {
  margin-top: 0.7rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #c9ccce;
}

.meta,
.apply {
  color: var(--muted) !important;
  font-size: 0.92rem !important;
}

.empty {
  color: var(--muted);
  font-family: "Source Serif 4", Georgia, serif;
}

.file-label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.file-label input[type="file"] {
  color: var(--silver);
}

.authors-roster {
  display: none;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
}

body.is-admin .authors-roster {
  display: flex;
}

.author-chip,
.author-hit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #101618;
  border: 1px solid rgba(217, 216, 216, 0.16);
  color: var(--silver);
  cursor: pointer;
  font: inherit;
  padding: 0.28rem 0.65rem 0.28rem 0.28rem;
}

.author-chip img,
.author-hit img,
.byline img,
.byline-fallback {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: cover;
  border-radius: 50%;
  background: #0b1112;
}

.byline-fallback {
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: var(--silver);
}

.author-pick {
  position: relative;
}

.author-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  display: grid;
  background: #101618;
  border: 1px solid rgba(217, 216, 216, 0.18);
}

.author-hit {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(217, 216, 216, 0.08);
  text-align: left;
}

.author-chosen .author-chip {
  margin-top: 0;
}

.byline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .bar {
    padding: 1rem 1.1rem;
  }

  .domain {
    display: none;
  }

  .paper-tabs {
    padding: 0 0.4rem;
    overflow-x: auto;
  }

  .paper-tabs a,
  .desk-open {
    padding: 0.8rem 0.7rem 0.7rem;
    letter-spacing: 0.12em;
  }

  body[data-tab="blog"] main,
  body[data-tab="jobs"] main {
    padding: 0 1.1rem 3rem;
  }
}
