/* The finish of the site: what the other style sheets leave rough. Loaded last. */
html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:target { scroll-margin-top: 90px; } ::selection { background: var(--maroon, #730000); color: #fff; }
:focus-visible { outline: 2px solid var(--maroon, #a11212); outline-offset: 3px; border-radius: 2px; }

/* the first screen of the home page on a phone: one column (a later rule of site.css kept two) */
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) !important; gap: 28px !important; } .hero h1 { font-size: clamp(2.3rem, 11vw, 3.4rem) !important; line-height: 1 !important; overflow-wrap: anywhere; } .hero .slides, .hero .stack { max-width: 100%; } }
.page-head h1 { overflow-wrap: anywhere; hyphens: auto; }

/* the cookie notice: small, and out of the way */
.cookiebar { max-width: 620px; padding: 12px 16px; font-size: .82rem; gap: 14px; border-radius: 3px; animation: ck-in .5s cubic-bezier(.16, 1, .3, 1) .6s both; }
@keyframes ck-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .cookiebar { left: 10px; right: 10px; bottom: 10px; flex-direction: row; align-items: center; padding: 10px 12px; font-size: .78rem; line-height: 1.4; } .cookiebar span[lang='de'] { display: none; } .cookiebar .btn { padding: 9px 14px; min-height: 40px; } }

/* every legal page keeps to the width of the screen */
.legal-page, main p, main li, main td { overflow-wrap: anywhere; }

/* finger-sized controls on a phone */
@media (max-width: 900px), (pointer: coarse) {
  .site-header a, .site-header button, .chip, .btn, .chips button, .filters select, .filters input, .site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-footer .legal-links a { padding: 6px 4px; } .chip { padding-left: 14px; padding-right: 14px; }
  .nav-menu a, .menu a { padding-top: 12px; padding-bottom: 12px; }
}

/* a little life: links, buttons and cards answer the pointer */
a.link, .link { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s ease; } a.link:hover, .link:hover { background-size: 100% 1px; }
.btn { transition: transform .18s cubic-bezier(.16, 1, .3, 1), box-shadow .2s, background-color .2s, border-color .2s; } .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); } .btn:active { transform: translateY(0); box-shadow: none; }
.panel, .notice, .card, .tile, .shot { transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s, box-shadow .25s; } .panel:hover, .card:hover, .tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); }
.site-header { transition: box-shadow .3s, background-color .3s; } .site-header.scrolled { box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }

/* what arrives while the page is read: it rises into place, once */
html.rv-on .rv { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--rv-d, 0ms); } html.rv-on .rv.in { opacity: 1; transform: none; }

/* the way to the app, in the head of a page */
.appchip { justify-self: start; align-self: start; grid-column: 1; width: max-content; max-width: 100%; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 16px; border: 1px solid currentColor; font: 600 .78rem/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: inherit; text-decoration: none; opacity: .86; transition: opacity .2s, transform .2s, background-color .2s, color .2s; }
.appchip:hover { opacity: 1; transform: translateX(3px); background: var(--maroon, #a11212); color: #fff; border-color: var(--maroon, #a11212); } .appchip svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 900px) { .appchip { display: none; } }

/* ---- phones, every page ---- */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(161, 18, 18, .18); }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.cookiebar { bottom: max(10px, env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  /* inputs at 16px so a phone does not zoom into them */
  input, select, textarea { font-size: 16px !important; min-height: 44px; }
  /* the filters of a list: two to a row instead of one long column */
  .filters, .toolbar, .search-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters > label:first-child, .filters > .wide, .filters input[type=search], .filters input[type=text] { grid-column: 1 / -1; }
  .filters select { width: 100%; }
  /* tables and wide blocks scroll inside themselves, never the page */
  main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, .code { overflow-x: auto; max-width: 100%; }
  img, video, canvas, iframe { max-width: 100%; }
  /* rhythm: tighter sections, the same reading size */
  section, .sec { scroll-margin-top: 70px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  /* links in a list are as tall as a finger, without changing how the list looks */
  .mono.small a, .muted a, p > a, .drow a, .rte a, .act a, .n a, .sec-note a { display: inline-block; padding: 8px 2px; margin: -8px -2px; }
  .act .btn, .act button, .act a { min-height: 44px; padding: 12px 14px; }
  .stand-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .stand-list button { min-height: 40px; min-width: 52px; padding: 8px 12px; }
  button.cp { min-height: 36px; min-width: 44px; padding: 8px 10px; }
  button.fav { min-width: 40px; min-height: 40px; }
  .tags { gap: 4px; }
  /* buttons side by side fill the row */
  .btn-row, .actions, .cta { display: flex; flex-wrap: wrap; gap: 10px; } .btn-row .btn, .actions .btn, .cta .btn { flex: 1 1 160px; justify-content: center; text-align: center; }
  /* the hero picture and maps keep their shape */
  .hero .slides { aspect-ratio: 4 / 3; }
  .leaflet-container, [id*=map] { touch-action: pan-y pinch-zoom; }
}
/* the first screen is not covered by the cookie notice for long: it sits low and shrinks once read */
@media (max-width: 640px) { .site-footer { padding-bottom: calc(70px + env(safe-area-inset-bottom)); } }
@media (max-width: 380px) { .hero h1 { font-size: 2.1rem !important; } .btn { padding-left: 14px; padding-right: 14px; } }
.cookiebar { box-sizing: border-box; }
@media (max-width: 900px) {
  .filters > *, .toolbar > * { min-width: 0; } .grow { min-width: 0; width: 100%; flex: 1 1 100%; } .grow input, .filters input { width: 100%; box-sizing: border-box; }
  .link, a.link { padding-top: 6px; padding-bottom: 6px; }
}
@media (max-width: 900px) { #hubs a { min-height: 44px; align-items: center; } }
@media (max-width: 900px) { .filters > div, .filters .grow, .filters > label { min-width: 0 !important; } .filters .grow { grid-column: 1 / -1; } }
