/* ==========================================================================
   Arbil Reef storefront
   Two viewing modes, because that is how reef keepers actually look at coral:
   "day" is white light, "blue" is actinic. The switch changes the whole page,
   and swaps each animal to its under-blues photograph where one exists.
   ========================================================================== */

:root {
  --ground:     #E7EEEE;
  --surface:    #FFFFFF;
  --surface-2:  #F1F7F7;
  --ink:        #0C2328;
  --ink-2:      #4C666C;
  --ink-3:      #7C9198;
  --line:       #C9D8D9;
  --line-soft:  #DEE9E9;
  --accent:     #0B6F6E;
  --accent-2:   #08504F;
  --on-accent:  #FFFFFF;
  --flag:       #C22E63;
  --warn:       #9A5B04;
  --good:       #0B6F6E;
  --shadow:     0 1px 2px rgba(12, 35, 40, .06), 0 8px 24px -12px rgba(12, 35, 40, .18);
  --radius:     4px;

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body:    "Public Sans", system-ui, -apple-system, sans-serif;
  --data:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  color-scheme: light;
}

[data-light="blue"] {
  --ground:     #030816;
  --surface:    #07112A;
  --surface-2:  #0B1938;
  --ink:        #DEE9FF;
  --ink-2:      #8CA0D0;
  --ink-3:      #6176A8;
  --line:       #1A2B55;
  --line-soft:  #132043;
  --accent:     #35F0E0;
  --accent-2:   #7CFF4F;
  --on-accent:  #021018;
  --flag:       #FF4D95;
  --warn:       #FFC44D;
  --good:       #35F0E0;
  --shadow:     0 0 0 1px rgba(53, 240, 224, .07), 0 18px 50px -20px rgba(53, 240, 224, .28);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  transition: background-color .45s ease, color .45s ease;
}

/* The actinic mode gets a faint water-column gradient; daylight stays flat. */
[data-light="blue"] body {
  background-image:
    radial-gradient(120% 80% at 50% -20%, rgba(53, 240, 224, .10), transparent 60%),
    radial-gradient(80% 60% at 90% 110%, rgba(255, 77, 149, .08), transparent 60%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 0;
}

/* Every number on this site is monospaced: prices, stock, sizes, totals.
   The hobby runs on measurements, so they are set like measurements. */
.num, .price, .money, td.num, .qty {
  font-family: var(--data);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.eyebrow {
  font-family: var(--data);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stack > * + * { margin-top: var(--gap, 1rem); }

/* --- header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .85rem 0;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.04em;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

.brand__mark { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-inline-start: auto;
  align-items: center;
  font-size: .9rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.cart-link { display: inline-flex; align-items: center; gap: .45rem; }

.cart-count {
  font-family: var(--data);
  font-size: .7rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: .05rem .45rem;
  line-height: 1.5;
}

/* --- the light switch: this page's signature control --------------------- */

.light-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface);
  font-family: var(--data);
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.light-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  padding: .35rem .7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}

.light-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

[data-light="blue"] .light-switch button[aria-pressed="true"] {
  box-shadow: 0 0 18px -2px var(--accent);
}

/* --- hero --------------------------------------------------------------- */

.hero { padding: 3.5rem 0 2rem; }

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  max-width: 16ch;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__lede {
  margin: 1.1rem 0 0;
  max-width: 48ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.hero__meta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: .9rem;
  padding: .7rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background-color .2s ease, border-color .2s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); }

.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); }

.btn--block { width: 100%; }

.btn[disabled], .btn--disabled {
  opacity: .5;
  pointer-events: none;
}

.btn--link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .8rem;
  cursor: pointer;
}

.btn--link:hover { color: var(--flag); }

/* --- product rack ------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 { font-size: 1.35rem; }

.rack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .3s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card__shot {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}

.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card:hover .card__shot img { transform: scale(1.04); }

/* Photo swap driven entirely by the light switch. */
.shot--blue { display: none; }
[data-light="blue"] .has-blue .shot--day { display: none; }
[data-light="blue"] .has-blue .shot--blue { display: block; }

.card__body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }

.card__name { font-size: 1.05rem; font-family: var(--display); font-weight: 700; }

.card__foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .35rem;
}

.card__price { font-size: 1.05rem; font-weight: 700; }
.card__price small { font-family: var(--body); font-weight: 400; color: var(--ink-3); font-size: .7rem; }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.tag {
  font-family: var(--data);
  font-size: .6rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .18rem .45rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-2);
}

.tag--flag { color: var(--flag); border-color: color-mix(in srgb, var(--flag) 45%, transparent); }
.tag--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }

.sold-out {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(2px);
  font-family: var(--data);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* --- requirement meters -------------------------------------------------
   Care, light and flow are shown as three-step meters rather than words,
   because that is the shorthand every reef keeper already reads.          */

.meter { display: inline-flex; align-items: center; gap: .4rem; }

.meter__label {
  font-family: var(--data);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meter__bars { display: inline-flex; gap: 2px; }

.meter__bar {
  width: 9px;
  height: 4px;
  border-radius: 1px;
  background: var(--line);
}

.meter__bar.is-on { background: var(--accent); }
.meter--warn .meter__bar.is-on { background: var(--warn); }
.meter--hot  .meter__bar.is-on { background: var(--flag); }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.spec { display: flex; flex-direction: column; gap: .4rem; }
.spec__value { font-family: var(--data); font-size: .85rem; }

/* --- product detail ----------------------------------------------------- */

.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2.5rem; padding: 2rem 0 3rem; }

.gallery { display: flex; flex-direction: column; gap: .6rem; }

.gallery__main {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}

.gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.gallery__strip { display: flex; gap: .5rem; flex-wrap: wrap; }

.gallery__thumb {
  width: 68px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  padding: 0;
  background: none;
  cursor: pointer;
}

.gallery__thumb[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail__title { font-size: clamp(1.9rem, 4vw, 2.6rem); }

.detail__price { font-size: 1.6rem; font-weight: 700; }

.prose { color: var(--ink-2); }
.prose p { margin: 0 0 .9rem; }
.prose :last-child { margin-bottom: 0; }

/* --- forms -------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: .35rem; }

.field > label {
  font-family: var(--data);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.input, select.input, textarea.input {
  font-family: var(--body);
  font-size: .95rem;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

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

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

.field__error { color: var(--flag); font-size: .8rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

/* Fulfillment choices read as cards, since each carries a fee and a promise. */
.choice {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .2s ease;
}

.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice input { margin-inline-end: .5rem; }
.choice__head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; font-weight: 600; }
.choice__note { color: var(--ink-3); font-size: .85rem; margin-top: .3rem; }

/* --- panels, tables, totals --------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { text-align: start; padding: .8rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.lines th {
  font-family: var(--data);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.lines td.right, .lines th.right { text-align: end; }
.lines tr:last-child td { border-bottom: 0; }

.line-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); }

.totals { display: flex; flex-direction: column; gap: .5rem; }
.totals__row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; color: var(--ink-2); }
.totals__row--grand {
  border-top: 1px solid var(--line);
  padding-top: .7rem;
  margin-top: .2rem;
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 700;
}

.callout {
  border-inline-start: 2px solid var(--accent);
  background: var(--surface-2);
  padding: .85rem 1rem;
  font-size: .9rem;
  color: var(--ink-2);
  border-start-end-radius: var(--radius);
  border-end-end-radius: var(--radius);
}

.callout--flag { border-inline-start-color: var(--flag); }

.notice {
  padding: .8rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.notice--error { border-color: var(--flag); color: var(--flag); }

.empty {
  text-align: center;
  padding: 4rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* --- filters ------------------------------------------------------------ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.filters .field { min-width: 150px; flex: 1; }

/* --- footer ------------------------------------------------------------- */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  color: var(--ink-3);
  font-size: .85rem;
}

.site-footer a { color: var(--ink-2); }

.foot-grid { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; }

/* --- pagination --------------------------------------------------------- */

.pagination { display: flex; gap: .35rem; list-style: none; padding: 0; margin: 2rem 0 0; flex-wrap: wrap; font-family: var(--data); font-size: .8rem; }
.pagination a, .pagination span {
  display: inline-flex;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0 .5rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
}
.pagination .active span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pagination .disabled span { opacity: .4; }

/* --- accessibility floor ------------------------------------------------ */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--on-accent);
  padding: .6rem 1rem;
  z-index: 100;
}

.skip-link:focus { left: 1rem; top: .6rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* --- responsive --------------------------------------------------------- */

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 1.75rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 2.25rem 0 1.5rem; }
  .site-nav { gap: .9rem; font-size: .82rem; }
  .brand { font-size: 1.05rem; }
}

@media (max-width: 560px) {
  .rack { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
  .wrap, .wrap--narrow { width: calc(100% - 1.75rem); }
  .lines th:first-child, .lines td:first-child { padding-inline-start: 0; }
}


/* ==========================================================================
   Arabic and Kurdish (Sorani)
   Both are written right to left in Arabic script. Flexbox and grid flip
   themselves under dir="rtl"; what does not come free is the typography.
   ========================================================================== */

html[dir="rtl"] {
  /* Readex Pro carries the display voice into Arabic script; Noto Sans Arabic
     is the workhorse. Both cover the Kurdish letters ڕ ڵ ۆ ێ ڤ گ چ پ ژ that
     many otherwise-good Arabic faces render as empty boxes. */
  --display: "Readex Pro", "Noto Sans Arabic", "Segoe UI", sans-serif;
  --body: "Noto Sans Arabic", "Readex Pro", "Segoe UI", sans-serif;
  /* Prices stay monospaced Latin digits, as Iraqi price lists are written. */
}

/* Arabic script needs more room between lines than Latin does. */
html[dir="rtl"] body { line-height: 1.85; }

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
  line-height: 1.35;
  /* Latin display tracking would pull the joined letterforms apart. */
  letter-spacing: normal;
}

/* Arabic is cursive: letter-spacing severs the joins between letters and
   makes words unreadable. Every tracked style has to be neutralised. */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .tag,
html[dir="rtl"] .meter__label,
html[dir="rtl"] .light-switch,
html[dir="rtl"] .sold-out,
html[dir="rtl"] .lines th,
html[dir="rtl"] .field > label,
html[dir="rtl"] .pagination {
  letter-spacing: normal;
}

/* Uppercasing does nothing in Arabic script, and the small tracked labels
   read better a touch larger. */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .field > label,
html[dir="rtl"] .lines th,
html[dir="rtl"] .meter__label {
  text-transform: none;
  font-size: .74rem;
}

html[dir="rtl"] .tag { text-transform: none; font-size: .68rem; }

/* Latin product names and SKUs sitting inside Arabic text keep their own
   direction, so "Jason Fox Homewrecker" does not scramble. */
html[dir="rtl"] .card__name,
html[dir="rtl"] .detail__title,
html[dir="rtl"] .num,
html[dir="rtl"] .price,
html[dir="rtl"] .money {
  unicode-bidi: plaintext;
}

/* The meter reads left-to-right as a rising scale in both directions:
   mirroring it would invert its meaning. */
html[dir="rtl"] .meter__bars { direction: ltr; }

/* Latin-only faces have no Arabic glyphs, so the language switcher labels
   itself in each language's own script. */
.lang-switch { display: inline-flex; gap: .15rem; align-items: center; }

.lang-switch a {
  font-size: .78rem;
  text-decoration: none;
  color: var(--ink-3);
  padding: .2rem .45rem;
  border-radius: 2px;
  line-height: 1.4;
}

.lang-switch a:hover { color: var(--ink); }

.lang-switch a[aria-current="true"] {
  color: var(--on-accent);
  background: var(--accent);
}

@media (max-width: 860px) {
  .lang-switch a { font-size: .72rem; padding: .18rem .35rem; }
}

/* --- dual currency, cart and checkout layout ---------------------------- */

.price-pair { display: inline-flex; flex-direction: column; line-height: 1.25; }

/* The dinar is the price. The dollar figure is a courtesy, so it sits quieter. */
.price-alt {
  font-size: .72rem;
  color: var(--ink-3);
  font-weight: 400;
}

.card__blurb {
  margin: 0;
  font-size: .85rem;
  color: var(--ink-2);
}

.cart-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.checkout-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.checkout-summary { position: sticky; top: 5rem; }

@media (max-width: 860px) {
  .cart-grid, .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}

/* WhatsApp and other contact links in the footer. */
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  color: var(--ink-2);
}

.contact-link:hover { color: var(--accent); }

/* --- order tracking ------------------------------------------------------
   The timeline is a genuine sequence, so it is drawn as one. The filled dot
   is where the order actually is; everything past it stays hollow.          */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline__step {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  align-items: baseline;
  gap: .65rem;
  padding: .5rem 0;
  color: var(--ink-3);
}

/* The connecting rail, drawn behind the dots. */
.timeline__step::before {
  content: "";
  position: absolute;
  inset-inline-start: .43rem;
  top: 1.35rem;
  bottom: -.45rem;
  width: 1px;
  background: var(--line);
}

.timeline__step:last-child::before { display: none; }

.timeline__dot {
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  align-self: center;
  position: relative;
  z-index: 1;
}

.timeline__step.is-done { color: var(--ink); }
.timeline__step.is-done .timeline__dot { border-color: var(--accent); background: var(--accent); }

.timeline__step.is-current { color: var(--ink); font-weight: 600; }
.timeline__step.is-current .timeline__dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.timeline__at { font-size: .75rem; color: var(--ink-3); font-weight: 400; }

.live-map {
  height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-2);
}

/* Map tiles are daylight artwork; under actinics they are inverted to match
   the rest of the page rather than glaring white. */
[data-light="blue"] .leaflet-tile {
  filter: invert(1) hue-rotate(185deg) brightness(.82) contrast(.92) saturate(.7);
}

[data-light="blue"] .leaflet-container { background: var(--surface-2); }

.leaflet-container { font-family: var(--body); }

/* Leaflet ships left-anchored controls; mirror them in RTL. */
html[dir="rtl"] .leaflet-container { direction: ltr; }

@media (max-width: 560px) {
  .live-map { height: 240px; }
  .timeline__step { grid-template-columns: 1.3rem 1fr; }
  .timeline__at { grid-column: 2; }
}

/* --- driver page --------------------------------------------------------- */

.driver-state {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--data);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

html[dir="rtl"] .driver-state { letter-spacing: normal; text-transform: none; font-size: .9rem; }

.driver-state__dot {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--line);
}

.driver-state[data-on="true"] { color: var(--good); }

.driver-state[data-on="true"] .driver-state__dot {
  background: var(--good);
  animation: driver-pulse 1.8s ease-in-out infinite;
}

@keyframes driver-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 45%, transparent); }
  50% { box-shadow: 0 0 0 .5rem color-mix(in srgb, var(--good) 0%, transparent); }
}

/* Trip page: thumb-sized targets, for someone holding a phone at a garage. */
.trip-button { padding: 1.1rem; font-size: 1.05rem; }

.trip-done {
  margin: 0;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--good) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--good) 35%, transparent);
  color: var(--ink);
  font-size: .95rem;
}

.carrier-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem .9rem;
  align-items: baseline;
}
