:root {
  color-scheme:dark;
  --bg:#0c0e0d;
  --panel:#151816;
  --panel-hi:#1d211e;
  --text:#f2f3ef;
  --muted:#9baba1;
  --line:#2a322d;
  --accent:#c9ddba;
  --lavender:#cec1ed;
  --danger:#ffb8b1;
  --serif:Georgia,'Times New Roman',serif;
  --sans:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--sans);
  line-height:1.5;
}

a {
  color:inherit;
  text-decoration:none;
}

button,input,textarea,select {
  font:inherit;
}

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}

button,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--lavender);
  outline-offset:4px;
}

button {
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.6;
}

[hidden] {
  display:none!important;
}

.skip-link {
  position:fixed;
  top:-100px;
  left:16px;
  padding:12px;
  background:var(--accent);
  color:var(--bg);
  z-index:10;
}

.skip-link:focus {
  top:12px;
}

.masthead {
  max-width:1100px;
  margin:auto;
  min-height:94px;
  padding:22px 36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid var(--line);
}

.brand {
  font-family:var(--serif);
  font-size:28px;
  font-weight:700;
  letter-spacing:-1.6px;
  white-space:nowrap;
}

.brand span:first-child {
  font-style:italic;
}

.brand-dot {
  color:var(--accent);
}

nav {
  display:flex;
  align-items:center;
  gap:25px;
  font-size:13px;
  font-weight:600;
}

nav a {
  padding:9px 0;
  color:var(--muted);
}

nav a[aria-current=page] {
  color:var(--text);
  border-bottom:2px solid var(--accent);
}

nav a:hover {
  color:var(--text);
}

nav .account-nav {
  padding:8px 13px;
  border:1px solid var(--line);
  border-radius:20px;
}

main {
  max-width:1000px;
  min-height:65vh;
  margin:0 auto;
  padding:40px 36px 70px;
}

.eyebrow {
  font-size:10px;
  letter-spacing:.17em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:700;
  margin:0 0 12px;
}

.page-heading {
  font-family:var(--serif);
  font-size:clamp(32px,5vw,49px);
  line-height:1.13;
  letter-spacing:-1.4px;
  margin:0 0 14px;
  font-weight:400;
}

.intro {
  max-width:600px;
  color:var(--muted);
  font-size:15px;
  margin:0 0 28px;
}

.page-top {
  padding-bottom:29px;
}

.feed-bar {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:15px 0;
  display:flex;
  align-items:center;
  gap:14px;
  justify-content:space-between;
}

.filter {
  max-width:170px;
  border:0;
  background:transparent;
  color:var(--text);
  padding:8px 25px 8px 0;
  font-size:16px;
  font-weight:650;
}

.search-form {
  display:flex;
  align-items:center;
  gap:8px;
  max-width:320px;
  flex:1;
}

.search-form input {
  min-width:0;
  width:100%;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--panel);
  font-size:13px;
}

.search-form button {
  background:transparent;
  color:var(--muted);
  border:0;
  font-size:13px;
  padding:9px 4px;
}

.feed {
  margin:0;
  padding:0;
  list-style:none;
}

.story-row {
  display:flex;
  gap:22px;
  padding:25px 0;
  border-bottom:1px solid var(--line);
}

.story-row:hover .story-title {
  color:var(--accent);
}

.story-thumb {
  width:91px;
  height:91px;
  object-fit:cover;
  border-radius:12px;
  flex:0 0 auto;
  background:var(--panel-hi);
}

.story-placeholder {
  display:grid;
  place-items:center;
  font-family:var(--serif);
  font-style:italic;
  font-size:32px;
  color:var(--muted);
  border:1px solid var(--line);
}

.story-copy {
  min-width:0;
  align-self:center;
  flex:1;
}

.story-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  font-size:10px;
  color:var(--muted);
  letter-spacing:.055em;
  text-transform:uppercase;
  margin:0 0 7px;
}

.story-meta span+span:before {
  content:'·';
  margin-right:10px;
  color:#6d7b71;
}

.story-title {
  margin:0;
  font-size:20px;
  line-height:1.32;
  letter-spacing:-.35px;
  font-weight:640;
  transition:color .15s;
}

.story-summary {
  font-size:13px;
  line-height:1.65;
  color:var(--muted);
  margin:7px 0 0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.story-arrow {
  align-self:center;
  color:var(--muted);
  font-size:20px;
  margin-left:5px;
}

.more {
  display:block;
  margin:28px auto 0;
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 18px;
  min-height:44px;
  background:var(--accent);
  border:1px solid var(--accent);
  border-radius:7px;
  color:#14200e;
  font-size:13px;
  font-weight:650;
  text-align:center;
}

.button:hover {
  filter:brightness(1.08);
}

.button.secondary {
  color:var(--text);
  background:transparent;
  border-color:var(--line);
}

.button.quiet {
  color:var(--muted);
  background:var(--panel);
  border-color:var(--line);
}

.button.danger {
  color:var(--danger);
  background:transparent;
  border-color:#644039;
}

.button.small {
  padding:8px 12px;
  font-size:12px;
  min-height:38px;
}

.actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.commission-prompt {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:22px 0;
  margin-top:33px;
  border-top:1px solid var(--line);
}

.commission-prompt h2 {
  font-family:var(--serif);
  font-weight:400;
  font-size:24px;
  margin:0 0 5px;
}

.commission-prompt p {
  font-size:13px;
  color:var(--muted);
  margin:0;
}

.footer {
  max-width:1100px;
  margin:auto;
  padding:24px 36px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:15px;
  color:var(--muted);
  font-size:11px;
}

.footer span {
  font-family:var(--serif);
  font-size:14px;
  font-style:italic;
}

.empty,.loading {
  color:var(--muted);
  padding:45px 0;
  text-align:center;
}

.empty strong {
  display:block;
  color:var(--text);
  font-size:18px;
  margin-bottom:7px;
}

.back-link {
  display:inline-block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:30px;
}

.article {
  max-width:740px;
  margin:0 auto;
}

.article h1 {
  font-family:var(--serif);
  font-weight:400;
  font-size:clamp(34px,5.5vw,56px);
  line-height:1.12;
  letter-spacing:-1.7px;
  margin:15px 0 22px;
}

.article-dek {
  font-size:18px;
  line-height:1.6;
  color:#b4c0b7;
  margin-bottom:26px;
}

.article-figure {
  margin:35px 0;
}

.article-figure img {
  width:100%;
  max-height:470px;
  object-fit:contain;
  border-radius:8px;
  background:var(--panel);
}

.article-figure figcaption {
  margin-top:9px;
  font-size:11px;
  color:var(--muted);
}

.prose {
  font-family:var(--serif);
  font-size:19px;
  line-height:1.85;
  color:#d5dcd5;
  overflow-wrap:anywhere;
}

.prose h2 {
  font-family:var(--sans);
  font-size:23px;
  line-height:1.4;
  letter-spacing:-.45px;
  color:var(--text);
  margin:40px 0 17px;
}

.prose h3 {
  font-size:21px;
  line-height:1.5;
}

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

.prose a {
  color:var(--accent);
  text-decoration:underline;
  text-decoration-color:#56624e;
  text-underline-offset:4px;
}

.prose img {
  max-width:100%;
  height:auto;
}

.prose pre {
  overflow-x:auto;
  background:var(--panel);
  padding:20px;
  font-size:13px;
  border:1px solid var(--line);
  border-radius:6px;
}

.prose code {
  font-size:.78em;
  background:var(--panel-hi);
  border-radius:3px;
  padding:2px 4px;
}

.prose table {
  display:block;
  overflow-x:auto;
  font-family:var(--sans);
  font-size:13px;
  max-width:100%;
  border-collapse:collapse;
}

.prose td,.prose th {
  padding:10px;
  border:1px solid var(--line);
  text-align:left;
}

.prose blockquote {
  margin:24px 0;
  padding:5px 0 5px 22px;
  border-left:2px solid var(--accent);
  color:var(--muted);
}

.evidence {
  border-top:1px solid var(--line);
  padding-top:24px;
  margin-top:40px;
}

.evidence summary {
  font-size:16px;
  cursor:pointer;
  color:var(--accent);
  padding-bottom:20px;
}

.evidence .prose {
  font-family:var(--sans);
  font-size:14px;
  line-height:1.8;
}

.evidence .prose h2 {
  font-size:20px;
}

.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:25px;
  margin:20px 0;
}

.panel h2 {
  font-family:var(--serif);
  font-size:25px;
  font-weight:400;
  line-height:1.3;
  margin:0 0 12px;
}

.panel .intro {
  font-size:13px;
  margin-bottom:23px;
}

.narrow {
  max-width:580px;
  margin:0 auto;
}

.form {
  display:grid;
  gap:18px;
}

.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}

.field label {
  font-size:12px;
  color:#d3dcd4;
  font-weight:600;
}

.field input,.field textarea,.field select {
  width:100%;
  color:var(--text);
  background:var(--bg);
  border:1px solid #364139;
  border-radius:6px;
  padding:11px 12px;
  font-size:14px;
  min-height:44px;
}

.field textarea {
  resize:vertical;
  line-height:1.6;
}

.field small,.muted {
  font-size:12px;
  color:var(--muted);
  line-height:1.65;
}

.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-message {
  font-size:13px;
  color:var(--accent);
  margin:0;
  overflow-wrap:anywhere;
}

.form-message.error {
  color:var(--danger);
}

.form button[type=submit] {
  justify-self:start;
  margin-top:3px;
}

.details-toggle {
  margin-top:30px;
}

.details-toggle>summary {
  cursor:pointer;
  font-size:13px;
  color:var(--muted);
  padding:15px 0;
}

.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:10px;
  letter-spacing:.04em;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:30px;
  text-transform:uppercase;
  color:var(--muted);
  white-space:nowrap;
}

.badge:before {
  content:'';
  width:5px;
  height:5px;
  flex:none;
  border-radius:100%;
  background:currentColor;
}

.badge.published,.badge.queued {
  color:var(--accent);
}

.badge.review,.badge.awaiting_approval,.badge.researching,.badge.drafting {
  color:var(--lavender);
}

.badge.failed,.badge.held {
  color:var(--danger);
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:34px 0 15px;
}

.section-heading h2 {
  font-size:20px;
  font-family:var(--serif);
  font-weight:400;
  margin:0;
}

.commission-list {
  list-style:none;
  margin:0;
  padding:0;
}

.commission-row {
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:20px 0;
  border-bottom:1px solid var(--line);
}

.commission-row h3 {
  font-size:16px;
  font-weight:600;
  margin:0 0 7px;
}

.commission-row p {
  font-size:12px;
  color:var(--muted);
  margin:0;
}

.commission-row:hover h3 {
  color:var(--accent);
}

.commission-head {
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
  margin:15px 0;
}

.commission-detail {
  overflow-anchor:none;
}

.execution-panel {
  border-block:1px solid var(--line);
  padding:20px 0;
  margin:24px 0;
}

.execution-panel h2 {
  font-size:13px;
  color:var(--muted);
  font-weight:600;
  margin:0 0 8px;
}

.execution-message {
  font-size:15px;
  margin:0 0 14px;
}

.execution-panel.interrupted .execution-message {
  color:var(--danger);
}

.execution-facts {
  display:flex;
  flex-wrap:wrap;
  gap:10px 24px;
  margin:0;
  font-size:11px;
}

.execution-facts dt {
  color:var(--muted);
}

.execution-facts dd {
  margin:3px 0 0;
}

.execution-note,.commission-refresh {
  font-size:11px;
  color:var(--muted);
  margin:12px 0 0;
}

.commission-refresh.paused {
  color:var(--lavender);
}

.commission-refresh a {
  text-decoration:underline;
}

.brief {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:#c4cfc6;
  font-size:15px;
  line-height:1.8;
}

.input-list {
  padding-left:20px;
  font-size:13px;
  line-height:1.8;
  color:var(--muted);
  overflow-wrap:anywhere;
}

.input-list a {
  color:var(--accent);
  text-decoration:underline;
}

.timeline {
  list-style:none;
  padding:0;
  margin:10px 0;
}

.timeline li {
  position:relative;
  padding:0 0 22px 21px;
  border-left:1px solid var(--line);
  font-size:13px;
}

.timeline li:before {
  content:'';
  position:absolute;
  left:-4px;
  top:6px;
  width:7px;
  height:7px;
  border-radius:100%;
  background:#7d9382;
}

.timeline strong {
  font-weight:550;
  display:block;
}

.timeline time {
  font-size:10px;
  color:var(--muted);
}

.timeline p {
  color:var(--muted);
  margin:5px 0 0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.invite-output {
  margin:15px 0 0;
  padding:15px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:6px;
  overflow-wrap:anywhere;
  font-size:12px;
}

.invite-output code {
  display:block;
  margin:12px 0;
  color:var(--accent);
  user-select:all;
}

.user-row {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding:15px 0;
  border-bottom:1px solid var(--line);
}

.user-info {
  flex:1;
  min-width:180px;
}

.user-info strong {
  display:block;
  font-size:13px;
}

.user-info span {
  font-size:11px;
  color:var(--muted);
}

.user-row select {
  max-width:120px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--bg);
  color:var(--text);
  font-size:12px;
}

#notice {
  padding:13px 16px;
  margin-bottom:22px;
  border:1px solid #4a4e3d;
  background:#22251b;
  border-radius:7px;
  font-size:13px;
  color:var(--accent);
}

.article .draft-label {
  padding:12px 15px;
  background:#241f2e;
  border:1px solid #493957;
  border-radius:6px;
  color:var(--lavender);
  font-size:12px;
  margin:25px 0;
}

.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;
}

@media(min-width:850px) {
  .feed {
    max-width:820px;
    margin:auto;
  }
  .feed-bar {
    padding-left:0;
  }
  .story-row {
    padding:28px 0;
  }
  .story-title {
    font-size:22px;
  }
  .story-thumb {
    width:102px;
    height:102px;
  }
  .page-top {
    padding-top:8px;
    padding-bottom:40px;
  }
}

@media(max-width:600px) {
  .masthead {
    min-height:83px;
    padding:19px 21px;
    gap:12px;
    flex-wrap:wrap;
  }
  .brand {
    font-size:25px;
  }
  nav {
    gap:17px;
    font-size:11px;
  }
  nav .account-nav {
    padding:6px 10px;
  }
  main {
    padding:31px 22px 50px;
  }
  .page-top {
    padding-bottom:24px;
  }
  .page-heading {
    font-size:36px;
  }
  .intro {
    font-size:13px;
    margin-bottom:9px;
  }
  .eyebrow {
    font-size:9px;
  }
  .feed-bar {
    gap:10px;
  }
  .filter {
    max-width:112px;
    font-size:15px;
  }
  .search-form {
    max-width:205px;
  }
  .search-form input {
    font-size:12px;
  }
  .story-row {
    gap:15px;
    padding:24px 0;
  }
  .story-thumb {
    width:65px;
    height:65px;
    border-radius:12px;
  }
  .story-title {
    font-size:18px;
    line-height:1.34;
  }
  .story-meta {
    font-size:8px;
    letter-spacing:.025em;
    gap:3px 7px;
    margin-bottom:6px;
  }
  .story-meta span+span:before {
    margin-right:7px;
  }
  .story-meta span:first-child {
    max-width:190px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .story-summary,.story-arrow {
    display:none;
  }
  .commission-prompt {
    display:block;
    margin-top:22px;
  }
  .commission-prompt h2 {
    font-size:23px;
  }
  .commission-prompt .button {
    margin-top:18px;
  }
  .footer {
    padding:22px;
    font-size:10px;
  }
  .article h1 {
    font-size:39px;
    letter-spacing:-1.3px;
  }
  .article-dek {
    font-size:16px;
  }
  .prose {
    font-size:18px;
    line-height:1.8;
  }
  .prose h2 {
    font-size:21px;
  }
  .panel {
    padding:20px;
  }
  .form-row {
    grid-template-columns:1fr;
  }
  .commission-row {
    gap:10px;
  }
  .commission-row h3 {
    font-size:14px;
  }
  .commission-row .badge {
    font-size:8px;
  }
  .badge {
    font-size:9px;
  }
  .actions .button {
    flex:1;
  }
  .user-row .button {
    padding:8px;
    font-size:11px;
  }
  .article-figure {
    margin:27px 0;
  }
}

@media(max-width:380px) {
  .masthead {
    padding:17px;
  }
  .brand {
    font-size:24px;
  }
  nav {
    width:100%;
    justify-content:space-between;
  }
  main {
    padding-left:17px;
    padding-right:17px;
  }
  .story-meta span:first-child {
    max-width:160px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  * {
    transition:none!important;
  }
}
