/* Noto Sans, self-hosted (SIL OFL 1.1, see fonts/OFL.txt) so no request goes to Google */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/noto-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: italic; font-weight: 600; font-display: swap; src: url(fonts/noto-sans-latin-600-italic.woff2) format("woff2"); }

/* Palette from the official TEVIS booking site: navy, blue and the StädteRegion lime. */
:root {
  --navy: #0a254c;
  --blue: #254c94;
  --blue-hover: #1c3d79;
  --lime: #b2c83a;
  --ink: #1b2232;
  --text: #39404d;
  --muted: #5f6878;
  --line: #d9dfe8;
  --line-strong: #c4ccd8;
  --bg: #e6eaf1;      /* soft blue-grey from the navy, so the page isn't glaring white */
  --card: #fafbfc;
  --tint: #eef2f7;
  --amber: #b7791f;
  --amber-bg: #fdf6e7;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-hover); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.topbar { background: var(--navy); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand img { display: block; border-radius: 7px; }
.tag { font-size: 12px; color: rgba(255, 255, 255, .75); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 2px 10px; }

/* Intro and status */
.page { padding-top: 44px; padding-bottom: 56px; width: 100%; flex: 1; }
.intro { margin-bottom: 36px; }
h1 { margin: 0 0 8px; color: var(--ink); font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 16px; max-width: 60ch; }

.status { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  flex-wrap: wrap; margin-top: 24px; padding: 12px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.status-text { font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.status-text #s-avail { color: var(--ink); font-weight: 600; }
/* Each item carries its separator on the left; the text is shifted left inside a
   clipping box, so the separator of whichever item starts a line is hidden. */
.status { overflow: hidden; }
.status-text { margin-left: -12px; }
.status-text .item { display: inline-flex; align-items: center; white-space: nowrap;
  padding-left: 14px; margin-right: 14px; border-left: 1px solid var(--line-strong); line-height: 1.1; }
.status-text .item:empty { display: none; }
.status-text #s-last { margin-left: 4px; color: var(--text); }

.progress { height: 2px; background: transparent; overflow: hidden; margin-top: -1px; visibility: hidden; }
.progress.on { visibility: visible; background: var(--line); }
.progress > div { height: 100%; width: 0; background: var(--blue); transition: width .4s ease; }
.hint { font-size: 13px; color: var(--muted); min-height: 0; margin-top: 8px; }
.hint:empty { display: none; }

.notice { margin-top: 16px; padding: 12px 14px; font-size: 14px; color: #6b4a12;
  background: var(--amber-bg); border: 1px solid #f0dfb8; border-radius: var(--radius); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--lime); box-shadow: 0 0 0 3px rgba(178, 200, 58, .18); }
.status-text .dot { margin-right: 8px; }

/* Offices and groups */
.office { margin-top: 40px; }
.office-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 12px; }
.office-head h2 { margin: 0; color: var(--navy); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.office-head .cnt { font-size: 13px; color: var(--muted); white-space: nowrap; }

.group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.group > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  list-style: none; color: var(--ink); font-weight: 600; user-select: none; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary:hover { background: var(--tint); }
.group .gname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.group .cnt, .group > summary .icon { flex: none; }
.group .cnt { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.group > summary .icon { width: 18px; height: 18px; color: var(--muted); transition: transform .15s ease; }
.group[open] > summary .icon { transform: rotate(180deg); }
.group[open] > summary { border-bottom: 1px solid var(--line); }

/* Rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; gap: 8px 24px;
  align-items: center; padding: 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .name { color: var(--ink); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.row .loc { margin-top: 2px; font-size: 13px; color: var(--muted); }
.when { color: var(--ink); line-height: 1.3; }
.when .date { color: var(--blue); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.when .day { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.meta { margin-top: 3px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.none { color: var(--muted); }
.acts { display: flex; gap: 6px; justify-self: end; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  height: 38px; padding: 0 16px; border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--navy);
  transition: background .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover:not(:disabled) { background: var(--tint); border-color: #c3cad6; color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn.ghost { background: transparent; }
.btn.link { border-color: transparent; background: transparent; color: var(--blue); padding: 0 8px; }
.btn.link:hover { background: var(--tint); border-color: transparent; color: var(--blue-hover); }
.btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.on:hover:not(:disabled) { background: var(--blue-hover); color: #fff; }
.btn.pending { color: var(--amber); border-color: #ecd6ac; background: var(--amber-bg); }
.btn.pending:hover:not(:disabled) { color: var(--amber); background: #faefd6; border-color: #e5c98f; }
.btn .icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.link .icon { width: 13px; height: 13px; }
.group > summary .icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.empty, .since { color: var(--muted); font-size: 14px; }
.since { margin-top: 32px; font-size: 13px; }

/* Alert dialog */
dialog { border: 0; padding: 0; width: min(460px, calc(100vw - 32px)); border-radius: 14px;
  color: var(--text); box-shadow: 0 24px 60px rgba(10, 37, 76, .22), 0 2px 6px rgba(10, 37, 76, .08); }
dialog::backdrop { background: rgba(10, 37, 76, .35); }
.m-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.m-head h3 { margin: 0; font-size: 18px; color: var(--ink); font-weight: 600; }
.m-head button { background: none; border: 0; width: 32px; height: 32px; border-radius: 8px;
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.m-head button:hover { background: var(--tint); color: var(--ink); }
.m-body { padding: 6px 22px 4px; font-size: 14px; }
.m-body h4 { margin: 0 0 6px; color: var(--blue); font-size: 15px; font-weight: 600; }
.m-body .sub { color: var(--muted); }
.m-body label { display: block; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
.m-body input[type=email] { width: 100%; font: inherit; font-size: 15px; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; }
.m-body input[type=email]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 76, 148, .15); }
.m-body label.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); margin: 14px 0 10px; }
.m-body label.consent input { margin-top: 3px; accent-color: var(--blue); flex: none; }
#dlg-msg { margin: 8px 0 0; line-height: 1.55; }
.m-err { color: #b42318; margin-top: 8px; font-size: 13px; }
.m-err:empty { display: none; }
.m-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; }
.m-foot.single .btn { min-width: 96px; }

/* Imprint, privacy and message pages */
.legal { }
.legal h1 { font-size: 26px; margin-bottom: 20px; }
.legal h2 { font-size: 16px; color: var(--ink); margin: 28px 0 8px; }
.legal p, .legal li { max-width: 68ch; margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.legal code { background: var(--tint); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.legal form { margin: 20px 0; }
.legal .note { padding: 12px 14px; background: var(--amber-bg); border: 1px solid #f0dfb8; border-radius: var(--radius); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #dde2ea; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 10px; }
.site-footer nav a { font-size: 14px; color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--blue); text-decoration: underline; }
.site-footer p { font-size: 13px; color: var(--muted); max-width: 70ch; }

@media (max-width: 700px) {
  .page { padding-top: 28px; }
  h1 { font-size: 25px; }
  .lead { font-size: 15px; }
  .status { align-items: flex-start; }
  .status-text { margin-left: -8px; }
  .status-text .item { padding-left: 10px; margin-right: 10px; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .acts { justify-self: stretch; }
  .acts .btn { flex: 1; }
  .group > summary { padding: 13px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
