:root {
  color-scheme: light;
  --ink: #18221b;
  --muted: #68736b;
  --canvas: #f5f7f4;
  --surface: #ffffff;
  --line: #dce2dc;
  --line-strong: #c8d1ca;
  --green: #1f6a43;
  --green-dark: #175334;
  --green-soft: #e3f3e9;
  --amber: #8a6417;
  --amber-soft: #fff3ce;
  --red: #9a3737;
  --red-soft: #fae8e8;
  --shadow: 0 18px 50px rgba(20, 44, 29, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
button, input { font: inherit; }
select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }

.app-header {
  height: 64px;
  padding: 0 clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 4;
}
.brand-group, .header-actions { display: flex; align-items: center; gap: 14px; }
.wordmark { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 780; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--green); color: white; font: 700 17px Georgia, serif; }
.file-name { color: var(--muted); font-size: 14px; border-left: 1px solid var(--line); padding-left: 14px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #98a19a; box-shadow: 0 0 0 3px #eef1ef; }
.connection.live i { background: #60a774; box-shadow: 0 0 0 3px #e8f4eb; }
.connection.mock i { background: #d09b2e; box-shadow: 0 0 0 3px #fff3d5; }
.connection.error i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.token-menu { position: relative; }
.token-menu summary { cursor: pointer; list-style: none; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: #425046; font-size: 13px; font-weight: 700; }
.token-menu summary::-webkit-details-marker { display: none; }
.token-popover { position: absolute; right: 0; top: 44px; width: 280px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.token-popover label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 750; }
.token-popover input { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 10px; outline: none; }
.token-popover p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

main { width: min(1280px, calc(100% - clamp(24px, 6vw, 80px))); margin: 0 auto; padding: 44px 0 28px; }
.control-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; margin-bottom: 16px; }
.question-control label { display: block; margin-bottom: 8px; color: #465149; font-size: 14px; font-weight: 760; }
.question-control input { width: 100%; height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 15px; background: var(--surface); color: var(--ink); font-size: 16px; outline: none; box-shadow: 0 1px 2px rgba(20, 44, 29, .03); }
.question-control input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 106, 67, .11); }
.run-button { height: 48px; border: 0; border-radius: 10px; padding: 0 19px; background: var(--green); color: white; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 780; cursor: pointer; box-shadow: 0 7px 18px rgba(31, 106, 67, .18); transition: background .15s, transform .15s; }
.run-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.run-button:disabled { opacity: .65; cursor: wait; transform: none; }
.run-icon { font-size: 10px; }

.run-progress { margin: 0 0 16px; padding: 15px 17px; border: 1px solid #c7d9cb; border-radius: 11px; background: #f4faf5; }
.run-progress[hidden], .sheet-loading[hidden] { display: none; }
.progress-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #254b32; font-size: 13px; }
.progress-top span { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.progress-track { height: 9px; margin: 12px 0; overflow: hidden; border-radius: 999px; background: #dce9df; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #3d9a60; transition: width .25s ease; }
.progress-log { display: grid; gap: 3px; min-height: 21px; margin: 0; padding-left: 20px; color: #41634c; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.run-progress p { margin: 9px 0 0; color: #6e8272; font-size: 11px; }
.run-progress.has-failures { border-color: #e7c7aa; background: #fffaf4; }
.run-progress.has-failures .progress-track span { background: #b87827; }

.bench-controls { min-height: 52px; margin-bottom: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: 10px; }
.bench-control { display: flex; align-items: center; gap: 7px; }
.bench-control label { color: var(--muted); font-size: 12px; font-weight: 700; }
.bench-control select { height: 32px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 28px 0 9px; background: white; color: var(--ink); font-size: 12px; font-weight: 700; }
.benchmark-button { height: 32px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 10px; background: white; color: #3e4c42; font-size: 12px; font-weight: 750; cursor: pointer; }
.benchmark-button:hover { border-color: var(--green); color: var(--green); }
.bench-controls p { margin: 0 0 0 auto; color: var(--muted); font-size: 11px; }

.telemetry { margin: 0 0 18px; border: 1px solid #ccd6ce; border-radius: 12px; background: #17231b; color: #ecf5ef; overflow: hidden; box-shadow: 0 12px 30px rgba(20, 44, 29, .09); }
.telemetry-heading { min-height: 62px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.eyebrow { display: block; margin-bottom: 2px; color: #8eb49a; font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.telemetry h2 { margin: 0; color: white; font-size: 15px; letter-spacing: -.01em; }
.telemetry-state { color: #91a398; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.telemetry-state.complete { color: #91d4a8; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid rgba(255,255,255,.1); }
.metric { min-width: 0; padding: 13px 14px 15px; border-right: 1px solid rgba(255,255,255,.1); }
.metric:last-child { border-right: 0; }
.metric span { display: block; margin-bottom: 6px; color: #8fa096; font-size: 10px; line-height: 1.25; }
.metric strong { display: block; overflow: hidden; color: white; font: 700 17px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.telemetry-details { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(480px, 1.6fr); }
.telemetry-details dl { margin: 0; padding: 10px 16px; border-right: 1px solid rgba(255,255,255,.1); }
.telemetry-details dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 5px 0; }
.telemetry-details dt { color: #879a8e; font-size: 10px; }
.telemetry-details dd { margin: 0; overflow: hidden; color: #d9e6dd; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.batch-table-wrap { max-height: 154px; overflow: auto; }
.batch-table { width: 100%; border-collapse: collapse; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.batch-table th, .batch-table td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: right; }
.batch-table th { position: sticky; top: 0; background: #1d2b21; color: #88a090; font-weight: 700; }
.batch-table td { color: #d6e3d9; }
.batch-table th:first-child, .batch-table td:first-child, .batch-table th:last-child, .batch-table td:last-child { text-align: left; }
.batch-table td[colspan] { padding: 22px; color: #819187; text-align: center; }

.formula-bar { min-height: 43px; display: grid; grid-template-columns: 92px 48px minmax(0, 1fr); align-items: center; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; color: #445047; }
.name-box, .fx { height: 100%; display: flex; align-items: center; border-right: 1px solid var(--line); }
.name-box { padding-left: 14px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.fx { justify-content: center; color: var(--green); font: italic 700 17px Georgia, serif; }
.formula-bar code { padding: 0 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3f4d43; font-size: 13px; }

.sheet-frame { position: relative; min-height: 468px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sheet-scroll { overflow: auto; }
.sheet { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.row-number-col { width: 48px; }
.source-col { width: auto; }
.decision-col { width: 170px; }
.probability-col { width: 180px; }
.sheet th, .sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet tr > :last-child { border-right: 0; }
.letters-row th { height: 29px; background: #f2f5f2; color: #78827a; font-size: 12px; font-weight: 700; text-align: center; }
.letters-row .active-column { background: #e6f1e9; color: var(--green); border-top: 2px solid var(--green); }
.field-row th { height: 48px; padding: 0 14px; background: #fbfcfb; color: #445047; text-align: left; font-size: 13px; font-weight: 750; }
.field-row th:first-child { padding: 0; text-align: center; color: #8a938c; font-weight: 500; }
.field-row .result-heading { background: #f2f8f4; }
.field-type { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 8px; border-radius: 5px; background: #edf1ed; color: #59655c; font-size: 10px; font-weight: 800; }
.formula-type { background: var(--green-soft); color: var(--green); font: italic 700 13px Georgia, serif; }
.number-type { background: #eef1f6; color: #536075; }

.sheet tbody th { height: 42px; background: #f7f9f7; color: #89928b; text-align: center; font-size: 12px; font-weight: 500; }
.sheet tbody td { height: 42px; padding: 0; background: white; }
.cell-input { width: 100%; height: 41px; border: 2px solid transparent; padding: 0 13px; background: transparent; color: #273129; outline: none; font-size: 14px; }
.cell-input:hover { background: #fbfcfb; }
.cell-input:focus { position: relative; z-index: 1; border-color: var(--green); background: white; box-shadow: inset 0 0 0 1px white; }
.result-cell { padding: 0 13px !important; background: #fcfdfc !important; }
.pending { color: #a0a8a2; font-size: 13px; }
.decision-pill { display: inline-flex; align-items: center; gap: 7px; min-width: 79px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 780; }
.decision-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.decision-pill.yes { color: var(--green); background: var(--green-soft); }
.decision-pill.no { color: #5d675f; background: #edf0ed; }
.decision-pill.review { color: var(--amber); background: var(--amber-soft); }
.probability-value { display: flex; align-items: center; gap: 10px; color: #4d5a50; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.probability-track { width: 64px; height: 5px; overflow: hidden; border-radius: 999px; background: #e5eae6; }
.probability-fill { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.sheet-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(249, 251, 249, .76); backdrop-filter: blur(2px); z-index: 3; }
.loading-card { min-width: 270px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; align-items: center; }
.loading-card strong { font-size: 14px; }
.loading-card > span:last-child { grid-column: 2; color: var(--muted); font-size: 12px; }
.spinner { grid-row: 1 / 3; width: 22px; height: 22px; border: 2px solid #d6e4da; border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sheet-footer { min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-actions, .sheet-status { display: flex; align-items: center; gap: 10px; }
.plain-button { border: 0; background: transparent; padding: 7px 8px; color: var(--green); font-size: 13px; font-weight: 750; cursor: pointer; }
.plain-button:hover { background: #f0f5f1; border-radius: 7px; }
.plain-button.subtle { color: var(--muted); font-weight: 650; }
.sheet-status { color: var(--muted); font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.page-actions button { width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--green); cursor: pointer; }
.page-actions button:disabled { opacity: .4; cursor: default; }
.page-actions select { height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); font-size: 11px; }
.shortcut { border-left: 1px solid var(--line); padding-left: 10px; }
kbd { min-width: 20px; margin-right: 2px; padding: 2px 4px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: #fafbfa; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.error { min-height: 20px; margin: 0 4px 7px; color: var(--red); font-size: 13px; }
.prototype-note { margin: 4px; color: #828c84; font-size: 12px; }

body[data-mode="customer"] .bench-controls,
body[data-mode="customer"] .telemetry { display: none; }
body[data-mode="customer"] main { padding-top: 34px; }
.customer-intro { display: none; }
body[data-mode="customer"] .customer-intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.customer-intro h1 { margin: 5px 0 8px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.045em; }
.customer-intro p { max-width: 620px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.customer-intro .eyebrow { color: var(--green); }
.customer-tools { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.customer-tools .plain-button { border: 1px solid var(--line-strong); border-radius: 8px; background: white; padding: 9px 12px; }
.customer-tools a.plain-button { display: inline-flex; align-items: center; text-decoration: none; }
.customer-tools .plain-button:disabled { opacity: .45; cursor: not-allowed; }
.customer-tools input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.csv-label { cursor: pointer; }
.account-usage { display: none; }
body[data-mode="customer"] .account-usage { display: block; margin: -15px 0 18px; color: var(--muted); font-size: 13px; }
.csv-column-control { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: -12px 0 26px; font-size: 13px; }
.csv-column-control label { color: #465149; font-weight: 750; }
.csv-column-control select { max-width: min(260px, 100%); height: 34px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 0 28px 0 10px; background: white; color: var(--ink); }
.csv-column-control span { color: var(--muted); }
body[data-mode="customer"] .sheet-scroll { max-height: min(58vh, 700px); }
body[data-mode="customer"] .formula-bar { margin-top: 20px; }

@media (max-width: 720px) {
  .app-header { padding: 0 14px; }
  .file-name, .connection span, .shortcut { display: none; }
  main { width: calc(100% - 20px); padding-top: 24px; }
  .control-bar { grid-template-columns: 1fr; }
  .run-button { justify-content: center; }
  .bench-controls { align-items: flex-end; flex-wrap: wrap; }
  .bench-control { flex: 1; align-items: stretch; flex-direction: column; }
  .bench-controls p { width: 100%; margin-left: 0; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric { border-bottom: 1px solid rgba(255,255,255,.1); }
  .telemetry-details { grid-template-columns: 1fr; }
  .telemetry-details dl { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .batch-table-wrap { overflow-x: auto; }
  .formula-bar { grid-template-columns: 72px 42px minmax(0, 1fr); }
  .sheet-frame { min-height: 450px; }
  .sheet-footer { align-items: flex-start; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .sheet-status { padding-top: 7px; white-space: nowrap; }
  .token-popover { right: -4px; width: min(280px, calc(100vw - 28px)); }
  body[data-mode="customer"] .customer-intro { align-items: start; flex-direction: column; gap: 14px; margin-bottom: 24px; }
  .customer-tools { flex-wrap: wrap; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}

/* HolySheet workspace */
:root { --green: #4b672b; --green-dark: #354e20; --green-soft: #edf6dc; --ink: #242d20; --muted: #7e8873; --line: #e0e5d8; --line-strong: #d4ddc8; --surface: #fff; }
body { background: #f7f8f3; font-family: Inter, Arial, Helvetica, sans-serif; }
.app-header { background: #f7f8f3; border-color: #dce0d5; min-height: 77px; }
.wordmark { font-size: 23px; letter-spacing: -1px; font-weight: 800; }
.wordmark .brand-mark { display: block; width: 34px; height: 34px; background: transparent; border-radius: 9px; }
.token-menu summary { background: #252e21; color: #f4f7ed; border: 1px solid #252e21; padding: 9px 14px; border-radius: 6px; font-size: 12px; }
.token-popover { width: 340px; border-radius: 9px; border: 1px solid #d7e0ca; background: #fbfcf8; }
.token-popover select { width: 100%; margin: 6px 0 13px; padding: 10px; border: 1px solid #ccd8bc; border-radius: 5px; background: #fff; color: #4c6140; font-size: 12px; }
.token-popover p { font-size: 11px; line-height: 1.6; }
.token-popover #credential-status { color: #52683a; overflow-wrap: anywhere; }
.token-popover #check-connection { width: 100%; padding: 9px; background: #d1f568; color: #29351e; border-radius: 5px; margin-top: 5px; }
body[data-mode="customer"] main { padding-top: 38px; }
body[data-mode="customer"] .customer-intro { align-items: start; gap: 35px; }
.customer-intro h1 { font-size: clamp(29px, 3.1vw, 44px); font-weight: 600; letter-spacing: -1.8px; }
.customer-intro .eyebrow { font-size: 9px; letter-spacing: .12em; font-weight: 500; }
.customer-intro p { font-size: 13px; max-width: 570px; color: #89937c; }
.customer-tools { max-width: 410px; flex-wrap: wrap; justify-content: end; }
.customer-tools .plain-button { font-size: 11px; border-color: #d9e1cf; border-radius: 5px; color: #647852; }
.control-bar { padding: 18px; border-radius: 10px; background: #252e21; border: 1px solid #333f2b; margin-bottom: 18px; }
.question-control label { color: #b9caa4; font: 9px ui-monospace, SFMono-Regular, monospace; text-transform: uppercase; letter-spacing: .08em; }
.question-control input { background: #333e2c; border-color: #4d5f40; color: #eaf1df; font-size: 14px; height: 46px; border-radius: 6px; box-shadow: none; }
.question-control input:focus { border-color: #c8ed6f; box-shadow: 0 0 0 2px #a4c56333; }
.run-button { background: #d1f568; color: #26311d; border-radius: 6px; height: 46px; box-shadow: none; font-size: 12px; }
.run-button:hover { background: #defb94; }
.run-progress { background: #eef5e4; border-color: #d6e3c6; }
.progress-track { background: #dce8cd; }
.progress-track span { background: #9ac650; }
.progress-top { color: #516c3a; }
.progress-log { color: #748c5a; }
.run-progress p { color: #859772; }
.formula-bar { border-color: #dce4d1; background: #fdfefb; border-radius: 8px 8px 0 0; }
.sheet-frame { border-color: #dce4d1; box-shadow: 0 14px 35px -20px #354b2533; }
.sheet tbody th { background: #f8faf3; color: #a0ad8f; font-size: 10px; }
.sheet tbody td { background: #fff; }
.cell-input { font-size: 12px; color: #536448; }
.letters-row th { background: #f2f5eb; color: #859975; }
.letters-row .active-column { background: #eaf3d9; border-top-color: #a7cb62; color: #627d41; }
.field-row th { background: #fcfdf9; color: #637a50; font-size: 11px; }
.field-row .result-heading { background: #f3f8e9; }
.result-cell { background: #fdfff8 !important; }
.decision-pill { min-width: 73px; font-size: 10px; border-radius: 5px; font-weight: 600; }
.decision-pill.yes { background: #eaf5d8; color: #648440; }
.decision-pill.no { background: #eef1e8; color: #859377; }
.probability-value { font-size: 11px; color: #7b8d6b; }
.probability-fill { background: #a1c968; }
.sheet-footer { flex-wrap: wrap; gap: 12px; border-radius: 0 0 8px 8px; }
.plain-button { font-size: 11px; }
.page-actions, .sheet-status { font-size: 10px; }
.prototype-note { font-size: 10px; color: #9aa68b; margin-top: 14px; }
.telemetry { background: #252e21; border-color: #45543a; }
.metric strong { font-size: 14px; }
@media (max-width: 720px) { .customer-tools { justify-content: start; max-width: none; } .control-bar { padding: 14px; } .token-popover { width: min(340px, calc(100vw - 24px)); } }

/* Task columns */
.control-bar { align-items: start; }
.task-panel { min-width: 0; }
.task-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.task-panel-title { color: #b9caa4; font: 9px ui-monospace, SFMono-Regular, monospace; text-transform: uppercase; letter-spacing: .08em; }
.template-control { display: flex; align-items: center; gap: 8px; color: #8f9f7d; font-size: 11px; }
.template-control select, .task-type { height: 32px; border: 1px solid #4d5f40; border-radius: 6px; padding: 0 8px; background: #333e2c; color: #eaf1df; font-size: 12px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task-card { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid #3a4732; border-radius: 8px; background: #2b3526; transition: border-color .15s; }
.task-card.active { border-color: #6f8d45; }
.task-letter { display: grid; place-items: center; width: 26px; height: 32px; border-radius: 5px; background: #3a4732; color: #c8ed6f; font: 700 11px ui-monospace, SFMono-Regular, monospace; }
.task-fields { display: grid; gap: 8px; min-width: 0; }
.task-line { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.task-question { height: 32px; min-width: 0; border: 1px solid #4d5f40; border-radius: 6px; padding: 0 10px; background: #333e2c; color: #eaf1df; font-size: 13px; outline: none; }
.task-question:focus, .task-options:focus, .task-type:focus { border-color: #c8ed6f; box-shadow: 0 0 0 2px #a4c56333; outline: none; }
.task-remove { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #9fb08a; font-size: 16px; cursor: pointer; }
.task-remove:hover { background: #3a4732; color: #eaf1df; }
.task-options-label { display: grid; gap: 5px; }
.task-options-label span { color: #8f9f7d; font-size: 10px; }
.task-options { width: 100%; resize: vertical; border: 1px solid #4d5f40; border-radius: 6px; padding: 7px 10px; background: #333e2c; color: #eaf1df; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.add-task { margin-top: 8px; border: 1px dashed #4d5f40; border-radius: 6px; padding: 7px 12px; background: transparent; color: #c8ed6f; font-size: 11px; font-weight: 700; cursor: pointer; }
.add-task:hover { background: #2b3526; }
.answer-col { width: 210px; }
.answer { display: flex; align-items: center; gap: 8px; min-width: 0; }
.answer.needs-review { box-shadow: inset 3px 0 0 #e1b450; margin-left: -13px; padding-left: 13px; }
.answer-meta { overflow: hidden; color: #7b8d6b; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.label-pill, .tag-chip { overflow: hidden; max-width: 140px; padding: 4px 8px; border-radius: 5px; background: #eef3e4; color: #4f6838; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.answer.tags { flex-wrap: nowrap; overflow: hidden; gap: 4px; }
.tag-chip { padding: 3px 6px; font-size: 10px; }
.score-value { color: #3f5530; font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.score-track { flex: 0 0 40px; height: 5px; overflow: hidden; border-radius: 999px; background: #e5eae6; }
.score-track span { display: block; height: 100%; border-radius: inherit; background: #a1c968; }
@media (max-width: 720px) {
  .control-bar { grid-template-columns: 1fr; }
  .task-panel-head { flex-wrap: wrap; }
  .task-line { grid-template-columns: 1fr auto; }
  .task-line .task-question { grid-column: 1 / -1; grid-row: 2; }
}
