/* Axis theme: Ramadan companion page */
.rm-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.rm-find{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.rm-search{position:relative;display:flex;align-items:center;gap:8px;height:44px;min-width:280px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--muted)}
.rm-search:focus-within{border-color:var(--focus);box-shadow:0 0 0 1px var(--focus)}
.rm-search input{flex:1;border:0;outline:0;background:transparent;color:var(--text);font:450 16px var(--font);min-width:0}
.rm-drop{position:absolute;inset-inline:0;top:calc(100% + 6px);background:var(--menu);border-radius:16px;box-shadow:var(--shadow);border:1px solid var(--line);padding:6px 0;z-index:30;max-height:50vh;overflow-y:auto}
.rm-drop button{display:flex;flex-direction:column;align-items:flex-start;width:100%;border:0;background:transparent;color:var(--text);padding:10px 18px;font:inherit;text-align:start;cursor:pointer}
.rm-drop button:hover,.rm-drop button:focus{background:color-mix(in srgb,var(--text) 8%,transparent)}
.rm-drop button:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;border-radius:0}
.rm-drop small{color:var(--muted);font-size:13px}
.rm-drop p{margin:0;padding:10px 18px;color:var(--muted)}

/* blocks that only make sense in one season of the year */
.rm:not([data-phase=active]) .only-active,.rm:not([data-phase=post]) .only-post,.rm[data-phase=active] .not-active,.rm[data-phase=""] .not-active{display:none!important}

.rm-sect h2,.rm-pair h2{font-size:22px;font-weight:600;margin:40px 0 14px}
.rm .card h2{font-size:18px;margin:0 0 12px}

/* ring + today */
.rm-top{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:16px;margin-top:22px}
.rm-ring-card{display:flex;flex-direction:column;align-items:center;text-align:center}
.rm-phase{display:inline-block;font-size:13px;font-weight:600;color:var(--on-soft);background:var(--primary-soft);padding:4px 12px;border-radius:999px}
.rm .card .rm-hero{font-size:20px;font-weight:600;margin:12px 0 8px}
.rm-ring{position:relative;width:180px;height:180px;margin:8px auto}
.rm-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.rm-ring-track{fill:none;stroke:var(--surface-2);stroke-width:10}
.rm-ring-prog{fill:none;stroke:var(--primary);stroke-width:10;stroke-linecap:round;stroke-dasharray:534;stroke-dashoffset:534;transition:stroke-dashoffset 1s ease}
.rm-ring-in{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rm-ring-in b{font:600 44px/1 "Roboto",var(--font);color:var(--text)}
.rm-ring-in small{font-size:14px;color:var(--muted);margin-top:6px;max-width:120px}
.rm-hijri{margin:6px 0 0;color:var(--muted);font-size:15px}

.rm-si{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rm-si-box{border:1px solid var(--line);border-radius:16px;padding:14px 16px;border-top:3px solid var(--c)}
.rm-si-top{display:flex;align-items:center;gap:8px;color:var(--c);font-weight:600}
.rm-si-top span{flex:1;color:var(--text)}
.rm-si-time{display:block;font:600 34px/1.2 "Roboto",var(--font);margin-top:6px}
.rm-si-sub{display:block;color:var(--muted);font-size:14px;min-height:22px}
.rm-count{margin:14px 0 0;font-size:17px;font-weight:500;color:var(--primary)}
.rm-prog{margin-top:12px}
.rm-prog-lbl{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}
.rm-prog-bar{height:6px;border-radius:3px;background:var(--surface-2);overflow:hidden;margin-top:4px}
.rm-prog-bar div{height:100%;width:0;background:var(--primary);border-radius:3px;transition:width .5s}
.rm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0 0}
.rm-stats div{background:var(--surface);border-radius:12px;padding:10px 12px}
.rm-stats dt{font-size:13px;color:var(--muted);line-height:1.4}
.rm-stats dd{margin:2px 0 0;font:600 17px "Roboto",var(--font)}

/* countdowns */
.rm-cd{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.rm-cd-item{border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:2px}
.rm-cd-item span{font-weight:600;color:var(--muted)}
.rm-cd-item b{font-size:24px;font-weight:600;color:var(--primary)}
.rm-cd-item small{font-size:14px;color:var(--muted)}

/* imsakiya */
.rm-tbl-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.rm-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:16px}
.rm-table{width:100%;border-collapse:collapse;font-size:15px}
.rm-table th,.rm-table td{padding:10px 12px;text-align:center;white-space:nowrap;border-bottom:1px solid var(--line)}
.rm-table tr:last-child td{border-bottom:0}
.rm-table th{background:var(--surface);font-weight:600}
.rm-table td.is-time{font-family:"Roboto",var(--font)}
.rm-table tr.is-today td{background:var(--primary-soft);color:var(--on-soft);font-weight:600}
.rm-empty{margin:0;padding:18px;color:var(--muted);text-align:center}

/* last ten nights + Shawwal */
.rm-l10,.rm-sw{margin-top:24px}
.rm-nights{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.rm-night{width:46px;height:46px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;font:600 15px "Roboto",var(--font);color:var(--muted)}
.rm-night.is-odd{border-color:var(--sky-isha);color:var(--sky-isha-text)}
.rm-night.is-tonight{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.rm-l10-info{margin:14px 0 0;color:var(--muted)}
.rm-sw-days{display:flex;flex-wrap:wrap;gap:10px}
.rm-sw-day{width:50px;height:50px;border-radius:50%;border:2px solid var(--line);background:var(--bg);color:var(--muted);font:600 17px "Roboto",var(--font);cursor:pointer}
.rm-sw-day:hover{border-color:var(--primary)}
.rm-sw-day.on{background:var(--green);border-color:var(--green);color:var(--bg)}
.rm-sw-count{margin:12px 0 0;font-weight:600}

/* Sunnah fasts */
.rm-next{margin-bottom:12px}
.rm-next-lbl{margin:10px 0 0;color:var(--muted);font-size:14px}
.rm-next-name{margin:0;font-size:22px;font-weight:600}
.rm-next-times{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:420px}
.rm-next-times div{background:var(--surface);border-radius:12px;padding:10px 14px}
.rm-next-times small{display:block;color:var(--muted);font-size:13px}
.rm-next-times b{font:600 20px "Roboto",var(--font)}
.rm-quote{margin:14px 0 0;padding:10px 16px;border-inline-start:3px solid var(--primary);background:var(--surface);border-radius:8px;color:var(--text);line-height:1.9}
.rm-quote:empty{display:none}
.rm-fasts .row:hover{background:transparent}

/* Hijri month + hadith of the day */
.rm-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:40px}
.rm-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.rm-cal-h{font-size:12px;font-weight:600;color:var(--muted);padding:4px 0}
.rm-cal-d{position:relative;border-radius:10px;padding:4px 0;display:flex;flex-direction:column;line-height:1.2}
.rm-cal-d b{font:600 15px "Roboto",var(--font)}
.rm-cal-d small{font:500 11px "Roboto",var(--font);color:var(--muted)}
@media (max-width:760px){.rm-cal-d small{font-size:12px}}   /* phones: no text under 12px */
.rm-cal-d.is-white{background:var(--amber-soft)}
.rm-cal-d.is-odd::after,.rm-dot.is-odd{content:"";position:absolute;bottom:2px;inset-inline-start:50%;width:5px;height:5px;border-radius:50%;background:var(--sky-isha);transform:translateX(-50%)}
[dir=rtl] .rm-cal-d.is-odd::after{transform:translateX(50%)}
.rm-cal-d.is-today{background:var(--primary);color:var(--on-primary)}
.rm-cal-d.is-today small{color:var(--on-primary)}
.rm-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:12px 0 0;font-size:13px;color:var(--muted)}
.rm-dot{display:inline-block;width:12px;height:12px;border-radius:4px;margin-inline-start:6px}
.rm-dot.is-white{background:var(--amber-soft);box-shadow:0 0 0 1px var(--line)}
.rm-legend .rm-dot.is-odd{position:static;transform:none;width:8px;height:8px;border-radius:50%}
.rm-pair h2{margin:0 0 12px}
.rm-daily-text{margin:0;font-size:19px;line-height:2;color:var(--text)}

/* fasting guide */
.rm-tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:16px;scrollbar-width:none}
.rm-tabs::-webkit-scrollbar{display:none}
.rm-tabs button{border:0;background:transparent;color:var(--muted);font:550 15px var(--font);padding:10px 16px;border-bottom:3px solid transparent;white-space:nowrap;cursor:pointer}
.rm-tabs button:hover{color:var(--text)}
.rm-tabs button:focus-visible{outline-offset:-2px}
.rm-tabs button[aria-selected=true]{color:var(--primary);border-bottom-color:var(--primary)}
.rm-k + .rm-k{margin-top:20px}
.rm-k h3{margin:0 0 6px;font-size:17px;font-weight:600}
.rm-k p,.rm-k li{color:var(--muted);max-width:75ch}
.rm-k p{margin:0}
.rm-k ul{margin:0;padding-inline-start:22px}

@media (max-width:860px){
  .rm-top,.rm-pair{grid-template-columns:1fr}
  .rm-search{min-width:0;flex:1}.rm-find{width:100%}
  .rm-stats{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:560px){
  .rm-cd{grid-template-columns:1fr}
  .rm-si-time{font-size:28px}
  .rm-night{width:40px;height:40px}
}
@media print{
  .topbar,.ax-footer,.consent,.crumbs,.rm-find,.page-desc,.rm-top,.day,.rm-sect:not(.rm-imsak),.rm-l10,.rm-sw,.rm-pair,.rm-tbl-actions{display:none!important}
  .rm-table-wrap{border:0}.rm-table{font-size:12px}
}
.rm-share{margin:6px 0 4px}
.rm-share.done{background:var(--green-soft);color:var(--green);border-color:transparent}

/* whitelisted source links inside ruling texts */
.rm-src{color:var(--primary);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;font-weight:500}
.rm-src:hover{color:var(--primary-hover);text-decoration-style:solid}
.rm-src:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:3px}

/* school labels and the two iftar supplications */
.rm-school{margin:14px 0 4px;font-size:12px;font-weight:700;letter-spacing:.02em;color:var(--primary)}
.rm-dua{margin:0 0 18px;padding:0 0 14px;border-bottom:1px solid var(--line)}
.rm-dua:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.rm-dua-tr{margin:8px 0 0;color:var(--muted);line-height:1.7}

/* city imsakia on phones: hide the Hijri date (the day number is the Ramadan day) and Fajr (always imsak + 10 min, said under the table) so imsak and iftar show without sideways scrolling */
@media (max-width:600px){.rmc-table th:nth-child(3),.rmc-table td:nth-child(3),.rmc-table th:nth-child(5),.rmc-table td:nth-child(5){display:none}}

/* /ramadan: link to the picked city own imsakia page */
.rm-citylink{margin:10px 0 0;font-weight:600}
.rm-citylink a{text-decoration:underline;text-underline-offset:3px}

/* city imsakia, Muslim Axis cards: first-day facts in the hero, table head with the school switch, method and Eid side by side */
.rmc-first{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
.rmc-first[hidden]{display:none}
.rmc-first div{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:12px;background:var(--surface);border:1px solid var(--line);min-width:0}
.rmc-first small{color:var(--muted);font-size:12.5px}
.rmc-first b{font:700 18px/1.3 "Roboto",var(--font);color:var(--text)}
.rmc-first div:nth-child(2){background:var(--primary-soft);border-color:transparent}
.rmc-first div:nth-child(2) small,.rmc-first div:nth-child(2) b{color:var(--on-soft)}
.rmc-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.rmc-head h2{margin:0;font-size:19px}
.rmc-head .rm-tbl-actions{margin:0}
.rmc-note{margin:12px 0 0}
.rmc-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:18px}
.rmc-info h2,.rmc .li-main section > h2{margin:0 0 8px;font-size:18px}
.rmc-info p{margin:0;line-height:1.7;color:var(--muted)}
.rmc .rmc-h2-more{margin-top:18px}
@media (max-width:600px){.rmc-first b{font-size:16px}.rmc-first div{padding:8px 10px}}
.rmc .chips-start{justify-content:flex-start}

/* ===== Compass: the month as a journey (route line with stops), today as one leg, fasting length by latitude ===== */
.rm .cr-hero{margin-top:12px;padding:24px 26px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.cr-hero-row{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}
.cr-hero-txt{min-width:0}
.cr-eyebrow{margin:0 0 6px;font-size:12.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--primary)}
.rm .cr-hero h1{margin:0;font-size:32px;line-height:1.2}
.rm .cr-hero .page-desc{margin:14px 0 0;max-width:72ch}
.rm .rm-search{border-radius:6px}
.rm :is(.cr-journey,.cr-leg,.cr-lat,.rm-sect,.rm-pair) h2{font-family:Georgia,"Noto Sans Arabic",serif;font-weight:600}

.cr-journey{margin-top:16px;padding:22px 26px 52px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.cr-j-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px 24px}
.rm .cr-journey .rm-hero{margin:10px 0 4px;font-size:22px}
.rm .rm-phase{border-radius:4px}
.cr-j-now{margin:0;display:flex;align-items:baseline;gap:8px}
.cr-j-now b{font:700 46px/1 Georgia,"Noto Sans Arabic",serif;color:var(--primary);font-variant-numeric:tabular-nums}
.cr-j-now small{font-size:15px;color:var(--muted);max-width:14ch}
.cr-j-map{position:relative;margin:26px 8px 36px}
.cr-j-svg{display:block;width:100%;height:12px;overflow:visible}
[dir=rtl] .cr-j-svg{transform:scaleX(-1)}
.cr-j-track{fill:none;stroke:var(--line);stroke-width:3}
.cr-j-prog{fill:none;stroke:var(--primary);stroke-width:6;stroke-linecap:butt;stroke-dasharray:534.07;stroke-dashoffset:534.07;transition:stroke-dashoffset 1s ease}
.cr-j-stops{list-style:none;margin:0;padding:0;position:absolute;inset:0}
.cr-j-stops li{position:absolute;top:-5px;inset-inline-start:var(--at);transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:8px}
[dir=rtl] .cr-j-stops li{transform:translateX(50%)}
.cr-j-stops li::before{content:"";width:18px;height:18px;border-radius:50%;background:var(--bg);border:3px solid var(--primary);box-sizing:border-box}
.cr-j-stops li:first-child{align-items:flex-start;transform:translateX(-9px)}
[dir=rtl] .cr-j-stops li:first-child{transform:translateX(9px)}
.cr-j-stops li:last-child{inset-inline-start:auto;inset-inline-end:0;align-items:flex-end;transform:translateX(9px)}
[dir=rtl] .cr-j-stops li:last-child{transform:translateX(-9px)}
.cr-j-stops span{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap}

.cr-leg{margin-top:16px;padding:22px 26px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.rm .cr-leg h2{margin:0 0 14px;font-size:19px}
.cr-leg-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:20px}
.cr-leg-end{display:flex;flex-direction:column;gap:2px;padding-inline-start:16px;border-inline-start:4px solid var(--c)}
.cr-leg-end.is-end{text-align:end;padding-inline-start:0;padding-inline-end:16px;border-inline-start:0;border-inline-end:4px solid var(--c)}
.cr-leg-k{font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.cr-leg .rm-si-time{font-size:38px;margin:0}
.cr-leg-mid{min-width:0;text-align:center}
.cr-leg .rm-count{margin:0 0 10px;font-size:16px}
.cr-leg .rm-prog{margin:0}
.cr-leg .rm-prog-bar{height:4px;border-radius:0;background:repeating-linear-gradient(90deg,var(--line) 0 8px,transparent 8px 14px)}
.cr-leg .rm-prog-bar div{border-radius:0}
.cr-leg .rm-prog-lbl{margin-top:6px}
.cr-legnotes{display:flex;flex-wrap:wrap;gap:0;margin:20px 0 14px;border-top:1px dashed var(--line);padding-top:12px}
.cr-legnotes div{flex:1 1 150px;background:transparent;border-radius:0;padding:4px 14px;border-inline-start:1px solid var(--line)}
.cr-legnotes div:first-child{border-inline-start:0;padding-inline-start:0}

/* the three dates ahead as numbered stops on one line */
.rm .rm-cd{counter-reset:crs;gap:0;border-top:3px solid var(--line);padding-top:0}
.rm .rm-cd-item{counter-increment:crs;position:relative;border:0;border-radius:0;padding:26px 14px 6px 0}
.rm .rm-cd-item::before{content:counter(crs);position:absolute;top:-15px;inset-inline-start:0;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--primary);color:var(--on-primary);font:700 14px/1 Georgia,serif}
.rm .rm-cd-item b{font-family:Georgia,"Noto Sans Arabic",serif}
.rm .day{border-radius:6px}

.cr-lat{margin-top:40px}
.rm .cr-lat h2{margin:0;font-size:22px}
.cr-lat .sect-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.cr-lat-list{list-style:none;margin:14px 0 10px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.cr-lat-list li{display:grid;grid-template-columns:minmax(0,13rem) 4.5rem minmax(0,1fr) 7.5rem;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid var(--line)}
.cr-lat-list li:last-child{border-bottom:0}
.cr-lat-city{color:var(--text);text-decoration:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cr-lat-city:hover b{color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.cr-lat-city small{color:var(--muted)}
.cr-lat-deg{font:600 13px "Roboto",var(--font);color:var(--muted);font-variant-numeric:tabular-nums}
.cr-lat-bar{display:block;height:8px;background:var(--surface-2);border-radius:4px;overflow:hidden}
.cr-lat-bar i{display:block;height:100%;background:var(--primary);border-radius:4px}
.cr-lat-len{font:600 14px "Roboto",var(--font);text-align:end;font-variant-numeric:tabular-nums}
.cr-lat[data-school=sunni] .is-shia,.cr-lat[data-school=shia] .is-sunni{display:none}

@media (max-width:700px){
  .rm .cr-hero,.cr-journey,.cr-leg{padding-inline:16px}
  .rm .cr-hero h1{font-size:26px}
  .cr-j-now b{font-size:36px}
  .cr-j-stops span{font-size:12px;white-space:normal;max-width:6.5rem;text-align:center}
  .cr-j-stops li:first-child span{text-align:start}.cr-j-stops li:last-child span{text-align:end}
  .cr-leg-row{grid-template-columns:1fr 1fr;grid-template-areas:"a b" "m m"}
  .cr-leg-row>.cr-leg-end:first-child{grid-area:a}.cr-leg-row>.cr-leg-end.is-end{grid-area:b}.cr-leg-mid{grid-area:m}
  .cr-leg .rm-si-time{font-size:30px}
  .cr-legnotes div{flex-basis:45%;border-inline-start:0;padding-inline-start:0}
  .rm .rm-cd{grid-template-columns:1fr;border-top:0;border-inline-start:3px solid var(--line);padding-inline-start:0}
  .rm .rm-cd-item{padding:6px 0 14px 26px}
  [dir=rtl] .rm .rm-cd-item{padding:6px 26px 14px 0}
  .rm .rm-cd-item::before{top:4px;inset-inline-start:-16px}
  .cr-lat-list li{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
  .cr-lat-bar{grid-column:1/-1;order:3}
  .cr-lat-deg{display:none}
}
@media (prefers-reduced-motion:reduce){.cr-j-prog,.rm-prog-bar div{transition:none}}
@media print{.cr-hero .rm-find,.cr-journey,.cr-leg,.cr-lat{display:none!important}}
