/* rahimov.tr — ortak stil (DESIGN.md) */
:root {
  --bg: #FAFAF7; --surface: #FFFFFF; --surface-2: #F3F2EE;
  --border: #E7E5DF; --border-strong: #D6D3CB;
  --text: #1A1917; --text-2: #57534E; --text-3: #6B6560;
  --primary: #1A1917; --on-primary: #FFFFFF;
  --accent: #C2410C; --accent-soft: #FFF1E8;
  --up: #15803D; --down: #B91C1C;
  --font-head: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px;
  --shadow-hover: 0 1px 2px rgba(26,25,23,.04), 0 12px 32px -16px rgba(26,25,23,.22);
  --content: 1200px; --section: 88px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0B; --surface: #161614; --surface-2: #1F1F1C;
    --border: #2A2926; --border-strong: #3A3935;
    --text: #F2F1EC; --text-2: #A8A49C; --text-3: #8C877F;
    --primary: #F2F1EC; --on-primary: #0C0C0B;
    --accent: #FB923C; --accent-soft: #2A1A10;
    --up: #4ADE80; --down: #F87171;
    --shadow-hover: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C0B; --surface: #161614; --surface-2: #1F1F1C;
  --border: #2A2926; --border-strong: #3A3935;
  --text: #F2F1EC; --text-2: #A8A49C; --text-3: #8C877F;
  --primary: #F2F1EC; --on-primary: #0C0C0B;
  --accent: #FB923C; --accent-soft: #2A1A10;
  --up: #4ADE80; --down: #F87171;
  --shadow-hover: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/26px var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--content); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.logo { display: block; flex: none; }
img.logo { object-fit: cover; }
.pixel { image-rendering: pixelated; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }
.muted { color: var(--text-3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-md); font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-quiet { background: none; color: var(--text-2); padding: 0 8px; }
.btn-quiet:hover { color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px/1 var(--font-head); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav .wrap { gap: 8px; }
  .nav .brand { margin-right: auto; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 16px; }
}

/* Ticker (canlı özet şeridi) */
.ticker { border-bottom: 1px solid var(--border); background: var(--surface); }
.ticker .wrap { display: flex; gap: 28px; overflow-x: auto; height: 44px; align-items: center; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.tick { display: inline-flex; gap: 8px; align-items: baseline; white-space: nowrap; font-size: 14px; text-decoration: none; }
.tick b { font-weight: 600; }
.tick span { color: var(--text-3); }

/* Hero */
.hero { padding: 64px 0 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--text-2); font-weight: 500; margin-bottom: 16px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.2vw, 58px); line-height: 1.04; font-weight: 800; max-width: 18ch; }
.lead { margin-top: 18px; font-size: 18px; line-height: 28px; color: var(--text-2); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* Sections */
.section { padding: 0 0 var(--section); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: 34px; line-height: 40px; font-weight: 800; }
.section-head p { color: var(--text-2); margin-top: 6px; max-width: 60ch; }
.more { font-weight: 600; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.more:hover { text-decoration: underline; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .g4.keep2 { grid-template-columns: repeat(2, 1fr); } }

/* Dashboard tiles */
.tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.tile:hover, a.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile-label { font-size: 13px; line-height: 18px; color: var(--text-3); font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.tile-value { font: 800 30px/36px var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-value.wrap-ok { white-space: normal; }
.tile-sub { font-size: 14px; line-height: 20px; color: var(--text-2); }
.skeleton { display: inline-block; min-width: 4ch; border-radius: 6px; color: transparent !important; background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* Tool cards */
.tool { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tool-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.tool-ic .icon { width: 24px; height: 24px; }
.tool h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.tool p { color: var(--text-2); font-size: 15px; line-height: 23px; margin-top: 4px; }

/* App cards (projeler) */
.app { position: relative; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s; }
.app:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.app-head { display: flex; align-items: center; gap: 14px; }
.app-head > div { min-width: 0; }
.app .logo { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--border); }
.app h3 { font-size: 21px; line-height: 27px; font-weight: 700; }
.app h3 a { text-decoration: none; }
.app h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.app-meta { font-size: 13px; line-height: 18px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-desc { color: var(--text-2); margin-top: 14px; font-size: 15px; line-height: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li { font-size: 13px; line-height: 18px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); }
.app-foot { margin-top: auto; padding-top: 18px; }
.open { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.badge { display: inline-block; font: 600 12px/1 var(--font-body); letter-spacing: .02em; padding: 5px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.app .badge { margin-left: auto; align-self: flex-start; }

/* Page head (alt sayfalar) */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); padding-top: 28px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head { padding: 16px 0 32px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.08; font-weight: 800; max-width: 22ch; }
.page-head .lead { margin-top: 12px; }
.updated { font-size: 13px; color: var(--text-3); margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); display: inline-block; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select { height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 16px; width: 100%; min-width: 0; }
.input:focus, .select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form-row { display: grid; gap: 12px; grid-template-columns: 1.2fr 1fr auto 1fr; align-items: end; }
@media (max-width: 680px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row .swap { grid-column: 1 / -1; justify-self: center; } .form-row .field:first-child { grid-column: 1 / -1; } }
.result { margin-top: 20px; padding: 20px; border-radius: var(--r-md); background: var(--surface-2); }
.result b { display: block; font: 800 32px/38px var(--font-head); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result span { color: var(--text-2); font-size: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 500 14px/1 var(--font-body); cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* City picker */
.citybar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.citybar .field { flex: 1 1 260px; position: relative; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; margin-top: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-hover); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; border: 0; cursor: pointer; font-size: 15px; }
.suggest button:hover, .suggest button:focus { background: var(--surface-2); }
.suggest small { color: var(--text-3); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 12px 16px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 13px; font-weight: 600; color: var(--text-3); background: var(--surface-2); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td .sub { display: block; font-size: 13px; color: var(--text-3); white-space: normal; }
td.wrap-cell { white-space: normal; min-width: 180px; }
tr.is-next td { background: var(--accent-soft); }

/* Magnitude pill */
.mag { display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 700; background: var(--surface-2); }
.mag.m3 { background: #FEF3C7; color: #92400E; }
.mag.m4 { background: #FFEDD5; color: #9A3412; }
.mag.m5 { background: #FEE2E2; color: #991B1B; }

/* Weather */
.wx-now { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.wx-ic { display: block; width: 72px; height: 72px; color: var(--accent); flex: none; }
.wx-ic svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wx-temp { font: 800 64px/1 var(--font-head); letter-spacing: -0.03em; }
.wx-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 28px; margin-left: auto; }
.wx-meta dt { font-size: 13px; color: var(--text-3); }
.wx-meta dd { margin: 0 0 8px; font-weight: 600; }
.hours { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.hour { flex: none; width: 68px; text-align: center; padding: 12px 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.hour .wx-ic { width: 28px; height: 28px; margin: 6px auto; color: var(--text-2); }
.hour b { display: block; }
.days li { display: grid; grid-template-columns: 1.2fr 32px 2fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.days li:last-child { border-bottom: 0; }
.days .wx-ic { width: 28px; height: 28px; color: var(--text-2); }
.days .desc { color: var(--text-2); font-size: 14px; }

/* Prayer */
.pray-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 800px) { .pray-grid { grid-template-columns: repeat(3, 1fr); } }
.pray { text-align: center; padding: 18px 8px; }
.pray small { display: block; color: var(--text-3); font-size: 13px; }
.pray b { font: 800 26px/32px var(--font-head); font-variant-numeric: tabular-nums; }
.pray.is-next { border-color: var(--accent); background: var(--accent-soft); }

/* Chart */
.chart { width: 100%; height: 220px; display: block; }
.chart path.line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart path.area { fill: var(--accent); opacity: .08; }
.chart text { fill: var(--text-3); font: 12px var(--font-body); }
.chart line { stroke: var(--border); }

/* Prose (bilgi metinleri) */
.prose { max-width: 760px; }
.prose h2 { font-size: 28px; line-height: 34px; font-weight: 800; margin-top: 48px; }
.prose h3 { font-size: 20px; line-height: 26px; margin-top: 28px; }
.prose p, .prose li { color: var(--text-2); font-size: 17px; line-height: 28px; }
.prose p { margin-top: 12px; }
.prose ul, .prose ol { margin-top: 12px; padding-left: 22px; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.note { margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 15px; line-height: 24px; color: var(--text-2); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 17px; line-height: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--text-3); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding: 0 0 18px; }
.faq a { color: var(--accent); }

.error-box { padding: 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--text-2); text-align: center; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 56px; margin-top: 8px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h3 { font: 600 13px/18px var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.foot-grid li + li { margin-top: 8px; }
.foot-grid a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.foot-grid p { color: var(--text-2); font-size: 15px; line-height: 24px; margin-top: 12px; max-width: 34ch; }
.foot-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 14px; line-height: 22px; }

@media (max-width: 680px) {
  :root { --section: 64px; }
  .hero { padding: 40px 0; }
  .section-head h2 { font-size: 28px; line-height: 34px; }
  .wx-temp { font-size: 52px; }
  .keep2 { gap: 12px; }
  .keep2 .card { padding: 16px; }
  .keep2 .tile-value { font-size: 22px; line-height: 28px; }
  .keep2 .tile-sub { font-size: 13px; }
  .wx-meta { margin-left: 0; width: 100%; }
  th, td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
