:root {
  --paper: #f5f3ed;
  --white: #fffefa;
  --ink: #173e35;
  --muted: #65746b;
  --line: #dedfd4;
  --accent: #d9e7bc;
  --warn: #8f5b18;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.6 system-ui,
    -apple-system,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 7px;
  padding: 9px 13px;
  font-weight: 600;
}
button:hover {
  border-color: #718b69;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--ink) !important;
  color: #fff !important;
  border: 1px solid var(--ink) !important;
  text-decoration: none;
  border-radius: 7px;
  padding: 10px 15px;
}
.wide {
  width: 100%;
}
.top {
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
}
.mark {
  font:
    32px Georgia,
    serif;
  color: var(--ink);
  text-decoration: none;
}
.mark span {
  display: inline-block;
  margin-left: 24px;
  font: 10px system-ui;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.project-tools {
  display: flex;
  gap: 10px;
}
.project-tools select {
  max-width: 310px;
}
.desk {
  display: grid;
  grid-template-columns: 335px minmax(0, 1fr);
  max-width: 1680px;
  margin: auto;
}
.clip {
  border-right: 1px solid var(--line);
  padding: 25px 22px;
}
.intro h1 {
  font:
    33px/1.15 Georgia,
    serif;
  margin: 10px 0 16px;
}
.intro p:not(.eyebrow) {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.clip details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.clip summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 15px;
}
.clip summary small {
  font-weight: 400;
  color: var(--muted);
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 550;
  margin: 12px 0;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #ccd2c6;
  background: var(--white);
  border-radius: 5px;
  padding: 9px 10px;
  color: var(--ink);
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
}
.brief-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.galley {
  min-width: 0;
  padding: 28px 32px;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.workspace-header h2 {
  font:
    29px/1.2 Georgia,
    serif;
  margin: 8px 0;
}
.badge {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  white-space: nowrap;
}
.badge.good {
  background: var(--accent);
}
#status {
  padding: 11px 15px;
  background: #e8eddf;
  border-radius: 6px;
  min-height: 44px;
  margin: 20px 0;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.tabs button {
  border: 0;
  background: transparent;
  white-space: nowrap;
}
.tabs button.on {
  background: var(--ink);
  color: #fff;
}
.pipeline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.pipeline span {
  font-size: 10px;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  padding-bottom: 4px;
}
.pipeline .ok {
  color: var(--ink);
  border-color: #789644;
}
.pipeline .stale {
  color: var(--warn);
  border-color: #c78d41;
}
.step-info {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 12px;
}
.sheet {
  background: var(--white);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 350px;
  overflow-wrap: anywhere;
}
.sheet h2 {
  font:
    28px/1.25 Georgia,
    serif;
}
.sheet h3 {
  font-size: 18px;
}
.sheet a,
.sources a {
  color: #356843;
  text-underline-offset: 3px;
}
.sheet pre {
  white-space: pre-wrap;
}
.sheet table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.sheet td,
.sheet th {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.table-scroll {
  overflow-x: auto;
}
.niche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.niche {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.niche h3 {
  font:
    23px/1.2 Georgia,
    serif;
  margin: 10px 0;
}
.niche .score {
  font-weight: 750;
  font-size: 23px;
}
.niche p {
  font-size: 13px;
}
.niche .compare {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.niche input[type="checkbox"] {
  width: 17px;
  height: 17px;
}
.niche summary {
  cursor: pointer;
  font-size: 12px;
}
.niche ul {
  padding-left: 18px;
  font-size: 12px;
}
.niche .use {
  width: 100%;
  margin-top: 14px;
}
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
}
.bar a {
  font-size: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  max-width: 720px;
}
.sources {
  padding: 18px 0;
}
.sources details {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sources p {
  font-size: 12px;
}
.sources summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}
.sources small {
  display: block;
  color: var(--muted);
}
#editor {
  min-height: 480px;
  font:
    13px/1.6 ui-monospace,
    monospace;
  padding: 20px;
}
.empty {
  max-width: 650px;
  margin: 30px auto;
}
.empty h2 {
  font:
    36px/1.2 Georgia,
    serif;
}
.empty p {
  color: var(--muted);
}
.steps-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}
.steps-overview div {
  padding: 16px;
  background: #f2f4e9;
  border-radius: 7px;
}
.steps-overview strong {
  display: block;
}
.export-hero {
  padding: 30px;
  background: #e9efdc;
  border-radius: 10px;
}
.export-hero h2 {
  font:
    36px/1.2 Georgia,
    serif;
}
.export-check {
  padding: 8px 0;
}
.economics {
  padding: 24px;
  background: #e9efdc;
  margin-top: 18px;
  border-radius: 8px;
}
.economics .row {
  grid-template-columns: repeat(3, 1fr);
}
.economics output {
  display: block;
  font-size: 22px;
  font-weight: 700;
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
:focus-visible {
  outline: 3px solid #b77538;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .desk {
    grid-template-columns: 295px minmax(0, 1fr);
  }
  .galley {
    padding: 22px;
  }
  .niche-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 750px) {
  .top {
    padding: 16px;
    align-items: flex-start;
  }
  .mark span {
    display: block;
    margin: 6px 0 0;
  }
  .project-tools {
    flex-direction: column;
    max-width: 180px;
  }
  .desk {
    grid-template-columns: 1fr;
  }
  .clip {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .galley {
    padding: 20px 14px;
  }
  .sheet {
    padding: 20px 16px;
  }
  .workspace-header {
    align-items: flex-start;
  }
  .workspace-header h2 {
    font-size: 25px;
  }
  .badge {
    white-space: normal;
  }
  .steps-overview {
    grid-template-columns: 1fr;
  }
  .economics .row {
    grid-template-columns: 1fr 1fr;
  }
  .bar > * {
    flex-grow: 1;
    text-align: center;
  }
}
#page-editor {
  background: var(--white);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
#page-editor fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 18px 0;
  padding: 12px 20px;
}
#page-editor legend {
  font-weight: 650;
}
