.model-demo-page { background: #f4f5f3; }
.model-demo-page .site-masthead { background: #e7eee7; }
.model-demo-page .site-masthead > .site-header { grid-template-columns: minmax(0, 1fr) auto; }
.demo-heading { padding-block: 38px 44px; }
.demo-heading h1 { max-width: 920px; margin: 14px 0 18px; color: var(--charcoal); font-size: clamp(48px, 6.5vw, 82px); }
.demo-heading > p:not(.eyebrow):not(.demo-context) { max-width: 750px; font-size: clamp(18px, 2vw, 22px); }
.demo-context { margin-top: 12px; color: var(--charcoal); font-size: 18px; font-weight: 700; }
.model-nav { display: flex; gap: 10px; padding-bottom: 20px; }
.model-nav a { padding: 13px 18px; border-radius: 999px; background: var(--charcoal); color: var(--white); font-size: 16px; font-weight: 700; text-decoration: none; }
.model-nav a:hover { background: var(--green); }
.model-nav .model-contact-link { margin-left: auto; background: var(--green); }
.model-nav span { margin-right: 9px; color: #a7dda2; font-variant-numeric: tabular-nums; }
.model-section { scroll-margin-top: 20px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: end; gap: 24px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { padding-left: 20px; border-left: 3px solid var(--green); font-size: 17px; }
.model-section .section-intro { margin: 18px 0 28px; font-size: 18px; }
.chart-card { max-width: 990px; padding: 20px 24px 24px; border: 1px solid #d5ddd4; border-radius: 18px; background: var(--white); }
.chart-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px; border-radius: 10px; background: #e7eee7; }
.chart-header h3 { margin-top: 8px; color: var(--charcoal); font-size: 26px; }
.chart-header .simulation-description { max-width: 560px; margin-top: 8px; font-size: 17px; }
.selected-year-readout { flex-shrink: 0; text-align: center; color: var(--charcoal); font-size: 16px; }
.selected-year-readout output { display: block; font-size: 36px; line-height: 1.2; font-weight: 700; }
.chart { width: 100%; }
.plot-panel { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.plot-title { margin: 0 12px 12px; color: var(--charcoal); font-size: 22px; line-height: 1.3; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 12px 12px; padding: 0; list-style: none; font-size: 16px; }
.plot-legend li { display: flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; width: 20px; height: 4px; border-radius: 2px; }
.legend-swatch.baseline { background: #169e18; }
.legend-swatch.stress { background: #5c5c5c; }
.legend-swatch.history { background: #60717b; }
#histogram { height: 260px; margin-top: 6px; }
#degradation-curve { height: 300px; margin-top: 8px; }
.year-control { margin: 20px 38px 36px 68px; padding-block: 12px; border-radius: 6px; background: #e7eee7; box-shadow: 0 0 0 16px #e7eee7; }
.year-control label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 6px; color: var(--charcoal); font-size: 18px; font-weight: 700; }
.year-control label span { padding: 5px 10px; border-radius: 999px; background: var(--charcoal); color: var(--white); font-size: 16px; }
#year-help { margin-bottom: 8px; color: var(--charcoal); font-size: 16px; }
.year-track { margin-left: 12%; }
/* Extend by one thumb width so its center reaches the exact year coordinates. */
.year-control input { appearance: none; display: block; width: calc(100% + 28px); height: 44px; margin: 0 -14px; padding: 0; border: 0; background: transparent; cursor: pointer; direction: ltr; }
.year-control input:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 4px; border-radius: 8px; }
.year-control input::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: #a9c4a6; }
.year-control input::-webkit-slider-thumb { box-sizing: border-box; appearance: none; width: 28px; height: 28px; margin-top: -10px; border: 3px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 1px 5px #20222040; }
.year-control input::-moz-range-track { height: 8px; border-radius: 4px; background: #a9c4a6; }
.year-control input::-moz-range-thumb { box-sizing: border-box; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 1px 5px #20222040; }
.range-ends { display: flex; justify-content: space-between; color: var(--gray); font-size: 16px; }
.chart-status { font-size: 16px; }
.chart-status:empty { display: none; }
.model-details { max-width: 990px; margin-top: 32px; padding: 24px; border-top: 3px solid var(--green); border-radius: 16px; background: var(--white); }
.model-details h3 { margin-bottom: 18px; color: var(--charcoal); font-size: 25px; }
.cell-summary { display: grid; gap: 10px; margin: 0 0 24px; padding-left: 20px; font-size: 17px; line-height: 1.55; }
.table-scroll { overflow-x: auto; }
.duty-details table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 16px; text-align: left; }
.duty-details th, .duty-details td { padding: 10px 8px; border-bottom: 1px solid #dce3db; }
.duty-details thead th { color: var(--charcoal); }
.duty-details tbody th { font-weight: 400; }
.model-contact { max-width: 990px; margin-top: 32px; padding: 28px; border-radius: 16px; background: var(--charcoal); color: var(--white); }
.model-contact h3 { margin-bottom: 10px; font-size: clamp(26px, 3vw, 36px); }
.model-contact p { max-width: 600px; margin-bottom: 20px; font-size: 18px; }
.model-contact .button { display: inline-flex; align-items: center; gap: 18px; padding: 14px 20px; border-radius: 999px; background: var(--green); color: var(--white); font-size: 17px; font-weight: 700; text-decoration: none; }
@media (max-width: 800px) {
  .section-heading { grid-template-columns: 1fr; }
  .section-heading > p { max-width: 620px; }
  .chart-card { padding: 16px 10px; }
  .chart-header { display: block; padding-inline: 12px; }
  .selected-year-readout { margin-top: 12px; text-align: left; }
  .selected-year-readout output { display: inline; margin-left: 8px; font-size: 26px; }
  .model-nav { flex-wrap: wrap; }
  .model-nav .model-contact-link { margin-left: 0; }
}

.cell-comparison-control { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; font-size: 16px; }
.cell-comparison-control label { font-weight: 700; }
.cell-comparison-control select { max-width: 100%; min-height: 44px; padding: 10px 36px 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--charcoal); font: inherit; }
.cell-comparison-control select:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
