/* Shared decisions: summary, consequences and action stay in one place. */
.research-workspace {display:block!important;overflow:hidden;}
.research-workspace #board {display:block!important;height:100%;overflow:auto;padding:22px 30px 48px;}
.research-list-view {max-width:760px;margin:0 auto;}
.decision-heading {margin:0 0 20px;padding:0;}
.decision-heading h1,.section-heading h1 {font-size:26px;letter-spacing:-.035em;line-height:1.2;margin:0;}
.decision-heading p {font-size:var(--text-meta);color:var(--fg-muted);margin:8px 0 0;}
.decision-list {display:flex;flex-direction:column;gap:8px;}
.decision-row {padding:0;border:1px solid var(--border-subtle);border-radius:12px;background:var(--surface);min-width:0;overflow:hidden;}
.decision-row>summary {list-style:none;display:flex;align-items:center;gap:13px;padding:14px;min-height:76px;cursor:pointer;}
.decision-row>summary::-webkit-details-marker,.phone-stat>summary::-webkit-details-marker {display:none;}
.decision-row>summary:focus-visible {outline:2px solid var(--accent);outline-offset:-3px;border-radius:12px;}
.decision-art {display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:0 0 44px;color:var(--accent);border-radius:9px;background:var(--surface-raised);overflow:hidden;}
.decision-art>svg,.decision-art .tech-glyph {position:static!important;inset:auto!important;transform:none!important;width:34px!important;height:34px!important;max-width:100%;}
.decision-art .work-art {position:static!important;width:42px;height:42px;margin:0;}
.decision-label {min-width:0;flex:1;display:flex;flex-direction:column;gap:5px;}
.decision-label strong {font-size:16px;font-weight:650;line-height:1.3;overflow-wrap:anywhere;}
.decision-label small {color:var(--fg-muted);font-size:var(--text-meta);line-height:1.4;overflow-wrap:anywhere;}
.expand-mark {font-size:22px;font-weight:400;color:var(--fg-muted);flex:none;}
.decision-row[open]>summary .expand-mark {transform:rotate(180deg);}
.decision-row.is-complete[open]>summary .expand-mark {transform:none;}
.decision-row.is-locked>summary {opacity:.52;}
.decision-row.is-locked[open]>summary {opacity:.8;}
.decision-row.is-active {border-color:var(--border-strong);}
.decision-row.is-complete .decision-art {color:var(--ok-fg);}
.decision-body {padding:0 16px 16px;border-top:1px solid var(--border-subtle);}
.decision-body p {font-size:var(--text-meta);line-height:1.55;margin:14px 0;}
.decision-body .decision-note {color:var(--fg-muted);font-size:var(--text-meta);}
.decision-reason {color:var(--warn-fg);}
.decision-action {display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:16px;}
.decision-action>span {margin-right:auto;font-size:var(--text-meta);color:var(--fg-muted);}
.decision-action>button {min-height:44px;padding:10px 18px;border-radius:8px;}
.decision-body .choice-formula {display:grid;gap:7px;margin-top:12px;}
.decision-body .formula-line {display:flex;justify-content:space-between;align-items:center;gap:12px;}
.decision-body .formula-label {font-size:var(--text-meta);color:var(--fg-muted);}
.decision-body .formula-value {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:4px;font-size:var(--text-meta);}
.decision-body .resource-icon {width:18px;height:18px;}
.decision-body .operating-forecast {font-size:var(--text-meta);}
.decision-row .work-meter,.decision-row .readiness-bar {height:3px;margin:3px 0 0;}
.section-heading {display:flex;gap:12px;justify-content:space-between;align-items:center;margin:4px 0 16px;}
.section-heading h2,.running-list h2 {font-size:16px;font-weight:600;margin:0;}
.ending-art {object-fit:cover;width:64px;flex-basis:64px;}
.dialog-navigation {margin-right:0;}
.decision-heading {display:block;height:auto;min-height:0;border:0;background:none;}
.decision-row>summary {color:var(--fg);-webkit-tap-highlight-color:transparent;}
.decision-row>summary::after {content:none!important;}
.decision-row[open]>summary {background:var(--surface-raised);border-radius:11px 11px 0 0;}
.decision-action>.primary-action {background:var(--accent);border:1px solid var(--accent);color:var(--accent-on);font-weight:650;}

/* Rows only disclose. The expanded content names the action before committing. */
.choice-entry {position:relative;min-width:0;}
.choice-entry.has-action>.decision-row[open] {border-color:var(--border-strong);}
.choice-entry>.decision-row>summary:hover {background:var(--surface-raised);}
.choice-entry .decision-body {letter-spacing:normal;}
.choice-commit {padding:4px 0;border-bottom:1px solid var(--border-subtle);}
body.strategy-game .choice-commit>.choice-confirm {display:flex;justify-content:space-between;gap:12px;width:100%;min-height:44px;margin:0;padding:8px 0;border:0;border-radius:4px;background:none;color:var(--accent);text-align:left;font-size:var(--text-meta);font-weight:600;box-shadow:none;}
body.strategy-game .choice-commit>.choice-confirm:hover>span:first-child {text-decoration:underline;text-underline-offset:3px;}
body.strategy-game .choice-commit>.choice-confirm:focus-visible {outline-offset:2px;}
.decision-label small {display:flex;align-items:center;gap:6px;font-weight:400;}
.expand-mark {display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:var(--text-meta);flex:none;}
.expand-mark svg {width:16px;height:16px;}
@media(max-width:700px),(pointer:coarse) and (max-height:500px) {
 .choice-entry .decision-row>summary {padding:12px 10px;gap:9px;}
 .choice-entry .decision-art {width:32px;height:36px;flex-basis:32px;}
 .choice-entry .decision-label strong {font-size:var(--text-meta);}
 .choice-entry .decision-label small {font-size:var(--text-meta);}
}

.choice-entry .decision-row>summary {box-sizing:border-box;letter-spacing:normal;}
.choice-entry .decision-label strong,.choice-entry .decision-label small {letter-spacing:normal;text-transform:none;}

/* The orange action arrow remains separate from the detail disclosure. */
.choice-entry.has-action>.decision-row>summary {padding-right:68px!important;}
body.strategy-game .choice-entry>.choice-start {position:absolute;top:13px;right:8px;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:7px;background:none;color:var(--accent);font-size:26px;line-height:1;box-shadow:none;}
.choice-entry>.choice-start::before {content:'';position:absolute;left:-7px;top:10px;bottom:10px;width:1px;background:var(--border-subtle);}
body.strategy-game .choice-entry>.choice-start:hover {background:var(--accent-soft);}
body.strategy-game .choice-entry>.choice-start:focus-visible {outline:2px solid var(--accent);outline-offset:1px;}

/* The same requirements list is used in the narrow desktop and phone sheets. */
.ending-list .ending-checklist {list-style:none;padding:0;margin:14px 0;}
.ending-list .ending-checklist li {display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid var(--border-subtle);}
.ending-checklist li>span {color:var(--fg-muted);flex:none;}
.ending-checklist li.done>span {color:var(--ok-fg);}
.ending-checklist strong,.ending-checklist small {display:block;font-size:var(--text-meta);line-height:1.4;font-weight:500;}
.ending-checklist small {font-size:var(--text-meta);color:var(--fg-muted);margin-top:3px;}
.ending-list .readiness-tags {display:flex;flex-wrap:wrap;gap:6px;}
.ending-list .readiness-tags:empty {display:none;}
.ending-list .readiness-tags>span {padding:3px 8px;border-radius:20px;font-size:var(--text-meta);}
.ending-list .tag-hostile {background:var(--danger-soft);color:var(--danger-fg);}
.ending-list .tag-favoured {background:var(--ok-soft);color:var(--ok-fg);}
.ending-list .tag-harder {background:var(--surface-raised);color:var(--fg-muted);}
.ending-list .decision-body>.decision-action {position:static;box-shadow:none;padding:0;background:none;}
.decision-art .tech-glyph {color:var(--accent-strong);}
.decision-art .tech-glyph :is(path,polygon,ellipse,circle) {stroke-width:2;}
.ending-list>.decision-row,.ending-list .decision-body {letter-spacing:normal;text-transform:none;}

.ending-list .ending-checklist li {min-width:0;white-space:normal;}
.ending-list .ending-checklist li>div {flex:1;min-width:0;overflow-wrap:anywhere;}
.ending-list .ending-checklist :is(strong,small) {white-space:normal;overflow-wrap:anywhere;}
