/* Responsive */
@media (max-width: 1100px) {
  .content-grid--contacts {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
  }
  .content-grid--contacts .sticky-panel {
    position: static;
  }
  .content-grid--contacts .primary-contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-grid,
  .portal-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-tile {
    min-height: 180px;
    padding: 20px;
  }
  .portal-tile__top {
    margin-bottom: 20px;
  }
  .portal-tile__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .portal-tile h3 {
    font-size: 1.05rem;
  }
  .portal-tile__meta {
    margin-bottom: 12px;
    font-size: 0.84rem;
  }
}
@media (max-width: 900px) {
  .section {
    padding-block: 58px;
  }
  .content-grid,
  .content-grid--contacts {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .sticky-panel {
    position: static;
  }
  .primary-contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-grid,
  .portal-grid,
  .portal-grid--featured,
  .notice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .info-strip__item:nth-child(2) {
    border-right: 0;
  }
  .info-strip__item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .portal-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
  }
  .year-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
  }
  .portal-status {
    grid-column: 2;
    grid-row: 1;
  }
  .year-button {
    flex: 1 1 auto;
  }
}
@media (max-width: 680px) {
  :root {
  }
  .container,
  .narrow {
    width: min(100% - 28px, var(--container));
  }
  .page-hero__inner,
  .portal-hero .page-hero__inner {
    min-height: 460px;
    padding-block: 62px 74px;
  }
  .page-hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.7rem);
  }
  .page-hero__lead {
    font-size: 1.03rem;
  }
  .quick-links {
    gap: 7px;
  }
  .quick-link {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.8rem;
  }
  .contact-card--person {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 13px;
  }
  .contact-photo--directory,
  .contact-avatar {
    width: 62px;
    height: 78px;
  }
  .section-header,
  .portal-section__header {
    align-items: flex-start;
    flex-direction: column;
  }
  .feature-grid,
  .notice-grid,
  .contact-cards,
  .primary-contact-list {
    grid-template-columns: 1fr;
  }
  .content-grid--contacts .primary-contact-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .info-strip {
    grid-template-columns: 1fr;
  }
  .info-strip__item,
  .info-strip__item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .info-strip__item:last-child {
    border-bottom: 0;
  }
  .contact-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .filter-select {
    width: 100%;
  }
  .contact-alphabet { margin-top: -10px; }
  .contact-alphabet__button,
  .contact-alphabet__arrow { min-height: 44px; }
  .portal-search {
    grid-template-columns: 1fr;
    padding: 7px;
    border-radius: 20px;
  }
  .portal-search .search-field input,
  .portal-search .button {
    border-radius: 14px;
  }
  .portal-controls-wrap {
    margin-top: -34px;
  }
  .portal-controls {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }
  .year-switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-radius: 16px;
  }
  .year-button {
    min-width: 0;
    border-radius: 12px;
    white-space: nowrap;
  }
  .year-button[data-year-filter="all"] {
    grid-column: span 2;
  }
  .portal-status {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    text-align: left;
  }
  .portal-grid,
  .portal-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .map-card iframe {
    height: 360px;
  }
  .map-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }
}
.portal-grid--compact .portal-tile {
  min-height: 150px;
  padding: 16px;
}

.portal-grid--compact .portal-tile__top {
  margin-bottom: 14px;
}

.portal-grid--compact .portal-tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.portal-grid--compact .portal-tile__icon svg {
  width: 21px;
  height: 21px;
}

.portal-grid--compact .portal-tile__tag {
  min-height: 24px;
  padding-inline: 8px;
  font-size: 0.62rem;
}

.portal-grid--compact .portal-tile__meta {
  display: none;
}

.portal-grid--compact .portal-tile h3 {
  margin-bottom: 12px;
  font-size: 0.96rem;
  line-height: 1.25;
}

.portal-grid--compact .portal-tile__arrow {
  font-size: 0.76rem;
  line-height: 1.3;
}

/* Keep phone tiles compact after rotation, using the portrait tile dimensions. */
@media (max-width: 680px), (max-width: 1100px) and (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  .portal-tile {
    min-height: 150px;
    padding: 16px;
  }
  .portal-tile__top {
    margin-bottom: 14px;
  }
  .portal-tile__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .portal-tile__icon svg {
    width: 21px;
    height: 21px;
  }
  .portal-tile__tag {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 0.62rem;
  }
  .portal-tile__meta {
    display: none;
  }
  .portal-tile h3 {
    margin-bottom: 12px;
    font-size: 0.96rem;
    line-height: 1.25;
  }
  .portal-tile__arrow {
    font-size: 0.76rem;
    line-height: 1.3;
  }
}
@media (max-width: 1100px) and (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  .portal-grid,
  .portal-grid--featured {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}
@media (max-width: 480px), (max-width: 1100px) and (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  .portal-tile__tag {
    display: none;
  }
}
/* Quick access uses the same compact cards on desktop, tablet and phone. */
.portal-page:not(.parent-portal-page) .portal-grid--compact .portal-tile__tag {
  display: none;
}

@media (min-width: 681px) {
  .portal-page:not(.parent-portal-page) .portal-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  /* Keep the loading indicators rotating while data is being fetched. */
  *:not(.calendar-loader__spinner):not(.school-calendar__spinner),
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Tlumený tmavý motiv vnitřních stránek */
[data-theme="dark"] body {
  color: var(--ink-700);
  background: var(--surface);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .primary-contact__name,
[data-theme="dark"] .hours-table th,
[data-theme="dark"] .address-block strong,
[data-theme="dark"] .accordion__button {
  color: var(--ink-900);
}

[data-theme="dark"] .page-hero h1,
[data-theme="dark"] .page-hero h2,
[data-theme="dark"] .page-hero h3,
[data-theme="dark"] .page-hero h4 {
  color: #fff;
}

/* Stejná, dostatečně kontrastní podoba eyebrow v každé tmavé ploše. */
[data-theme="dark"] .eyebrow {
  color: var(--blue-300);
}

[data-theme="dark"] .lead-paragraph,
[data-theme="dark"] .quote {
  color: #d8e3ee;
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .primary-contact,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .search-field input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .hours-table,
[data-theme="dark"] .map-card,
[data-theme="dark"] .portal-controls,
[data-theme="dark"] .portal-tile:not(.portal-tile--dark),
[data-theme="dark"] .notice-card,
[data-theme="dark"] .portal-empty {
  color: var(--ink-900);
  background: #1b2837;
  border-color: var(--line);
}

[data-theme="dark"] .filter-select {
  background-color: #1b2837;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%2385d4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
}

[data-theme="dark"] .contact-alphabet {
  background: #142131;
  border-color: var(--line);
}

[data-theme="dark"] .contact-alphabet__button {
  color: #d8e3ee;
  background: #1b2837;
  border-color: #49677f;
}

[data-theme="dark"] .contact-alphabet__button:hover,
[data-theme="dark"] .contact-alphabet__button:focus-visible {
  color: var(--blue-300);
  border-color: var(--blue-300);
}

[data-theme="dark"] .contact-alphabet__button[aria-pressed="true"] {
  color: #071426;
  background: var(--blue-300);
  border-color: var(--blue-300);
}

[data-theme="dark"] .contact-reset {
  color: #ff9b91;
  background: #1b2837;
  border-color: #b94b42;
}

[data-theme="dark"] .contact-reset:hover,
[data-theme="dark"] .contact-reset:focus-visible {
  color: #071426;
  background: #ff9b91;
  border-color: #ff9b91;
}

[data-theme="dark"] .callout {
  --callout-background: color-mix(
    in srgb,
    var(--callout-accent) 14%,
    var(--surface)
  );
  --callout-border: color-mix(
    in srgb,
    var(--callout-accent) 36%,
    var(--surface)
  );
  color: var(--ink-700);
}

[data-theme="dark"] .callout a,
[data-theme="dark"] .accordion__panel a,
[data-theme="dark"] .contact-links a {
  color: var(--blue-300);
}

[data-theme="dark"] .callout a:hover,
[data-theme="dark"] .callout a:focus-visible,
[data-theme="dark"] .accordion__panel a:hover,
[data-theme="dark"] .accordion__panel a:focus-visible,
[data-theme="dark"] .contact-links a:hover,
[data-theme="dark"] .contact-links a:focus-visible {
  color: #bfe4ff;
}

[data-theme="dark"] .accordion__icon {
  background: rgba(133, 212, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(133, 212, 255, 0.24);
}

[data-theme="dark"] .accordion__icon::before,
[data-theme="dark"] .accordion__icon::after {
  background: var(--blue-300);
}

[data-theme="dark"] .year-switcher {
  background: #0f1925;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .portal-search .search-field input {
  color: var(--ink-900);
  background: #142435;
  border-color: #4f91bf;
}

[data-theme="dark"] .portal-search {
  background: rgba(7, 20, 38, 0.56);
  border-color: rgba(133, 212, 255, 0.34);
}

[data-theme="dark"] .portal-search .search-field svg {
  color: var(--blue-300);
}

[data-theme="dark"] .portal-search .search-field input::placeholder {
  color: #b8c7d6;
  opacity: 1;
}

[data-theme="dark"] .portal-search .button--light,
[data-theme="dark"] .portal-search .button--light:visited {
  color: #071426;
  background: var(--blue-300);
  border-color: var(--blue-300);
}

[data-theme="dark"] .portal-search .button--light:hover,
[data-theme="dark"] .portal-search .button--light:focus-visible {
  color: #071426;
  background: #bfe4ff;
  border-color: #bfe4ff;
}

[data-theme="dark"] .portal-page .page-hero__lead {
  color: #e0ebf5;
}

[data-theme="dark"] .portal-page .portal-section__header p,
[data-theme="dark"] .portal-page .portal-tile__meta,
[data-theme="dark"] .portal-page .notice-card p,
[data-theme="dark"] .portal-page .notice-card__date,
[data-theme="dark"] .portal-page .portal-controls__label,
[data-theme="dark"] .portal-page .portal-status {
  color: #c8d3df;
}

[data-theme="dark"] .portal-page .portal-reset {
  color: #ff9b91;
  background: #1b2837;
  border-color: #b94b42;
}

[data-theme="dark"] .portal-page .portal-reset:hover,
[data-theme="dark"] .portal-page .portal-reset:focus-visible {
  color: #071426;
  background: #ff9b91;
  border-color: #ff9b91;
}

[data-theme="dark"] .portal-page .portal-tile__icon,
[data-theme="dark"] .portal-page .portal-tile--dark .portal-tile__icon,
[data-theme="dark"] .portal-page .portal-tile__tag,
[data-theme="dark"] .portal-page .portal-tile--dark .portal-tile__tag {
  color: var(--blue-300);
  background: rgba(133, 212, 255, 0.12);
}

[data-theme="dark"] .portal-page .portal-tile__arrow,
[data-theme="dark"] .portal-page .portal-tile--dark .portal-tile__arrow,
[data-theme="dark"] .portal-page .notice-card__links a,
[data-theme="dark"] .portal-page .button--ghost {
  color: var(--blue-300);
}

[data-theme="dark"] .portal-page .year-button {
  color: #c8d3df;
}

[data-theme="dark"] .portal-page .year-button:hover {
  color: var(--blue-300);
}

[data-theme="dark"] .portal-page .year-button[aria-pressed="true"],
[data-theme="dark"] .portal-page .year-button[aria-pressed="true"]:hover {
  color: #071426;
  background: var(--blue-300);
}

[data-theme="dark"] .portal-tile:hover,
[data-theme="dark"] .notice-card:hover,
[data-theme="dark"] .contact-card:hover {
  color: var(--ink-900);
  border-color: #49677f;
}

[data-theme="dark"] .today-badge {
  color: var(--success-text);
  background: #214b2d;
}

@media print {
  .quick-links,
  .portal-controls-wrap,
  .button,
  .contact-toolbar,
  .contact-alphabet,
  .contact-reset {
    display: none !important;
  }
  .page-hero {
    color: #000;
    background: #fff;
  }
  .page-hero__inner {
    min-height: 0;
    padding: 20px 0;
  }
  .page-hero h1,
  .page-hero .eyebrow,
  .page-hero__lead,
  .breadcrumbs {
    color: #000;
  }
  .section {
    padding-block: 24px;
  }
  .card,
  .portal-tile,
  .contact-card,
  .map-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-dark);
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 200;
  border-radius: 4px;
}

.skip-link:focus {
  left: 1rem;
  outline: 3px solid var(--action-focus);
  outline-offset: 3px;
}

.skip-link:hover {
  color: var(--blue-300);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

