/* Hilal — ink-green ground, brass accent, one typographic voice per language. */

:root {
  --ink: #0c1a15;
  --ink-2: #112420;
  --ink-3: #16302a;
  --cream: #f3ede1;
  --cream-70: rgba(243, 237, 225, 0.70);
  --cream-45: rgba(243, 237, 225, 0.45);
  --brass: #c8a24c;
  --brass-lift: #e3c684;
  --line: rgba(243, 237, 225, 0.10);
  --line-2: rgba(243, 237, 225, 0.16);

  --ui: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --display: 'Fraunces', 'IBM Plex Sans Arabic', Georgia, serif;
  --display-ar: 'Amiri', 'IBM Plex Sans Arabic', serif;

  --r-out: 28px;
  --r-in: 22px;
  --pad: clamp(1.15rem, 2.6vw, 2rem);
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Numbers with Latin units keep their own direction inside Arabic text. */
bdi.num {
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Film grain + a very low lattice wash, both inert. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    url("assets/lattice.svg"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23g)' opacity='0.45'/></svg>");
  background-size: 48px 48px, 140px 140px;
  mix-blend-mode: soft-light;
}

h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.01em; }

a { color: var(--brass-lift); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }

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

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  z-index: 40;
}
.skip:focus {
  inset-inline-start: var(--gutter);
  top: 12px;
  background: var(--brass);
  color: #15120a;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--brass-lift);
  outline-offset: 3px;
}

::selection { background: var(--brass); color: #15120a; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cream);
  text-decoration: none;
}
.brand__mark {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  background: var(--brass);
  -webkit-mask: url("assets/mark.svg") center / contain no-repeat;
  mask: url("assets/mark.svg") center / contain no-repeat;
}
.brand__text { display: grid; }
.brand__text strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
[dir='rtl'] .brand__text strong { font-family: var(--display-ar); font-size: 1.5rem; }
.brand__text small {
  font-size: 0.72rem;
  color: var(--cream-45);
  line-height: 1.3;
  max-width: 30ch;
}

.topbar__tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.select { display: grid; gap: 2px; }
.select__label { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-45); }
select, input[type='search'] {
  font: inherit;
  font-size: 0.85rem;
  color: var(--cream);
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  min-height: 44px;
  appearance: none;
}
select { max-width: 15rem; }
select:hover, input[type='search']:hover { border-color: var(--brass); }

.pill {
  font: inherit;
  font-size: 0.82rem;
  color: var(--cream);
  background: rgba(243, 237, 225, 0.06);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 400ms var(--ease), color 400ms var(--ease), transform 400ms var(--ease);
}
.pill:hover { background: var(--cream); color: var(--ink); }
.pill:active { transform: scale(0.97); }

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

main { position: relative; z-index: 2; }

.hero {
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  max-width: 78rem;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  padding: 0.35rem 0.85rem 0.35rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-70);
}
[dir='rtl'] .eyebrow { letter-spacing: 0; font-size: 0.78rem; }
.eyebrow__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(200, 162, 76, 0.16);
}

.hero__next { display: grid; gap: 0.35rem; }
.hero__label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-45);
}
[dir='rtl'] .hero__label { letter-spacing: 0; font-size: 0.85rem; }
.hero__name {
  font-family: var(--display);
  font-size: clamp(2.8rem, 11vw, 7rem);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-variation-settings: 'opsz' 100;
}
[dir='rtl'] .hero__name {
  font-family: var(--display-ar);
  letter-spacing: 0;
  line-height: 1.3;
}
/* Amiri's descenders reach further than Fraunces', so the countdown needs room. */
[dir='rtl'] .hero__count { margin-block-start: 1.1rem; }

.hero__count {
  margin: 0.6rem 0 0;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  color: var(--brass-lift);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.hero__where {
  margin: 1rem 0 0;
  color: var(--cream-70);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero__sep { color: var(--brass); }

.search {
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.search input[type='search'] { flex: 1 1 16rem; min-width: 0; }

.btn {
  font: inherit;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brass);
  color: #15120a;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.6rem 0.55rem 1.3rem;
  min-height: 44px;
  cursor: pointer;
  transition: transform 400ms var(--ease), background 400ms var(--ease);
}
[dir='rtl'] .btn { padding: 0.55rem 1.3rem 0.55rem 0.6rem; }
.btn:hover { background: var(--brass-lift); }
.btn:active { transform: scale(0.98); }
.btn__icon {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(21, 18, 10, 0.14);
  transition: transform 400ms var(--ease);
}
.btn__icon svg { width: 17px; height: 17px; }
[dir='rtl'] .btn__icon { transform: scaleX(-1); }
.btn:hover .btn__icon { transform: translateX(2px); }
[dir='rtl'] .btn:hover .btn__icon { transform: scaleX(-1) translateX(2px); }

.ghost {
  font: inherit;
  font-size: 0.82rem;
  background: transparent;
  color: var(--cream-70);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 400ms var(--ease), border-color 400ms var(--ease);
}
.ghost:hover { color: var(--cream); border-color: var(--brass); }

.search__msg { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--brass-lift); min-height: 1.2em; }

.results { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 1px; max-width: 46rem; }
.results:empty { display: none; }
.results button {
  width: 100%;
  font: inherit;
  font-size: 0.88rem;
  text-align: start;
  color: var(--cream-70);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: color 300ms var(--ease), border-color 300ms var(--ease);
}
.results button:hover { color: var(--cream); border-color: var(--brass); }

/* ----------------------------------------------------------------- bento */

.bento {
  max-width: 78rem;
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, 1fr); gap: 1.1rem; }
  .card--times { grid-column: 1 / span 7; }
  .card--weather { grid-column: 8 / span 5; }
  .card--ayah { grid-column: 1 / span 7; }
  .card--qibla { grid-column: 8 / span 5; }
  .card--month { grid-column: 1 / span 12; }
  /* Short cards centre their content so a stretched row reads as padding. */
  .card--weather .card__in, .card--qibla .card__in { justify-content: center; }
  .card--month .month__scroll { max-height: 22rem; }
}

/* Outer shell + inner core, concentric radii. */
.card {
  padding: 6px;
  background: rgba(243, 237, 225, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--r-out);
}
.js .card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.js .card.in { opacity: 1; transform: none; }

.card__in {
  height: 100%;
  background: var(--ink-2);
  border-radius: var(--r-in);
  padding: var(--pad);
  box-shadow: inset 0 1px 0 rgba(243, 237, 225, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.card__head h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
[dir='rtl'] .card__head h2 { font-family: var(--display-ar); font-size: 1.6rem; letter-spacing: 0; }
.card__head p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--cream-45); }

.muted { color: var(--cream-45); font-size: 0.85rem; }

/* times list */

.times { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.times li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.times li:last-child { border-bottom: 0; }
.times__name { font-size: 0.95rem; color: var(--cream-70); }
.times__time { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.times li[data-state='past'] { opacity: 0.4; }
.times li[data-state='next'] {
  border-inline-start: 2px solid var(--brass);
  padding-inline-start: 0.8rem;
  margin-inline-start: -0.8rem;
}
.times li[data-state='next'] .times__name { color: var(--brass-lift); }
.times li[data-state='next'] .times__time { color: var(--brass-lift); }

/* weather */

.weather { display: grid; gap: 0.9rem; }
.weather__temp {
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 3.8rem);
  font-weight: 300;
  line-height: 1;
  font-variation-settings: 'opsz' 110;
}
.weather__desc { color: var(--cream-70); font-size: 0.95rem; }
.weather__rows { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.weather__rows li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--cream-70);
}

/* qibla */

.qibla { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.compass {
  --deg: 0deg;
  width: 128px; height: 128px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  position: relative;
  display: grid;
  place-items: center;
}
.compass::before {
  content: 'N';
  position: absolute;
  top: 6px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--cream-45);
}
.compass__needle {
  width: 2px;
  height: 46px;
  background: linear-gradient(var(--brass-lift), var(--brass));
  transform-origin: 50% 100%;
  transform: translateY(-23px) rotate(var(--deg));
  transition: transform 900ms var(--ease);
}
.compass__hub {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass);
}
.qibla__read { display: grid; gap: 0.2rem; }
.qibla__deg {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ayah */

.ayah { margin: 0; display: grid; gap: 1rem; }
.ayah__ar {
  font-family: var(--display-ar);
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 2.1;
  direction: rtl;
  text-align: start;
  color: var(--cream);
}
.ayah__en {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--cream-70);
  direction: ltr;
  text-align: start;
}
[dir='rtl'] .ayah__en { text-align: start; }
.ayah__tools { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* month */

.month { display: grid; gap: 0.9rem; }
.month__scroll { max-height: 15rem; overflow-y: auto; }
.month table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.month th, .month td { text-align: start; padding: 0.42rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.month th { color: var(--cream-45); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; position: sticky; top: 0; background: var(--ink-2); }
.month td { font-variant-numeric: tabular-nums; color: var(--cream-70); }
.month tr[data-today='1'] td { color: var(--brass-lift); }

.disclaimer {
  max-width: 78rem;
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--cream-45);
}

/* ------------------------------------------------------------- inspector */

.inspector {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line-2);
  background: #0a1512;
}
.inspector__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.inspector__bar h2 { font-size: 1rem; font-weight: 600; }
.inspector__bar p { margin: 0; font-size: 0.78rem; color: var(--cream-45); }
.inspector__bar .ghost { margin-inline-start: auto; }

.inspector__body { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .inspector__body { grid-template-columns: 22rem 1fr; }
  .reqs { border-inline-end: 1px solid var(--line); }
}

.reqs { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow-y: auto; }
.reqs li { border-bottom: 1px solid var(--line); }
.reqs button {
  width: 100%;
  font: inherit;
  text-align: start;
  background: transparent;
  color: var(--cream);
  border: 0;
  border-inline-start: 3px solid transparent;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}
.reqs button:hover { background: rgba(243, 237, 225, 0.04); }
.reqs button[aria-pressed='true'] { background: rgba(243, 237, 225, 0.05); border-inline-start-color: var(--brass); }
.reqs__top { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.82rem; }
.reqs__verb { color: var(--brass); font-size: 0.7rem; letter-spacing: 0.08em; }
.reqs__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reqs__meta { font-size: 0.68rem; color: var(--cream-45); }
.state-OK { color: #7fbf8a; }
.state-FAIL { color: #e4756b; }
.state-FLIGHT { color: var(--cream-45); }

.req { padding: var(--pad) var(--gutter); display: grid; gap: 1.1rem; align-content: start; }
.anat { display: grid; gap: 1px; margin: 0; }
@media (min-width: 700px) { .anat { grid-template-columns: repeat(4, 1fr); } }
.anat > div { background: var(--ink-2); border: 1px solid var(--line); padding: 0.6rem 0.8rem; display: grid; gap: 2px; }
.anat dt { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-45); }
.anat dd { margin: 0; font-size: 0.85rem; overflow-wrap: anywhere; }

.ptable { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.ptable th, .ptable td { text-align: start; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable th { color: var(--cream-45); font-weight: 400; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ptable td:first-child { color: var(--brass); white-space: nowrap; }
.ptable td:last-child { overflow-wrap: anywhere; }

.raw {
  margin: 0;
  background: #07100d;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  max-height: 16rem;
  overflow: auto;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--cream-70);
  direction: ltr;
  text-align: left;
}

.switcher { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.75rem; color: var(--cream-45); }
.switcher button {
  font: inherit;
  font-size: 0.75rem;
  background: transparent;
  color: var(--cream-70);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  min-height: 34px;
  cursor: pointer;
}
.switcher button:hover { color: var(--cream); border-color: var(--brass); }
.switcher button[aria-pressed='true'] { background: var(--brass); color: #15120a; border-color: var(--brass); }

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

.foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.2rem) var(--gutter);
  display: grid;
  gap: 2rem;
  max-width: 78rem;
  margin-inline: auto;
}
@media (min-width: 820px) { .foot { grid-template-columns: 1.4fr 1fr; } }

.foot h2 { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-45); font-weight: 400; }
[dir='rtl'] .foot h2 { letter-spacing: 0; font-size: 0.82rem; }
.foot__sources ul { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.foot__sources li { font-size: 0.82rem; color: var(--cream-45); }
.foot__sources strong { color: var(--cream-70); font-weight: 600; }
.foot__meta { display: grid; gap: 0.6rem; align-content: start; font-size: 0.82rem; color: var(--cream-45); }
.foot__meta p { margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.foot__by { color: var(--cream-45); }

.linkish {
  font: inherit;
  font-size: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--brass-lift);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkish:hover { color: var(--cream); }

/* ---------------------------------------------------------------- states */

.is-loading { opacity: 0.55; }

.error {
  border: 1px solid rgba(228, 117, 107, 0.4);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  color: #f0b3ac;
  display: grid;
  gap: 0.6rem;
}

.skeleton {
  height: 0.85rem;
  border-radius: 4px;
  background: rgba(243, 237, 225, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .js .card { opacity: 1; transform: none; }
}

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

.hero__grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); }
}

.hero__dial { margin: 0; display: grid; justify-items: center; gap: 0.8rem; }
.dial { width: min(100%, 15rem); color: var(--brass); }
.dial svg { width: 100%; height: auto; display: block; overflow: visible; }
.dial__caption {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-45);
  text-align: center;
}
[dir='rtl'] .dial__caption { letter-spacing: 0; font-size: 0.78rem; }

/* The fasting arc draws itself once, on first paint. */
.dial__fast {
  stroke-dasharray: 1000;
  animation: draw-arc 1.6s var(--ease) 0.2s both;
}
.dial__now { animation: bead 2.6s ease-in-out 1.6s infinite; transform-origin: center; }
.dial__hand { transition: all 600ms var(--ease); }

@keyframes draw-arc {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}
@keyframes bead {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.brand__mark { background: none !important; -webkit-mask: none !important; mask: none !important; color: var(--brass); }
.brand__mark svg { width: 34px; height: 34px; display: block; overflow: visible; }

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

.rise {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
.rise.risen { opacity: 1; transform: none; filter: none; }

/* -------------------------------------------------------- pointer feel */

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 60;
  pointer-events: none;
  border-radius: 50%;
  opacity: 1;
  transition: opacity 250ms var(--ease);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--brass-lift);
}
.cursor-ring {
  width: 30px; height: 30px;
  border: 1px solid rgba(200, 162, 76, 0.55);
  transition: width 400ms var(--ease), height 400ms var(--ease),
              border-color 400ms var(--ease), background-color 400ms var(--ease), opacity 250ms var(--ease);
}
.cursor-ring.is-active {
  width: 52px; height: 52px;
  border-color: var(--brass-lift);
  background: rgba(200, 162, 76, 0.10);
}
.cursor-ring.is-down { width: 22px; height: 22px; background: rgba(200, 162, 76, 0.22); }
.cursor-away .cursor-dot, .cursor-away .cursor-ring { opacity: 0; }

/* The native arrow steps aside, but text fields keep their caret cue. */
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input, .has-cursor select, .has-cursor textarea { cursor: auto; }

.btn, .pill, .ghost {
  transform: translate3d(var(--pull-x, 0), var(--pull-y, 0), 0);
  transition: transform 500ms var(--ease), background 400ms var(--ease),
              color 400ms var(--ease), border-color 400ms var(--ease);
}
.btn:active, .pill:active, .ghost:active { transform: translate3d(var(--pull-x, 0), var(--pull-y, 0), 0) scale(0.975); }

/* ------------------------------------------------------------ card feel */

.card {
  position: relative;
  transition: border-color 500ms var(--ease), transform 500ms var(--ease);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-out);
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease);
  background: radial-gradient(22rem 22rem at var(--mx, 50%) var(--my, 0%), rgba(200, 162, 76, 0.13), transparent 70%);
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }

.times li { transition: padding-inline-start 400ms var(--ease), opacity 400ms var(--ease); }
.times li:hover { opacity: 1; }

/* A hairline at the top of the page tracks how far down you are. */
.scrollbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  z-index: 30;
  background: linear-gradient(90deg, var(--brass), var(--brass-lift));
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .scrollbar { animation: grow linear both; animation-timeline: scroll(root block); }
  @keyframes grow { to { transform: scaleX(1); } }
}
[dir='rtl'] .scrollbar { transform-origin: 100% 50%; }

@media (prefers-reduced-motion: reduce) {
  .dial__fast { animation: none; stroke-dasharray: none; }
  .dial__now { animation: none; }
  .rise { opacity: 1; transform: none; filter: none; }
  .scrollbar { display: none; }
}
