:root {
  --ink: #111111;
  --muted: #62666f;
  --line: #d9dce2;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --blue: #002fa7;
  --blue-soft: #e9efff;
  --header-background: rgba(255, 255, 255, 0.96);
  --input-border: #858991;
  --bar-track: #e2e4e8;
  --button-ink: #ffffff;
  --button-hover: #002782;
  --max-width: 1180px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f6fa;
  --muted: #b4bfce;
  --line: #3a4658;
  --surface: #101721;
  --surface-soft: #182332;
  --blue: #7ea8ff;
  --blue-soft: #1c3353;
  --header-background: rgba(16, 23, 33, 0.96);
  --input-border: #66748a;
  --bar-track: #344050;
  --button-ink: #071323;
  --button-hover: #9ab9ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, select { font: inherit; }
a { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--blue);
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header-background);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}
.brand-mark { width: 18px; height: 18px; background: var(--blue); }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 26px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.theme-toggle::before {
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  content: "";
}
.theme-toggle[aria-pressed="true"]::before { background: var(--blue); }

main { overflow: hidden; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  min-height: 540px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
  border-right: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.3rem, 7.8vw, 6.8rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.9;
}
.hero-intro {
  max-width: 600px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.person-picker {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--surface-soft);
}
.picker-label {
  margin: 0 0 12px;
  font-weight: 700;
}
.select-wrap { position: relative; }
.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}
select {
  width: 100%;
  min-height: 56px;
  padding: 0 48px 0 18px;
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 47, 167, 0.3); outline-offset: 3px; }
.quick-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 126px;
  margin-top: 20px;
  padding: 22px;
  border-left: 5px solid var(--blue);
  background: var(--blue);
  color: #fff;
}
.quick-result strong { font-size: 1.35rem; line-height: 1.2; }
.quick-result > span:last-child { color: #dce5ff; }
.quick-kicker { margin-bottom: 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
  border: 1px solid var(--line);
}
.overview article {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 128px;
  padding: 26px 34px;
  border-right: 1px solid var(--line);
}
.overview article:last-child { border-right: 0; }
.overview-number { color: var(--blue); font-size: 2.4rem; font-weight: 600; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.overview article div { display: flex; flex-direction: column; }
.overview article div span { color: var(--muted); font-size: 0.88rem; }

.section { max-width: var(--max-width); margin: 0 auto; padding: 112px 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}
h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.95; }
.view-switch { display: flex; border: 1px solid var(--ink); }
.view-button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}
.view-button:last-child { border-right: 0; }
.view-button.is-active { background: var(--ink); color: #fff; }
.filter-status { min-height: 24px; margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; }
.weekend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.week-card { padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 22px; }
.week-number { color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.week-card h3 { margin: 4px 0 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.week-card.is-next { box-shadow: inset 5px 0 0 var(--blue); }
.current-label { padding: 5px 8px; background: var(--blue-soft); color: var(--blue); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.shift-list { display: grid; gap: 0; }
.shift {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) minmax(110px, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid var(--line);
}
.shift-time { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.shift-person { font-weight: 700; }
.shift.is-highlighted { margin: 0 -12px; padding: 0 12px; background: var(--blue-soft); color: var(--blue); }
.shift.is-muted { opacity: 0.22; }

.weekday-intro { max-width: 660px; margin-bottom: 30px; color: var(--muted); }
.weekday-list { border-top: 1px solid var(--line); }
.weekday-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 0.8fr) minmax(220px, 1.5fr) minmax(110px, 0.6fr);
  gap: 20px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}
.person-initial { display: grid; width: 32px; height: 32px; place-items: center; background: var(--blue); color: #fff; font-size: 0.78rem; font-weight: 700; }
.weekday-person { font-weight: 700; }
.weekday-time { font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.weekday-note { color: var(--muted); font-size: 0.84rem; }
.hours-summary { margin-top: 68px; padding: 34px; background: var(--surface-soft); }
.hours-summary h3 { margin: 0 0 26px; font-size: 1.35rem; }
.hours-bar-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 18px; align-items: center; margin: 14px 0; }
.hours-bar-row strong { font-size: 0.88rem; }
.bar-track { height: 8px; background: var(--bar-track); }
.bar-fill { height: 100%; background: var(--blue); }
.hours-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.rules-section { max-width: none; padding: 112px max(24px, calc((100vw - var(--max-width)) / 2)); background: var(--ink); color: #fff; }
.rules-heading { max-width: var(--max-width); margin-right: auto; margin-left: auto; }
.rules-heading > p { max-width: 390px; margin: 0; color: #b5b8c0; }
.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: var(--max-width); margin: 0 auto; border-top: 1px solid #363636; border-left: 1px solid #363636; }
.rule-card { min-height: 280px; padding: 34px; border-right: 1px solid #363636; border-bottom: 1px solid #363636; }
.rule-card-featured { background: var(--blue); }
.rule-index { color: #b5b8c0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; }
.rule-card-featured .rule-index { color: #dce5ff; }
.rule-card h3 { max-width: 460px; margin: 46px 0 16px; font-size: 1.65rem; letter-spacing: -0.035em; }
.rule-card p { max-width: 570px; margin: 0; color: #c8cad0; }
.rule-card-featured p { color: #fff; }
.rule-card ul { margin: 22px 0 0; padding-left: 18px; color: #c8cad0; }
.rule-card li { margin: 7px 0; }

.help-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; max-width: var(--max-width); margin: 0 auto; padding: 54px 0; border-bottom: 1px solid var(--line); }
.help-strip p { margin: 0; }
.help-strip a { color: var(--blue); font-weight: 700; }
footer { display: flex; justify-content: space-between; gap: 20px; max-width: var(--max-width); margin: 0 auto; padding: 34px 0 48px; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; border-right: 0; border-left: 0; }
  .hero-copy { padding: 72px 28px 48px; border-right: 0; border-bottom: 1px solid var(--line); }
  .person-picker { padding: 36px 28px; }
  .overview { margin: 0; border-right: 0; border-left: 0; }
  .overview article { padding: 22px; }
  .section { padding: 86px 24px; }
  .rules-section { padding: 86px 24px; }
  .help-strip, footer { margin: 0 24px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 60px; padding: 0 18px; }
  .site-header nav { gap: 16px; }
  .brand span:last-child { font-size: 0.92rem; }
  .hero-copy { padding: 54px 20px 38px; }
  h1 { font-size: clamp(3.1rem, 17vw, 5.1rem); }
  .hero-intro { margin-top: 26px; }
  .person-picker { padding: 28px 20px; }
  .overview { grid-template-columns: 1fr; }
  .overview article { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--line); }
  .overview article:last-child { border-bottom: 0; }
  .section { padding: 72px 18px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 32px; }
  .view-switch, .view-button { width: 100%; }
  .weekend-grid { grid-template-columns: 1fr; }
  .week-card { padding: 24px 20px; }
  .weekday-row { grid-template-columns: 34px 1fr; gap: 8px 14px; padding: 16px 0; }
  .weekday-time, .weekday-note { grid-column: 2; }
  .hours-summary { margin: 46px -18px 0; padding: 28px 18px; }
  .hours-bar-row { grid-template-columns: 84px 1fr 42px; gap: 10px; }
  .rules-section { padding: 72px 18px; }
  .rules-grid { grid-template-columns: 1fr; }
  .rule-card { min-height: auto; padding: 28px 24px 34px; }
  .rule-card h3 { margin-top: 30px; }
  .help-strip { align-items: flex-start; flex-direction: column; margin: 0 18px; padding: 42px 0; }
  footer { flex-direction: column; margin: 0 18px; padding-bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.site-header {
  position: static;
  min-height: 58px;
}
.hero {
  display: block;
  min-height: auto;
  padding: 0 28px;
  border: 0;
}
.hero-copy {
  padding: 48px 0 12px;
  border: 0;
}
h1 {
  max-width: none;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
}
.hero-intro {
  margin: 16px 0 0;
  font-size: 0.96rem;
}
.person-picker {
  display: block;
  max-width: 500px;
  padding: 16px 0 42px;
  background: var(--surface);
}
.person-picker select {
  min-height: 48px;
  border: 1px solid var(--input-border);
  font-weight: 500;
}
.quick-result {
  min-height: 0;
  margin-top: 14px;
  padding: 12px 16px;
  border: 0;
  background: var(--blue-soft);
  color: var(--ink);
}
.quick-result strong { font-size: 1rem; }
.quick-result > span:last-child { color: var(--muted); }
.quick-kicker { color: var(--blue); font-size: 0.68rem; }
.overview { display: none; }
.section {
  padding: 34px 28px 96px;
}
.section-heading {
  align-items: center;
  margin-bottom: 28px;
}
h2 { font-size: clamp(1.75rem, 2.7vw, 2.5rem); }
.section-heading .eyebrow { display: none; }
.view-switch {
  gap: 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.view-button {
  min-height: 46px;
  padding: 0 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.view-button.is-active {
  border-bottom-color: var(--blue);
  background: var(--surface);
  color: var(--blue);
}
.filter-status { margin-bottom: 4px; }
.copy-instruction {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
}
.weekend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border: 0;
}
.week-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.week-card.is-next { box-shadow: none; }
.week-card-header { min-height: 72px; padding-bottom: 12px; }
.week-card h3 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  line-height: 1.16;
}
.week-number {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}
.shift-list { flex: 1; }
.shift {
  grid-template-columns: 1fr auto;
  gap: 10px;
  min-height: 53px;
}
.shift-time { font-size: 0.79rem; }
.shift-person {
  font-size: 0.86rem;
  text-align: right;
}
.card-actions { padding-top: 16px; }
.copy-image-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: var(--blue);
  color: var(--button-ink);
  cursor: pointer;
  font-weight: 700;
}
.copy-image-button:hover { background: var(--button-hover); }
.copy-status {
  display: block;
  min-height: 1.35em;
  margin-top: 8px;
  color: var(--blue);
  font-size: 0.78rem;
}
.weekday-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  border: 0;
}
.weekday-person-card {
  padding: 22px;
  border: 1px solid var(--line);
}
.weekday-person-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
}
.weekday-person-heading h3 { margin: 0; font-size: 1.35rem; }
.weekday-person-heading strong { color: var(--blue); font-size: 0.8rem; }
.weekday-day {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  min-height: 43px;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.weekday-day span { color: var(--muted); }
.weekday-day strong { font-variant-numeric: tabular-nums; }
.hours-summary { margin-top: 28px; }
.rules-section {
  background: var(--surface);
  color: var(--ink);
}
.rules-heading > p { color: var(--muted); }
.rules-grid {
  border-top-color: var(--line);
  border-left-color: var(--line);
}
.rule-card,
.rule-card-featured {
  min-height: 230px;
  border-right-color: var(--line);
  border-bottom-color: var(--line);
  background: var(--surface);
}
.rule-card h3 { margin-top: 24px; }
.rule-card-featured h3 { color: var(--blue); }
.rule-card p,
.rule-card-featured p,
.rule-card ul { color: var(--muted); }
.rule-index,
.rule-card-featured .rule-index { color: var(--blue); }

@media (max-width: 900px) {
  .hero { padding: 0 24px; }
  .hero-copy { padding: 36px 0 12px; }
  .person-picker { padding: 12px 0 28px; }
  .section { padding: 34px 24px 76px; }
  .weekend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .site-header nav { display: none; }
  .header-actions { gap: 0; }
  .hero { padding: 0 18px; }
  .hero-copy { padding-top: 30px; }
  .person-picker { padding-bottom: 18px; }
  .section { padding: 30px 18px 60px; }
  .section-heading { align-items: flex-start; }
  .view-switch { width: 100%; gap: 14px; }
  .view-button { width: auto; }
  .weekend-grid,
  .weekday-list { grid-template-columns: 1fr; }
  .week-card { padding: 16px; }
  .shift-time { font-size: 0.84rem; }
}
