/**
 * Companion surface · full viewport harmony · 20261020WIDE
 * Educational only — not a fatwa.
 */

/* —— Full-bleed shell —— */
.clarity-provision-home,
#clarity-provision-home {
  width: 100%;
  max-width: none !important;
  margin: 0.5rem 0 0.85rem;
  padding: 0 0.75rem;
  box-sizing: border-box;
}

/* Prefer fluid page content under banner */
#main-application-workspace,
.main-application-workspace,
#clarity-app-root,
.rrra-hub-body,
.tab-panel.rrra-hub,
.tab-panel.active,
.tab-panel.is-active {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Cards & sections span viewport with soft side inset */
.tab-panel .card,
.rrra-hub-body .card,
#meme-card,
#callig-lab-card,
#tajweed-live-card,
#tj-deep-studio,
#tajweed-path-card,
.rrra-hub-hero,
.rrra-hub-summary {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Dual path tiles full width */
.dual-tiles {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0.75rem 0 1rem !important;
  padding: 0 0.75rem !important;
  box-sizing: border-box;
}
@media (max-width: 520px) {
  .dual-tiles {
    grid-template-columns: 1fr !important;
  }
}
.dual-tile {
  border-radius: 16px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dual-tile:hover {
  border-color: rgba(30, 125, 94, 0.55);
  transform: translateY(-1px);
}

/* —— Provision card (Do this today) —— */
.cph-card {
  width: 100%;
  max-width: none;
  border-radius: 18px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: linear-gradient(
    145deg,
    rgba(22, 38, 30, 0.96) 0%,
    rgba(12, 22, 18, 0.98) 100%
  );
  padding: 1.05rem 1.25rem 1.15rem;
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.1),
    0 1px 0 rgba(201, 168, 76, 0.12) inset,
    0 12px 32px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}
.cph-card::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  opacity: 0.85;
  pointer-events: none;
}
html[data-theme="light"] .cph-card,
body:not(.dark)[data-theme="light"] .cph-card {
  background: linear-gradient(145deg, #fffefb 0%, #f7f0e4 55%, #efe6d6 100%);
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 28px rgba(19, 32, 26, 0.06);
  color: #13201a;
}
.cph-card h2 {
  margin: 0 0 0.35rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 700;
  color: #e4c76a;
  letter-spacing: 0.02em;
}
html[data-theme="light"] .cph-card h2 {
  color: #8b6f3f;
}
.cph-lane {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a84c;
  opacity: 0.95;
}
.cph-card > p {
  font-size: clamp(0.92rem, 1.6vw, 1.02rem);
  line-height: 1.55;
  margin: 0.25rem 0;
}
.cph-note,
.cph-mirror {
  font-size: 0.78rem;
  opacity: 0.82;
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

/* Primary action row — full width flex */
.cph-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  width: 100%;
}
.cph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: min(9.5rem, 100%);
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: #1e7d5e;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  border: 0;
  box-shadow: 0 2px 12px rgba(30, 125, 94, 0.3);
  transition: filter 0.15s ease, transform 0.12s ease;
}
.cph-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.cph-btn.ghost {
  background: transparent;
  color: inherit !important;
  border: 1px solid rgba(201, 168, 76, 0.45);
  box-shadow: none;
}

/* Drill chips — span full row evenly */
.cph-drills {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}
.cph-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 6.5rem;
  min-height: 38px;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit !important;
  border: 1px solid rgba(201, 168, 76, 0.42);
  background: linear-gradient(180deg, rgba(28, 44, 36, 0.9), rgba(14, 26, 20, 0.95));
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cph-chip:hover {
  border-color: rgba(30, 125, 94, 0.55);
  background: rgba(30, 125, 94, 0.2);
}
html[data-theme="light"] .cph-chip {
  background: linear-gradient(180deg, #fffef9, #f0e9db);
}

/* Tab hints */
.cph-tab-hint {
  font-size: 0.82rem;
  opacity: 0.88;
  margin: 0.5rem 0 0.85rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border-left: 3px solid rgba(201, 168, 76, 0.6);
  background: rgba(16, 28, 22, 0.45);
  width: 100%;
  box-sizing: border-box;
}
html[data-theme="light"] .cph-tab-hint {
  background: rgba(255, 252, 245, 0.85);
}

/* Bottom tab bar — full viewport width */
.clarity-bottom-tabs,
#clarity-bottom-tabs,
nav.tab-bar,
.tab-bar-bottom,
.mobile-tab-bar,
[class*="bottom-tab"] {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}
/* Common bottom nav pattern on this SPA */
body > nav[aria-label*="tab" i],
footer + nav,
.clarity-tab-nav {
  width: 100% !important;
}

/* Gate / track pills — stretch across content width */
.clarity-gate-switcher,
.cgp-track-plaque,
.cgp-track-row,
.adm-steps {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.cgp-track-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: stretch;
}
.cgp-track-row .cgs-btn,
.cgp-track-row button {
  flex: 1 1 auto;
  min-width: 4.5rem;
  justify-content: center;
}

/* Phased learning strip full width */
[class*="phase"],
.phased-learning,
#clarity-phase-plaque-rail {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

/* Meme / studios fluid */
#meme-stage-wrap,
#meme-stage,
#callig-stage-wrap,
#callig-canvas {
  max-width: 100% !important;
  width: 100%;
  box-sizing: border-box;
}

/* Hijri temps readable */
#hijri-temps,
.hijri-temps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
}
#hijri-temps .ht-item strong {
  font-weight: 800;
}

/* Scroll margin for drill targets */
#meme-card,
#callig-lab-card,
#tajweed-live-card,
#tj-deep-studio {
  scroll-margin-top: 5rem;
}

/* Side padding only — no artificial 40rem cage for main flow */
@media (min-width: 900px) {
  .clarity-provision-home,
  .tab-panel.rrra-hub .rrra-hub-body,
  .dual-tiles {
    padding-left: clamp(0.75rem, 2vw, 1.5rem);
    padding-right: clamp(0.75rem, 2vw, 1.5rem);
  }
}

/* —— Day theme readability · 20261020DAY —— */
html[data-theme="light"] body,
body:not(.dark):not([data-theme="dark"]),
html[data-theme="light"] {
  --cph-text: #1a2e24;
  --cph-muted: #3d5348;
  --cph-card-bg: linear-gradient(155deg, #fffefb 0%, #f5efe3 55%, #ebe2d0 100%);
  --cph-border: rgba(139, 111, 63, 0.4);
}
html[data-theme="light"] .cph-card,
body:not(.dark) .cph-card {
  background: var(--cph-card-bg, linear-gradient(155deg, #fffefb, #f5efe3)) !important;
  color: #1a2e24 !important;
  border-color: rgba(139, 111, 63, 0.4) !important;
  box-shadow: 0 1px 0 #fff inset, 0 8px 28px rgba(26, 46, 36, 0.07) !important;
}
html[data-theme="light"] .cph-card h2 {
  color: #7a5c2e !important;
}
html[data-theme="light"] .cph-lane {
  color: #8b6f3f !important;
}
html[data-theme="light"] .cph-note,
html[data-theme="light"] .cph-mirror {
  color: #3d5348 !important;
  opacity: 1 !important;
}
html[data-theme="light"] .cph-chip {
  background: linear-gradient(180deg, #fffef9, #f0e8d8) !important;
  color: #1a2e24 !important;
  border-color: rgba(139, 111, 63, 0.45) !important;
}
html[data-theme="light"] .cph-btn.ghost {
  color: #1a2e24 !important;
  border-color: rgba(139, 111, 63, 0.4) !important;
}
html[data-theme="light"] .cph-tab-hint {
  background: rgba(255, 252, 245, 0.95) !important;
  color: #1a2e24 !important;
}
/* Section-wide day readability for cards */
html[data-theme="light"] .tab-panel .card,
html[data-theme="light"] .rrra-hub-hero,
html[data-theme="light"] .rrra-hub-summary,
html[data-theme="light"] .dual-tile {
  color: #1a2e24;
}
html[data-theme="light"] .rrra-hub-sub,
html[data-theme="light"] .td-src {
  color: #3d5348 !important;
  opacity: 1 !important;
}
html[data-theme="light"] .mv-chip,
html[data-theme="light"] .btn-soft {
  color: #1a2e24 !important;
  background: linear-gradient(180deg, #fffefb, #f3ebe0) !important;
  border-color: rgba(139, 111, 63, 0.35) !important;
}

/* Tasbeeh + next salah on provision card */
.cph-top-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.cph-salah {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1e7d5e;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(30, 125, 94, 0.35);
  background: rgba(30, 125, 94, 0.08);
}
html[data-theme="light"] .cph-salah {
  color: #0f5c42;
  background: rgba(30, 125, 94, 0.1);
}
.cph-tasbeeh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.cph-tas-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.45);
  background: #1e7d5e;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.cph-tas-btn.ghost {
  background: transparent;
  color: inherit;
  font-size: 0.85rem;
}
#cph-tas-count {
  min-width: 1.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Day: un-grey city temps & muted chrome · 20261020ANCHOR */
html[data-theme="light"] #hijri-temps,
html[data-theme="light"] .hijri-temps,
html[data-theme="light"] #hijri-temps .ht-item,
html[data-theme="light"] #temp-makkah,
html[data-theme="light"] #temp-madinah,
html[data-theme="light"] .temp-live,
html[data-theme="light"] #place-temp {
  color: #1a2e24 !important;
  opacity: 1 !important;
  font-weight: 700;
}
html[data-theme="light"] #clarity-top-duo,
html[data-theme="light"] .banner-overlay,
html[data-theme="light"] .salah-box,
html[data-theme="light"] .hijri-cal-meta {
  color: #1a2e24 !important;
}
html[data-theme="light"] .salah-box,
html[data-theme="light"] [class*="salah"] {
  opacity: 1 !important;
}
html[data-theme="light"] .salah-box span,
html[data-theme="light"] .salah-box strong,
html[data-theme="light"] .salah-box div {
  color: #1a2e24 !important;
  opacity: 1 !important;
}
/* One daily drill grey box on day — readable */
html[data-theme="light"] #clarity-one-daily-drill,
html[data-theme="light"] .one-daily-drill,
html[data-theme="light"] [class*="daily-drill"] {
  background: linear-gradient(160deg, #1e3d32, #152e26) !important;
  color: #f5f0e6 !important;
  opacity: 1 !important;
}
/* Provision meta always visible */
.cph-top-meta {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.65rem 0 !important;
  min-height: 2.2rem;
}
.cph-salah,
.cph-tasbeeh {
  display: inline-flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Do this today · centered title between salah & tasbeeh · 20261020NUR */
.cph-headline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.55rem;
}
.cph-title-center {
  margin: 0 !important;
  text-align: center;
  font-family: "Cormorant Garamond", "Amiri", Georgia, serif !important;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem) !important;
  font-weight: 700 !important;
  color: var(--nuros-gold, #c9a84c) !important;
  letter-spacing: 0.02em;
  justify-self: center;
}
.cph-headline-row .cph-salah {
  justify-self: start;
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  color: var(--nuros-green-deep, #0f5c42);
}
.cph-headline-row .cph-tasbeeh {
  justify-self: end;
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
}
.cph-headline-row .nuros-icon {
  color: var(--nuros-green, #1e7d5e);
}
.cph-tas-btn .nuros-icon {
  color: #fff;
  width: 1.1rem;
  height: 1.1rem;
}
.cph-tas-btn.ghost .nuros-icon {
  color: inherit;
}
@media (max-width: 520px) {
  .cph-headline-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "salah tas";
  }
  .cph-title-center { grid-area: title; }
  .cph-headline-row .cph-salah { grid-area: salah; }
  .cph-headline-row .cph-tasbeeh { grid-area: tas; }
}

/* Inline SVG icons · large impact · 20261020NUR2 */
.cph-salah .nuros-svg,
.cph-tas-btn .nuros-svg {
  display: inline-block !important;
  width: 1.65rem !important;
  height: 1.65rem !important;
  min-width: 1.65rem;
  min-height: 1.65rem;
  flex-shrink: 0;
  vertical-align: middle;
}
.cph-salah {
  color: #0f5c42 !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  gap: 0.4rem !important;
  padding: 0.35rem 0.75rem !important;
  border: 1px solid rgba(30, 125, 94, 0.4) !important;
  border-radius: 999px !important;
  background: rgba(30, 125, 94, 0.1) !important;
}
.cph-salah .nuros-svg { color: #1e7d5e; }
.cph-tas-btn {
  width: 2.55rem !important;
  height: 2.55rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}
.cph-tas-btn .nuros-svg {
  color: #fff !important;
  width: 1.45rem !important;
  height: 1.45rem !important;
}
#cph-tas-count {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  min-width: 2rem;
}
.cph-headline-row {
  display: grid !important;
  grid-template-columns: minmax(5.5rem, 1fr) auto minmax(5.5rem, 1fr) !important;
  align-items: center !important;
  gap: 0.4rem !important;
  width: 100% !important;
}
.cph-title-center {
  text-align: center !important;
  margin: 0 !important;
  line-height: 1.15 !important;
}
@media (max-width: 560px) {
  .cph-headline-row {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "title title"
      "salah tas" !important;
  }
  .cph-title-center { grid-area: title !important; width: 100%; }
  .cph-headline-row .cph-salah { grid-area: salah !important; justify-self: start !important; }
  .cph-headline-row .cph-tasbeeh { grid-area: tas !important; justify-self: end !important; }
  .cph-salah .nuros-svg,
  .cph-tas-btn .nuros-svg {
    width: 1.75rem !important;
    height: 1.75rem !important;
  }
  .cph-tas-btn {
    width: 2.75rem !important;
    height: 2.75rem !important;
  }
}

/* —— 20261020FIX: paired icons + solar date + top symmetry —— */
.cph-headline-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.1fr) !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
}
.cph-title-block {
  text-align: center;
  justify-self: center;
}
.cph-title-center {
  margin: 0 !important;
  font-size: clamp(1.15rem, 3vw, 1.5rem) !important;
  color: #c9a84c !important;
}
.cph-solar-date {
  margin: 0.15rem 0 0 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #3d5348 !important;
  opacity: 1 !important;
  letter-spacing: 0.02em;
}
html[data-theme="dark"] .cph-solar-date,
body.dark .cph-solar-date {
  color: #a8bdb0 !important;
}
.cph-ico {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.85rem !important;
  height: 1.85rem !important;
  min-width: 1.85rem;
  min-height: 1.85rem;
  font-size: 1.45rem !important;
  line-height: 1 !important;
  flex-shrink: 0;
}
.cph-ico-emoji { display: inline-block !important; }
.cph-ico-svg { display: none !important; } /* emoji first for mobile reliability */
.cph-salah {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(30, 125, 94, 0.4) !important;
  background: rgba(30, 125, 94, 0.12) !important;
  color: #0f5c42 !important;
}
.cph-tas-btn {
  width: 2.85rem !important;
  height: 2.85rem !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #1e7d5e !important;
  border: none !important;
  color: #fff !important;
  padding: 0 !important;
  font-size: 1.35rem !important;
}
.cph-tas-btn .cph-ico { font-size: 1.35rem !important; }
.cph-tas-btn.ghost {
  width: 2rem !important;
  height: 2rem !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 1rem !important;
}
.cph-tas-count {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  min-width: 1.75rem;
  text-align: center;
}
@media (max-width: 560px) {
  .cph-headline-row {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "title title"
      "salah tas" !important;
  }
  .cph-title-block { grid-area: title !important; }
  .cph-headline-row .cph-salah { grid-area: salah !important; }
  .cph-headline-row .cph-tasbeeh { grid-area: tas !important; justify-self: end !important; }
  .cph-ico { width: 2rem !important; height: 2rem !important; font-size: 1.55rem !important; }
  .cph-tas-btn { width: 3rem !important; height: 3rem !important; }
}

/* Top chrome symmetry */
#clarity-top-duo,
.clarity-top-duo,
.banner-triple {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr) !important;
  gap: 0.55rem !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#clarity-top-duo > *,
.banner-triple > * {
  min-width: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 720px) {
  #clarity-top-duo,
  .clarity-top-duo,
  .banner-triple {
    grid-template-columns: 1fr !important;
  }
}
/* Theme pills row balance */
.theme-switcher,
.clarity-theme-row,
header .theme-pills {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

/* Phase D CLS shells 20261021PERF */
#clarity-provision-home,.clarity-provision-home{min-height:11.5rem}
#clarity-adhkar-daily,.clarity-adhkar-daily{min-height:9.5rem}
