:root {
  color-scheme: light;
  --paper: #f7f5f1;
  --surface: #fff;
  --ink: #16181b;
  --muted: #5f646b;
  --line: #ddd8ce;
  --accent: #0f4c5c;
  --accent-hover: #0b3a47;
  --accent-soft: color-mix(in srgb, #0f4c5c 10%, #f7f5f1);
  --danger: #a3392a;
  --danger-soft: #fcf0ec;
  --focus: #1766a3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 5; padding: 1rem; background: var(--surface); }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem max(2rem, calc((100% - 1240px) / 2)); }
.return-nav { padding: .25rem max(1rem, calc((100% - 1240px) / 2)); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { color: var(--ink); display: flex; align-items: center; gap: .75rem; text-decoration: none; font-size: 1rem; font-weight: 650; line-height: 1.35; }
.brand-mark { display: block; width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
.brand-subtitle { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.header-actions { display: flex; gap: 1.5rem; align-items: center; font-size: .8125rem; }
.header-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.demo-label { padding: .25rem .625rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
main { max-width: 1304px; padding: 2.5rem 2rem 0; margin: auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; }
.eyebrow { margin: 0 0 .5rem; font-size: .6875rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.18; letter-spacing: -.035em; margin-bottom: .625rem; font-weight: 600; }
h2 { font-size: 1.1875rem; letter-spacing: -.02em; font-weight: 650; line-height: 1.3; margin-bottom: 0; }
h3 { font-size: .875rem; margin-bottom: .75rem; }
.lead { font-size: .9375rem; color: var(--muted); margin-bottom: 0; }
.period-control { min-width: 13.75rem; }
label { display: block; font-size: .75rem; font-weight: 650; margin-bottom: .375rem; }
input, select { border: 1px solid #b4c0b9; border-radius: 4px; min-height: 44px; padding: .625rem .75rem; color: var(--ink); background: var(--surface); width: 100%; }
input[aria-invalid='true'] { border-color: var(--danger); }
.period-line { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .8125rem; padding: 1rem 0 1.5rem; }
#period-dates { font-weight: 650; }
.week-label { color: var(--muted); padding-left: .75rem; border-left: 1px solid #b4c0b9; }
.temporary-note { margin-left: auto; color: var(--muted); font-size: .75rem; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1.5rem; }
.metric { padding: 1.125rem 1.5rem; border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric-label { color: var(--muted); font-size: .75rem; margin-bottom: .5rem; }
.metric-value { display: block; font-size: 1.75rem; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.metric-unit { font-size: .875rem; font-weight: normal; color: var(--muted); }
.metric-note { margin: .375rem 0 0; font-size: .6875rem; color: var(--muted); }
.metric.alert .metric-value { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; min-width: 0; }
.people-panel { margin-bottom: 1.5rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-note { color: var(--muted); font-size: .75rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
caption { text-align: left; color: var(--muted); padding-bottom: 1rem; font-size: .8125rem; }
th { color: var(--muted); font-size: .6875rem; font-weight: 600; letter-spacing: .035em; border-bottom: 1px solid var(--line); padding: .625rem .75rem; }
td { border-bottom: 1px solid var(--line); padding: 1rem .75rem; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.people-table tr.selected { background: var(--accent-soft); }
.people-table tr.selected td:first-child { padding-left: .75rem; }
.person-button { display: flex; align-items: center; gap: .75rem; text-align: left; border: 0; background: transparent; padding: .25rem; min-height: 44px; border-radius: 3px; }
.avatar { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid #c4d2ca; background: #f4f7f5; color: var(--accent); font-size: .6875rem; font-weight: 650; flex-shrink: 0; }
.person-name { display: block; font-weight: 650; }
.person-role { display: block; font-size: .6875rem; color: var(--muted); margin-top: .125rem; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.load-meter { width: 6rem; height: 4px; background: #e5eae7; margin-top: .5rem; }
.load-meter span { display: block; height: 100%; background: var(--accent); }
.load-meter.overloaded span { background: var(--danger); }
.badge { display: inline-block; padding: .25rem .5rem; border-radius: 3px; font-size: .75rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.badge.overloaded { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { color: var(--muted); background: #f1f3f1; }
.table-note { font-size: .75rem; color: var(--muted); margin: 1rem 0 0; line-height: 1.6; }
.detail-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.5rem; }
.detail-layout .section-heading { align-items: start; }
.capacity-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 1.5rem; padding: 1rem 0; border-block: 1px solid var(--line); gap: .75rem; }
.capacity-breakdown dt { font-size: .6875rem; color: var(--muted); }
.capacity-breakdown dd { margin: .375rem 0 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.capacity-breakdown .capacity-total dd { color: var(--accent); }
.assignment-table td:last-child, .assignment-table th:last-child { text-align: right; }
.section-description { color: var(--muted); font-size: .8125rem; line-height: 1.65; margin: .75rem 0 1.25rem; }
.field { margin-bottom: 1rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.date-shortcut { display: flex; align-items: center; gap: .5rem; }
.date-shortcut input { min-width: 0; }
.hours-input { position: relative; }
.hours-input input { padding-right: 4rem; }
.hours-input span { position: absolute; top: .6875rem; right: .75rem; font-size: .8125rem; color: var(--muted); }
.field-hint { font-size: .6875rem; color: var(--muted); margin: .5rem 0 0; }
.button { min-height: 44px; padding: .625rem 1rem; font-weight: 600; font-size: .8125rem; border: 1px solid transparent; border-radius: 4px; transition: background .15s; }
.button.primary { background: var(--accent); color: white; width: 100%; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: var(--surface); border-color: #b4c0b9; }
.button.secondary:hover { background: var(--accent-soft); }
.feedback { font-size: .8125rem; margin: 1rem 0 0; }
.feedback.error { color: var(--danger); }
.scenario-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 1.25rem 0; }
.scenario-footer p { font-size: .8125rem; color: var(--muted); margin: 0; }
.scenario-footer button { flex-shrink: 0; }
.actuals-intro { display: flex; justify-content: space-between; align-items: start; gap: 2rem; margin: 1rem 0; }
.actuals-intro h2 { font-size: 1.5rem; }
.actuals-intro .section-description { margin-bottom: 0; max-width: 38rem; }
.report-notice { margin-bottom: 1.5rem; padding: 1rem 1.25rem; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: .8125rem; line-height: 1.65; }
.report-notice strong { display: block; margin-bottom: .25rem; }
.variance-up { color: var(--danger); font-weight: 650; }
.muted { color: var(--muted); }
.about-demo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 5rem; border-top: 1px solid var(--line); padding-block: 2.5rem; margin-top: 2.5rem; scroll-margin-top: 1rem; }
.about-demo h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.about-demo p { color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.text-link { font-size: .8125rem; font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; }
.demo-boundary { border-left: 1px solid var(--line); padding-left: 2rem; }
.demo-boundary p:last-child { margin-bottom: 0; }
.site-footer { max-width: 1304px; padding: 1.25rem 2rem 2rem; margin: auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; font-size: .6875rem; color: var(--muted); }
.noscript-message { margin: 2rem; padding: 1rem; border: 1px solid var(--danger); }
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .metric { padding-inline: 1rem; }
  .about-demo { gap: 2rem; }
}
@media (max-width: 600px) {
  .site-header { padding: .75rem 1rem; }
  .header-actions a { display: none; }
  .demo-label { max-width: 7rem; line-height: 1.3; font-size: .6875rem; }
  main { padding: 1.5rem 1rem 0; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .period-control { min-width: 0; width: 100%; }
  .temporary-note { width: 100%; margin-left: 0; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 1rem; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric-value { font-size: 1.5rem; }
  .panel { padding: 1.25rem; }
  .section-heading { flex-direction: column; align-items: start; gap: .5rem; margin-bottom: 1rem; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; }
  .responsive-table tr { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { padding: .375rem 0; border: 0; text-align: right; min-height: 2rem; }
  .responsive-table td::before { content: attr(data-label); float: left; color: var(--muted); font-size: .75rem; margin-right: .75rem; }
  .people-table tr.selected { padding-inline: .75rem; margin-inline: -.75rem; }
  .people-table tr.selected td:first-child { padding-left: 0; }
  .people-table td:first-child { text-align: left; padding-bottom: .75rem; }
  .people-table td:first-child::before { content: none; }
  .load-meter { display: none; }
  .capacity-breakdown { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
  .assignment-table td:first-child, .actuals-table td:first-child { text-align: left; font-weight: 600; padding-bottom: .75rem; }
  .assignment-table td:first-child::before, .actuals-table td:first-child::before { content: none; }
  .scenario-footer { align-items: start; flex-direction: column; gap: .75rem; }
  .actuals-intro { flex-direction: column; gap: 1rem; }
  .about-demo { grid-template-columns: 1fr; gap: 1.5rem; }
  .demo-boundary { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .site-footer { padding-inline: 1rem; flex-direction: column; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

textarea { width: 100%; max-width: 100%; font: inherit; padding: .65rem .75rem; border: 1px solid #b4c0b9; border-radius: 4px; background: white; color: var(--ink); resize: vertical; }
.save-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); margin-bottom: 1rem; }
.save-bar p, .action-feedback p { margin: 0; font-size: .8125rem; }
.save-bar .field-hint { margin-top: .35rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.button-row .button.primary { width: auto; }
.action-feedback { display: flex; align-items: center; gap: 1rem; margin-block: .75rem; }
.action-feedback:has(p:empty):has(button[hidden]) { display: none; }
.context-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.context-bar .field { flex: 1; min-width: 180px; margin: 0; max-width: 23rem; }
.compact-panel { margin-top: 1.5rem; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.inline-form .field { margin: 0; }
.entry-record { border-top: 1px solid var(--line); padding-block: 1rem; }
.entry-heading { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; }
.entry-heading span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-heading strong, .forecast-table td:first-child { overflow-wrap: anywhere; min-width: 0; }
.entry-note { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem; line-height: 1.6; }
.entry-record .button, .forecast-table .button { font-size: .75rem; padding-inline: .7rem; }
.forecast-table td { vertical-align: top; }
.forecast-table td:first-child { max-width: 17rem; }
.forecast-table .person-role { white-space: normal; }
.checkbox-label { display: flex; align-items: start; gap: .6rem; font-weight: 400; line-height: 1.5; }
.checkbox-label input { width: 1.1rem; min-height: 1.1rem; margin-top: .15rem; flex-shrink: 0; }
#work-error { margin-bottom: 1rem; padding: 1rem; border: 1px solid currentColor; }
@media (max-width: 900px) {
  .save-bar { align-items: start; flex-direction: column; }
  .forecast-table { font-size: .75rem; }
}
@media (max-width: 600px) {
  .inline-form { grid-template-columns: 1fr; }
  .context-bar .field { max-width: none; }
  .save-bar { padding: 1rem; }
  .action-feedback { flex-wrap: wrap; }
  .forecast-table td:first-child { max-width: none; text-align: left; }
  .forecast-table td:first-child::before { content: none; }
  .forecast-table td:last-child { text-align: left; }
  .forecast-table td:last-child::before { float: none; display: block; }
}
@media (max-width: 400px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.5rem; width: min(38rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; box-shadow: 0 12px 60px #16181b33; }
dialog::backdrop { background: #16181b99; }
dialog h2 { margin-bottom: 1rem; }
dialog p { font-size: .875rem; line-height: 1.65; }
dialog .button-row { justify-content: flex-end; }
.person-name, .person-role, .assignment-table td { overflow-wrap: anywhere; }
