:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #202b35;
  background: #f5f7f9;
  font-size: 16px;
  --paper: #fff;
  --ink: #202b35;
  --muted: #687480;
  --line: #e0e6eb;
  --accent: #165dce;
  --soft: #eaf2ff;
  --weekend: #f6f8fb;
  --holiday: #a94418;
  --vacation: #266d58;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 48px;
  padding: 10px 15px;
}
a:hover,
button:hover {
  color: var(--accent);
}
button:disabled {
  cursor: default;
  opacity: 0.35;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
header {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  height: 96px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
}
.brand {
  font-size: 1.4rem;
  font-weight: 750;
  display: flex;
  align-items: center;
  letter-spacing: -0.05em;
}
.brand-mark {
  color: var(--accent);
  font-size: 1.9rem;
  margin-right: 10px;
}
.brand-dot {
  color: var(--accent);
}
header button {
  border: none;
  font-size: 1.5rem;
  padding: 5px;
  width: 48px;
}
main {
  max-width: 1136px;
  margin: 20px auto 0;
}
.calendar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 5px 30px #14233c04;
}
.calendar-toolbar {
  padding: 27px 30px 20px;
}
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
h1 {
  margin: 0;
  font-size: 2.1rem;
  letter-spacing: -0.055em;
  font-weight: 650;
}
.month-title {
  padding: 0;
  border: none;
  font: inherit;
  text-transform: capitalize;
  letter-spacing: inherit;
}
.month-title > span:not(.chevron) {
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
}
.chevron {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-left: 16px;
}
.view-switch {
  display: flex;
  padding: 4px;
  background: var(--weekend);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.view-switch a {
  padding: 12px 22px;
  font-size: 0.875rem;
  border-radius: 7px;
}
.view-switch [aria-current] {
  background: var(--paper);
  box-shadow: 0 1px 5px #0001;
  color: var(--accent);
  font-weight: 650;
}
.navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}
.navigation button {
  font-size: 0.875rem;
}
.icon-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
}
.context-label {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 22px;
  isolation: isolate;
}
.month-grid.with-weeks {
  grid-template-columns: 40px repeat(7, minmax(0, 1fr));
}
.weekday {
  padding: 15px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 550;
  border-bottom: 1px solid var(--line);
}
.week-label {
  font-size: 0.65rem;
  align-content: center;
}
.day {
  height: 76px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 1.4rem;
  font-weight: 500;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.day > span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
}
.day.weekend {
  background: var(--weekend);
}
.day.adjacent {
  color: var(--muted);
  opacity: 0.55;
}
.day.today > span {
  background: var(--accent);
  color: white;
  font-weight: 700;
}
/* A remembered calculation date is not an active selection.
   Keyboard focus and hover identify the current cell instead. */
.day.selected > span {
  outline: none;
}
.day.in-range {
  background: var(--soft);
}
.day.holiday > span:after {
  content: "◆";
  position: absolute;
  bottom: 5px;
  font-size: 8px;
  color: var(--holiday);
}
.day.vacation {
  box-shadow: inset 0 -4px var(--vacation);
}
.day.departure {
  border-bottom: 3px dashed var(--vacation);
}
.week {
  border: 0;
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0;
  border-radius: 0;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 22px 32px;
  color: var(--muted);
  font-size: 0.75rem;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.today-key {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.calendar-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 26px;
  border-top: 1px solid var(--line);
}
.calendar-bottom button {
  border: 0;
  font-size: 0.85rem;
  padding: 8px 6px;
}
.calendar-bottom span {
  margin-left: 12px;
  color: var(--muted);
}
.data-status {
  padding: 0 32px 12px;
  color: var(--muted);
  font-size: 0.75rem;
}
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 18px 0 44px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-heading h2 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  font-weight: 550;
}
.section-heading > span {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.tool-links a {
  padding: 24px;
  display: grid;
  grid-template-columns: 35px 1fr 14px;
  gap: 8px;
  position: relative;
}
.tool-links a + a {
  border-left: 1px solid var(--line);
}
.tool-links strong {
  font-size: 0.9rem;
  font-weight: 600;
}
.tool-links a > span:nth-of-type(2) {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 0.75rem;
}
.tool-icon {
  grid-row: 1 / 3;
  font-size: 1.4rem;
  color: var(--accent);
}
.tool-links b {
  grid-column: 3;
  grid-row: 1;
  font-weight: 400;
}
.text-button {
  border: 0;
  color: var(--muted);
  font-size: 0.8rem;
  padding-left: 0;
  margin-top: 10px;
}
footer {
  max-width: 1136px;
  margin: 65px auto 0;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.75rem;
  color: var(--muted);
}
footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-left: 1px solid var(--line);
  padding: 24px 28px calc(32px + env(safe-area-inset-bottom));
  overflow: auto;
  box-shadow: -10px 0 50px #0001;
}
dialog::backdrop {
  background: #17273745;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.panel-head p {
  letter-spacing: 0.18em;
  font-size: 0.65rem;
  color: var(--muted);
}
.panel-head button {
  border: 0;
}
.panel-date {
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-transform: capitalize;
  margin: 15px 0;
}
.eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.07em;
}
.info-row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  line-height: 1.6;
}
.info-row small {
  display: block;
  color: var(--muted);
}
.actions {
  display: grid;
  gap: 10px;
  margin: 25px 0;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.primary:hover {
  color: #fff;
  filter: brightness(0.93);
}
label {
  display: block;
  font-size: 0.875rem;
  margin: 16px 0 6px;
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
  min-width: 0;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  accent-color: var(--accent);
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.4;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.result {
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.65;
  margin: 24px 0 15px;
}
.result strong {
  font-size: 1.5rem;
  display: block;
}
.result p {
  margin: 6px 0;
}
.error {
  color: #b62d26;
}
.fine {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
  padding: 5px 28px 25px;
}
.mini-month {
  break-inside: avoid;
  min-width: 0;
  scroll-margin-top: 12px;
}
.mini-month h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
}
.mini-month h2 a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}
.mini-month h2 span {
  color: var(--muted);
}
.mini {
  padding: 0;
}
.mini.with-weeks {
  grid-template-columns: 22px repeat(7, minmax(0, 1fr));
}
.mini .day {
  height: 30px;
  min-height: 0;
  font-size: 0.75rem;
  padding: 0;
}
.mini .day > span {
  min-width: 22px;
  height: 22px;
}
.mini .weekday {
  font-size: 0.65rem;
  padding: 8px 0;
}
.mini .week {
  font-size: 0.6rem;
}
.mini .day.holiday > span:after {
  bottom: 0;
  font-size: 5px;
}
.month-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 28px 15px;
}
.month-jumps a {
  padding: 12px 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.prose {
  max-width: 760px;
  margin: auto;
  background: var(--paper);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.7;
}
.prose h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin-bottom: 24px;
}
.prose a {
  text-decoration: underline;
  color: var(--accent);
}
.prose li {
  margin-bottom: 12px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.prose td,
.prose th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.prose + .tools {
  margin-top: 40px;
}
.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;
}
.compare-banner {
  background: var(--soft);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.compare-banner button {
  font-size: 0.8rem;
  min-height: 44px;
}
.print-note {
  display: none;
}
[hidden] {
  display: none !important;
}
[data-theme="dark"] {
  --paper: #18222e;
  --ink: #e5ecf4;
  --muted: #a2afbd;
  --line: #354150;
  --accent: #8ab5ff;
  --soft: #223b59;
  --weekend: #1e2b39;
  --holiday: #ffb28c;
  --vacation: #7fc4ac;
  background: #101923;
  color: var(--ink);
  color-scheme: dark;
}
[data-theme="dark"] .primary {
  color: #10233c;
}
@media (max-width: 1199px) {
  main,
  footer {
    margin-left: 32px;
    margin-right: 32px;
  }
}
@media (max-width: 767px) {
  header {
    height: 70px;
    padding: 12px 16px;
  }
  header nav {
    gap: 14px;
  }
  .desktop-link {
    display: none;
  }
  .brand {
    font-size: 1.2rem;
  }
  .brand-mark {
    font-size: 1.6rem;
  }
  main {
    margin: 6px 12px 0;
  }
  .calendar {
    border-radius: 12px;
  }
  .calendar-toolbar {
    padding: 16px 13px 10px;
  }
  h1 {
    font-size: 1.65rem;
  }
  .chevron {
    margin-left: 6px;
  }
  .view-switch a {
    padding: 10px 12px;
  }
  .view-switch {
    padding: 3px;
  }
  .navigation {
    margin-top: 10px;
  }
  .context-label {
    display: none;
  }
  .month-grid {
    padding: 0 7px;
  }
  .month-grid.with-weeks {
    grid-template-columns: 23px repeat(7, minmax(0, 1fr));
  }
  .weekday {
    font-size: 0.7rem;
    padding: 12px 0;
  }
  .week-label {
    font-size: 0.55rem;
  }
  .day {
    height: 55px;
    font-size: 1.12rem;
    padding: 0;
  }
  .day > span {
    min-width: 32px;
    height: 32px;
  }
  .week {
    font-size: 0.65rem;
  }
  .legend {
    padding: 15px 14px;
    gap: 10px 15px;
    font-size: 0.65rem;
  }
  .calendar-bottom {
    padding: 4px 12px;
  }
  .calendar-bottom button {
    font-size: 0.75rem;
  }
  .data-status {
    font-size: 0.65rem;
    padding: 0 14px 10px;
  }
  .hint {
    font-size: 0.7rem;
    margin: 15px 12px 30px;
  }
  .section-heading > span {
    display: none;
  }
  .section-heading h2 {
    font-size: 1.1rem;
  }
  .tools {
    margin: 0 4px;
  }
  .tool-links {
    grid-template-columns: 1fr;
  }
  .tool-links a {
    padding: 21px 18px;
  }
  .tool-links a + a {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  footer {
    margin: 35px 16px 0;
    flex-direction: column;
    line-height: 1.6;
  }
  footer nav {
    gap: 12px 20px;
  }
  .year-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 20px;
    gap: 20px;
  }
  .mini .day {
    height: 34px;
    font-size: 0.85rem;
  }
  .mini .weekday {
    font-size: 0.7rem;
  }
  .month-jumps {
    padding: 0 15px 10px;
  }
  dialog {
    inset: auto 0 0;
    width: 100%;
    height: auto;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    padding: 18px 22px calc(28px + env(safe-area-inset-bottom));
  }
  .panel-head {
    margin-bottom: 14px;
  }
  .prose {
    padding: 22px 18px;
  }
  .prose h1 {
    font-size: 1.6rem;
  }
}
@media (max-width: 350px) {
  main {
    margin-left: 6px;
    margin-right: 6px;
  }
  .calendar-toolbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  h1 {
    font-size: 1.38rem;
  }
  .view-switch a {
    padding: 11px 9px;
    font-size: 0.75rem;
  }
  .day > span {
    min-width: 28px;
    height: 28px;
  }
  .month-grid.with-weeks {
    grid-template-columns: 20px repeat(7, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      color 0.12s,
      background 0.12s;
  }
  dialog[open] {
    animation: enter 0.18s ease-out;
  }
  @keyframes enter {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@page {
  size: A4 portrait;
  margin: 10mm;
}
@media print {
  html,
  body {
    background: white !important;
    color: black !important;
    font-size: 10pt;
  }
  header,
  footer,
  .tools,
  .hint,
  .calendar-toolbar .navigation,
  .view-switch,
  .month-jumps,
  .calendar-bottom,
  .data-status,
  dialog,
  .compare-banner {
    display: none !important;
  }
  main {
    max-width: none;
    margin: 0 !important;
  }
  .calendar {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    break-inside: avoid;
  }
  .calendar-toolbar {
    padding: 0 0 10mm;
  }
  .month-title {
    color: black !important;
  }
  .chevron {
    display: none;
  }
  .month-grid {
    padding: 0;
  }
  .day {
    height: 20mm;
    color: black !important;
  }
  .day.today > span {
    background: transparent !important;
    color: black !important;
    outline: 2px solid black;
  }
  .day.selected > span {
    outline: 0;
  }
  .day.holiday > span:after {
    color: black !important;
  }
  .day.vacation {
    box-shadow: none;
    border-bottom: 3px solid black;
  }
  .day.departure {
    border-bottom: 3px dashed black;
  }
  .day.weekend {
    background: none;
  }
  .day.adjacent {
    opacity: 0.45;
  }
  .legend {
    padding: 5mm 0;
    color: black;
  }
  .print-note {
    display: block;
    font-size: 8pt;
    line-height: 1.4;
  }
  .year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5mm;
    padding: 0;
  }
  .mini-month h2 {
    margin: 0 0 2mm;
    font-size: 10pt;
  }
  .mini-month h2 a {
    min-height: 0;
  }
  .mini-month h2 span {
    display: none;
  }
  .mini .day {
    height: 6.3mm;
    min-height: 0;
    font-size: 8pt;
  }
  .mini .day > span {
    height: 5mm;
    min-width: 5mm;
  }
  .mini .weekday {
    padding: 1mm 0;
    font-size: 6pt;
  }
  .mini .week {
    font-size: 6pt;
  }
  .calendar:has(.year-grid) .calendar-toolbar {
    padding-bottom: 4mm;
  }
  .calendar:has(.year-grid) .legend {
    padding: 3mm 0;
  }
  .large-year .year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .large-year .calendar {
    break-inside: auto;
  }
  .large-year .mini .day {
    height: 9mm;
  }
  .monochrome * {
    color: black !important;
    background: transparent !important;
  }
}

/* Preserve comfortable text and controls when browser text is enlarged. */
@media (max-width: 767px) {
  .legend,
  .data-status {
    font-size: 0.75rem;
  }
  .calendar-bottom button {
    font-size: 0.875rem;
  }
  .hint {
    font-size: 0.75rem;
  }
}
.sr-only:focus {
  position: fixed;
  z-index: 99;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px;
  background: var(--paper);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 20px;
  min-width: 0;
}
summary {
  cursor: pointer;
  padding: 14px 0;
}
.prose {
  overflow-wrap: anywhere;
}
.ad-slot {
  min-height: 100px;
  margin: 20px 0;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
@media print {
  .ad-slot {
    display: none !important;
  }
}

@media (max-width: 767px) {
  header {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    gap: 0 12px;
  }
  header nav {
    margin-left: auto;
  }
  .month-grid.with-weeks {
    grid-template-columns: max(23px, 1em) repeat(7, minmax(0, 1fr));
  }
  .day {
    font-size: 1rem;
    height: max(55px, 2.5rem);
  }
  .tool-links a {
    grid-template-columns: 1.8rem 1fr 1rem;
    gap: 8px 12px;
  }
  .title-row {
    align-items: flex-start;
  }
  .navigation {
    flex-wrap: wrap;
  }
}
@media print {
  .landscape .year-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .landscape.large-year .year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print {
  .landscape:not(.large-year) .mini .day {
    height: 5mm;
  }
  .landscape:not(.large-year) .mini .weekday {
    padding: 0.8mm 0;
  }
}

.month-notes {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.place-choice {
  max-width: 440px;
  margin-bottom: 28px;
}
.place-choice label {
  display: block;
  font-weight: 650;
  margin-bottom: 10px;
}
.place-choice select {
  width: 100%;
  min-height: 44px;
}
.month-notes h2 {
  font-size: 1.25rem;
}
.event-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.event-list li + li {
  border-top: 1px solid var(--line);
}
.event-list button {
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 16px 0;
  border: 0;
  background: transparent;
  min-height: 56px;
}
.event-list time {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.event-list button > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.event-list small {
  display: block;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 4px;
}
.day {
  position: relative;
}
.cell-event {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0 3px;
}
@media (max-width: 600px) {
  .month-notes {
    padding: 18px;
  }
  .cell-event {
    font-size: 0;
    height: 4px;
    width: 4px;
    border-radius: 50%;
    background: currentColor;
    position: absolute;
    bottom: 7px;
    left: calc(50% - 2px);
    padding: 0;
  }
}
@media print {
  .month-notes {
    display: none !important;
  }
  .cell-event {
    display: none;
  }
}

.search-content {
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.65;
}
.search-content h2 {
  font-size: 1.3rem;
}
.search-content a,
.prose nav a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.search-content nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-left: 20px;
}
.school-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.school-table {
  overflow-x: auto;
}
.school-table th,
.school-table td {
  text-align: left;
  min-width: 140px;
}
.school-table caption {
  text-align: left;
  margin-bottom: 12px;
}
@media print {
  .search-content {
    display: none !important;
  }
}

@media (max-width: 430px) {
  header {
    gap: 8px;
  }
  .brand {
    font-size: 1.1rem;
    flex-shrink: 1;
  }
  .brand-mark {
    margin-right: 6px;
    font-size: 1.5rem;
  }
  header nav {
    gap: 6px;
    flex-shrink: 0;
  }
}

.print-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 650;
  margin-left: auto;
}
.print-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.print-fields > div {
  min-width: 0;
}
.print-config label {
  display: block;
  margin-top: 16px;
}
.print-config .check {
  display: flex;
}
.print-config select,
.print-config input[type="number"] {
  width: 100%;
  min-height: 48px;
}
.print-coverage {
  border-left: 3px solid var(--accent);
  padding: 12px;
  background: var(--soft);
  line-height: 1.5;
  font-size: 0.9rem;
}
.print-location {
  display: none;
}
@media (max-width: 600px) {
  .print-cta {
    width: 100%;
    margin: 8px 0 0;
  }
  .print-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media print {
  .print-cta,
  .print-landing {
    display: none !important;
  }
  .print-location {
    display: block;
    font-size: 9pt;
    margin: 2mm 0;
  }
}

@media print {
  .event-key {
    display: none !important;
  }
  body:not(.monochrome) .day.vacation,
  body:not(.monochrome) .day.departure {
    border-bottom-color: var(--vacation);
  }
  body:not(.monochrome) .day.holiday > span:after {
    color: var(--holiday) !important;
  }
  body:not(.monochrome) .day.today > span {
    outline-color: var(--accent);
  }
}

/* Consent control occupies its own space and never covers calendar buttons. */
#analytics-choice { max-width: 960px; margin: 20px auto; padding: 20px; border: 1px solid #bccbd4; border-radius: 12px; }
#analytics-choice p { margin: 0 0 12px; }
#analytics-choice > div { display: flex; gap: 12px; flex-wrap: wrap; }
#analytics-choice button { min-height: 44px; padding: 10px 24px; cursor: pointer; }
@media print { #analytics-choice, #analytics-settings { display: none !important; } }

/* Published brand asset, with intrinsic dimensions to reserve its space. */
.brand { flex-shrink: 0; }
.brand-logo { display: block; width: 280px; height: auto; }
[data-theme="dark"] .brand-logo { background: #fff; border-radius: 8px; }
@media (max-width: 767px) { .brand-logo { width: 210px; } }
@media (max-width: 430px) { .brand-logo { width: 180px; } }
.residence-search{padding:16px;border:1px solid var(--line,#cbd5df);border-radius:12px;margin:16px 0;background:var(--soft,#f4f7fb)}
.residence-input{display:flex;gap:8px}.residence-input input{min-width:0;flex:1}#residence-results{max-height:240px;overflow:auto}#residence-results button{display:block;width:100%;text-align:left;margin:6px 0;padding:10px}
#print-preview-section iframe{display:block;width:100%;height:780px;border:1px solid #cbd5df;background:#e8edf2;margin:16px 0}
@media(max-width:600px){.residence-input{flex-direction:column}#print-preview-section iframe{height:520px}}
@media print{#print-preview-section{display:none!important}}

/* Clear calendar rhythm and holiday bands, without changing cell geometry. */
:root { --vacation-fill: #e4f4ee; --vacation-weekend: #d4ece3; --grid-rule: #ccd6df; }
[data-theme="dark"] { --vacation-fill: #173d34; --vacation-weekend: #204d40; --grid-rule: #425667; }
.vacation-key,.departure-key { display:inline-block;width:24px;height:6px;border-radius:3px;background:var(--vacation); }
.departure-key { background:repeating-linear-gradient(90deg,var(--vacation) 0 4px,transparent 4px 7px); }
@media screen {
  .calendar { box-shadow: 0 8px 28px #17334a06; }
  .weekday { color:var(--ink); font-weight:650;border-bottom:2px solid var(--grid-rule); }
  .day { border-bottom:1px solid var(--grid-rule);font-weight:600; }
  .day.weekend:not(.vacation):not(.departure) { background:var(--weekend); }
  .day.vacation,.day.departure { background:var(--vacation-fill);box-shadow:none;border-bottom:1px solid var(--grid-rule); }
  .day.vacation.weekend,.day.departure.weekend { background:var(--vacation-weekend); }
  .day.vacation::after,.day.departure::after { content:"";position:absolute;left:1px;right:1px;bottom:4px;height:6px;border-radius:3px;background:var(--vacation);pointer-events:none; }
  .day.departure::after { background:repeating-linear-gradient(90deg,var(--vacation) 0 5px,transparent 5px 8px); }
  .day.vacation > span,.day.departure > span { transform:translateY(-3px); }
  .day.holiday > span::after { top:6px;right:5px;bottom:auto;font-size:8px; }
  .day .cell-event { margin-bottom:7px; }
  .day.adjacent.vacation,.day.adjacent.departure { opacity:1;color:var(--muted); }
  .day.in-range { outline:2px solid var(--accent);outline-offset:-2px; }
  .day:focus-visible { z-index:2;outline:3px solid var(--accent);outline-offset:-3px; }
  .day:hover { outline:2px solid var(--accent);outline-offset:-2px; }
  .mini .day.vacation::after,.mini .day.departure::after { height:3px;bottom:1px;border-radius:2px; }
  .mini .day.holiday > span::after { top:2px;right:1px;font-size:5px; }
  .mini .day.vacation > span,.mini .day.departure > span { transform:translateY(-1px); }
  .legend { color:var(--ink);gap:12px 20px; }
}
@media screen and (max-width:600px) { .day .cell-event { bottom:13px;margin:0; } }
@media print { .vacation-key { background:none;border-bottom:3px solid black;border-radius:0; } .departure-key { background:none;border-bottom:3px dashed black;border-radius:0; } }
@media screen { [data-theme="dark"] .print-cta,[data-theme="dark"] .day.today > span { color:#10233c; } }
