:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #f3f5f7;
  --ink: #121a23;
  --muted: #4a5563;
  --border: #d5dae0;
  --control-border: #7c8896;
  --blue: #1d4e89;
  --blue-deep: #163c69;
  --focus: #f2b705;
  --green: #1e6b3a;
  --red: #b3261e;
  --late-background: #fdf3f2;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem / 1.5 "Segoe UI", system-ui, sans-serif;
}

h1, h2, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; }
h2 { font-size: 1.2rem; line-height: 1.3; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
button, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.frame {
  width: min(100%, 76rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3.25vw, 2rem);
}

.skip { position: absolute; top: 0.75rem; left: 1rem; z-index: 1; padding: 0.5rem; background: var(--paper); }
.skip:not(:focus) { clip-path: inset(50%); }
.site-header { border-top: 4px solid var(--blue-deep); border-bottom: 1px solid var(--border); }
.masthead, .nav-content, .page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.masthead { min-height: 4.75rem; padding-block: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand strong, .brand div > span, .identity strong, .identity span { display: block; }
.brand strong { font-size: 1.12rem; line-height: 1.25; }
.brand div > span, .identity span, .environment { color: var(--muted); font-size: 0.875rem; }
.brand-mark {
  display: grid;
  place-content: center;
  gap: 4px;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--blue);
}
.brand-mark i { display: block; width: 1rem; height: 2px; background: var(--paper); }
.brand-mark i:last-child { width: 0.65rem; }
.environment { padding: 0.25rem 0.65rem; border: 1px solid var(--border); border-radius: var(--radius); }
.nav { border-top: 1px solid var(--border); background: var(--surface); }
.nav-link, .text-button { display: inline-flex; align-items: center; min-height: 2.75rem; }
.nav-link { text-decoration: none; border-bottom: 3px solid transparent; font-weight: 600; }
.nav-link[aria-current] { border-bottom-color: var(--blue); }
.nav-link:hover { text-decoration: underline; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--blue); text-decoration: underline; }

.content { flex: 1; padding-block: 2rem 3rem; }
.back { display: inline-block; margin-bottom: 1rem; }
.page-head { align-items: flex-start; margin-bottom: 1.5rem; }
.page-head p, .content > h1 + p { margin-top: 0.5rem; color: var(--muted); }
.content > p + a { display: inline-block; margin-top: 0.75rem; }
.identity { padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.identity strong { font-size: 0.92rem; }
.demo-grid, .case-grid { display: grid; gap: 1.25rem; }
.demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.panel { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); }
.demo-office form { display: grid; gap: 0.5rem; margin-top: 1rem; }
.demo-office label { font-weight: 600; }
select, .primary-button { min-height: 2.75rem; border-radius: var(--radius); padding: 0.5rem 0.75rem; }
select { width: 100%; border: 1px solid var(--control-border); background: var(--paper); color: var(--ink); }
.primary-button { justify-self: start; margin-top: 0.5rem; border: 1px solid var(--blue); color: var(--paper); background: var(--blue); font-weight: 600; }
.primary-button:hover { background: var(--blue-deep); }

.timeline { margin: 1rem 0 0 0.35rem; padding: 0 0 0 1.2rem; list-style: none; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding-bottom: 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  position: absolute;
  top: 0.42rem;
  left: -1.58rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}
.timeline strong, .timeline span, .timeline time, .relative-date { display: block; }
.timeline span, .relative-date { color: var(--muted); font-size: 0.875rem; }
.case-summary { background: var(--surface); }
.open-case { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 0.25rem; font-weight: 600; }
dl { margin: 0.6rem 0 0; }
dl > div { display: grid; grid-template-columns: minmax(0, 6.5rem) 1fr; gap: 0.5rem; padding-block: 0.55rem; border-top: 1px solid var(--border); }
dt { color: var(--muted); }
dd { margin: 0; }
time { font-variant-numeric: tabular-nums; }

table { width: 100%; table-layout: fixed; border-collapse: collapse; }
caption { padding-block: 0 0.55rem; text-align: left; font-weight: 600; }
td, th { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; vertical-align: top; text-align: left; }
thead th { background: var(--surface); color: var(--muted); font-size: 0.875rem; font-weight: 600; }
tbody th { font-weight: 600; }
.status { color: var(--blue-deep); }
.status::before { display: inline-block; width: 0.42em; height: 0.42em; margin-inline-end: 0.45em; border: 1px solid currentColor; border-radius: 50%; vertical-align: 0.14em; content: ""; }
.status-complete { color: var(--green); }
.late-row { background: var(--late-background); }
.late-row th { box-shadow: inset 3px 0 var(--red); }
.overdue { color: var(--red); font-weight: 600; }
.site-footer { padding-block: 0.65rem; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.875rem; }

@media (max-width: 44rem) {
  .demo-grid, .case-grid { grid-template-columns: minmax(0, 1fr); }
  td, th { padding-inline: 0.45rem; font-size: 0.875rem; }
}

h3 { margin: 0; font-size: 1rem; }
.stack { display: grid; gap: 1.25rem; }
.muted { color: var(--muted); }
.panel > .muted { margin-top: 0.5rem; }
.recorded { color: var(--green); }
.criteria-list { padding-inline-start: 1.25rem; }
.workflow-actions { margin-top: 0.75rem; }
.work-grid, .hr-events { margin-top: 1.25rem; }
.field-form { display: grid; gap: 0.65rem; margin-block: 0.75rem; }
.field { display: grid; gap: 0.25rem; min-width: 0; }
.field label { font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}
.field textarea { resize: vertical; }
.date-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 0.65rem; }
.record-list { margin: 0.65rem 0 0; padding: 0; list-style: none; }
.record-list li { padding-block: 0.5rem; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.record-list li:last-child { padding-bottom: 0; }
.note-body { margin-top: 0.25rem; white-space: pre-wrap; }
.hr-reminders, .notifications { margin-bottom: 1.25rem; }
.stack .notifications { margin-bottom: 0; }
.notifications { background: var(--surface); }
.section-heading, .overdue-group { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 0.5rem 1rem; }
.overdue-group { margin-top: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.overdue-group ul { margin: 0.35rem 0; padding-inline-start: 1.25rem; }
.secondary-button {
  min-height: 2.75rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--blue-deep);
  font-weight: 600;
}
.secondary-button:hover { background: var(--surface); }
.notice { margin-bottom: 1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--green); background: var(--surface); }
