/* Shared by the report, profile, articles and policy pages. */
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink, #071740); text-decoration: none; border-radius: 6px; white-space: nowrap; gap: 9px; font-size: 1.38rem; font-weight: 740; letter-spacing: -.055em; }
.brand img { display: block; width: 46px; height: auto; }
:root {
  color-scheme: light;
  --appearance-panel: #fff;
  --appearance-ink: #182735;
  --appearance-muted: #45566b;
  --appearance-line: #7f90a2;
  --appearance-focus: #0065aa;
}
.appearance-menu {
  position: relative; z-index: 11; flex: none; margin: 0; padding: 0; border: 0;
  color: var(--appearance-ink); font: 1rem/1.45 system-ui, sans-serif; text-align: start;
}
.appearance-menu > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  box-sizing: border-box; min-height: 44px; padding: .35rem .65rem;
  border: 1px solid var(--appearance-line); border-radius: .7rem; list-style: none;
  color: var(--appearance-ink); background: var(--appearance-panel); cursor: pointer; font-size: .9em; font-weight: 600;
}
.appearance-menu summary::-webkit-details-marker { display: none; }
.appearance-symbol { font: 650 1.08em/1 Georgia, serif; }
.appearance-options {
  position: absolute; top: calc(100% + .4rem); right: 0; width: min(16rem, calc(100vw - 2rem));
  box-sizing: border-box; padding: 1rem; border: 1px solid var(--appearance-line); border-radius: .9rem;
  box-shadow: 0 .5rem 1.8rem #07122030; background: var(--appearance-panel);
}
.appearance-options label { display: block; margin: 0; color: var(--appearance-ink); font: 600 .92em/1.4 system-ui,sans-serif; }
.appearance-options select {
  display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: .45rem; margin: .25rem 0 .65rem;
  border: 1px solid var(--appearance-line); border-radius: .45rem; background: var(--appearance-panel);
  color: var(--appearance-ink); font: inherit;
}
.appearance-menu :focus-visible { outline: 3px solid var(--appearance-focus); outline-offset: 2px; }
.appearance-options small { display: block; margin: 0; color: var(--appearance-muted); font-size: .85em; line-height: 1.5; }
.masthead .pilot { margin-inline-start: auto; }
[data-appearance-host] { display: flex; justify-content: end; }
@media (max-width: 760px) {
  .brand { font-size: 1.18rem; gap: 6px; }
  .brand img { width: 36px; }
  header .topline { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  header .topline .brand { margin-inline-end: auto; }
  header .topline .site-tabs { flex: 1 0 100%; order: 1; }
  .appearance-symbol { display: none; }
  header:has(.appearance-menu) > div { flex-wrap: wrap; }
  header:has(.appearance-menu) > div:not(.topline, .masthead) { gap: 6px; }
  header > div:not(.topline, .masthead) img { max-width: 25vw; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #151f2c; --raised: #213042; --ink: #edf2f7; --muted: #b8c7d7;
  --line: #46586c; --wash: #0e1620; --blue: #9bcaff; --focus: #ffd36b;
  --button-bg: #23598d; --button-hover: #326da6; --button-text: #fff;
  --appearance-panel: var(--surface); --appearance-ink: var(--ink); --appearance-muted: var(--muted);
  --appearance-line: #8196ab; --appearance-focus: var(--focus);
  background: var(--wash); color: var(--ink);
}
[data-theme="dark"] body { background: var(--wash); color: var(--ink); }
[data-theme="dark"] .profile-shell {
  --paper: var(--wash); --text: var(--ink); --sub: var(--muted); --edge: var(--line); --tile: #493929;
}
[data-theme="dark"] :is(header,.panel,.card,.form-progress,.skip-link,.receipt-number,.receipt-reward,#userDialog,#avatarDialog,#contactLogin) {
  background: var(--surface); color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] :is(h1,h2,h3) { color: inherit; }
[data-theme="dark"] :is(.lead,time,.clip figcaption,.rank-link,.contact-input svg,.report-address > svg) { color: var(--muted); }
[data-theme="dark"] a:not(.brand,.new-report,.action,.site-tabs a) { color: var(--blue); }
[data-theme="dark"] :is(.photo-frame,.review-photos img,.code-box,.site-tabs,.member-level,.total-grid p,.reward,.reminder-confirm,.count,.rank-position,.receipt-reward,#delivery:not(:empty)) {
  background: var(--raised); color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] .photo-picker .street-art { opacity: .24; }
[data-theme="dark"] .site-tabs a { color: var(--blue); background: var(--surface); box-shadow: none; }
[data-theme="dark"] .site-tabs a:hover { background: var(--raised); }
[data-theme="dark"] .site-tabs a[aria-current="page"] { background: var(--button-bg); color: white; }
[data-theme="dark"] :is(.total-grid strong,.receipt-number strong,.level-heading h3,#levelNumber,.member-level small,.member-level summary,.member-level li[aria-current],.plate-tag,.member-tools summary:hover) { color: var(--ink); }
[data-theme="dark"] input:not([type="file"],[type="checkbox"],[type="hidden"]), [data-theme="dark"] .code-box #code {
  color: var(--ink); background: var(--wash); border-color: var(--appearance-line);
}
[data-theme="dark"] input::placeholder,[data-theme="dark"] .code-box #code::placeholder { color: var(--muted); }
[data-theme="dark"] #progressBar, [data-theme="dark"] #progressBar::-webkit-progress-bar { background: var(--raised); }
[data-theme="dark"] :is(.section-mark,.icon-tile.sage,.profile-choice,.profile-receipt,.notice:not(:empty),.status,.user-badge,#scanStatus[data-state="success"],#result[data-state="invalid"],#delivery[data-state="sent"]) {
  background: #183c32; color: #b0f1cc; border-color: #679b83;
}
[data-theme="dark"] :is(.icon-tile,#inspection .section-mark,#submit .section-mark,.anonymous-warning,#review #subject,#scanStatus[data-state="notice"],#result[data-state="undated"]) {
  background: #422f1a; color: #ffdb9c; border-color: #b88b4e;
}
[data-theme="dark"] #scanStatus[data-state="busy"] { background: var(--raised); color: var(--blue); }
[data-theme="dark"] :is(#result[data-state="valid"],#result[data-state="recent"],#result[data-state="error"],#delivery[data-state="error"],.notice[data-error]:not(:empty),.user-badge.blocked,.user-actions .user-danger) {
  background: #48262b; color: #ffc8c4; border-color: #d58d88;
}
[data-theme="dark"] .field-error { color: #ffb3ac; }
[data-theme="dark"] #reportDetails:disabled .panel { background: #202327; }
[data-theme="dark"] #reportDetails:disabled :is(input,button) { background: #30353b; color: #bbc1c8; border-color: #697078; }
[data-theme="dark"] .action, [data-theme="dark"] .new-report { color: white; }
[data-theme="dark"] :is(.back,summary) { color: var(--blue); }
[data-theme="dark"] #map { background-color: var(--raised); }
[data-theme="dark"] #map .leaflet-control-attribution a { color: #164e81; }

/* This preference is independent of theme and respects the browser's base font size. */
:root[data-high-readability] {
  font-size: 125%; line-height: 1.65; --ink: #080f1a; --muted: #253448; --line: #58687c;
  --blue: #00377a; --focus: #063c95; --appearance-line: #394d61; --appearance-focus: var(--focus);
  --button-bg: #07386a; --button-hover: #00264c;
}
:root[data-high-readability][data-theme="dark"] {
  --ink: #fff; --muted: #e5edf5; --line: #a4b4c4; --blue: #b9ddff; --focus: #ffe67b;
  --appearance-line: #bacadc; --button-bg: #124779; --button-hover: #24578c;
}
[data-high-readability] body:not(.profile-shell) { font-size: 1rem; line-height: 1.65; }
[data-high-readability] .profile-shell { --text: var(--ink); --sub: var(--muted); --edge: var(--line); }
[data-high-readability] :is(h1,h2,h3,.brand) { letter-spacing: normal; }
[data-high-readability] :is(small,.pilot,.copy-note,.field-error,.report-meta,.appearance-options small,time,.clip figcaption) { font-size: .94rem; }
[data-high-readability] :is(.new-report,button,.pick-action,.site-tabs a,.action,.appearance-menu summary) { box-shadow: inset 0 0 0 1px currentColor; }
[data-high-readability] :is(.policy,.panel,.card,.receipt-number,input:not([type="file"],[type="checkbox"],[type="hidden"])) { border-color: var(--line); }
[data-high-readability] :is(a,summary):not(.brand,.action,.new-report) { text-decoration: underline; text-underline-offset: .18em; }
[data-high-readability] body :focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
[data-high-readability] .cover h1 { font-size: clamp(1.7rem,4vw,3.35rem); overflow-wrap: anywhere; }
@media (max-width: 780px) {
  [data-high-readability] .form-progress { position: static; }
  [data-high-readability] :is(.masthead,.topline) { padding-block: 5px; row-gap: 4px; }
}
@media (max-width: 420px) {
  [data-high-readability] .masthead .pilot { order: 1; max-width: none; width: 100%; text-align: start; }
  [data-high-readability] .masthead .pilot b { display: inline; }
  [data-high-readability] .masthead .appearance-menu { margin-inline-start: auto; }
  [data-high-readability] .ranking-table :is(th,td) { padding-inline: 3px; }
}
@media (forced-colors: active) {
  .appearance-menu > summary,.appearance-options,.appearance-options select { border: 1px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
}
[data-high-readability] .challenge #captcha {
  width: min(100%, 15rem); height: auto; max-width: 100%; max-height: none; object-fit: contain;
}
@media (max-width: 780px) {
  header:has(.appearance-menu), [data-appearance-host] { position: relative; z-index: 12; }
  .appearance-menu { position: static; }
  .appearance-options { top: calc(100% + 2px); inset-inline-end: 12px; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  [data-high-readability] .topline { flex-wrap: wrap; gap: 6px 12px; padding-block: 8px; }
  [data-high-readability] .topline .brand { margin-inline-end: auto; }
  [data-high-readability] .topline .site-tabs { order: 1; flex-basis: 100%; }
}

/* Match the site theme, including a manual override of the device theme. */
[data-theme="dark"] .brand img { content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%2221%2059%20138%2061%22%3E%0A%20%20%3Cstyle%3E%0A%20%20%20%20.car%20%7B%20fill%3A%20%23ffffff%20%7D%0A%20%20%3C%2Fstyle%3E%0A%20%20%3Cg%20class%3D%22car%22%3E%0A%20%20%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M22%20102c0-5%202-14%205-18%202-3%207-4%2012-5l12-12c7-6%2012-7%2026-7h12c10%200%2017%203%2025%209l10%208c3%202%206%203%2010%203l-2%206h-17c-12%200-20%207-24%2018l-1%204H65c-1-10-7-16-15-16s-14%206-15%2016h-5c-5%200-8-2-8-6Zm29-24q0%202%203%202h22q2%200%202-2v-9q0-2-2-2h-5q-10%200-16%206Zm32-9v9q0%202%202%202h23q3%200%201-3-8-9-19-10h-5q-2%200-2%202Z%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2250.5%22%20cy%3D%22107.5%22%20r%3D%2211.5%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%22108.5%22%20cy%3D%22107.5%22%20r%3D%2211.5%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cpath%20fill%3D%22%23ff6800%22%20d%3D%22M92%20108c2-14%2012-23%2026-23h18l-3-12q-1-5%203-3l20%2020q3%203%200%205l-20%2016q-4%203-3-2l2-10h-12c-4-5-9-7-15-7-9%200-15%206-17%2016Z%22%2F%3E%0A%3C%2Fsvg%3E%0A"); }
