/* The frame round every view: the bar at the top with the name, the search
   box and the five places to go; the same five along the bottom on a phone;
   the foot of the long pages. */

.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--radius-s); font-weight: 600; }
.skip:focus { top: 10px; }

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 20px; padding: 0 10px 0 24px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
main { padding-top: var(--top-h); }

/* --- the name: a pin of the map's own colour, then the words ----------------------- */
.brand { display: flex; align-items: center; gap: 9px; flex: none; height: 100%; font: 600 15.5px/1 var(--font); letter-spacing: -.012em; text-decoration: none; white-space: nowrap; }
.brandmark { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--accent); }

/* --- the search box ------------------------------------------------------------- */
.search { position: relative; flex: 0 1 380px; min-width: 150px; }
.search > .ico { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search input { height: 36px; min-height: 0; padding: 0 12px 0 34px; font-size: 14.5px; text-overflow: ellipsis; background: var(--soft); border-color: transparent; }
.search input:focus { background: var(--raise); border-color: var(--focus); }
#search-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; max-height: min(70dvh, 520px); overflow-y: auto; padding: 6px;
  background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--float);
}
#search-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 10px; font-size: 14.5px; border-radius: 6px; }
#search-list li[role="option"] { cursor: pointer; }
#search-list li[role="option"]:hover, #search-list li[aria-selected="true"] { background: var(--soft); }
#search-list small { flex: none; font-size: 12.5px; color: var(--ink-3); }
#search-list .searchhead { padding: 6px 10px 4px; font-size: 12.5px; color: var(--ink-3); }
#search-list .searchnote { font-size: 13.5px; color: var(--ink-2); }

/* --- the five places to go: plain words, with a line under the one that is open ------ */
.tabs { display: flex; align-items: stretch; gap: 2px; height: 100%; margin-left: auto; flex: none; }
.tabs a { position: relative; display: flex; align-items: center; padding: 0 10px; font: 500 14px/1 var(--font); text-decoration: none; white-space: nowrap; color: var(--ink-2); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); }
.tabs a:focus-visible { outline-offset: -4px; }
.tabs .short, .tabs .ico { display: none; }
[data-theme="dark"] .moon, [data-theme="light"] .sun { display: none; }

@media (max-width: 1060px) {
  .tabs .long { display: none; }
  .tabs .short { display: inline; }
}

/* --- word from the payment page ------------------------------------------------------ */
.paybanner { position: fixed; left: 50%; top: calc(var(--top-h) + 10px); z-index: 50; translate: -50% 0; width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 16px; font-weight: 500; font-size: 14px; background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--radius-s); box-shadow: var(--float); }
.paybanner[data-tone="ok"] { color: var(--below); border-color: color-mix(in srgb, var(--below) 50%, transparent); }
.paybanner[data-tone="wait"] { color: var(--above); border-color: color-mix(in srgb, var(--above) 50%, transparent); }

/* --- the long pages ------------------------------------------------------------------- */
.page { max-width: 1040px; margin: 0 auto; padding: 44px 24px 80px; }
.page > * + * { margin-top: 28px; }
.pagehead > * + * { margin-top: 10px; }
.pagehead h1 { font-size: 30px; max-width: 24ch; }
.pagehead .lede { font-size: 16px; }
.foot { max-width: 1040px; margin: 0 auto; padding: 20px 24px calc(40px + var(--tab-h)); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.foot .warn { flex: 1 1 320px; }
.footlinks { font-weight: 500; font-size: 14px; }
body[data-view="explore"] { overflow: hidden; }
body[data-view="explore"] .foot { display: none; }

/* --- a phone: the five places move to the bottom ----------------------------------------- */
@media (max-width: 760px) {
  :root { --top-h: 52px; --tab-h: calc(54px + env(safe-area-inset-bottom, 0px)); }
  .top { gap: 4px; padding: 0 4px 0 6px; }
  .brand { width: 34px; justify-content: center; }
  .brandname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* still read out as the link's name */
  .search { flex: 1; }
  .search input { font-size: 16px; }   /* 16px stops a phone zooming in on the box */
  .tabs { position: fixed; inset: auto 0 0 0; z-index: 30; height: var(--tab-h); margin: 0; padding: 0 4px env(safe-area-inset-bottom, 0px); gap: 0; background: var(--bg); border-top: 1px solid var(--line); }
  .tabs a { flex: 1; flex-direction: column; justify-content: center; gap: 4px; padding: 0; font-size: 10.5px; color: var(--ink-3); }
  .tabs .ico { display: block; width: 20px; height: 20px; }
  .tabs a[aria-current="page"] { color: var(--ink); }
  .tabs a[aria-current="page"]::after { display: none; }
  .page { padding: 26px 16px 44px; }
  .pagehead h1 { font-size: 26px; }
  .foot { padding-inline: 16px; }
  input[type="text"], input[type="search"], textarea, select { font-size: 16px; }
}
