/*
 * One stylesheet, hand written, no build step.
 *
 * The form it replaces was slow on a phone in front of the building it is about, so
 * everything here is sized for that: one column, targets a thumb can hit, and a page
 * that is a few kilobytes rather than a bundle.
 */
/*
 * Hidden means gone, whatever comes after.
 *
 * A button, a row and a form each have a display of their own here, and any of them
 * beats the browser's own rule for the attribute. That is how a button nobody should
 * see yet ends up on the screen doing nothing, so the attribute is given the last
 * word once, here, for everything.
 */
[hidden] { display: none !important; }

:root {
    --ink: #16202b;
    --muted: #5b6976;
    --line: #d8dee5;
    --paper: #ffffff;
    --ground: #f5f7f9;
    --accent: #1d4ed8;
    --accent-ink: #ffffff;
    --bad: #b42318;
    --good: #15803d;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e7edf3;
        --muted: #9aa7b4;
        --line: #2b3644;
        --paper: #141b23;
        --ground: #0d131a;
        /* Lighter blue, so a link stands out against a dark page, and dark text on
           top of it: white on this blue is too thin to read on a phone outside. */
        --accent: #6b9bff;
        --accent-ink: #081018;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 0 3rem;
    background: var(--ground);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 40rem; margin: 0 auto; padding: 1.25rem 1rem; }
.wrap.wide { max-width: 68rem; }

h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1rem; margin: 0 0 .75rem; }
p.sub { margin: 0 0 1.25rem; color: var(--muted); font-size: .875rem; }

/* A panel, whether it is a section of the page or a form standing on its own. */
.block {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.block > h2 {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .6875rem;
    color: var(--muted);
}

.q { margin-bottom: 1.5rem; }
/* A question that is not asked yet takes up no room, margin included. */
.q:last-child { margin-bottom: 0; }
.q > label.head { display: block; font-weight: 600; margin-bottom: .25rem; }
.q .hint { color: var(--muted); font-size: .8125rem; margin: 0 0 .375rem; }
.req { color: var(--bad); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], textarea, select {
    width: 100%;
    min-height: 2.75rem;
    padding: .5rem .75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

textarea { min-height: 5rem; resize: vertical; }

input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.choice { display: flex; align-items: center; gap: .625rem; min-height: 2.75rem; }
.choice input { width: 1.125rem; height: 1.125rem; flex: none; }

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .5rem 1rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

button.plain, .button.plain {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

button.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); }
button[disabled] { opacity: .6; cursor: default; }

.bar {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: .75rem 1rem;
    margin: 0 -1rem;
}
.bar button { width: 100%; }

.error { color: var(--bad); font-size: .875rem; margin: .25rem 0 0; }
.notice { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }

/* The photographs somebody chose, before they are sent. */
/* The photographs that were chosen, as tiles with a way to take one out again. */
ul.files { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
ul.files li { width: 6rem; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .8125rem; }
ul.files img { display: block; width: 100%; height: 6rem; object-fit: cover; background: var(--line); }
ul.files .name { display: block; padding: .5rem; color: var(--muted); word-break: break-all; }
ul.files button { width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; min-height: 2.5rem; padding: .25rem; font-size: .75rem; }
ul.files li.note { width: 100%; border: 0; background: transparent; color: var(--bad); }

table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { text-align: left; padding: .625rem .75rem; border-bottom: 1px solid var(--line); font-size: .9375rem; }
th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:hover { background: var(--ground); }
td a { color: var(--accent); }

/* A status is a word, not a button: it stays on one line and stays small. */
.tag {
    display: inline-block;
    padding: .125rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.tag.nieuw { background: #dbeafe; color: #1e40af; }
.tag.bekeken { background: #fef3c7; color: #92400e; }
.tag.afgehandeld { background: #dcfce7; color: #166534; }

dl.answers { margin: 0; }
dl.answers div { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .375rem 0; border-bottom: 1px solid var(--line); }
dl.answers div:last-child { border-bottom: 0; }
dl.answers dt { color: var(--muted); flex: 1 1 14rem; margin: 0; font-size: .875rem; }
dl.answers dd { flex: 2 1 16rem; margin: 0; font-weight: 600; font-size: .875rem; }
dl.answers dd.empty { font-weight: 400; color: var(--muted); }

.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.row > * { flex: 1 1 10rem; }
.row > .narrow { flex: 0 0 7rem; }
/* Under the map a button keeps its words together and moves down a line instead. */
.map-actions > * { white-space: nowrap; }

.thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.thumbs img { width: 7rem; height: 7rem; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

.top { display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.muted { color: var(--muted); font-size: .875rem; }
a.back { color: var(--muted); font-size: .8125rem; text-decoration: none; }
a.back:hover { color: var(--ink); }

/* The file field itself is out of sight; its label does the asking. See form.blade. */
input.hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

input.hidden-file:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* A place on one line: its name, saving it, and removing it. */
.place {
    display: flex;
    gap: .5rem;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: .5rem;
    margin-top: .5rem;
}
.place:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.place-name { display: flex; gap: .5rem; flex: 1 1 auto; min-width: 0; }
.place-name input { flex: 1 1 auto; min-width: 0; }
.place button, .place-name button { flex: 0 0 auto; }

/* The way out and the way across, top right. */
.menu { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.menu form { margin: 0; }

/* The map, tall enough to show a street and still leave the buttons in reach. */
.map {
    height: 60vh;
    min-height: 20rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .75rem 0 0; font-size: .8125rem; color: var(--muted); }
.legend .dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 999px; margin-right: .35rem; vertical-align: -1px; }
.legend .dot.open { background: #c026d3; }
.legend .dot.done { background: #15803d; opacity: .85; }
.legend .dot.gone { background: #8a94a0; opacity: .7; }
/*
 * A point that is a neighbourhood, and the way out of it.
 *
 * The line says how wide the guess is and the button opens the photograph to point
 * at the roof. Once it has been pointed at, the same line says so and the button is
 * gone: there is nothing left to do.
 */
/* What a list proposed for this building, above the question it answers. */
.proposal ol { margin: .4rem 0 .6rem; padding-left: 1.3rem; }
.proposal li { margin: .15rem 0; }
.proposal .muted { margin: 0 0 .6rem; }
.proposal.done { background: #dcfce7; border-color: #86efac; color: #166534; }

.pinpoint { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.pinpoint .row { gap: .5rem; margin: 0; }
.pinpoint.done { background: #dcfce7; border-color: #86efac; color: #166534; }

.pinpoint-dot {
    display: block;
    width: 22px;
    height: 22px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #b42318;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

/*
 * Two kinds of work on one map. The colour keeps saying how far a building is; a
 * square says it belongs to the municipality, in a lighter shade of the same colour
 * so the two never compete. Shape rather than another colour, because somebody who
 * cannot tell magenta from green still sees the difference.
 */
.pin {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-radius: 3px;
    box-sizing: border-box;
    filter: brightness(1.14) saturate(.72);
}

.legend .dot.vast { border-radius: 3px; background: #c026d3; filter: brightness(1.14) saturate(.72); }

/* A point that is a neighbourhood rather than a building. */
.legend .dot.rough {
    background: transparent;
    border: 2px dashed #c026d3;
    width: .85rem;
    height: .85rem;
    opacity: .75;
}

.tag.vast { background: #ede9fe; color: #5b21b6; }

/* The device's own position, in the colour a map reader expects it in. */
.legend .dot.me { background: #1d4ed8; box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(29, 78, 216, .25); }

/* Leaflet writes its own popup; these two make ours sit in it properly. */
.leaflet-popup-content { font: inherit; line-height: 1.45; }
.leaflet-popup-content .button { margin-top: .5rem; padding: .35rem .7rem; min-height: 2.25rem; }

/*
 * Leaflet brings its own white popup and white controls, which on a dark screen is
 * a white card with light text in it. Everything the map draws is therefore given
 * the same colours as the rest of the page.
 */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip,
.leaflet-control-layers,
.leaflet-bar a,
.leaflet-control-attribution {
    background: var(--paper);
    color: var(--ink);
}

.leaflet-bar a,
.leaflet-control-layers,
.leaflet-popup-content-wrapper { border-color: var(--line); }

.leaflet-bar a:hover { background: var(--ground); color: var(--ink); }

.leaflet-control-attribution a { color: var(--accent); }

.leaflet-popup-content .muted { color: var(--muted); }

/*
 * The buttons in a popup keep their own colours.
 *
 * Leaflet paints every link inside the map its own blue, and that selector beats a
 * plain class, so a button in a popup came out as blue text on a blue ground: the
 * unreadable one reported from the field. Named here with enough weight to win.
 */
.leaflet-popup-content a.button {
    margin-top: .5rem;
    background: var(--accent);
    color: var(--accent-ink);
}

.leaflet-popup-content a.button.plain {
    background: var(--ground);
    color: var(--ink);
    border: 1px solid var(--line);
}

/* Asking for a name, once, before anything else. */
.curtain {
    position: fixed;
    inset: 0;
    background: var(--ground);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2000;
}
.curtain .card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    width: 100%;
    max-width: 22rem;
}

/* Who is working, top right of a screen behind a link. */
.who { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); }
.who .initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: .75rem;
    font-weight: 700;
}

/* What the register offers while an address is being typed. */
ul.suggestions {
    list-style: none;
    margin: .25rem 0 0;
    padding: .25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    max-height: 14rem;
    overflow-y: auto;
}
ul.suggestions li { padding: .6rem .5rem; border-radius: calc(var(--radius) - 4px); cursor: pointer; }
ul.suggestions li:hover, ul.suggestions li.on { background: var(--ground); }

/* A field the address already settled: readable, clearly not to be typed in. */
input[readonly] { background: var(--ground); color: var(--muted); }

/* Map or list. Two buttons that look like one control. */
.switch { display: inline-flex; margin-bottom: .75rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.switch button { border: 0; border-radius: 0; background: var(--paper); color: var(--muted); min-height: 2.5rem; }
.switch button.on { background: var(--accent); color: var(--accent-ink); }

/*
 * The switch between the two rounds of work: three buttons that share the width,
 * each saying how many buildings stand behind it. Nothing is hidden without a
 * number next to it.
 */
#wie { display: flex; width: 100%; }
#wie button { flex: 1 1 0; padding: .5rem .35rem; font-size: .875rem; }
#wie button .muted { font-variant-numeric: tabular-nums; }
#wie button.on .muted { color: inherit; opacity: .8; }

/* Choosing stops for a trip, above the list. */
.planner { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.planner button { min-height: 2.5rem; }
.planner span { margin-left: auto; }
#route ol { font-size: .875rem; }

/* The line above a form that came off the list: back, and the way out. */
.topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.5rem 0 1rem; }
button.small, .button.small { min-height: 2.25rem; padding: .35rem .7rem; font-size: .8125rem; }

/* Two buttons in the bar: sending, and stopping halfway. */
.bar { display: flex; gap: .5rem; }
.bar button { flex: 1 1 auto; }
.bar button.plain { flex: 0 1 auto; }

/* The four answers an address can have, in the list and in the legend. */
.legend .dot.busy { background: #d97706; }
.tag.status-te-bezoeken { background: #fae8ff; color: #86198f; }
.tag.status-bezig { background: #fef3c7; color: #92400e; }
.tag.status-bezocht { background: #dcfce7; color: #166534; }
.tag.status-vervallen { background: #e7eaee; color: #47525e; }

/* The screen the form itself is put together on. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.section-name { display: flex; align-items: center; gap: .5rem; flex: 1 1 18rem; min-width: 0; }
.section-name input { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.section-name button { flex: 0 0 auto; }
.row-buttons { display: flex; align-items: center; gap: .375rem; }
.row-buttons form { display: inline; }
.add-field { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.add-field input { flex: 1 1 14rem; min-width: 0; }
.add-field select { flex: 0 1 12rem; }
.choice.inline { display: inline-flex; margin-right: 1rem; }
tr.off td { color: var(--muted); }
tr.off td a { color: var(--muted); }
details summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; }

/* What is still missing, at the top, with a line to every question it concerns. */
.missing { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--bad); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.missing .head { font-weight: 600; margin: 0 0 .5rem; color: var(--bad); }
.missing ul { list-style: none; margin: 0; padding: 0; }
.missing li { margin: 0; }
.missing a { display: block; padding: .375rem 0; }
.missing li.more { color: var(--muted); padding: .375rem 0; font-size: .875rem; }

/* The question it is about, marked where it stands. */
.q.mist { border-left: 3px solid var(--bad); padding-left: .75rem; margin-left: -.75rem; }

/* A photograph on its way up. */
ul.files .busy { display: block; padding: .25rem .5rem; font-size: .75rem; color: var(--muted); }

/* How far a list is: a bar, the numbers under it, and what can be downloaded. */
.progress { margin-bottom: 1.25rem; }
.bar-line { height: 10px; background: var(--ground); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar-line span { display: block; height: 100%; background: var(--good); }
.progress .lead { margin: .5rem 0 1rem; font-weight: 600; }
.numbers { display: flex; flex-wrap: wrap; gap: .5rem; }
.numbers div { flex: 1 1 6rem; background: var(--ground); border-radius: var(--radius); padding: .625rem .75rem; }
.numbers strong { display: block; font-size: 1.375rem; line-height: 1.2; }
.numbers span { color: var(--muted); font-size: .8125rem; }
.downloads { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; }

/* What somebody else just did, on a map that is being watched. */
.news { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--radius); padding: .5rem .75rem; margin-bottom: .75rem; }
.news p { margin: .125rem 0; font-size: .875rem; }

/* The building itself, above the questions about it. */
.spot { position: relative; margin: 0 0 1rem; }
.spot #plek-kaart { height: 180px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground); }
.spot.wide #plek-kaart { height: 420px; }
.spot .north { position: absolute; top: .5rem; right: .5rem; z-index: 500; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; font-size: .75rem; font-weight: 700; padding: .125rem .375rem; }
.spot-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.spot-bar .switch { margin-bottom: 0; }

/* The places on a progress link, opened one at a time. */
.place-group { border-top: 1px solid var(--line); padding: .5rem 0; }
.place-group:first-of-type { border-top: 0; }
.place-group summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; min-height: 2.75rem; }
.place-group[open] summary { margin-bottom: .5rem; }

/* A photograph, opened over the page instead of in a tab of its own. */
.lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(8, 16, 24, .88); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lightbox figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); border-radius: var(--radius); }
.lightbox figcaption { color: #e7edf3; font-size: .8125rem; text-align: center; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
/* One step back or forward, big enough for a thumb and out of the picture's way. */
.lightbox .step { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 4rem; padding: 0; font-size: 2rem; line-height: 1; background: rgba(255, 255, 255, .12); color: #ffffff; border: 0; border-radius: var(--radius); }
.lightbox .step.back { left: .5rem; }
.lightbox .step.next { right: .5rem; }
.lightbox .step:hover { background: rgba(255, 255, 255, .22); }
body.behind { overflow: hidden; }

/* A toggle that is on says so, without shouting like a primary button. Scoped to the
   row it lives in: the map/list switch already paints its own active button, and a
   rule of the same weight later in the file would take its text colour away. */
.row > button.plain.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* How fast the work goes: one bar per day somebody was out. */
.pace { display: flex; align-items: flex-end; gap: .375rem; height: 7rem; margin-bottom: .75rem; }
.pace-day { flex: 0 1 3rem; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.pace-day span { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.pace-day strong { font-size: .8125rem; }
.pace-day em { font-style: normal; font-size: .6875rem; color: var(--muted); }

/* What the answers together say: one bar per answer, longest first. */
.spread { margin: 0 0 1rem; }
.spread .head { font-weight: 600; margin: 0 0 .375rem; }
.spread-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; font-size: .875rem; }
.spread-label { flex: 0 0 11rem; color: var(--muted); overflow-wrap: anywhere; }
.spread-bar { flex: 1 1 auto; background: var(--ground); border-radius: 999px; height: .75rem; overflow: hidden; }
.spread-bar i { display: block; height: 100%; background: var(--accent); }
.spread-number { flex: 0 0 2.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* Something worth a second look. */
.signal { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.signal:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.signal .head { font-weight: 600; margin: 0; }
.signal ul { margin: .375rem 0 0; padding-left: 1.125rem; font-size: .875rem; }
.signal li { margin-bottom: .125rem; }

/* All photographs of a municipality, to leaf through. */
.wall { display: flex; flex-wrap: wrap; gap: .5rem; }
.wall figure { margin: 0; width: 9rem; }
.wall img { display: block; width: 100%; height: 7rem; object-fit: cover; border-radius: var(--radius); background: var(--ground); }
.wall figcaption { font-size: .75rem; color: var(--muted); padding: .25rem 0; overflow-wrap: anywhere; }

@media (max-width: 30rem) {
    .spread-label { flex-basis: 7rem; }
    .wall figure { width: calc(50% - .25rem); }
}

/* Ticks that carry their order: the number beside a choice is its place. */
.choices.ordered .choice { position: relative; }
.choices .place { font-style: normal; display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; margin-left: auto; padding: 0 .375rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .8125rem; font-weight: 600; }
/* A number that is not there yet shows nothing: display beats the hidden attribute. */
.choices .place[hidden] { display: none; }
.place-note { color: var(--bad); }

/*
 * What a tick carries beside itself.
 *
 * On a screen with room it stands behind the choice, lined up at the right so a
 * column of them reads as a column. On a telephone, which is where the form is
 * filled in, it drops under the words it belongs to rather than squeezing both into
 * half a line each.
 */
.tick { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.tick > .choice { flex: 0 1 auto; min-width: 0; }
.tick .place { margin-left: 0; }
.choices .detail { display: flex; align-items: center; gap: .375rem; margin-left: 1.75rem; }
.choices .detail[hidden] { display: none; }
.choices .detail input { width: 6.5rem; }
.choices .detail select { width: auto; }

@media (min-width: 34rem) {
    .tick { flex-wrap: nowrap; }
    .tick > .choice { flex: 1 1 auto; }
    .choices .detail { margin-left: auto; }
}

/*
 * A button that opens into a short list of things to take away.
 *
 * Lies over whatever is below it, the map included, and stays inside a narrow
 * screen because it opens from the left edge of the button.
 */
.export { position: relative; display: inline-block; }
.export > summary { list-style: none; }
.export > summary::-webkit-details-marker { display: none; }
.export > summary::after {
    content: "";
    width: .4rem;
    height: .4rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-.15rem) rotate(45deg);
}
.export[open] > summary::after { transform: translateY(.1rem) rotate(-135deg); }
.export-list {
    position: absolute;
    z-index: 1100;
    top: calc(100% + .25rem);
    left: 0;
    display: grid;
    min-width: 13rem;
    padding: .25rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
.export-list a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 .75rem;
    border-radius: calc(var(--radius) - 4px);
    color: var(--ink);
    text-decoration: none;
}
.export-list a:hover, .export-list a:focus-visible { background: var(--ground); }

/* The municipality in the heading of the map, as the way to the other lists. */
h1 .lists > summary { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
h1 .lists > summary::after { border-width: 0 2.5px 2.5px 0; }
h1 .lists > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 .lists .export-list { font-size: 1rem; font-weight: 400; min-width: 16rem; }
.lists .export-list a { justify-content: space-between; gap: 1rem; }
.lists .export-list a[aria-current="page"] { font-weight: 600; }

/* Paging under a long list. */
.pages { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pages [aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* The view switch with the export beside it, on the right; the menu then opens leftwards. */
.toolbar { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.toolbar .switch { margin-bottom: 0; }
.toolbar .export { margin-left: auto; }
.toolbar .export > summary { min-height: 2.5rem; }
.toolbar .export-list { left: auto; right: 0; }

/*
 * The arrow in the corner of the map: grey, the map stays where you put it; blue,
 * it keeps you in the middle. Shaped like the other buttons on the map.
 */
.leaflet-control.follow {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
}
.leaflet-control.follow[hidden] { display: none; }
.leaflet-control.follow svg { fill: none; }
.leaflet-control.follow.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.leaflet-control.follow.on svg { fill: currentColor; }
.leaflet-control.follow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/*
 * The form on a sheet over the map, so the map underneath keeps living. The sheet
 * is the whole screen and the page inside it scrolls by itself.
 */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--ground);
}
.sheet iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
html.sheet-open, html.sheet-open body { overflow: hidden; }

/*
 * Five frames for the photographs of one question, three on a row. A photograph
 * fills its frame with a cross in the corner; the empty ones are dashed, and the
 * next of them carries the camera.
 */
ul.files.slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    max-width: 22rem;
}
ul.files.slots li {
    position: relative;
    width: auto;
    aspect-ratio: 1;
    margin: 0;
}
ul.files.slots li > a { display: block; width: 100%; height: 100%; }
ul.files.slots img { width: 100%; height: 100%; }
ul.files.slots li > button {
    position: absolute;
    top: .25rem;
    right: .25rem;
    width: 2rem;
    min-height: 0;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(0 0 0 / .55);
    color: #ffffff;
    font-size: 1.25rem;
    line-height: 1;
}
ul.files.slots li > button::before {
    /* A bigger target than the cross itself, for a thumb. */
    content: "";
    position: absolute;
    inset: -.5rem;
}
ul.files.slots .busy,
ul.files.slots .name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0 0 0 / .55);
    color: #ffffff;
}
ul.files.slots li.slot {
    background: transparent;
    border: 2px dashed var(--line);
}
ul.files.slots li.slot.next { border-color: var(--accent); }
ul.files.slots li.slot label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent);
    cursor: pointer;
}
input.camera:focus-visible ~ ul.files.slots li.slot.next { outline: 2px solid var(--accent); outline-offset: 2px; }
ul.files.slots li.note { grid-column: 1 / -1; aspect-ratio: auto; }

.slots-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    max-width: 22rem;
    margin: .5rem 0 0;
}
.slots-foot .hint { margin: 0; }
label.link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}
input.hidden-file:focus-visible ~ .slots-foot label.link { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
