/* Wyen el Baladiyat. Quiet limestone canvas, warm ink, hairlines.
   Flag red only for actions (Report, Publish, the selected pin, the "new" dot).
   Cedar green only means fixed. */

@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url(/vendor/fonts/readex-arabic.woff2) format("woff2-variations");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E,
    U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-display: swap;
  font-weight: 160 700;
  src: url(/vendor/fonts/readex-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #f6f3ee;
  --surface: #ffffff;
  --sunken: #efebe5;
  --raised: #ffffff;
  --hairline: rgb(28 25 23 / 0.08);
  --ink: #1c1917;
  --ink-2: #6b655e;
  --ink-3: #746e67;
  --red: #d7262e;
  --red-press: #b81f26;
  --red-text: #c01f27;
  --green: #00754a;
  --green-tint: #e5f1eb;
  --scrim: rgb(246 243 238 / 0.3);
  --glass: rgb(255 253 249 / 0.78);
  --glass-solid: #fffdf9;
  --glass-border: rgb(28 25 23 / 0.1);
  --glass-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75), 0 2px 6px rgb(28 25 23 / 0.06),
    0 12px 32px -10px rgb(28 25 23 / 0.22);

  --r-badge: 8px;
  --r-thumb: 12px;
  --r-media: 16px;
  --r-card: 20px;
  --r-sheet: 28px;
  --gutter: 16px;
  --bar: calc(56px + env(safe-area-inset-top));
  --dock-space: calc(env(safe-area-inset-bottom) + 96px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --t-slow: 320ms;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141311;
    --surface: #1e1c1a;
    --sunken: #282522;
    --raised: #36322e;
    --hairline: rgb(255 255 255 / 0.08);
    --ink: #f4f1ec;
    --ink-2: #b5aea5;
    --ink-3: #8c8781;
    --red: #d03239;
    --red-press: #b8282f;
    --red-text: #ec5d62;
    --green: #2fa36f;
    --green-tint: #16261e;
    --scrim: rgb(20 19 17 / 0.3);
    --glass: rgb(30 28 26 / 0.72);
    --glass-solid: #1e1c1a;
    --glass-border: rgb(255 255 255 / 0.1);
    --glass-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 12px 32px -8px rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.65 "Readex Pro", system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
:lang(fr) body,
:lang(en) body {
  letter-spacing: -0.005em;
  line-height: 1.55;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
  unicode-bidi: plaintext; /* each line aligns to the language it is typed in */
}
a,
button,
label,
.press {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Headings receive focus programmatically (for screen readers); no ring for those. */
[tabindex="-1"]:focus {
  outline: none;
}
.i {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Iconoir solid icons are filled shapes. */
.i.solid {
  fill: currentColor;
  stroke: none;
}
[dir="rtl"] .flip {
  transform: scaleX(-1);
}
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
main {
  min-height: 100dvh;
  padding-bottom: var(--dock-space);
}
body[data-chrome="bare"] main,
body[data-chrome="flow"] main {
  padding-bottom: 0;
}

/* Press feedback on everything tappable. */
.press {
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease-std),
    color var(--t) var(--ease-std), opacity var(--t) var(--ease-std), box-shadow var(--t) var(--ease-std);
}
.press:active {
  transform: scale(0.96);
}
.fade-in {
  animation: fade-in var(--t-fast) var(--ease-std) both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------------------------------------------------------------- top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar);
  padding: env(safe-area-inset-top) var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color var(--t) var(--ease-std), box-shadow var(--t) var(--ease-std);
}
body.scrolled .bar {
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 0.5px 0 var(--hairline);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
:lang(ar) .brand {
  letter-spacing: 0;
}
.brand b {
  color: var(--red);
  font-weight: 700;
}
.mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.bar-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity var(--t) var(--ease-std);
}
body.scrolled .bar-title {
  opacity: 1;
}
.spacer {
  flex: 1;
}
.circle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.circle .i {
  width: 22px;
  height: 22px;
}
.circle.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.admin-btn {
  position: relative;
  color: var(--ink-3);
}
.admin-btn.on {
  background: var(--ink);
  color: var(--canvas);
}
.admin-btn .count {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--canvas);
}

/* ---------------------------------------------------------------- dock */

.dock {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  padding: 6px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform var(--t-slow) var(--ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock,
  .circle.glass {
    background: var(--glass-solid);
  }
}
body[data-chrome="bare"] .dock,
body[data-chrome="flow"] .dock {
  transform: translate(-50%, 140%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility 0s var(--t-slow);
}
.dock-scrim {
  position: fixed;
  z-index: 29;
  inset-inline: 0;
  bottom: 0;
  height: calc(112px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--scrim), transparent);
  pointer-events: none;
}
body[data-chrome="bare"] .dock-scrim,
body[data-chrome="flow"] .dock-scrim,
body[data-view="map"] .dock-scrim {
  display: none;
}
.tab {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--ink-3);
}
.tab .i {
  transition: stroke-width var(--t) var(--ease-std), color var(--t) var(--ease-std);
}
.tab[aria-current="page"] {
  color: var(--ink);
}
.tab[aria-current="page"] .i {
  stroke-width: 2;
}
.tab::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transform: scale(0);
  transition: opacity var(--t) var(--ease-std), transform var(--t-slow) var(--spring);
}
.tab[aria-current="page"]::after {
  opacity: 1;
  transform: none;
}
.report-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding-inline: 14px 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: padding var(--t-slow) var(--ease), background-color var(--t) var(--ease-std),
    transform var(--t-fast) var(--ease);
}
.report-btn:active {
  background: var(--red-press);
  transform: scale(0.96);
}
.report-btn .i {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
.report-btn span {
  display: inline-block;
  max-width: 120px;
  transition: max-width var(--t-slow) var(--ease), opacity var(--t) var(--ease-std);
}
body.scrolled-down .report-btn {
  padding-inline: 14px;
  gap: 0;
}
body.scrolled-down .report-btn span {
  max-width: 0;
  opacity: 0;
}

/* ---------------------------------------------------------------- toast & sheet */

#toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 82px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  pointer-events: none;
  transition: opacity var(--t) var(--ease-std), transform var(--t-slow) var(--spring);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast[data-kind="error"] {
  background: var(--red);
  color: #fff;
}
body[data-chrome="bare"] #toast,
body[data-chrome="flow"] #toast {
  bottom: calc(env(safe-area-inset-bottom) + 92px);
}
#turnstile {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 90px);
  transform: translateX(-50%);
}

dialog.sheet {
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 520px;
  margin: auto auto 0;
  padding: 8px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--surface);
  color: var(--ink);
  animation: sheet-in var(--t-slow) var(--ease);
}
dialog.sheet::backdrop {
  background: rgb(20 15 10 / 0.32);
  animation: fade-in var(--t) var(--ease-std);
}
dialog.sheet.closing {
  animation: sheet-out var(--t) var(--ease-std) forwards;
}
dialog.sheet.closing::backdrop {
  animation: fade-out var(--t) var(--ease-std) forwards;
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}
@keyframes sheet-out {
  to {
    transform: translateY(100%);
  }
}
.grabber {
  width: 36px;
  height: 5px;
  margin: 2px auto 14px;
  border-radius: 3px;
  background: var(--sunken);
}
.sheet h2 {
  padding: 0 4px 8px;
  font-size: 17px;
  font-weight: 600;
}
.sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 16px;
  text-align: start;
}
.sheet-item:active,
.sheet-item[aria-current="true"] {
  background: var(--sunken);
}
.sheet-item .end {
  margin-inline-start: auto;
}
.sheet textarea {
  margin: 4px 0 8px;
  min-height: 120px;
}
.sheet .note {
  margin: 0 0 14px;
}
.list-foot {
  margin-top: 20px;
}
.sheet-row {
  display: flex;
  gap: 10px;
}
.sheet-row .btn {
  flex: 1;
}
.edit-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.edit-cats .chip,
.pick-chips .chip {
  background: var(--sunken);
}
.edit-cats .chip[aria-pressed="true"],
.pick-chips .chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}
.update-list {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.update-list li {
  padding-inline-start: 12px;
  box-shadow: inset 2px 0 0 var(--sunken);
}
[dir="rtl"] .update-list li {
  box-shadow: inset -2px 0 0 var(--sunken);
}
.update-list p {
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.update-list small {
  color: var(--ink-3);
  font-size: 13px;
}
.sheet-item.danger {
  color: var(--red-text);
}

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.btn .i {
  width: 20px;
  height: 20px;
}
.btn-ink {
  background: var(--ink);
  color: var(--canvas);
}
.btn-red {
  background: var(--red);
  color: #fff;
}
.btn-red:active {
  background: var(--red-press);
}
.btn-soft {
  background: var(--sunken);
  color: var(--ink);
}
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.segmented {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: var(--sunken);
}
.segmented::before {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / var(--n, 2));
  border-radius: 999px;
  background: var(--raised);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 0 0 0.5px var(--glass-border);
  transform: translateX(calc(var(--i, 0) * 100% * var(--dir, 1)));
  transition: transform var(--t-slow) var(--ease);
}
[dir="rtl"] .segmented::before {
  --dir: -1;
}
.segmented button {
  position: relative;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t) var(--ease-std);
}
.segmented button[aria-pressed="true"] {
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.chip[aria-pressed="true"],
.chip.on {
  background: var(--sunken);
  color: var(--ink);
}
.chip .i {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- page head */

.head {
  padding: 8px 0 16px;
}
.head h1 {
  font-size: 30px;
  font-weight: 650;
  line-height: 1.3;
}
:lang(fr) .head h1,
:lang(en) .head h1 {
  letter-spacing: -0.02em;
}
.head p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.controls::-webkit-scrollbar {
  display: none;
}

/* ---------------------------------------------------------------- report card */

.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.list > li {
  animation: rise var(--t-slow) var(--ease) both;
}
.card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meta {
  display: flex;
  flex-wrap: wrap; /* a long category moves the time and distance to a second line, never gets cut */
  align-items: center;
  gap: 2px 6px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.4;
}
.meta > * {
  flex: none;
  white-space: nowrap;
}
.meta .cat {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta .dist {
  color: var(--ink-2);
  font-weight: 500;
}
.meta .i {
  width: 16px;
  height: 16px;
  color: var(--ink-2);
}
.meta .cat {
  color: var(--ink-2);
  font-weight: 500;
}
.meta .sep::before {
  content: "·";
}
.new-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
}
.card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 13px;
}
.card-foot .stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-foot .stat .i {
  width: 16px;
  height: 16px;
}
.card-foot .end {
  margin-inline-start: auto;
}
.thumb {
  position: relative;
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: var(--r-thumb);
  overflow: hidden;
  background: var(--sunken);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
img.fade {
  opacity: 0;
  transition: opacity var(--t) var(--ease-std);
}
img.fade.ready {
  opacity: 1;
}
.thumb .more {
  direction: ltr;
  position: absolute;
  bottom: 4px;
  inset-inline-end: 4px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge.fixed {
  padding-inline-start: 5px;
  background: var(--green-tint);
  color: var(--green);
  font-weight: 600;
}
.badge.fixed .i {
  width: 17px;
  height: 17px;
}
.badge .i {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
.badge.warn {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red-text);
}

.skeleton {
  height: 128px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
  animation: breathe 1.4s var(--ease-std) infinite alternate;
}
@keyframes breathe {
  to {
    opacity: 0.55;
  }
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 8px;
  text-align: center;
  animation: fade-in var(--t) var(--ease-std) both;
}
.empty .art {
  width: min(300px, 82%);
  height: auto;
  margin-bottom: 4px;
}
.empty h2 {
  font-size: 17px;
  font-weight: 600;
}
.empty p {
  max-width: 32ch;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 15px;
}

.panel {
  min-height: calc(100dvh - 300px);
  align-content: center;
  padding: 8px 0 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  animation: rise var(--t-slow) var(--ease) both;
}
.panel .art {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-bottom: 12px;
}
.panel h2 {
  font-size: 22px;
  font-weight: 600;
}
.panel h2,
.empty h2,
.flow-done h2 {
  line-height: 1.3;
  text-wrap: balance;
}
:lang(ar) .panel h2,
:lang(ar) .empty h2,
:lang(ar) .flow-done h2 {
  line-height: 1.5;
}
.panel p,
.empty p {
  text-wrap: pretty;
}
.panel p {
  max-width: 34ch;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 15px;
}
.panel .btn {
  width: 100%;
}
.link {
  padding: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.install {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
  animation: rise var(--t-slow) var(--ease) both;
}
.install img {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
}
.install .txt {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}
.install strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.install .circle {
  width: 44px;
  height: 44px;
  background: none;
  color: var(--ink-3);
}
.install .i.inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

/* ---------------------------------------------------------------- map */

.map-screen {
  position: relative;
  height: 100dvh;
}
.map {
  width: 100%;
  height: 100%;
  background: var(--sunken);
}
.map .maplibregl-canvas {
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-std);
}
.map.ready .maplibregl-canvas {
  opacity: 1;
}
.map-top {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 10px);
  inset-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-top .segmented {
  height: 44px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow);
}
.map-note {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 62px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  animation: fade-in var(--t) var(--ease-std) both;
}
.map-locate {
  position: absolute;
  z-index: 2;
  inset-inline-end: var(--gutter);
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  transition: opacity var(--t) var(--ease-std);
}
.peek {
  position: absolute;
  z-index: 3;
  inset-inline: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 82px);
  animation: rise var(--t-slow) var(--ease) both;
}
.peek .card {
  box-shadow: var(--glass-shadow), 0 0 0 0.5px var(--hairline);
}
.map-screen:has(.peek .card) .map-locate {
  opacity: 0;
  pointer-events: none;
}
.maplibregl-ctrl-attrib {
  font-size: 10px;
}
.map-screen .maplibregl-ctrl-top-left,
.map-screen .maplibregl-ctrl-top-right {
  top: env(safe-area-inset-top);
}
.maplibregl-ctrl-attrib.maplibregl-compact {
  margin: 12px !important;
  background: var(--glass) !important;
  box-shadow: var(--glass-shadow);
  color: var(--ink-2);
}
.maplibregl-ctrl-attrib-button {
  opacity: 0.5;
}
@media (prefers-color-scheme: dark) {
  .maplibregl-ctrl-attrib-button {
    filter: invert(1);
  }
}

/* ---------------------------------------------------------------- report detail */

.detail-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
  transition: background-color var(--t) var(--ease-std), box-shadow var(--t) var(--ease-std);
}
body.scrolled .detail-bar {
  background: color-mix(in srgb, var(--canvas) 85%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 0.5px 0 var(--hairline);
}
.detail {
  padding-bottom: calc(env(safe-area-inset-bottom) + 96px);
  animation: fade-in var(--t) var(--ease-std) both;
}
.detail .meta {
  margin-top: 8px;
}
.detail-title {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-wrap: pretty;
}
.detail-title:dir(ltr) {
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.detail-title.long {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.badges:empty {
  display: none;
}
.photos-strip {
  display: flex;
  gap: 8px;
  margin: 18px calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.photos-strip::-webkit-scrollbar {
  display: none;
}
.photos-strip button {
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--sunken);
  scroll-snap-align: center;
}
.photos-strip.many button {
  width: 86%;
}
.photos-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.section h3 {
  margin-bottom: 12px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}
.minimap {
  position: relative;
  margin-top: 16px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--sunken);
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.minimap .map {
  pointer-events: none;
}
.minimap .btn {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  inset-inline-end: 10px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow);
  color: var(--ink);
}
.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.4;
}
.timeline li > div {
  padding-top: 4px;
}
.timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  inset-inline-start: 13.25px;
  top: 30px;
  bottom: -12px;
  width: 1.5px;
  background: var(--sunken);
}
.timeline .node {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink-3);
}
.timeline .node .i {
  width: 16px;
  height: 16px;
}
.timeline .fixed .node .i {
  width: 28px;
  height: 28px;
}
.timeline li.on:has(+ li.on)::before {
  background: var(--ink);
}
.timeline .on .node {
  background: var(--ink);
  color: var(--canvas);
}
.timeline .on.fixed .node {
  background: none;
  color: var(--green);
}
.timeline small {
  display: block;
  color: var(--ink-3);
  font-size: 13px;
}
.fix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  box-shadow: 0 -0.5px 0 var(--hairline);
  font-size: 15px;
}
.meter {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.meter i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 26%, transparent);
  transition: background-color var(--t-slow) var(--ease-std);
}
.meter i.on {
  background: var(--green);
}
.meter i.on:nth-child(2) {
  transition-delay: 70ms;
}
.meter i.on:nth-child(3) {
  transition-delay: 140ms;
}
.flag-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px auto 0;
  padding: 8px;
  color: var(--ink-3);
  font-size: 13px;
}
.flag-link .i {
  width: 16px;
  height: 16px;
}
.action-bar {
  position: fixed;
  z-index: 25;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px var(--gutter) calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(to top, var(--canvas) 55%, transparent);
  animation: rise var(--t-slow) var(--ease) both;
}
.action-bar .btn {
  flex: 1;
  max-width: 540px;
}
.action-bar .circle {
  width: 52px;
  height: 52px;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.btn[data-vote="fixed"][aria-pressed="true"] {
  background: var(--green-tint);
  color: var(--green);
}
.btn[data-vote="seen"][aria-pressed="true"] {
  background: var(--sunken);
  color: var(--ink);
}
.btn .count {
  opacity: 0.6;
  font-weight: 500;
}
.pop {
  animation: pop 420ms var(--spring);
}
@keyframes pop {
  40% {
    transform: scale(1.06);
  }
}

dialog.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  animation: fade-in var(--t) var(--ease-std);
}
dialog.lightbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
dialog.lightbox .circle {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  inset-inline-end: 12px;
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

/* ---------------------------------------------------------------- new report flow */

.flow {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.flow-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(env(safe-area-inset-top) + 8px) var(--gutter) 8px;
}
.progress {
  flex: 1;
  display: flex;
  gap: 4px;
}
.progress i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 26%, transparent);
  overflow: hidden;
}
.progress i::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform var(--t-slow) var(--ease);
}
[dir="rtl"] .progress i::after {
  transform-origin: right;
}
[dir="ltr"] .progress i::after {
  transform-origin: left;
}
.progress i.on::after {
  transform: scaleX(1);
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: step-in var(--t-slow) var(--ease) both;
}
.step.back {
  animation-name: step-in-back;
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(calc(20px * var(--dir, 1)));
  }
}
@keyframes step-in-back {
  from {
    opacity: 0;
    transform: translateX(calc(-20px * var(--dir, 1)));
  }
}
[dir="rtl"] .step {
  --dir: -1;
}
.step .head {
  padding-top: 12px;
}
.step > .wrap {
  width: 100%;
}
.step-body {
  flex: 1;
}
.step-foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 16px var(--gutter) calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(to top, var(--canvas) 65%, transparent);
}
.step-foot .btn {
  width: 100%;
  max-width: 608px;
  margin: 0 auto;
  display: flex;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 112px;
  padding: 12px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
  font-size: 14px;
  font-weight: 600;
  text-align: start;
  line-height: 1.35;
}
:lang(ar) .cat-tile {
  font-size: 15px;
}
.cat-tile .i {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: var(--sunken);
  color: var(--ink);
  transition: background-color var(--t) var(--ease-std), color var(--t) var(--ease-std);
}
.cat-tile[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ink);
}
/* Events are a different kind of post: one wide tile under the problem grid. */
.cat-tile[data-cat="event"] {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 72px;
  margin-top: 6px;
}
.cat-tile[aria-pressed="true"] .i {
  background: var(--ink);
  color: var(--canvas);
}
.cat-tile[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ink);
}
.cat-tile[aria-pressed="true"] .i {
  stroke-width: 2;
}
.pick {
  position: relative;
  flex: 1;
  min-height: 56dvh;
  margin: 0 var(--gutter);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--sunken);
}
.pick > .map.map {
  position: absolute;
  inset: 0;
  height: auto;
}
.pick .center-pin {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -44px 0 0 -22px;
  pointer-events: none;
  transition: transform var(--t-slow) var(--spring);
  filter: drop-shadow(0 4px 6px rgb(0 0 0 / 0.25));
}
.pick.moving .center-pin {
  transform: translateY(-12px);
  transition: transform var(--t) var(--ease);
}
.pick .center-dot {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 4px;
  margin: -2px 0 0 -5px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.3);
  transition: transform var(--t) var(--ease);
}
.pick.moving .center-dot {
  transform: scale(0.6);
}
.pick .circle {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  inset-inline-end: 12px;
}
textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
  resize: none;
  font-size: 16px;
  line-height: 1.6;
  transition: box-shadow var(--t) var(--ease-std);
}
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1.5px var(--ink);
}
textarea::placeholder {
  color: var(--ink-3);
}
.counter {
  direction: ltr;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 12px;
  text-align: end;
}
.label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 20px 0 10px;
  font-size: 15px;
  font-weight: 600;
}
.label small {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400;
}
.photo-row {
  display: flex;
  gap: 10px;
}
.photo,
.add-photo {
  position: relative;
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: var(--r-thumb);
  overflow: hidden;
}
.photo {
  animation: pop-in var(--t-slow) var(--spring) both;
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo.bad {
  box-shadow: 0 0 0 2px var(--red);
}
.photo .remove {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
}
.photo .remove .i {
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  stroke-width: 2;
}
.add-photo:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.add-photo {
  display: grid;
  place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--ink-3) 55%, transparent);
  color: var(--ink-2);
  cursor: pointer;
}
.add-photo input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}
.note .i {
  width: 18px;
  height: 18px;
  color: var(--ink-2);
}
.alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  color: var(--ink);
  font-size: 15px;
  animation: rise var(--t-slow) var(--ease) both;
}
.alert p {
  display: flex;
  gap: 10px;
}
.alert .i {
  width: 20px;
  height: 20px;
  color: var(--red);
}
.alert .btn {
  margin-top: 12px;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.flow-done {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}
.flow-done .drop {
  position: relative;
  width: 120px;
  height: 104px;
  margin-bottom: 8px;
}
.flow-done .drop svg {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  animation: drop 620ms var(--spring) 80ms both;
}
.flow-done .drop::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 36px;
  height: 8px;
  margin-left: -18px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.18);
  animation: shadow 620ms var(--spring) 80ms both;
}
.flow-done .drop::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 96px;
  height: 16px;
  margin-left: -48px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--red) 40%, transparent);
  animation: ripple 900ms var(--ease) 520ms both;
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-48px);
  }
}
@keyframes shadow {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes ripple {
  from {
    opacity: 1;
    transform: scale(0.3);
  }
  to {
    opacity: 0;
    transform: scale(1);
  }
}
.flow-done h2 {
  font-size: 24px;
  font-weight: 600;
}
.flow-done p {
  max-width: 30ch;
  margin-bottom: 8px;
  color: var(--ink-2);
}
.review-block {
  position: relative;
}
.review-block + .review-block {
  margin-top: 12px;
}
.review-block .edit {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--sunken);
  font-size: 13px;
  font-weight: 500;
}
.review-block .muted {
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- admin */

.admin-login {
  display: grid;
  gap: 12px;
}
.admin-login input {
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--hairline);
}
.admin-row {
  display: grid;
  gap: 10px;
  padding: 10px 4px 6px;
}
.admin-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-actions {
  display: flex;
  gap: 8px;
}
.admin-actions .btn {
  flex: 1;
}

/* ---------------------------------------------------------------- page transitions */

::view-transition-old(root) {
  animation: 140ms var(--ease-std) both vt-out;
}
::view-transition-new(root) {
  animation: 240ms var(--ease) both vt-in;
}
@keyframes vt-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.dock {
  view-transition-name: dock;
}
::view-transition-group(dock) {
  animation-duration: var(--t-slow);
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .spinner {
    animation-duration: 1.6s !important;
    animation-iteration-count: infinite !important;
  }
}

/* Arabic glyphs read smaller than Latin at the same size: lift the small roles. */
:lang(ar) .meta,
:lang(ar) .note,
:lang(ar) .timeline small,
:lang(ar) .card-foot {
  font-size: 14px;
}
:lang(ar) .badge {
  font-size: 13px;
}

/* ---------------------------------------------------------------- updates on the admin desk */

.update-card {
  display: grid;
  gap: 8px;
}
.update-card .admin-flags {
  align-items: center;
}
.update-card small {
  color: var(--ink-3);
  font-size: 13px;
}
.update-card .body {
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.update-on {
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- choosing where to look */

.sheet-label {
  margin: 14px 0 2px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}
.area-group {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  box-shadow: 0 -0.5px 0 var(--hairline);
}
.area-group > span {
  color: var(--ink-2);
  font-size: 13px;
}
.pick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pick-chips .chip,
.edit-cats .chip {
  height: 40px;
}
.edit-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 15px;
}
.edit-ends[hidden] {
  display: none;
}
.edit-ends input {
  font: inherit;
  color: inherit;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--canvas);
}

.link-btn {
  margin-inline-start: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn.danger {
  color: var(--red);
}
