:root {
  color-scheme: light;
  --bg:#faf8f5; --surface:#fffefa; --soft:#f5f3ed; --text:#1e293b;
  --muted:#54635b; --green:#0f5132; --gold:#d4af37; --line:#e7e7df;
  --tint:#ecf3eb; --shadow:0 10px 28px #253c2610; --warn:#8e3d21;
  font-family:Inter,system-ui,sans-serif;
}
:root[data-theme=dark] {
  color-scheme:dark; --bg:#141d19; --surface:#1b2721; --soft:#202d26;
  --text:#f3f3eb; --muted:#b9c7bb; --green:#a6d3b6; --line:#36463a;
  --tint:#283d30; --shadow:0 10px 28px #0002; --warn:#ffbb95;
}
* {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0;background:var(--bg);color:var(--text);line-height:1.55}
button,input,select {font:inherit;color:inherit}
button,select {cursor:pointer}
button:disabled {cursor:default}
button,a,input,select {touch-action:manipulation}
a {color:inherit}
:focus-visible {outline:3px solid #b88710;outline-offset:3px}
h1,h2,p,blockquote,dl,dd {margin:0}
h1,h2 {letter-spacing:-.025em}
h2 {font-size:clamp(1.3rem,2vw,1.65rem);line-height:1.25}
svg {vertical-align:middle;flex:none}
.wrap {width:min(1170px,calc(100% - 72px));margin-inline:auto}
.sr-only,.skip:not(:focus) {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus {position:fixed;z-index:10;top:8px;left:8px;padding:8px 14px;background:var(--surface)}
.header {background:var(--surface);border-bottom:1px solid var(--line)}
.topline {min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand {display:inline-flex;gap:9px;align-items:center;text-decoration:none;font:1.95rem/1 'DM Serif Display',Georgia,serif;color:var(--green)}
.brand-dot {margin-left:-9px;color:#9a7200}
.mark {display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--tint)}
.mark svg {width:19px}
#desktop-nav {display:flex;gap:5px;align-items:center}
#desktop-nav a {font-size:.87rem;font-weight:600;color:var(--muted);white-space:nowrap;padding:9px 13px;border-radius:9px;text-decoration:none}
#desktop-nav a[aria-current],#desktop-nav a:hover {background:var(--tint);color:var(--green)}
.icon-button {display:grid;place-items:center;min-width:42px;min-height:42px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--green)}
#mobile-nav {display:none}
main {min-height:calc(100vh - 150px);padding-top:28px}
main:focus {outline:none}
.hero {
  background:#123c2c;position:relative;isolation:isolate;overflow:hidden;
  border-radius:24px;color:#fff9eb;display:flex;align-items:center;min-height:350px;
  background-image:linear-gradient(90deg,#0b3023dd 0%,#0c332576 52%,#0c332519 100%),url('../assets/hero.webp'),radial-gradient(ellipse at 83% 65%,#40634d,#0b3427 62%);
  background-size:cover;background-position:center;
}
.hero-content {padding:40px clamp(26px,5vw,64px);max-width:610px}
.eyebrow {display:flex;align-items:center;gap:8px;color:var(--green);font-size:.72rem;font-weight:800;letter-spacing:.085em}
.eyebrow svg {width:15px;height:15px}
.hero .eyebrow {color:#f1d995}
.hero h1 {font:clamp(3rem,6.1vw,5.15rem)/.97 'DM Serif Display',Georgia,serif;letter-spacing:-.045em;margin:13px 0 15px}
.hero h1 em {color:#eed28a;font-weight:400}
.hero p:not(.eyebrow) {max-width:340px;color:#e4ebe0;font-size:.96rem}
.hero-link,.text-link {display:inline-flex;gap:7px;align-items:center;font-weight:700;text-decoration:none}
.hero-link {margin-top:20px;color:#fff4d3;font-size:.84rem}
.hero-link svg,.text-link svg {width:16px}
.hero-link:hover,.text-link:hover,.source a:hover {text-decoration:underline}
.panel {background:var(--surface);border:1px solid var(--line);border-radius:21px;box-shadow:var(--shadow)}
.prayer {margin-top:22px;padding:24px 26px 17px}
#prayer-slot .prayer {margin-top:0}
.prayer-heading {display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:16px}
.prayer-heading h2 {margin-top:3px}
.location {display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.location label {min-width:0}
select,.secondary,.plain,.card-actions a,.card-actions button,.filters button,.primary {
  border:1px solid var(--line);border-radius:9px;background:var(--surface);
  font-size:.82rem;font-weight:650;min-height:41px;padding:7px 12px;
}
select {max-width:100%}
.secondary {color:var(--green);display:inline-flex;align-items:center;justify-content:center;gap:5px}
.secondary svg {width:16px}
.countdown {display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px 16px;background:var(--tint);border-radius:12px;color:var(--green);margin-bottom:13px}
.clock-icon {display:grid;place-items:center;width:37px;height:37px;border-radius:10px;background:var(--surface)}
.countdown small,.countdown strong {display:block}
.countdown small {font-size:.72rem;color:var(--muted)}
.countdown strong {font-size:.96rem}
.timer {font-size:clamp(1.22rem,3vw,1.9rem);font-weight:800;letter-spacing:.025em;font-variant-numeric:tabular-nums}
.times {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.time-card {position:relative;display:grid;justify-items:center;align-content:center;gap:3px;min-height:112px;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:9px 4px;color:var(--muted)}
.time-card.active {background:#104b34;color:#fff4d7;border-color:#104b34}
.time-card strong {font-size:1.25rem;color:var(--text);font-variant-numeric:tabular-nums}
.time-card.active strong {color:#fff}
.time-icon {color:var(--green)}
.time-card.active .time-icon {color:#f0cc72}
.time-name {font-size:.78rem;font-weight:700}
.active-label {min-height:12px;font-size:.62rem;line-height:12px}
.prayer-foot {display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:9px;font-size:.73rem;color:var(--muted)}
.prayer-foot .demo {color:var(--warn);font-weight:700}
.plain {border:0;background:transparent;min-height:35px;color:var(--green);padding-inline:3px}
.notice {font-size:.78rem;margin:0 0 9px;color:var(--muted)}
.home-bottom {display:grid;grid-template-columns:1.42fr 1fr;gap:16px;margin-top:22px}
.hadith-feature,.quick,.content-card,.tool {padding:24px}
.hadith-feature blockquote {font:clamp(1.22rem,2.4vw,1.95rem)/1.25 'DM Serif Display',Georgia,serif;margin:10px 0;color:var(--text)}
.source {color:var(--muted);font-size:.78rem}
.text-link {color:var(--green);font-size:.82rem;margin-top:12px}
.quick h2 {margin-bottom:7px;font-size:1.13rem}
.quick a {text-decoration:none;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:8px 0;color:var(--green)}
.quick a+a {border-top:1px solid var(--line)}
.quick b {display:block;color:var(--text);font-size:.85rem}
.quick small {display:block;color:var(--muted);font-size:.75rem}
.quick-icon {display:grid;place-items:center;width:36px;height:36px;background:var(--tint);border-radius:9px}
.page-title {padding:13px 0 24px}
.page-title h1 {font:clamp(2.6rem,5vw,4rem)/1.06 'DM Serif Display',Georgia,serif;color:var(--green);margin-bottom:8px}
.page-title p,.tool p {color:var(--muted)}
.filters {display:flex;gap:7px;flex-wrap:wrap;margin-bottom:18px}
.filters [aria-pressed=true],.card-actions [aria-pressed=true] {background:var(--tint);border-color:var(--green);color:var(--green)}
.collection {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.content-card {display:flex;flex-direction:column;gap:10px}
.category {font-weight:800;font-size:.72rem;color:var(--green)}
.arabic {font-family:Amiri,'Noto Naskh Arabic',serif;background:var(--soft);border-radius:12px;padding:13px 16px;font-size:clamp(1.7rem,3.2vw,2.2rem);line-height:1.7;color:var(--green)}
dt {font-weight:700;font-size:.75rem;color:var(--green)}
dd {margin-bottom:8px}
.card-actions {display:flex;flex-wrap:wrap;gap:6px;padding-top:6px;margin-top:auto}
.card-actions a {text-decoration:none;display:inline-flex;align-items:center}
.card-actions button:hover,.card-actions a:hover,.secondary:hover,.icon-button:hover {background:var(--tint)}
.search {display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:10px;width:min(100%,420px);padding-inline:13px;margin-bottom:14px}
.search input {width:100%;background:transparent;border:0;min-height:46px}
.tool {display:flex;align-items:center;text-align:center;flex-direction:column;gap:10px}
.compass {width:150px;height:150px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;position:relative;background:var(--tint);color:var(--green);margin:8px}
.compass span {position:absolute;top:7px;font-size:.75rem;font-weight:800}
.compass i {font-size:4.4rem;font-style:normal;line-height:1}
.tool output {font-size:clamp(2rem,7vw,4rem);font-weight:800;color:var(--green);max-width:100%;overflow-wrap:anywhere}
.primary {background:#0f5132;color:white;border-color:#0f5132;min-width:130px;font-size:.95rem}
.tool-actions {display:flex;align-items:center;justify-content:center;gap:14px}
.tool-actions input {accent-color:#0f5132}
.footer {padding-block:25px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.73rem;color:var(--muted)}
#toast:not(:empty) {position:fixed;z-index:4;bottom:18px;right:18px;max-width:calc(100% - 36px);padding:10px 14px;background:#104b34;color:white;border-radius:9px;box-shadow:var(--shadow)}
@media(max-width:860px) {
  .wrap {width:calc(100% - 36px)}
  .topline {min-height:65px}
  #desktop-nav {display:none}
  #mobile-nav {position:fixed;z-index:3;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--surface);border-top:1px solid var(--line);padding:5px 4px max(5px,env(safe-area-inset-bottom))}
  #mobile-nav a {min-height:49px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center;text-decoration:none;font-size:.66rem;font-weight:700;color:var(--muted);border-radius:8px}
  #mobile-nav a[aria-current] {color:var(--green);background:var(--tint)}
  .footer {padding-bottom:calc(74px + env(safe-area-inset-bottom))}
  #toast:not(:empty) {bottom:calc(66px + env(safe-area-inset-bottom))}
}
@media(max-width:620px) {
  main {padding-top:14px}
  .wrap {width:calc(100% - 28px)}
  .hero {min-height:305px;border-radius:17px;background-position:77% center}
  .hero-content {padding:25px 21px}
  .hero h1 {font-size:clamp(2.8rem,12vw,4.2rem)}
  .hero p:not(.eyebrow) {max-width:235px;font-size:.83rem}
  .prayer {padding:15px 12px 10px;margin-top:14px}
  .prayer-heading {align-items:start;flex-direction:column;gap:11px;margin-bottom:12px}
  .location {display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
  .location select {width:100%}
  #locate {grid-column:span 2;justify-self:start}
  .countdown {padding:9px;gap:7px}
  .times {grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .time-card {min-height:97px}
  .home-bottom,.collection {grid-template-columns:1fr;gap:12px}
  .home-bottom {margin-top:14px}
  .hadith-feature,.quick,.content-card,.tool {padding:17px}
  .footer {flex-wrap:wrap}
}

.hadith-image {display:block;width:100%;aspect-ratio:2.5;object-fit:cover;border-radius:12px;margin-bottom:6px}
.hadith-feature .hadith-image {aspect-ratio:3;margin-bottom:16px}
.chat{max-width:760px;margin:auto}.chat form{display:grid;gap:8px}.chat textarea{width:100%;resize:vertical;background:var(--soft);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:12px;font:inherit}.chat form button{justify-self:end}.chat #dialogue{max-height:52vh;overflow:auto;overflow-wrap:anywhere}.chat #dialogue p{padding:12px;margin:6px 0;border-radius:12px;background:var(--soft);white-space:pre-line}.chat #dialogue .user-message{background:var(--tint);margin-left:12%}.chat #dialogue a{color:var(--green)}@media(max-width:980px){#desktop-nav a{padding-inline:6px}}@media(max-width:860px){#mobile-nav{grid-template-columns:repeat(6,minmax(0,1fr))}}
#ayetler section{padding:18px 0;border-bottom:1px solid var(--line)}#ayetler .arabic{margin:8px 0} @media(max-width:860px){#mobile-nav{grid-template-columns:repeat(7,minmax(0,1fr))}} @media(min-width:861px) and (max-width:1100px){#desktop-nav{gap:0}#desktop-nav a{font-size:.75rem;padding-inline:5px}}
