/* Built-in stylesheet of the public site and the setup wizard. Colours,
   font and radius come from /theme.css (ADR 0012); the values here are the
   fallback for the wizard, which has no theme yet. */
:root {
  --bg: #ffffff;
  --surface: #f4f5f8;
  --fg: #1d1f24;
  --muted: #525866;
  --accent: #1f4fa3;
  --accent-fg: #ffffff;
  --line: color-mix(in srgb, var(--fg) 16%, transparent);
  --danger: #a32020;
  --radius: 8px;
  --space: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); overflow-wrap: break-word;
  min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; width: 100%; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space); top: var(--space); background: var(--bg); padding: 8px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 var(--space); }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 12px; }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 0 0 6px; }
p { margin: 0 0 12px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header-row { display: flex; flex-wrap: wrap; gap: 8px var(--space); align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 12px var(--space); }
.site-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; min-width: 0; }
.site-logo img { width: 44px; height: 44px; object-fit: contain; }
.site-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-langs { display: flex; gap: 10px; }
.site-langs [aria-current] { font-weight: 700; }
.site-city { position: relative; }
.site-city summary { cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); list-style: none; }
.site-city summary::-webkit-details-marker { display: none; }
.site-city summary::after { content: " ▾"; }
.site-city ul { position: absolute; right: 0; z-index: 5; margin: 4px 0 0; padding: 6px 0; list-style: none; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); min-width: 180px; box-shadow: 0 6px 20px rgb(0 0 0 / 12%); }
.site-city li a { display: block; padding: 8px 14px; }
.site-city [aria-current] { font-weight: 700; }
.site-nav { max-width: 1120px; margin: 0 auto; padding: 0 var(--space); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0 0 8px; list-style: none; }
.site-nav a { display: inline-block; padding: 6px 0; white-space: nowrap; color: var(--fg); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current] { border-bottom-color: var(--accent); font-weight: 600; }

.site-main { max-width: 1120px; margin: 0 auto; padding: calc(var(--space) * 1.5) var(--space) calc(var(--space) * 3); }
.crumbs { margin: 0 0 8px; font-size: .95rem; }
.lead { font-size: 1.1rem; }
.label { color: var(--muted); }
.notice { background: var(--surface); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: var(--radius); }
.notice-danger { border-left-color: var(--danger); }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg); }
.badge-danger { border-color: var(--danger); color: var(--danger); }
.button { display: inline-block; font-weight: 600; padding: 10px 20px; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg);
  text-decoration: none; min-height: 44px; }
.button-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* layout (ADR 0018) */
.layout-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space); margin-bottom: var(--space); }
.layout-row > .block { grid-column: span 12; min-width: 0; }
@media (min-width: 760px) {
  .layout-row > .w-8 { grid-column: span 8; }
  .layout-row > .w-6 { grid-column: span 6; }
  .layout-row > .w-4 { grid-column: span 4; }
  .layout-row > .w-3 { grid-column: span 3; }
}
.layout-row > .block > .home-block { margin-top: calc(var(--space) * 1.5); }
.block-cta { padding: var(--space) 0; }
.preview-bar { background: #fff4cc; color: #3d3000; border-bottom: 1px solid #e6cf73; padding: 8px var(--space); text-align: center; font-size: .95rem; }
.demo-bar { background: #e8f3ff; color: #0a2e52; border-bottom: 1px solid #9cc4ea; padding: 8px var(--space); text-align: center; font-size: .95rem; }
.demo-bar .button { margin-left: .5em; padding: 4px 12px; }

/* home */
.hero { padding: calc(var(--space) * 1.5) 0; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
.hero-tagline { font-size: 1.2rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-photo { display: block; margin-top: var(--space); }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.home-about { max-width: 760px; }
.home-block { margin-top: calc(var(--space) * 2.5); }

/* cards */
.cards { list-style: none; margin: 0 0 var(--space); padding: 0; display: grid; gap: var(--space); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 14px 16px; }
.card-body p:last-child { margin-bottom: 0; }
.card-kicker { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 4px; }
.card-meta { color: var(--muted); font-size: .95rem; }
.event-card.is-cancelled h3 a { text-decoration: line-through; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 var(--space); padding: 12px; background: var(--surface); border-radius: var(--radius); }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
.filters select, .filters input { font: inherit; color: var(--fg); background: var(--bg); padding: 8px 10px; border: 1px solid #8a909c; border-radius: var(--radius); min-height: 44px; max-width: 100%; }
.filters input { width: 5.5em; }
.filters button { min-height: 44px; }
.tabs { display: flex; gap: 20px; margin-bottom: var(--space); }
.tabs [aria-current] { font-weight: 700; text-decoration: none; color: var(--fg); border-bottom: 2px solid var(--accent); }

/* schedule */
.week-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: var(--space); }
.week-nav span { font-weight: 600; }
.hall-week { margin-bottom: calc(var(--space) * 2); }
.week { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.week-day { background: var(--surface); border-radius: var(--radius); padding: 10px; }
.week-day.is-today { outline: 2px solid var(--accent); }
@media (max-width: 899px) { .week-day.is-empty { display: none; } }
.week-day h3 { font-size: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
.week-date { color: var(--muted); font-weight: 400; font-size: .9rem; }
.classes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.class { display: flex; flex-direction: column; gap: 2px; }
.class-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.class-title { font-weight: 600; }
.class-meta, .class-note { font-size: .9rem; color: var(--muted); }
.class.is-cancelled .class-title { color: var(--muted); }
.classes-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 12px; }
.classes-list .class { padding: 10px 12px; background: var(--surface); border-radius: var(--radius); }

/* halls, people, facts */
.hall-info { display: grid; gap: var(--space); grid-template-columns: 1fr; }
.hall-photo img, .person-photo img { border-radius: var(--radius); }
.person-photo { display: block; max-width: 360px; margin-bottom: var(--space); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 var(--space); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts dd p { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dt { margin-top: 6px; } }

/* materials and rich text */
.material { max-width: 760px; }
.material-cover img { border-radius: var(--radius); margin-bottom: var(--space); }
.rich h2 { margin-top: 1.5em; }
.rich h3, .rich h4 { margin-top: 1.2em; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 12px; }
.rich blockquote { margin: 0 0 12px; padding: 4px 0 4px 16px; border-left: 4px solid var(--line); color: var(--muted); }
.rich hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.ta-justify { text-align: justify; }
.rt-image { margin: 0 0 var(--space); }
.rt-image img { border-radius: var(--radius); }
.rt-image figcaption, .gallery figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.rt-gallery, .gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin: 0 0 var(--space); }
.gallery figure, .rt-gallery figure { margin: 0; }
.gallery img, .rt-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.album { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rt-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 var(--space); }
.rt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.rt-video-file, .album video { width: 100%; border-radius: var(--radius); }
.rt-table { overflow-x: auto; margin: 0 0 var(--space); }
.rt-table table { border-collapse: collapse; min-width: 100%; }
.rt-table th, .rt-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.rt-table th { background: var(--surface); }
.rt-doc::before { content: "⤓ "; }

/* documents */
.files { list-style: none; padding: 0; margin: var(--space) 0; display: flex; flex-direction: column; gap: 12px; }
.file { padding: 12px 14px; background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; }
.file-link { font-weight: 600; }
.file-meta { color: var(--muted); font-size: .9rem; }
.file-history summary { cursor: pointer; color: var(--accent); font-size: .95rem; }
.file-history ul { margin: 6px 0 0; padding-left: 1.2em; }

/* trial form */
.trial-form { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.trial-form label { font-weight: 600; margin-top: 8px; }
.trial-form label.choice { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 2px 0; }
.trial-form input:not([type=radio]):not([type=checkbox]), .trial-form select, .trial-form textarea {
  font: inherit; color: var(--fg); background: var(--bg); padding: 10px 12px; border: 1px solid #8a909c; border-radius: var(--radius); width: 100%; min-height: 44px; }
.trial-form [aria-invalid=true] { border-color: var(--danger); }
.trial-form fieldset { border: 0; margin: 8px 0 0; padding: 0; }
.trial-form legend { font-weight: 600; padding: 0; }
.trial-form input[type=radio], .trial-form input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.trial-form button { margin-top: 16px; align-self: flex-start; }
.trial-form .hint { margin: 0; }
.field-error { color: var(--danger); margin: 0; font-size: .9rem; }
.hint { color: var(--muted); font-size: .9rem; }
.consent { margin-top: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.footer-links { grid-column: 1 / -1; margin: 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer-cols { max-width: 1120px; margin: 0 auto; padding: calc(var(--space) * 1.5) var(--space); display: grid; gap: var(--space);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); font-size: .95rem; }
.site-footer p { margin: 0 0 6px; }
.footer-name { font-weight: 700; }
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-requisites { color: var(--muted); }

@media print {
  .site-header .site-tools, .site-nav, .no-print, .site-footer, .skip { display: none !important; }
  body { font-size: 11pt; }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week-day { background: none; border: 1px solid #999; }
  .week-day.is-empty { display: block; }
  a { color: inherit; text-decoration: none; }
}

/* Setup wizard */
body.setup { background: #f3f4f7; display: block; }
.setup-card { max-width: 520px; margin: 0 auto; padding: calc(var(--space) * 2) var(--space); }
@media (min-width: 560px) {
  .setup-card { margin-top: 48px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
}
.setup-kicker { color: var(--muted); margin: 0 0 8px; font-size: .9rem; }
.setup form { display: flex; flex-direction: column; gap: 8px; }
.setup label { font-weight: 600; margin-top: 8px; }
.setup label.choice { font-weight: 400; display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.setup input:not([type=radio]):not([type=checkbox]), .setup select {
  font: inherit; padding: 10px 12px; border: 1px solid #8a909c; border-radius: var(--radius); width: 100%; background: var(--bg); color: var(--fg); }
.setup input[aria-invalid=true] { border-color: var(--danger); }
.setup fieldset { border: 0; padding: 0; margin: 0; }
.setup legend { font-weight: 600; padding: 0; }
.hint { color: var(--muted); margin: 0; font-size: .9rem; }
.field-error { color: var(--danger); margin: 0; font-size: .9rem; }
.alert { background: #fdecec; color: var(--danger); border: 1px solid #f1b5b5; border-radius: var(--radius); padding: 10px 12px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space); margin-top: var(--space); }
.actions button:only-child { margin-left: auto; }
button { font: inherit; font-weight: 600; padding: 10px 20px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); cursor: pointer; min-height: 44px; }
.setup-langs { display: flex; gap: 12px; margin-top: calc(var(--space) * 2); }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 var(--space); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; overflow-wrap: anywhere; }

/* no jump between short and long pages: the scrollbar is always there
   (overflow-y), its place is kept where the browser can (scrollbar-gutter) */
html { overflow-y: scroll; scrollbar-gutter: stable; }

/* the menu button on narrow screens (/static/site.js) */
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; flex: none;
  color: var(--fg); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; }
.menu-toggle:hover { background: var(--surface); }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 1px; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-icon::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 759px) {
  /* the logo and the button in one row; the languages and the city open
     with the sections */
  .js-menu .site-header-row { flex-wrap: wrap; }
  .js-menu .site-name { flex: 1 1 0; }
  .js-menu .menu-toggle { display: inline-flex; order: 1; }
  .js-menu .site-tools { order: 2; width: 100%; display: none; }
  .js-menu.menu-open .site-tools { display: flex; }
  .js-menu .site-nav { display: none; }
  .js-menu.menu-open .site-nav { display: block; }
  .js-menu .site-nav ul { flex-direction: column; padding: 0 0 12px; }
  .js-menu .site-nav li + li { border-top: 1px solid var(--line); }
  .js-menu .site-nav a { display: block; padding: 12px 0; border-bottom: 0; }
  .js-menu .site-nav a[aria-current] { color: var(--accent); }
}

/* the hall: photos with the gallery under the main one, the open map */
@media (min-width: 760px) { .hall-info.has-photos { grid-template-columns: minmax(0, 480px) 1fr; } }
.hall-photos .gallery { margin: 10px 0 0; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
/* the height by itself: with an aspect ratio a minimum height would widen
   the map past a phone screen */
.hall-map { position: relative; display: block; width: 100%; height: clamp(300px, 75vw, 460px); overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); margin-top: var(--space); background: #ece8e1;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hall-map[hidden] { display: none; }
.hall-map-tiles { position: absolute; inset: 0; transform-origin: 50% 50%; }
.hall-map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.hall-map-pin { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -34px 0 0 -14px; background: var(--accent);
  border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgb(0 0 0 / 35%); }
.hall-map-in, .hall-map-out { position: absolute; right: 10px; width: 40px; height: 40px; font: 600 22px/1 var(--font); color: var(--fg);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / 20%); }
.hall-map-in { top: 10px; }
.hall-map-out { top: 56px; }
/* the signs are lines in the very middle, not glyphs of a font */
.hall-map-in::before, .hall-map-in::after, .hall-map-out::before { content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2px; margin: -1px 0 0 -8px; background: currentColor; border-radius: 1px; }
.hall-map-in::after { transform: rotate(90deg); }
.hall-map-in:disabled, .hall-map-out:disabled { opacity: .45; cursor: default; }
.hall-map-credit { position: absolute; right: 0; bottom: 0; margin: 0; padding: 1px 6px; font-size: .75rem; background: rgb(255 255 255 / 85%);
  border-top-left-radius: 4px; }

/* prices: the cards keep their text off the border */
.tariff { padding: 14px 16px; }
.tariff .card-title { margin-top: 0; }
.tariff-price { font-size: 1.35rem; font-weight: 700; margin: 4px 0 10px; }

/* the photo slider (/static/site.js) */
.lb-trigger { cursor: zoom-in; }
[data-gallery] a:has(img) { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
dialog.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(10 12 16 / 94%); color: #fff; overflow: hidden; }
dialog.lb::backdrop { background: rgb(10 12 16 / 94%); }
dialog.lb figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 64px 48px; gap: 10px; }
dialog.lb img { max-width: 100%; max-height: calc(100% - 2.5em); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
dialog.lb figcaption { text-align: center; color: #e6e8ec; max-width: 60em; }
.lb-count { position: absolute; top: 14px; left: 18px; margin: 0; color: #c9ccd3; font-size: .95rem; }
.lb-prev, .lb-next, .lb-close { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  font: 400 34px/1 var(--font); color: #fff; background: rgb(255 255 255 / 12%); border: 0; border-radius: 999px; cursor: pointer; }
.lb-prev:hover, .lb-next:hover, .lb-close:hover { background: rgb(255 255 255 / 24%); }
.lb-prev:focus-visible, .lb-next:focus-visible, .lb-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 10px; top: 10px; font-size: 30px; }
@media (max-width: 640px) {
  /* the buttons stay in the middle at the sides, over the photo edges */
  dialog.lb figure { padding: 56px 8px 48px; }
  .lb-prev, .lb-next { width: 42px; height: 42px; background: rgb(0 0 0 / 45%); }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

/* a phone does not break across lines */
a[href^="tel:"] { white-space: nowrap; }

/* on a phone the two hero buttons fit in one row */
@media (max-width: 480px) {
  .hero-actions { gap: 8px; }
  .hero-actions .button { padding-left: 13px; padding-right: 13px; }
}

/* on a phone the logo, the name and the menu button stay at the top */
@media (max-width: 759px) {
  html { scroll-padding-top: 76px; }
  .site-header { position: sticky; top: 0; z-index: 20; }
  /* an open menu longer than the screen scrolls inside */
  .js-menu.menu-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
}
