/* v9.1 — a practical calculation workbench plus an optional post-game laboratory. */
.sidebar-real-workbench {
  margin: 8px 10px 10px;
  padding: 11px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  color: #ecf7f0;
  background: #153f30;
  border: 1px solid #477361;
  border-radius: 11px;
}
.sidebar-real-workbench>span { display: grid; width: 32px; height: 32px; place-items: center; color: #123b2c; background: #d8ff72; border-radius: 9px; font-size: 20px; font-weight: 950; }
.sidebar-real-workbench small,.sidebar-real-workbench b,.sidebar-real-workbench p { display: block; }
.sidebar-real-workbench small { color: #d8ff72; font-size: 10px; font-weight: 950; letter-spacing: .08em; }
.sidebar-real-workbench b { margin-top: 1px; color: #fff; }
.sidebar-real-workbench p { margin: 2px 0 0; color: #b9d0c5; font-size: 12px; line-height: 1.35; }
.sidebar-real-workbench button { min-height: 38px; padding: 7px 8px; color: #163c2e; background: #fff; border: 0; border-radius: 8px; font-weight: 950; cursor: pointer; }
.sidebar-real-workbench button:hover,.sidebar-real-workbench button:focus-visible { background: #d8ff72; }
.sidebar-real-workbench button b { display: inline; color: inherit; }
.decision-lab { margin: 0 0 18px; color: #163d2e; }
.decision-lab-hero {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 255px;
  align-items: center;
  gap: 22px;
  color: #fff;
  background: linear-gradient(125deg,#0d3427,#1f6648);
  border-radius: 17px 17px 0 0;
}
.decision-lab-hero span,
.decision-lab-hero h2,
.decision-lab-hero p,
.decision-lab-hero b,
.decision-lab-hero small { display: block; }
.decision-lab-hero>div>span { color: #d8ff72; font-weight: 900; letter-spacing: .13em; }
.decision-lab-hero h2 { margin: 5px 0; color: #fff; font-family: "Yu Mincho",serif; font-size: clamp(24px,3vw,35px); line-height: 1.25; }
.decision-lab-hero p { max-width: 760px; margin: 0; color: #c4d7ce; line-height: 1.65; }
.decision-lab-hero aside { padding: 14px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.decision-lab-hero aside b { color: #fff; }
.decision-lab-hero aside i,
.readiness-meter { height: 8px; margin: 9px 0; overflow: hidden; background: rgba(255,255,255,.14); border-radius: 999px; }
.decision-lab-hero aside i::after,
.readiness-meter i { content: ""; display: block; width: var(--v); height: 100%; background: #d8ff72; border-radius: inherit; transition: width .25s ease; }
.decision-lab-hero aside small { color: #b9cec4; line-height: 1.45; }

.decision-lab-tabs { padding: 9px; display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; background: #e5ede5; border-inline: 1px solid #cbd9cf; }
.decision-lab-tabs button { min-width: 0; min-height: 60px; padding: 9px 11px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 7px; color: #38584a; text-align: left; background: #f8faf6; border: 1px solid #cbd9cf; border-radius: 10px; cursor: pointer; }
.decision-lab-tabs button:hover,
.decision-lab-tabs button:focus-visible { border-color: #39775a; background: #fff; }
.decision-lab-tabs button.active { color: #fff; background: #174b37; border-color: #174b37; box-shadow: 0 7px 18px rgba(14,55,40,.16); }
.decision-lab-tabs button span { display: grid; width: 28px; height: 28px; place-items: center; color: #174b37; background: #d8ff72; border-radius: 7px; font-weight: 950; }
.decision-lab-tabs button b { line-height: 1.25; }
.decision-lab-body { padding: 18px; background: #f3f6ef; border-inline: 1px solid #cbd9cf; }

.real-input-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 13px; align-items: start; }
.real-input-form,
.readiness-card,
.scenario-panel,
.breakeven-panel,
.evidence-checks,
.export-card { background: #fff; border: 1px solid #cbd9cf; border-radius: 13px; }
.real-input-form>header,
.scenario-panel>header,
.breakeven-panel>header,
.evidence-checks>header { padding: 17px 19px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dbe4dc; }
.real-input-form header small,
.scenario-panel header small,
.breakeven-panel header small,
.evidence-checks header small { color: #347055; font-weight: 950; letter-spacing: .12em; }
.real-input-form h3,
.scenario-panel h3,
.breakeven-panel h3,
.evidence-checks h3 { margin: 3px 0 0; font-family: "Yu Mincho",serif; font-size: 21px; }
.real-input-form>header>span { height: fit-content; padding: 5px 8px; color: #174b37; background: #e7f2dc; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.real-input-grid { padding: 17px 19px 4px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.real-input-grid label { color: #344f43; font-weight: 850; }
.real-input-grid label.wide { grid-column: 1 / -1; }
.real-input-grid input { width: 100%; height: 45px; margin-top: 5px; padding: 0 11px; color: #173e2f; background: #fbfcf9; border: 1px solid #bdcdc2; border-radius: 8px; }
.real-input-grid input:focus { background: #fff; border-color: #2e7253; }
.real-input-grid small { display: block; margin-top: 4px; color: #68786f; font-weight: 600; line-height: 1.4; }
.real-input-actions { padding: 14px 19px 18px; display: flex; gap: 8px; }
.real-input-actions button,
.export-card button,
.post-game-shell footer button { min-height: 45px; padding: 10px 14px; color: #fff; background: #174b37; border: 1px solid #174b37; border-radius: 8px; font-weight: 900; cursor: pointer; }
.real-input-actions button+button { color: #174b37; background: #fff; }

.readiness-card { overflow: hidden; }
.readiness-card>header { padding: 16px 17px 10px; color: #fff; background: #174b37; }
.readiness-card header small,
.readiness-card header strong,
.readiness-card header span { display: block; }
.readiness-card header small { color: #d8ff72; font-weight: 900; letter-spacing: .1em; }
.readiness-card header strong { margin-top: 4px; font-size: 34px; }
.readiness-card header em { color: #b3c7bd; font-size: .5em; font-style: normal; }
.readiness-card header span { color: #c8d8d0; }
.readiness-meter { margin: 0; background: #dce6df; border-radius: 0; }
.readiness-meter i { background: #d8ff72; }
.readiness-card ol { margin: 0; padding: 8px 15px 13px; list-style: none; }
.readiness-card li { padding: 9px 0; display: grid; grid-template-columns: 24px 1fr; gap: 7px; border-bottom: 1px solid #e5ebe6; }
.readiness-card li:last-child { border: 0; }
.readiness-card li>i { display: grid; width: 21px; height: 21px; place-items: center; color: #7a8d83; background: #edf1ec; border-radius: 50%; font-style: normal; font-weight: 900; }
.readiness-card li.done>i { color: #133e2e; background: #d8ff72; }
.readiness-card li b,
.readiness-card li small { display: block; }
.readiness-card li b { line-height: 1.3; }
.readiness-card li small { margin-top: 2px; color: #718079; line-height: 1.35; }

.scenario-panel,
.breakeven-panel { overflow: hidden; }
.scenario-panel>header p,
.breakeven-panel>header p { max-width: 400px; margin: 0; color: #64766d; line-height: 1.5; }
.scenario-table-wrap { overflow-x: auto; }
.scenario-table-wrap table { width: 100%; min-width: 940px; border-collapse: collapse; }
.scenario-table-wrap th,
.scenario-table-wrap td { padding: 13px 12px; border-bottom: 1px solid #dde5de; text-align: right; vertical-align: middle; }
.scenario-table-wrap thead th { color: #697970; background: #f5f7f3; font-weight: 850; }
.scenario-table-wrap th:first-child { text-align: left; }
.scenario-table-wrap tbody th { width: 235px; }
.scenario-table-wrap tbody th b,
.scenario-table-wrap tbody th small { display: block; }
.scenario-table-wrap tbody th small { margin-top: 4px; color: #74847b; font-weight: 500; line-height: 1.4; }
.scenario-table-wrap tr.scenario-down { background: #fff7f1; }
.scenario-table-wrap tr.scenario-up { background: #f4faec; }
.scenario-table-wrap td span { padding: 5px 8px; color: #174b37; background: #e5f0df; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.scenario-panel>footer { padding: 12px 17px; color: #6a786f; background: #f6f8f4; }

.breakeven-grid { padding: 15px; display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.breakeven-grid article { min-height: 128px; padding: 15px; color: #fff; background: #174b37; border-radius: 10px; }
.breakeven-grid article:nth-child(2),
.breakeven-grid article:nth-child(4) { color: #163d2e; background: #e7f2dc; }
.breakeven-grid span,
.breakeven-grid strong,
.breakeven-grid small { display: block; }
.breakeven-grid span { opacity: .78; font-weight: 800; }
.breakeven-grid strong { margin: 8px 0 4px; font-size: 23px; }
.breakeven-grid small { line-height: 1.4; opacity: .82; }
.breakeven-guidance { margin: 0 15px 15px; padding: 14px 16px; display: flex; align-items: center; gap: 24px; background: #f5f7f2; border: 1px solid #dbe4dc; border-radius: 9px; }
.breakeven-guidance ol { margin: 0; padding-left: 22px; display: flex; flex-wrap: wrap; gap: 7px 28px; }

.evidence-workbench { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 13px; align-items: start; }
.evidence-checks { overflow: hidden; }
.evidence-checks>header { display: block; }
.evidence-checks>header p { margin: 4px 0 0; color: #68786f; }
.evidence-checks>label { margin: 0 18px; padding: 12px 0; display: grid; grid-template-columns: 25px 1fr; gap: 9px; border-bottom: 1px solid #e0e7e1; cursor: pointer; }
.evidence-checks>label:last-child { border: 0; }
.evidence-checks input { width: 20px; height: 20px; accent-color: #174b37; }
.evidence-checks label b,
.evidence-checks label small { display: block; }
.evidence-checks label small { margin-top: 2px; color: #6a7c72; }
.export-card { padding: 20px; color: #fff; background: #153d2d; border-color: #153d2d; }
.export-card>span { color: #d8ff72; font-weight: 950; letter-spacing: .12em; }
.export-card h3 { margin: 7px 0; font-family: "Yu Mincho",serif; font-size: 23px; }
.export-card p { color: #c1d2ca; line-height: 1.6; }
.export-card button { width: 100%; margin-top: 8px; color: #173e2f; background: #d8ff72; border-color: #d8ff72; }
.export-card button+button { color: #fff; background: transparent; border-color: #6b8b7d; }
.export-card>small { display: block; margin-top: 12px; color: #98afa4; line-height: 1.45; }

.decision-data-guide { background: #fff; border: 1px solid #cbd9cf; border-top: 0; border-radius: 0 0 17px 17px; overflow: hidden; }
.decision-data-guide>header { padding: 19px 22px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid #cbd9cf; border-bottom: 1px solid #dbe4dc; }
.decision-data-guide header small { color: #347055; font-weight: 950; letter-spacing: .12em; }
.decision-data-guide header h3 { margin: 3px 0; font-family: "Yu Mincho",serif; font-size: 23px; }
.decision-data-guide header p { margin: 0; color: #68786f; }
.decision-data-guide>header>span { height: fit-content; padding: 5px 8px; color: #476255; background: #eef3ed; border-radius: 999px; white-space: nowrap; }
.decision-data-list { display: grid; grid-template-columns: repeat(2,1fr); }
.decision-data-list details { border-right: 1px solid #e0e7e1; border-bottom: 1px solid #e0e7e1; }
.decision-data-list details:nth-child(2n) { border-right: 0; }
.decision-data-list summary { min-height: 73px; padding: 12px 15px; display: grid; grid-template-columns: 34px minmax(145px,1fr) minmax(130px,.75fr) 22px; align-items: center; gap: 9px; list-style: none; cursor: pointer; }
.decision-data-list summary::-webkit-details-marker { display: none; }
.decision-data-list summary:hover { background: #f5f8f2; }
.decision-data-list summary>i { display: grid; width: 31px; height: 31px; place-items: center; color: #173e2f; background: #d8ff72; border-radius: 8px; font-style: normal; font-weight: 950; }
.decision-data-list summary span b,
.decision-data-list summary span small { display: block; }
.decision-data-list summary span small { margin-top: 3px; color: #7a887f; font-weight: 850; letter-spacing: .08em; }
.decision-data-list summary>strong { text-align: right; line-height: 1.35; }
.decision-data-list summary>em { color: #557266; font-style: normal; font-weight: 900; text-align: center; }
.decision-data-list details[open] summary>em { transform: rotate(45deg); }
.decision-data-list details>div { padding: 0 15px 16px 58px; }
.decision-data-list details p { margin: 5px 0; color: #566b60; line-height: 1.55; }
.decision-data-list details a,
.input-source-note { display: inline-flex; margin-top: 7px; color: #174b37; font-weight: 900; }

/* The game hand-off now lives in the left rail, never above the real calculation workspace. */
.sidebar-post-game-lab { margin: 0 9px 10px; padding: 10px; color: #eaf6ef; background: #183e2e; border: 1px solid #456456; border-radius: 12px; }
.sidebar-post-game-lab>small { color: #d8ff72; font-weight: 950; letter-spacing: .09em; }
.sidebar-post-game-lab h3 { margin: 5px 0 3px; color: #fff; line-height: 1.3; }
.sidebar-post-game-lab p { margin: 0 0 8px; color: #b7c9bf; line-height: 1.4; }
.sidebar-post-game-actions { display: grid; gap: 6px; }
.sidebar-post-game-actions button,
.sidebar-post-game-actions a { min-height: 37px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; color: #173e2f; background: #d8ff72; border: 1px solid #d8ff72; border-radius: 8px; font-weight: 900; text-decoration: none; cursor: pointer; }
.sidebar-post-game-actions a { color: #fff; background: transparent; border-color: #607d6f; }
.sidebar-post-game-lab details { margin-top: 8px; }
.sidebar-post-game-lab summary { color: #c9d8d0; cursor: pointer; }
.sidebar-post-game-chips { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.sidebar-post-game-chips span { padding: 4px 6px; color: #d9e7df; background: #0e2e21; border-radius: 999px; }

.post-game-lab-dialog { width: min(1050px,96vw); max-height: 92vh; padding: 0; overflow: auto; color: #163d2e; background: #f5f7f1; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.post-game-lab-dialog::backdrop { background: rgba(5,25,17,.72); backdrop-filter: blur(5px); }
.post-game-shell>header { padding: 24px 26px; display: grid; grid-template-columns: 1fr auto; gap: 18px; color: #fff; background: linear-gradient(120deg,#143f2e,#287052); }
.post-game-shell>header small { color: #d8ff72; font-weight: 950; letter-spacing: .15em; }
.post-game-shell>header h2 { margin: 5px 0; color: #fff; font-family: "Yu Mincho",serif; font-size: clamp(25px,4vw,39px); }
.post-game-shell>header p { max-width: 740px; margin: 0; color: #c9d9d1; line-height: 1.6; }
.post-game-shell>header button { width: 42px; height: 42px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 50%; font-size: 23px; cursor: pointer; }
.post-game-context { padding: 10px 24px; display: flex; flex-wrap: wrap; gap: 7px; background: #dce8dd; border-bottom: 1px solid #c2d2c6; }
.post-game-context span { padding: 6px 9px; background: #fff; border-radius: 999px; font-weight: 800; }
.post-game-score { margin: 16px 20px 0; padding: 14px 17px; display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 16px; color: #fff; background: #153d2d; border-radius: 12px; }
.post-game-score span,
.post-game-score strong,
.post-game-score small { display: block; }
.post-game-score span { color: #d8ff72; font-weight: 950; letter-spacing: .1em; }
.post-game-score strong { font-size: 31px; }
.post-game-score strong em { color: #a9beb3; font-size: .5em; font-style: normal; }
.post-game-score small { color: #a9beb3; }
.post-game-score p { margin: 0; color: #dbe7e1; line-height: 1.55; }
.post-game-layout { padding: 14px 20px; display: grid; grid-template-columns: 320px 1fr; gap: 12px; }
.post-game-controls { padding: 15px; background: #fff; border: 1px solid #ccd8ce; border-radius: 12px; }
.post-game-controls label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 14px; font-weight: 850; }
.post-game-controls input,
.post-game-controls select { grid-column: 1 / -1; width: 100%; accent-color: #174b37; }
.post-game-controls select { height: 43px; padding: 0 9px; background: #f9fbf7; border: 1px solid #bdcdc2; border-radius: 7px; }
.post-game-controls output { color: #174b37; font-weight: 950; }
.post-game-results { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.post-game-results article { min-height: 108px; padding: 15px; color: #fff; background: #1b513b; border-radius: 11px; }
.post-game-results article:nth-child(2),
.post-game-results article:nth-child(3) { color: #163d2e; background: #e7f2dc; }
.post-game-results article.wide { grid-column: 1 / -1; min-height: 95px; background: #153d2d; }
.post-game-results span,
.post-game-results strong,
.post-game-results small { display: block; }
.post-game-results strong { margin: 8px 0 3px; font-size: 25px; }
.post-game-results small { color: #bed0c7; }
.post-game-challenges { margin: 0 20px 15px; padding: 14px; background: #fff; border: 1px solid #ccd8ce; border-radius: 11px; }
.post-game-challenges header { display: flex; justify-content: space-between; gap: 10px; }
.post-game-challenges header span { color: #6c7b73; }
.post-game-challenges>div { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px; }
.post-game-challenges button { min-height: 40px; padding: 7px 11px; color: #174b37; background: #eff5e9; border: 1px solid #bdd0c0; border-radius: 999px; font-weight: 850; cursor: pointer; }
.post-game-challenges button:hover { background: #d8ff72; border-color: #b2d541; }
.post-game-shell>footer { padding: 15px 20px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.post-game-shell>footer a { min-height: 45px; padding: 10px 14px; display: inline-flex; align-items: center; color: #174b37; background: #fff; border: 1px solid #9db4a5; border-radius: 8px; font-weight: 900; text-decoration: none; }

@media (max-width: 1100px) {
  .real-input-layout,
  .evidence-workbench { grid-template-columns: 1fr; }
  .readiness-card { display: grid; grid-template-columns: 220px 1fr; }
  .readiness-card .readiness-meter { display: none; }
  .breakeven-grid { grid-template-columns: repeat(2,1fr); }
  .decision-data-list { grid-template-columns: 1fr; }
  .decision-data-list details { border-right: 0; }
}

@media (max-width: 800px) {
  .decision-lab-hero { grid-template-columns: 1fr; padding: 19px; }
  .decision-lab-tabs { grid-template-columns: repeat(2,1fr); }
  .decision-lab-body { padding: 11px; }
  .real-input-grid { grid-template-columns: 1fr; padding-inline: 14px; }
  .real-input-grid label.wide { grid-column: auto; }
  .real-input-actions { flex-direction: column; padding-inline: 14px; }
  .readiness-card { display: block; }
  .breakeven-grid { grid-template-columns: 1fr; }
  .breakeven-guidance { align-items: flex-start; flex-direction: column; gap: 8px; }
  .breakeven-guidance ol { display: block; }
  .decision-data-guide>header { flex-direction: column; }
  .decision-data-list summary { grid-template-columns: 32px 1fr 22px; }
  .decision-data-list summary>strong { grid-column: 2; grid-row: 2; text-align: left; }
  .decision-data-list summary>em { grid-column: 3; grid-row: 1 / 3; }
  .decision-data-list details>div { padding-left: 56px; }
  .sidebar-post-game-lab { display: none; }
  .post-game-layout,
  .post-game-score { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .decision-lab-tabs { grid-template-columns: 1fr; }
  .decision-lab-tabs button { min-height: 49px; }
  .post-game-layout { padding-inline: 12px; grid-template-columns: 1fr; }
  .post-game-results { grid-template-columns: 1fr; }
  .post-game-results article.wide { grid-column: auto; }
  .post-game-challenges { margin-inline: 12px; }
  .post-game-shell>footer { flex-direction: column; }
  .post-game-shell>footer>* { width: 100%; justify-content: center; }
}

@media print {
  .decision-lab-tabs,
  .real-input-actions,
  .post-game-lab-dialog { display: none !important; }
}
