@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/work-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/work-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: Spectral;
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/spectral-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: Spectral;
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/spectral-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/space-mono-latin-400-normal.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --ink: #14110f;
  --ink-body: #2e2a26;
  --muted: #8a837c;
  --paper: #faf8f5;
  --paper-alt: #f2efe9;
  --surface: #fffdf9;
  --signal: #ff2d20;
  --signal-ink: #b3130a;
  --rule: rgb(20 17 15 / 10%);
  color: var(--ink);
  background: var(--paper);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-synthesis: none;
}

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

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-color: rgb(20 17 15 / 30%);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--signal-ink);
}

.masthead {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px max(20px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--rule);
  background: #fffdf9;
}

.masthead > a:first-child {
  display: inline-flex;
  align-items: baseline;
  flex: none;
  gap: 8px;
  color: var(--ink);
  font: 600 24px/1 Spectral, Georgia, serif;
  letter-spacing: -0.6px;
  text-decoration: none;
}

.masthead > a:first-child strong {
  font: 600 11px/1 'Space Mono', ui-monospace, monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.masthead nav a {
  color: #5f5a55;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--ink);
}

.masthead nav form {
  margin: 0;
}

.actor {
  flex: none;
  color: var(--muted);
  font: 10px/1.4 'Space Mono', ui-monospace, monospace;
  text-transform: uppercase;
}

main {
  width: min(1160px, calc(100% - 40px));
  margin: 36px auto 80px;
}

.page-heading {
  margin: 0 0 28px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--rule);
}

.page-heading h1,
.preview h1,
main > h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font: 600 clamp(30px, 4vw, 42px)/1.15 Spectral, Georgia, serif;
  letter-spacing: -0.8px;
}

.page-heading > p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: #5f5a55;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font: 400 10px/1.4 'Space Mono', ui-monospace, monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

h2,
h3 {
  color: var(--ink);
  font-family: Spectral, Georgia, serif;
  line-height: 1.3;
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

p,
li,
dd {
  color: var(--ink-body);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--rule);
}

.tabs a {
  padding: 0 0 12px;
  color: #5f5a55;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: capitalize;
}

.tabs a[aria-current='page'] {
  border-bottom: 2px solid var(--signal);
  color: var(--ink);
}

.stack {
  display: grid;
  gap: 14px;
}

.stack label,
.form-grid label,
.inline-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.card,
main > section:not(.page-heading),
.columns > section {
  min-width: 0;
  margin: 14px 0;
  padding: 20px;
  border: 1px solid rgb(20 17 15 / 9%);
  border-radius: 4px;
  background: var(--surface);
}

.card h2 {
  margin: 8px 0;
  font-size: 21px;
}

.card > :last-child,
main > section > :last-child {
  margin-bottom: 0;
}

.card__meta,
small,
dt {
  color: var(--muted);
  font-size: 11px;
}

.status {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-alt);
  color: #5f5a55;
  font: 400 9px/1.4 'Space Mono', ui-monospace, monospace;
  text-transform: uppercase;
  vertical-align: middle;
}

.status--accepted,
.status--published {
  border-color: rgb(30 100 56 / 18%);
  background: #e7f1e8;
  color: #185c2b;
}

.status--rejected {
  border-color: rgb(179 19 10 / 18%);
  background: #f7e8e5;
  color: #81261b;
}

.warning,
[role='alert'] {
  color: #8b4c00;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wide {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c9c4bb;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: 400 13px/1.45 'Work Sans', system-ui, sans-serif;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #bd6637;
  outline-offset: 3px;
}

button,
.button {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #c9c4bb;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 600 12px/1.4 'Work Sans', system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

button:hover,
.button:hover {
  background: #ece8e1;
  color: var(--ink);
}

.tabs button,
button[type='submit'] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.tabs button:hover,
button[type='submit']:hover {
  background: #36312a;
}

.confirm {
  display: flex !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 400 !important;
}

.confirm input {
  width: auto;
  margin: 4px 0 0;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.inline-form label {
  min-width: min(240px, 100%);
}

.danger-zone {
  border-color: rgb(179 19 10 / 35%) !important;
}

.preview-warning {
  padding: 12px 16px;
  border: 1px solid #dfc66f;
  border-radius: 4px;
  background: #fbf2d5;
}

.preview {
  max-width: 760px;
  margin: 32px auto;
  padding: 32px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.preview .dek {
  color: #5f5a55;
  font-size: 18px;
}

.preview p {
  line-height: 1.8;
}

.preview blockquote {
  margin-inline: 0;
  padding-left: 16px;
  border-left: 2px solid var(--signal);
}

.review-image {
  width: min(100%, 24rem);
  height: auto;
}

.framing-previews {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.framing-preview {
  margin: 0;
}

.framing-preview--narrow {
  width: min(100%, 15rem);
}

.framing-preview--wide {
  width: min(100%, 30rem);
}

.framing-preview__box img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-alt);
  object-fit: cover;
}

.framing-preview figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.framing-point {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--rule);
}

.framing-point legend {
  color: var(--ink);
  font-weight: 600;
}

.framing-point small {
  grid-column: 1 / -1;
}

.framing-hint {
  margin: 0;
  color: var(--muted);
}

[data-framing-enhanced] .framing-preview__box img {
  cursor: crosshair;
}

code,
pre {
  overflow-wrap: anywhere;
}

pre {
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .masthead {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 16px 20px;
  }

  .masthead nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
  }

  .actor {
    margin-left: auto;
    align-self: center;
  }

  main {
    width: min(100% - 36px, 1160px);
    margin-top: 24px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wide {
    grid-column: auto;
  }

  .preview {
    padding: 22px;
  }
}

@media (max-width: 440px) {
  .masthead > a:first-child {
    font-size: 21px;
  }

  .masthead nav {
    gap: 15px;
  }

  .masthead nav a {
    white-space: nowrap;
  }

  .actor {
    font-size: 9px;
  }

  .card,
  main > section:not(.page-heading),
  .columns > section {
    padding: 16px;
  }
}
