:root {
  color-scheme: dark;
  --bg: #080e17;
  --surface: #0d1724;
  --panel: #111e2d;
  --panel-raised: #152437;
  --text: #eef5f7;
  --muted: #97a9b8;
  --line: #28394b;
  --accent: #57dacf;
  --accent-soft: #173f43;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.page-shell { width: min(1180px,100%); min-height: 100vh; margin: 0 auto; border-inline: 1px solid var(--line); background: var(--surface); }
.topbar { min-height: 66px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: #0d1724; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-decoration: none; white-space: nowrap; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.brand-slash { color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--text); font-size: 19px; line-height: 1; }
.icon-btn:hover, .text-btn:hover, .story-link:hover { color: var(--accent); }
.mono { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.subtle { color: var(--muted); }
.eyebrow { display: block; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.main-nav { display: flex; gap: 4px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.main-nav-btn { border: 1px solid transparent; border-radius: 8px; padding: 9px 18px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.main-nav-btn.active { border-color: var(--line); background: var(--panel-raised); color: var(--accent); }
.main-nav-btn:hover { color: var(--text); }
.main-nav-btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible, .text-btn:focus-visible, .save-btn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-intro { padding: 40px 28px 36px; display: flex; justify-content: space-between; align-items: end; gap: 30px; border-bottom: 1px solid var(--line); }
.home-intro h1 { margin: 0; font-size: clamp(42px, 5.4vw, 68px); line-height: .97; letter-spacing: -.065em; }
.home-intro h1 span { color: var(--accent); }
.home-intro p { max-width: 320px; margin: 0 0 4px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.section-block { padding: 32px 28px 38px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.section-head h1, .section-head h2 { margin: 0; letter-spacing: -.05em; line-height: 1.05; }
.section-head h1 { font-size: clamp(42px, 5vw, 62px); }
.section-head h2 { font-size: clamp(27px, 3.4vw, 39px); }
.compact-head { margin-bottom: 16px; }
.text-btn { padding: 5px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.prayer-section { padding-top: 26px; }
.prayer-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 18px 20px 16px; }
.prayer-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prayer-card-head strong { font-size: 13px; font-weight: 650; }
.zone-picker { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.zone-picker select { max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 13px; }
.next-prayer { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0; padding: 14px 16px; border: 1px solid #287b7c; border-radius: 8px; background: var(--accent-soft); color: var(--text); }
.next-prayer strong { font-size: 23px; letter-spacing: -.04em; }
.countdown { color: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 600; }
.prayer-times { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.prayer-time { min-width: 0; padding: 10px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.prayer-time.next { border-color: var(--accent); background: #15313a; }
.prayer-time span { display: block; color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.prayer-time strong { display: block; margin-top: 5px; font-size: 19px; letter-spacing: -.035em; }
.prayer-time.next strong { color: var(--accent); }
.prayer-status { min-height: 12px; margin: 12px 0 0; }
.story-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.story-card { min-width: 0; min-height: 232px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.story-card:hover { border-color: #4b6778; }
.story-media { position: relative; aspect-ratio: 16 / 8; margin: -18px -18px 17px; overflow: hidden; border-radius: 9px 9px 0 0; border-bottom: 1px solid var(--line); background: #102633; }
.story-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-image[hidden], .story-image-fallback[hidden] { display: none; }
.story-image-fallback { display: flex; height: 100%; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 17px; background: #102633; }
.story-image-category { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.story-image-source { max-width: 100%; color: #bed5dc; font-size: clamp(20px, 2.5vw, 30px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; overflow-wrap: anywhere; }
.story-topline, .story-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.story-source { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.story-hot { color: var(--accent); white-space: nowrap; }
.story-card h3 { margin: 22px 0 10px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.16; letter-spacing: -.035em; overflow-wrap: anywhere; }
.story-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.story-footer { margin-top: auto; padding-top: 18px; }
.story-category { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.story-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.save-btn { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.save-btn.saved { color: var(--accent); }
.story-link { font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.home-story-grid .story-card { min-height: 210px; }
.brief-box { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 6px 22px; }
.brief-box ol { margin: 0; padding-left: 22px; }
.brief-box li { padding: 12px 0; color: var(--muted); line-height: 1.5; border-bottom: 1px solid var(--line); }
.brief-box li:last-child { border-bottom: 0; }
.brief-box strong { color: var(--text); }
.sports-events { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.home-sport-events { margin-bottom: 12px; }
.event-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.event-kicker { color: var(--accent); }
.event-card h3 { margin: 10px 0 7px; font-size: 22px; line-height: 1.2; letter-spacing: -.035em; }
.event-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.event-card a { color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none; }
.compact-story-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.compact-story-grid .story-card { min-height: 210px; }
.compact-story-grid .story-card h3 { font-size: 20px; }
.compact-story-grid .story-card p { display: none; }
.category-links { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.category-link { padding: 16px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); text-align: left; font-size: 13px; font-weight: 700; }
.category-link:hover { border-color: var(--accent); color: var(--accent); }
.view-heading { padding: 40px 28px 24px; }
.view-heading h1 { margin: 0 0 8px; font-size: clamp(42px, 5vw, 62px); letter-spacing: -.05em; }
.view-heading p { margin: 0; }
.controls { display: grid; grid-template-columns: 1fr 250px; gap: 14px; align-items: center; padding: 16px 28px; border-block: 1px solid var(--line); }
.tabs { display: flex; min-width: 0; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 12px; white-space: nowrap; }
.tab.active { border-color: var(--accent); color: var(--accent); }
.search-wrap { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-wrap input::placeholder { color: var(--muted); }
.social-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.social-card { display: flex; flex-direction: column; min-height: 185px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.social-card .platform { color: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .1em; }
.social-card h3 { margin: 16px 0 8px; font-size: 19px; letter-spacing: -.03em; }
.social-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.social-card .social-status { margin-top: auto; padding-top: 12px; color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 10px; }
.feature-view { min-height: 520px; }
.feature-subhead { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 30px 0 15px; }
.feature-subhead h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.sports-tabs { margin-bottom: 12px; }
.sports-grid .story-card { min-height: 210px; }
.empty { grid-column: 1/-1; padding: 32px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); text-align: center; }
.last-section { border-bottom: 0; }
footer { display: flex; justify-content: space-between; gap: 14px; padding: 26px 28px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) {
  .category-links { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .compact-story-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .page-shell { border-inline: 0; }
  .topbar { min-height: 60px; padding: 0 16px; }
  #dateLabel { display: none; }
  .home-intro { align-items: start; flex-direction: column; gap: 16px; padding: 30px 18px 26px; }
  .home-intro h1 { font-size: clamp(42px, 11vw, 58px); }
  .home-intro p { max-width: 420px; }
  .section-block { padding: 26px 18px 30px; }
  .section-head { align-items: start; }
  .section-head h2 { font-size: clamp(26px, 6vw, 34px); }
  .prayer-times { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .story-grid, .compact-story-grid, .sports-events, .social-grid { grid-template-columns: 1fr; }
  .story-card, .home-story-grid .story-card, .compact-story-grid .story-card { min-height: 0; }
  .compact-story-grid .story-card p { display: block; }
  .controls { grid-template-columns: 1fr; padding: 14px 18px; }
  .view-heading { padding: 30px 18px 22px; }
  .category-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  footer { padding: 24px 18px 88px; }
}
@media (max-width: 640px) {
  .main-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; justify-content: space-around; padding: 8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border-top: 1px solid var(--line); border-bottom: 0; background: #0d1724; }
  .main-nav-btn { flex: 1; padding: 10px 2px; font-size: 12px; }
  .prayer-card { padding: 14px; }
  .prayer-card-head strong { display: block; margin-top: 3px; }
  .zone-picker { align-items: start; flex-direction: column; }
  .next-prayer strong { font-size: 21px; }
  .prayer-time { padding: 9px 6px; }
  .prayer-time strong { font-size: 17px; }
  .story-footer { align-items: start; }
}
@media (max-width: 360px) {
  .prayer-times { gap: 5px; }
  .prayer-time span { font-size: 9px; }
  .prayer-time strong { font-size: 15px; }
  .story-actions { gap: 8px; }
}
