:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #f1f3ef;
  --ink: #142922;
  --muted: #50635a;
  --paper: #fffefa;
  --line: #d5ded6;
  --accent: #1b654b;
  --light: #e4f0e7;
  --dark: #102e25;
  --lime: #d8f593;
  --serif: Georgia, "Times New Roman", serif;
  --display: clamp(2.25rem, 5vw, 3.5625rem);
  --headline: 1.75rem;
  --title: 1.375rem;
  --body: 1rem;
  --label: .875rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #268b62; outline-offset: 3px; }
.masthead :focus-visible { outline-color: var(--lime); }
a { color: var(--accent); overflow-wrap: anywhere; }
h1, h2, p { margin-top: 0; }
h1 { font-family: var(--serif); letter-spacing: -.052em; line-height: 1.08; margin-bottom: 12px; font-size: var(--display); }
h2 { line-height: 1.2; margin-bottom: 0; font-size: var(--title); }
p { font-size: var(--body); line-height: 1.55; }
.skip { position: absolute; left: 1rem; top: .5rem; z-index: 2; transform: translateY(-200%); background: white; padding: 8px; }
.skip:focus { transform: none; }
.masthead { padding: 15px max(24px, calc((100% - 1160px)/2)); background: var(--dark); color: white; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.publication { display: flex; align-items: center; gap: 12px; }
.publication strong, .publication div span { display: block; }
.publication strong { font-size: var(--title); line-height: 1.1; letter-spacing: -.035em; }
.publication div span { font-size: var(--label); color: #bcd3c5; }
.mark { flex: none; width: 42px; height: 42px; background: var(--lime); border-radius: 12px 12px 12px 2px; position: relative; }
.mark::after { position: absolute; content: ""; inset: 10px; border: 2px solid var(--dark); border-radius: 3px; background: repeating-linear-gradient(to bottom, transparent 0 4px, var(--dark) 4px 6px) center / 10px 12px no-repeat; }
.desk { max-width: 1208px; margin: 0 auto; padding: clamp(24px, 5vw, 58px) 24px 48px; }
.overview { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; min-height: 170px; padding: clamp(24px, 5vw, 48px); color: #fffefa; background: radial-gradient(ellipse at 92% 5%, #326346, transparent 58%), var(--dark); border-radius: 20px 20px 20px 4px; }
.overview p:last-child { margin: 0; color: #d2e2d8; }
.kicker { color: var(--accent); font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 5px; }
.primary, .quiet, .secondary { border: 1px solid transparent; border-radius: 9px; font-weight: 650; min-height: 44px; padding: 9px 15px; }
.primary { color: white; background: var(--accent); }
.primary:hover { background: #144732; }
.quiet { padding-inline: 9px; color: var(--accent); background: transparent; }
.quiet:hover, .secondary:hover { background: var(--light); }
.secondary { color: var(--ink); border-color: var(--line); background: white; }
.new { white-space: nowrap; color: var(--dark); background: var(--lime); }
.new:hover { background: #e9ffc0; }
.new:focus-visible { outline-color: var(--lime); }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 23px; }
.metric { border: 1px solid var(--line); background: var(--paper); text-align: left; color: var(--ink); border-radius: 12px; padding: 13px 15px; border-top: 3px solid var(--state); }
.metric:hover, .metric[aria-pressed="true"] { background: var(--tone); }
.metric strong, .metric span { display: block; }
.metric strong { font-size: var(--headline); line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--state); }
.metric span { font-size: .8rem; color: var(--muted); padding-top: 5px; }
[data-state="received"] { --state: #5055a5; --tone: #eeedff; }
[data-state="review"] { --state: #8b5a0d; --tone: #fcf0d9; }
[data-state="approved"] { --state: #17694e; --tone: #e1f4ec; }
[data-state="published"] { --state: #255c80; --tone: #e3f0fa; }
[data-state="rejected"] { --state: #963a58; --tone: #fbeaf0; }
.workspace { display: grid; grid-template-columns: minmax(245px, .9fr) minmax(0, 1.75fr); min-height: 385px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 8px 26px #102e250a; }
.queue { min-width: 0; border-right: 1px solid var(--line); background: #f7faf6; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue .section-heading { padding: 17px 19px 10px; }
.filter { display: flex; align-items: center; gap: 8px; padding: 4px 19px 15px; color: var(--muted); font-size: .83rem; }
.filter select { flex: 1; width: 100%; min-width: 0; padding: 6px; }
.stories { list-style: none; margin: 0; padding: 0; }
.stories button { width: 100%; text-align: left; padding: 13px 19px; border: 0; border-top: 1px solid var(--line); border-left: 3px solid transparent; background: transparent; color: var(--ink); overflow-wrap: anywhere; }
.stories button:focus-visible { outline-offset: -3px; }
.stories button:hover, .stories button[aria-current="true"] { background: var(--light); border-left-color: var(--accent); }
.stories strong { display: block; margin: 5px 0 2px; }
.meta { color: var(--muted); font-size: .79rem; }
.badge { color: var(--state); background: var(--tone); border-radius: 4px; display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 7px; }
.empty { padding: 17px 20px; margin: 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.reader { padding: clamp(16px, 4vw, 34px); min-width: 0; overflow-wrap: anywhere; }
.reader-empty { display: grid; align-content: center; justify-items: start; min-height: 285px; }
.reader-empty p { color: var(--muted); max-width: 32ch; margin: 8px 0 0; }
.page-icon { margin-bottom: 10px; width: 38px; height: 44px; background: var(--light); border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--accent); font-size: 1.5rem; }
.reader h2 { font: bold clamp(1.5rem, 4vw, 2rem)/1.18 var(--serif); margin: 8px 0 9px; letter-spacing: -.023em; }
.reader .story-body { white-space: pre-wrap; line-height: 1.65; margin: 16px 0 20px; max-width: 72ch; }
.links { display: grid; gap: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.history h3 { margin: 0; font-size: .96rem; }
.history ul { margin: 7px 0 0; padding-left: 1.1em; }
.history li { font-size: .85rem; margin: 4px 0; }
.notice { padding: 9px 12px; background: var(--light); color: var(--dark); border-radius: 7px; margin-bottom: 13px; }
.error { background: #fbeaf0; color: #80213f; }
dialog { padding: 21px; max-width: min(560px, calc(100vw - 30px)); width: 100%; max-height: calc(100dvh - 30px); color: var(--ink); border: 1px solid var(--line); border-radius: 11px; }
dialog::backdrop { background: rgb(16 46 37 / 63%); }
dialog form { display: grid; gap: 13px; }
dialog form p { margin: 0; }
dialog label { display: grid; gap: 5px; font-weight: 650; font-size: .88rem; }
input, select, textarea { color: var(--ink); border: 1px solid #819589; background: white; border-radius: 7px; }
input, textarea { padding: 9px 11px; width: 100%; }
textarea { resize: vertical; }
dialog .primary { justify-self: start; }
@media (max-width: 680px) {
  .masthead { padding-inline: 14px; }
  .desk { padding-inline: 14px; }
  .overview { align-items: start; flex-direction: column; gap: 14px; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .queue { border-right: 0; border-bottom: 1px solid var(--line); }
  .reader-empty { min-height: 160px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.account { display: flex; align-items: end; gap: 14px; flex-wrap: wrap; }
.newsroom-field { display: grid; gap: 4px; color: #c8ded0; font-size: .77rem; }
.newsroom-field select { padding: 7px 9px; min-height: 37px; max-width: min(240px, 60vw); }
.account-details { display: grid; gap: 3px; color: #c8ded0; font-size: .77rem; max-width: 230px; overflow-wrap: anywhere; }
.account-role { color: white; font-weight: 700; }
.sign-out { color: white; min-height: 37px; border-color: #7da291; }
.sign-out:hover { background: #295641; }
.auth-shell { min-height: min(75vh, 700px); display: grid; grid-template-columns: 1fr 1fr; align-content: center; margin: auto; max-width: 1090px; padding: clamp(20px, 6vw, 62px); }
.auth-art { position: relative; overflow: hidden; min-height: 340px; border-radius: 20px 0 0 20px; background: radial-gradient(circle at 42% 35%, #2c624b, var(--dark) 70%); }
.auth-art i { position: absolute; width: 52%; height: 56%; inset: 20% auto auto 23%; border: 1px solid #8fbf9d; border-radius: 4px; transform: rotate(-22deg) translate(-16%, 8%); }
.auth-art i:nth-child(2) { transform: rotate(16deg) translate(19%, 4%); }
.auth-art i:nth-child(3) { transform: rotate(-5deg); background: linear-gradient(var(--dark), var(--dark)) 20% 17% / 63% 10% no-repeat, repeating-linear-gradient(to bottom, var(--dark) 0 1px, transparent 1px 9px) 20% 71% / 65% 43% no-repeat, var(--lime); box-shadow: 0 20px 48px #071e1680; }
.auth-panel { background: var(--paper); border: 1px solid var(--line); border-left: 0; border-radius: 0 20px 20px 0; padding: clamp(22px, 5vw, 48px); }
.auth-panel h1 { font-size: clamp(2.25rem, 4vw, 2.8125rem); }
.auth-panel p { color: var(--muted); }
.auth-panel form { display: grid; gap: 14px; margin-top: 20px; }
.auth-panel label { display: grid; gap: 6px; font-size: .88rem; font-weight: 650; }
.auth-panel form .primary { justify-self: start; }
.auth-panel .error { color: #80213f; margin: 0; }
.passkey-actions { display: grid; justify-items: start; gap: 14px; margin-top: 20px; }
.passkey-actions details { width: 100%; }
.passkey-actions summary { cursor: pointer; color: var(--accent); font-size: var(--label); font-weight: 650; min-height: 36px; padding-block: 8px; }
.passkey-actions .secondary { justify-self: start; }
.tip-source { margin: 16px 0 0; padding: 11px 14px; border-left: 3px solid var(--accent); background: #eff6ef; }
.tip-source strong { display: block; margin-bottom: 5px; }
.tip-source p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .masthead { align-items: start; flex-direction: column; }
  .account { width: 100%; gap: 10px; }
  .account-details { max-width: 38vw; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); align-content: start; max-width: 520px; }
  .auth-art { min-height: 125px; border-radius: 16px 16px 0 0; }
  .auth-art i { width: 26%; inset: 10% auto auto 37%; }
  .auth-panel { border-left: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; }
}

.intake-health { margin: 0 0 14px; padding: 9px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.intake-health summary { cursor: pointer; font-size: .88rem; font-weight: 650; padding: 4px 0; }
.intake-health ul { margin: 6px 0 1px; padding: 0; list-style: none; }
.intake-health li { display: flex; justify-content: space-between; align-items: center; gap: 11px; padding: 8px 0; border-top: 1px solid var(--line); }
.intake-health li p { margin: 0; overflow-wrap: anywhere; }
.intake-health li button { flex: none; }
.intake-health #intake-failures > p { margin: 8px 0 0; }
