:root {
  color-scheme: light;
  --page: #fff;
  --control: #fff;
  --ink: #183452;
  --body: #202a34;
  --muted: #68737e;
  --line: #b9c3cc;
  --surface: #f3f5f6;
  --focus: #ad5b00;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* The light palette is the original eMed design; dark mode matches the
   timetable service so navigation between the two stays visually continuous. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #26292c;
  --control: #2f3336;
  --ink: #d2d7db;
  --body: #d0d3d6;
  --muted: #a4abb1;
  --line: #6b7278;
  --surface: #383c40;
  --focus: #efbb78;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #26292c;
    --control: #2f3336;
    --ink: #d2d7db;
    --body: #d0d3d6;
    --muted: #a4abb1;
    --line: #6b7278;
    --surface: #383c40;
    --focus: #efbb78;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.breadcrumbs,
.content {
  width: min(100% - 48px, 680px);
  margin-inline: auto;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  transform: translateY(14px);
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  font-size: 17px;
}

.nav-spacer { flex: 1; }

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.theme-toggle { flex: none; }

.crumb {
  display: block;
  min-width: 0;
  max-width: 345px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  text-decoration: underline;
}

.crumb[aria-current="page"] {
  color: var(--body);
  font-weight: 600;
  text-decoration: none;
  cursor: default;
}

.content { padding: 28px 0 64px; }

h2 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.resource-divider {
  max-width: 680px;
  margin: 12px 0 16px;
  border: 0;
  border-top: 1px solid var(--line);
}

.link-list {
  display: grid;
  gap: 10px;
  max-width: 680px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.link-card {
  display: flex;
  min-height: 54px;
  align-items: center;
  border: 2px solid var(--ink);
  padding: 12px 16px;
  background: var(--control);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.link-card:hover { background: var(--surface); }

@media (max-width: 600px) {
  .breadcrumbs,
  .content { width: min(100% - 32px, 960px); }

  .content { padding-top: 24px; }
  .crumb { max-width: 46.5vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
