@font-face {
  font-family: Fraunces;
  src: url("/assets/fraunces.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Grotesk;
  src: url("/assets/grotesk.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #efe8d2;
  --surface: #f7f2e3;
  --inset: #e5dcbe;
  --ink: #21231a;
  --muted: #6e6849;
  --line: #d3c79e;
  --olive: #374525;
  --gold: #a57e14;
  --bright: #d4a72c;
  --error: #923b2c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.55 Grotesk,
    system-ui,
    sans-serif;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.serif {
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--olive);
  color: #efe8d2;
  padding: 32px 23px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Fraunces, Georgia, serif;
  font-size: 19px;
}
.brand small {
  font:
    9px Grotesk,
    sans-serif;
  display: block;
  letter-spacing: 0.16em;
  margin-top: 4px;
  color: #c9c8a9;
}
.monogram {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-size: 40px;
  color: #e4c773;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #bec4aa;
  margin: 45px 12px 12px;
}
#nav {
  display: grid;
  gap: 4px;
}
#nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #d5d6c0;
  font-size: 13px;
}
#nav a:hover {
  background: #ffffff0a;
}
#nav a.active {
  background: #efe8d2;
  color: var(--olive);
}
.nav-icon {
  width: 18px;
  font-size: 17px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 30px 10px 0;
  font-size: 10px;
  color: #cad0b5;
}
.sidebar-foot p {
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
  line-height: 1.35;
  margin: 20px 0;
  color: var(--paper);
}
.sidebar-foot a {
  font-size: 11px;
  color: #e7cd87;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #afc575;
  margin-right: 5px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 78px;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.topbar > span {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.top-separator {
  margin: 0 10px;
  color: var(--gold);
}
#main {
  max-width: 1440px;
  margin: auto;
  padding: 46px 42px 70px;
  min-height: calc(100vh - 150px);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 12px 0 14px;
}
h1 em {
  color: var(--olive);
  font-weight: 400;
}
h2 {
  font-size: 27px;
  line-height: 1.2;
}
h3 {
  font-size: 21px;
  line-height: 1.3;
}
.lede {
  max-width: 650px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 25px;
  margin-bottom: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.button:hover {
  background: var(--inset);
}
.button.primary {
  background: var(--olive);
  color: var(--surface);
  border-color: var(--olive);
}
.button.primary:hover {
  background: #4f6128;
}
.button.small {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 11px;
}
.button.danger {
  color: var(--error);
  border-color: #b59375;
}
.quiet-link {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--olive);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 32px 0;
}
.stat {
  padding: 23px 20px;
  border-right: 1px solid var(--line);
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border: 0;
}
.stat strong {
  display: block;
  font:
    38px Fraunces,
    Georgia,
    serif;
  font-weight: 400;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  gap: 30px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  gap: 15px;
}
.section-head h2 {
  font-size: 25px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 25px;
}
.panel + .panel {
  margin-top: 20px;
}
.panel.dark {
  background: var(--olive);
  color: var(--paper);
  border: 0;
}
.panel.dark .eyebrow,
.panel.dark .muted {
  color: #d2d6bd;
}
.panel.dark h2 {
  font-size: 30px;
  margin: 16px 0;
}
.panel.dark .button {
  color: var(--paper);
  border-color: #849167;
  margin-top: 22px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.row-main {
  min-width: 0;
}
.row h3 {
  font-size: 21px;
  margin: 5px 0;
}
.row .meta {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.row .summary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-action {
  flex-shrink: 0;
}
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--muted);
}
.badge.approved,
.badge.ready {
  color: #3e571f;
  background: #dce3ca;
  border-color: #c2d0a7;
}
.badge.pending,
.badge.in_review {
  background: #efe0b2;
  border-color: #d1bc7d;
  color: #765610;
}
.badge.rejected,
.badge.failed {
  background: #f0d7ca;
  color: var(--error);
}
.toolbar {
  display: flex;
  gap: 12px;
  margin: 25px 0;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar input,
.toolbar select {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink);
}
.empty {
  padding: 38px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty h3 {
  margin-bottom: 10px;
}
.empty p {
  max-width: 450px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
}
.strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0;
  padding: 15px 20px;
  border-left: 2px solid var(--gold);
  background: var(--surface);
  font-size: 12px;
  color: var(--muted);
}
.activity {
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.activity small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 42px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
dialog {
  position: fixed;
  margin: 0 0 0 auto;
  max-height: 100vh;
  height: 100vh;
  width: min(760px, 100%);
  max-width: 100%;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: #18200ea6;
  backdrop-filter: blur(3px);
}
.drawer-head {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 23px 30px;
}
.drawer-head h2 {
  font-size: 25px;
}
.drawer-body {
  padding: 28px 30px 55px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
label.full {
  grid-column: 1/-1;
}
label input,
label textarea,
label select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
label textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 90px;
}
label textarea.manuscript {
  min-height: 270px;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.form-note {
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0 22px;
}
.error {
  color: var(--error);
  font-size: 13px;
  margin-top: 15px;
}
.subsection {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 25px;
}
.subsection h3 {
  margin-bottom: 15px;
}
.field-value {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.7;
}
.review-copy {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.record-title {
  font-size: 28px;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.history-item {
  border-left: 2px solid var(--line);
  padding: 0 0 20px 16px;
}
.history-item summary {
  cursor: pointer;
  font-size: 13px;
}
.history-item pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  max-height: 350px;
  overflow: auto;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(600px, 90vw);
  background: var(--olive);
  color: var(--paper);
  padding: 14px 22px;
  border-radius: 9px;
  font-size: 13px;
  z-index: 20;
  box-shadow: 0 8px 30px #0002;
  display: none;
}
#toast.visible {
  display: block;
}
.skip {
  position: fixed;
  left: 10px;
  top: -80px;
  z-index: 100;
  padding: 12px;
  background: var(--surface);
}
.skip:focus {
  top: 10px;
}
.loading {
  font-family: Fraunces, serif;
  font-size: 25px;
  padding: 70px 0;
}
.pill-tabs {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pill-tabs a {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  margin-right: 12px;
  font-size: 12px;
}
.integration {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 25px;
}
.integration h3 {
  margin-bottom: 8px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
@media (min-width: 1500px) {
  #main {
    padding-top: 65px;
  }
  .columns {
    gap: 45px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 15px;
  }
  .brand {
    font-size: 16px;
  }
  #main {
    padding: 35px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .stats .stat {
    padding: 18px 12px;
  }
  h1 {
    font-size: 40px;
  }
  .workspace-footer {
    padding: 20px 25px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 18px;
  }
  .brand {
    font-size: 17px;
  }
  .monogram {
    font-size: 30px;
  }
  .nav-label,
  .sidebar-foot {
    display: none;
  }
  #nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    padding-top: 15px;
  }
  #nav a {
    flex-shrink: 0;
    font-size: 11px;
    padding: 8px 10px;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    height: 62px;
    padding: 0 20px;
  }
  .topbar > span {
    font-size: 8px;
  }
  .topbar > span .top-separator {
    margin: 0 5px;
  }
  #main {
    padding: 28px 20px 45px;
  }
  h1 {
    font-size: 38px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat,
  .stat:first-child {
    padding: 18px 10px;
  }
  .stat:nth-child(2) {
    border: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stat strong {
    font-size: 32px;
  }
  .row {
    align-items: flex-start;
  }
  .row h3 {
    font-size: 19px;
  }
  .row-action {
    max-width: 90px;
  }
  .button {
    white-space: normal;
  }
  .row-action .button {
    padding: 6px 10px;
  }
  .workspace-footer {
    padding: 18px 20px;
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  label.full {
    grid-column: auto;
  }
  .drawer-body,
  .drawer-head {
    padding: 22px 20px;
  }
  .integration {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .panel {
    padding: 22px;
  }
  .toolbar input {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.title-button {
  all: unset;
  cursor: pointer;
  color: inherit;
}
.title-button:hover {
  color: var(--gold);
}
.title-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.revision {
  font-size: 10px;
  margin-top: 7px;
  text-align: right;
}
.spaced {
  margin-top: 40px;
}
.block-link {
  display: block;
  margin-top: 18px;
}
.principle {
  margin: 15px 0;
}
.review-title {
  margin: 9px 0;
}
.release-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.form-grid label input:invalid {
  border-color: var(--error);
}
.sidebar {
  overflow-y: auto;
}
.login-panel {
  max-width: 520px;
}
@media(max-width:650px){#nav{scrollbar-width:thin;scrollbar-color:#a5b08d #374525}#nav::-webkit-scrollbar{height:4px}#nav::-webkit-scrollbar-thumb{background:#a5b08d;border-radius:4px}}
