:root {
  color-scheme: light;
  --background: #f4f7f7;
  --surface: #ffffff;
  --surface-soft: #eef4f1;
  --ink: #17222b;
  --muted: #5e6c77;
  --line: #d8e1e1;
  --navy: #0c2f4d;
  --teal: #0d7c75;
  --teal-soft: #d9f0ed;
  --amber: #f2ad3b;
  --amber-soft: #fff2d8;
  --shadow: 0 18px 45px rgba(12, 47, 77, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--background);
  color: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 28px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(12, 47, 77, 0.96), rgba(13, 124, 117, 0.9)),
    var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.hero__mark svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.hero__label,
.section-heading p,
.summary-card span {
  margin: 0;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero__label {
  color: var(--amber);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero__summary {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.5;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary-card span {
  color: var(--muted);
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
}

.summary-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.summary-card--next {
  background: var(--amber-soft);
  border-color: #f4d39a;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.segment,
.download-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 750;
}

.segment {
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
}

.segment:hover,
.segment:focus-visible {
  color: var(--navy);
  background: var(--surface-soft);
}

.segment.is-active {
  color: #ffffff;
  background: var(--teal);
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--navy);
}

.download-button:hover,
.download-button:focus-visible {
  background: #164565;
}

.download-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.agenda-section,
.calendar-section {
  margin-top: 28px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading p {
  color: var(--teal);
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.agenda-list {
  display: grid;
  gap: 10px;
}

.shift-card {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  background: var(--surface);
}

.shift-card.is-afternoon {
  border-left-color: var(--amber);
}

.shift-date {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 96px;
  font-weight: 800;
}

.shift-date strong {
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1;
}

.shift-date span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.83rem;
  text-transform: capitalize;
}

.shift-body h3 {
  margin-bottom: 3px;
  font-size: 1rem;
  line-height: 1.25;
}

.shift-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.shift-badge {
  display: inline-grid;
  place-items: center;
  min-width: 86px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #07534e;
  background: var(--teal-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.shift-card.is-afternoon .shift-badge {
  color: #7a4a00;
  background: var(--amber-soft);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar__weekday,
.calendar__day {
  min-height: 92px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar__weekday:nth-child(7n),
.calendar__day:nth-child(7n) {
  border-right: 0;
}

.calendar__weekday {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: #ffffff;
  background: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar__day {
  position: relative;
  padding: 10px;
  background: #ffffff;
}

.calendar__day.is-empty {
  background: #f7faf9;
}

.calendar__number {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.calendar__pill {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #07534e;
  background: var(--teal-soft);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
}

.calendar__day.is-afternoon .calendar__pill {
  color: #7a4a00;
  background: var(--amber-soft);
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero__mark {
    width: 58px;
    height: 58px;
  }

  .hero__mark svg {
    width: 34px;
    height: 34px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .download-button {
    width: 100%;
  }

  .download-button {
    justify-content: center;
  }

  .shift-card {
    grid-template-columns: 1fr auto;
  }

  .shift-date {
    grid-column: 1 / -1;
  }

  .calendar {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.2rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .shift-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shift-badge {
    width: fit-content;
  }
}
