:root {
  color-scheme: light;
  --paper: #fbfbf8;
  --ink: #25312c;
  --muted: #68726c;
  --line: #dce1d9;
  --accent: #32604b;
  --soft: #e9efe7;
  --red: #954c40;
  --red-soft: #f6ece8;
  --page-width: 1040px;
  --page-gutter: 40px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary, select { touch-action: manipulation; }
button, summary { cursor: pointer; }
button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 16px; background: transparent; font-weight: 550; transition: background-color 150ms ease, border-color 150ms ease; }
button:hover { background: var(--soft); border-color: #bac6bb; }
button:active { background: #dbe4d8; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #68937c; outline-offset: 3px; }
input, textarea, select { background: var(--paper); border: 1px solid #c5cec3; border-radius: 6px; padding: 8px 12px; }
select { appearance: none; min-height: 44px; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2368726c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea { width: 100%; resize: vertical; display: block; margin-bottom: 12px; }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #203f31; }
a:active { color: var(--ink); }
[hidden] { display: none !important; }
p { margin: 0 0 16px; }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; top: -80px; left: 16px; background: var(--paper); padding: 12px; z-index: 3; }
.skip:focus { top: 12px; }
.topbar, .overview, .layout, .workflow-navigation { width: calc(100% - var(--page-gutter) * 2); max-width: var(--page-width); margin-left: auto; margin-right: auto; }
.topbar { height: 72px; display: flex; gap: 24px; align-items: center; }
.brand { display: block; width: 50px; height: auto; flex-shrink: 0; }
.product { font-size: 13px; color: var(--muted); }
.account { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 13px; }
.text-button { padding: 8px; border-color: transparent; background: transparent; font-size: 13px; color: var(--muted); }
.overview { padding: 24px 0 32px; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.eyebrow { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: 24px; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.progress { flex-shrink: 0; font-size: 13px; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.progress strong { color: var(--ink); font-weight: 500; }
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 64px; margin-bottom: 48px; align-items: start; isolation: isolate; }
.sidebar { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-bottom: 8px; }
.sidebar select { width: 100%; margin-bottom: 16px; font-size: 13px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-picker { display: none; }
.idea-link { display: flex; align-items: start; gap: 12px; text-align: left; width: 100%; border: 0; padding: 12px; line-height: 1.5; font-size: 14px; font-weight: 400; }
.idea-link[aria-current=true] { background: var(--soft); font-weight: 550; }
.idea-link .number { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.idea-link .nav-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nav-mark { font-size: 16px; font-weight: 600; color: var(--accent); }
.nav-mark.rejected { color: var(--red); }
.layout main { min-width: 0; }
.idea-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.idea-top .eyebrow { margin: 0; font-variant-numeric: tabular-nums; }
.badge { font-size: 12px; line-height: 1.5; color: var(--muted); white-space: nowrap; }
.badge.approved, .badge.viable { color: var(--accent); }
.badge.rejected, .badge.not-viable { color: var(--red); }
h2 { font-size: 28px; line-height: 1.25; letter-spacing: -.025em; margin: 0 0 16px; font-weight: 600; overflow-wrap: anywhere; }
.angle { font-size: 16px; line-height: 1.65; max-width: 68ch; margin-bottom: 24px; overflow-wrap: anywhere; }
.context { margin: 0 0 32px; font-size: 14px; }
.context > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.context dt { color: var(--muted); }
.context dd { margin: 0; overflow-wrap: anywhere; }
h3 { font-size: 14px; font-weight: 600; margin: 0; }
.email-section { margin-bottom: 24px; }
.stage-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stage-tabs { display: flex; gap: 4px; }
.stage-tabs button { font-size: 13px; border-color: transparent; padding: 8px 12px; }
.stage-tabs button[aria-selected=true] { background: var(--soft); color: var(--accent); }
#version-picker { font-size: 12px; max-width: 100%; }
#stage-status { margin-bottom: 24px; font-size: 14px; color: var(--muted); }
#stage-result h3 { margin-bottom: 8px; }
.stage-check { margin: 0 0 24px; }
.stage-check p { margin: 0 0 8px; }
.stage-check blockquote { margin: 8px 0; padding-left: 16px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13px; }
.stage-check a { font-size: 12px; }
.stage-check summary { font-size: 12px; padding: 4px 0; }
.stage-check ul { padding-left: 20px; }
#stage-result .email { margin-bottom: 24px; }
#stage-result .caption { margin-bottom: 24px; }
.section-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; }
.tabs button { font-size: 12px; border-color: transparent; padding: 4px 8px; font-weight: 400; color: var(--muted); }
.tabs button[aria-pressed=true] { background: var(--soft); color: var(--accent); }
.email { background: #f1f3ed; border-radius: 8px; padding: 24px 28px; overflow-wrap: anywhere; }
.subject { font-weight: 600; margin-bottom: 20px; }
.email p { white-space: pre-wrap; }
.email p:last-child { margin-bottom: 0; }
.variable { background: #e6e1f3; color: #514074; border-radius: 3px; padding: 1px 3px; font-size: .93em; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.caption { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 12px 0; overflow-wrap: anywhere; }
.caption:empty { display: none; }
summary { padding: 12px 0; font-size: 13px; color: var(--muted); border-radius: 4px; display: flex; align-items: center; gap: 8px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+'; font-size: 16px; line-height: 1; width: 12px; flex-shrink: 0; text-align: center; }
details[open] > summary::before { content: '−'; }
summary:hover { color: var(--accent); }
summary:active { background: var(--soft); }
.example-context summary { font-size: 12px; padding: 8px 0 0; }
.example-context p { font-size: 13px; color: var(--muted); margin: 8px 0 0 20px; overflow-wrap: anywhere; }
.decision { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: start; margin-bottom: 24px; }
.decision details[open] { flex-basis: 100%; }
.decision #saved-by { flex-basis: 100%; order: 3; margin: 8px 0 0; }
.decision-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.decision-buttons button { min-height: 44px; }
.approve { background: var(--soft); border-color: transparent; color: var(--accent); }
.approve:hover { background: #dce8d7; }
.approve[aria-pressed=true] { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.reject { color: var(--red); }
.reject:hover, .reject[aria-pressed=true] { background: var(--red-soft); border-color: #d9bfb4; }
.secondary { font-size: 13px; padding: 8px 12px; }
.supporting { margin-top: 0; }
.supporting > details { margin: 0; }
.detail-content, #evidence-body { padding: 8px 0 16px 20px; }
.evidence h4 { font-size: 13px; margin: 0 0 8px; font-weight: 600; }
.evidence p, .evidence li { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.evidence-section, .source { margin-bottom: 24px; }
.evidence-section:last-child, .source:last-child { margin-bottom: 0; }
.evidence p:last-child { margin-bottom: 0; }
.evidence ul { padding-left: 20px; margin: 0; }
.evidence li + li { margin-top: 8px; }
.evidence-facts { display: grid; gap: 12px; margin: 0 0 24px; font-size: 14px; }
.evidence-facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
.evidence-facts dt { color: var(--muted); }
.evidence-facts dd { margin: 0; overflow-wrap: anywhere; }
.source > p { margin-bottom: 8px; }
.source-link { display: inline-block; font-size: 13px; margin-bottom: 8px; }
.source-limits { display: grid; gap: 8px; margin: 12px 0 0; }
.source-limits > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; font-size: 13px; }
.source-limits dt { color: var(--muted); }
.source-limits dd { margin: 0; overflow-wrap: anywhere; }
.viability summary .badge { margin-left: auto; }
.viability label { margin-top: 16px; }
.viability label:first-child { margin-top: 0; }
.viability select { width: 100%; }
.history { overflow-wrap: anywhere; }
.history p { font-size: 13px; margin-bottom: 8px; }
.history-entry { margin-bottom: 24px; }
.history-entry p:first-child { font-size: 12px; color: var(--muted); }
.idea-footer { display: flex; justify-content: space-between; margin-top: 24px; }
.review-footer { margin-top: 32px; }
.export, .sync { font-size: 12px; }
.sync { line-height: 1.5; color: var(--muted); margin: 12px 0 0; }
.login { max-width: 424px; padding: 0 24px; margin: 80px auto; }
.login h1 { font-size: 28px; }
.login form { margin-top: 32px; }
.login input { width: 100%; margin-bottom: 20px; }
.primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.primary:hover { background: #254d3a; }
.login .primary { width: 100%; margin-top: 8px; display: flex; justify-content: space-between; }
.error { color: var(--red); font-size: 13px; margin-top: 16px; }
.loading { padding: 80px; text-align: center; color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; display: flex; align-items: center; gap: 16px; background: #263c31; color: #f3f5ef; border-radius: 8px; padding: 12px 16px; z-index: 2; box-shadow: 0 4px 20px #263c311f; font-size: 13px; }
.toast button { font-size: 12px; padding: 4px 8px; border-color: #749080; background: transparent; color: #f3f5ef; }
.toast button:hover { background: #405a4b; }
#dismiss { border: 0; font-size: 20px; padding: 0 4px; }
.toast.error-toast { background: #713c32; }
@media (max-width: 1240px) {
  .layout { margin-bottom: 40px; gap: 40px; grid-template-columns: 224px minmax(0, 1fr); }
}
@media (max-width: 800px) {
  :root { --page-gutter: 24px; }
  .topbar { height: 64px; gap: 16px; }
  .brand { width: 42px; }
  .account { gap: 4px; }
  .account > span { display: none; }
  .account .text-button { padding: 8px 0 8px 4px; }
  .overview { padding: 20px 0 24px; gap: 16px; }
  .overview > div { min-width: 0; }
  h1 { font-size: 22px; }
  .progress { font-size: 12px; }
  .layout { display: block; margin-bottom: 32px; }
  .sidebar { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 28px; }
  .sidebar nav { display: none; }
  .sidebar select { font-size: 16px; min-height: 44px; margin-bottom: 8px; }
  .sidebar #filter { width: auto; max-width: 100%; font-size: 13px; }
  .mobile-picker { display: block; }
  .mobile-picker select { text-overflow: ellipsis; }
  h2 { font-size: 25px; }
  .context > div { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .email { padding: 20px; }
  .tabs button { min-height: 44px; }
  .source-limits > div { grid-template-columns: 1fr; gap: 4px; }
  .evidence-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .toast { bottom: 16px; }
  .login { margin-top: 48px; }
  .login input, textarea, .viability select { font-size: 16px; }
}
@media (max-width: 360px) {
  :root { --page-gutter: 20px; }
  .topbar { gap: 12px; }
  .product, .account .text-button { font-size: 12px; }
  .progress { max-width: 64px; }
  .context > div { grid-template-columns: 1fr; gap: 4px; margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.workflow-navigation { max-width: var(--page-width); margin: 0 auto 36px; }
.stepper { display: flex; padding: 0; margin: 0 0 28px; list-style: none; }
.stepper li { display: flex; flex: 1; align-items: center; min-width: 0; }
.stepper li:not(:last-child)::after { content: ''; height: 1px; background: var(--line); flex: 1; margin: 0 20px; }
.stepper button { border: 0; background: transparent; padding: 4px 0; display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--muted); }
.stepper button[aria-current=step] { color: var(--ink); }
.step-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; flex-shrink: 0; }
[aria-current=step] .step-number { background: var(--ink); border-color: var(--ink); color: white; }
.step-done .step-number { background: var(--soft); color: var(--accent); border-color: transparent; }
.step-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.step-summary p { margin: 0; font-size: 13px; color: var(--muted); }
.step-actions { display: flex; align-items: center; gap: 12px; }
.copy-editor { display: grid; gap: 10px; margin: 0 0 28px; }
.copy-editor input, .copy-editor textarea { width: 100%; font: inherit; }
.copy-editor label { font-size: 13px; color: var(--muted); }
.copy-controls { display: flex; align-items: center; gap: 12px; }
.copy-toolbar select { margin-bottom: 20px; font-size: 13px; }
.copy-toolbar label { font-size: 12px; color: var(--muted); }
.copy-preview-tabs { margin-bottom: 12px; }
#version-picker { margin-bottom: 16px; }
@media (max-width: 800px) {
  .workflow-navigation { margin-bottom: 28px; }
  .stepper { margin-bottom: 20px; gap: 12px; }
  .stepper li:not(:last-child)::after { display: none; }
  .stepper button { flex-direction: column; align-items: flex-start; text-align: left; font-size: 12px; gap: 8px; }
  .step-summary { flex-direction: column; align-items: flex-start; gap: 12px; }
  .step-actions { flex-wrap: wrap; }
  .copy-editor input,.copy-editor textarea { font-size: 16px; }
}
