/* Standart Solar Takvim - stil (web + Android) */
:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --ink: #1d2433;
  --muted: #6b7280;
  --line: #e4ded2;
  --brand: #0b3d6e;
  --brand-2: #145a9e;
  --sun: #f0a020;
  --sun-soft: #fff1d6;
  --weekend: #b4532a;
  --sel: #145a9e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 6px 20px rgba(20, 30, 50, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --surface: #171e2d; --surface-2: #1d2638; --ink: #e8ecf3; --muted: #94a0b4;
    --line: #2a3448; --brand: #8fc1ff; --brand-2: #5ea3f5; --sun: #f5b545; --sun-soft: #3a2e14;
    --weekend: #f0956a; --sel: #5ea3f5; --shadow: none; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans SC", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 1320px; margin: 0 auto; padding: 16px 16px 32px; }

/* üst bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, var(--sun) 0 34%, transparent 35%), var(--brand);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08);
}
h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; color: var(--brand); }
.sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.lang select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; min-height: 40px;
}

/* bugün kartı */
.today {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 1px; overflow: hidden;
  background: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px;
}
.today > div { padding: 16px 20px; background: var(--surface); }
.today-sst { background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important; color: #fff; }
.today-sst .tag { color: rgba(255,255,255,.75); }
.tag { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.today-date { font-size: 32px; font-weight: 800; line-height: 1.15; margin-top: 4px; letter-spacing: -.01em; }
.today-wd { font-weight: 700; color: var(--sun); letter-spacing: .04em; margin-top: 2px; }
.today-gdate { font-size: 18px; font-weight: 600; margin: 6px 0 2px; }
@media (prefers-color-scheme: dark) { .today-sst { background: linear-gradient(135deg, #123a66, #1d5a99) !important; } }

/* araç çubuğu */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
  position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--bg);
}
.pager { display: flex; align-items: center; gap: 6px; flex: 1 1 260px; min-width: 0; }
.pager-label { display: flex; flex-direction: column; min-width: 0; padding: 0 6px; }
.pager-label strong { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-label .muted { font-size: 12px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 22px; line-height: 1; display: grid; place-items: center; flex: none;
}
.icon-btn:hover { border-color: var(--brand-2); }
[dir="rtl"] .nav-arrow { transform: scaleX(-1); }
.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tab { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .tab.on { color: #0f1420; } }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 16px; font-weight: 600; }
.btn.primary { background: var(--sun); border-color: var(--sun); color: #23180a; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.link { border: 0; background: none; padding: 6px 0 0; color: var(--brand-2); }

/* seçili gün çubuğu */
.selbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--sel);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
}
.selbar.is-today { border-inline-start-color: var(--sun); }
.sel-sst { font-weight: 800; font-size: 17px; }
.sel-wd { font-size: 12.5px; font-weight: 700; color: var(--brand-2); letter-spacing: .04em; }
.sel-eq { color: var(--muted); font-size: 20px; }
.sel-greg { font-weight: 600; }

/* yerleşim */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
aside { display: grid; gap: 14px; position: sticky; top: 70px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }

/* ay kartları */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 12px; }
.month.current { border-color: var(--sun); box-shadow: 0 0 0 2px var(--sun-soft); }
.month-title {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  width: 100%; border: 0; background: none; padding: 2px 4px 8px; text-align: start;
}
.mnum {
  grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted);
}
.month.current .mnum { background: var(--sun); color: #23180a; }
.mname { font-weight: 700; font-size: 15.5px; }
.mrange { font-size: 11.5px; color: var(--muted); }
.month-title:hover .mname { color: var(--brand-2); }

.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dh {
  text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted); padding: 2px 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dh.weekend { color: var(--weekend); }
.day {
  border: 0; border-radius: 8px; background: var(--surface-2); aspect-ratio: 1 / 1; min-height: 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0;
  font-weight: 600; font-size: 13px; transition: background .15s, color .15s;
}
.day.weekend { color: var(--weekend); }
.day:hover { background: var(--line); }
.day.is-today { background: var(--sun); color: #23180a; font-weight: 800; }
.day.is-sel { box-shadow: inset 0 0 0 2px var(--sel); }
.day.is-sel:not(.is-today) { background: color-mix(in srgb, var(--sel) 14%, var(--surface)); }

/* ay görünümü */
.month.big { padding: 16px; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 4px 12px; }
.month-head h2 { margin: 0; font-size: 22px; }
.month.big .grid7 { gap: 6px; }
.month.big .dh { font-size: 12px; }
.month.big .day { aspect-ratio: auto; min-height: 64px; border-radius: 10px; }
.month.big .day .n { font-size: 20px; font-weight: 700; }
.month.big .day .g { font-size: 11px; font-weight: 500; color: var(--muted); }
.month.big .day.is-today .g { color: #3d2b0a; }

/* hafta görünümü */
.week-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wrow {
  width: 100%; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  border: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 14px; text-align: start;
}
.wnum { font-size: 26px; font-weight: 800; text-align: center; }
.wname { font-weight: 700; display: flex; flex-direction: column; }
.wname small { font-weight: 500; color: var(--muted); }
.wgreg { color: var(--muted); font-size: 13.5px; text-align: end; }
.wrow.weekend .wname, .wrow.weekend .wnum { color: var(--weekend); }
.wrow.is-today { background: var(--sun); color: #23180a; }
.wrow.is-today .wgreg, .wrow.is-today small, .wrow.is-today .wname, .wrow.is-today .wnum { color: #23180a; }
.wrow.is-sel { box-shadow: inset 0 0 0 2px var(--sel); }

/* yılbaşı */
.chips { display: grid; gap: 8px; margin-top: 10px; }
.chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start;
  border: 1px dashed var(--sun); background: var(--sun-soft); border-radius: 10px; padding: 9px 12px;
}
.chip span { font-size: 13px; color: var(--muted); }
.chip.is-today { background: var(--sun); border-style: solid; }
.chip.is-today span { color: #3d2b0a; }
.chip.is-sel { box-shadow: inset 0 0 0 2px var(--sel); }

/* çevirici */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; margin: 10px 0; }
.seg button { border: 0; background: none; padding: 7px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.field input, .field select {
  width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
  background: var(--surface); color: var(--ink); font-weight: 500; font-size: 15px;
}
.row3 { display: grid; grid-template-columns: 1fr 1.4fr .8fr; gap: 8px; }
.result { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.result.error { color: #c0392b; }

.foot { text-align: center; margin-top: 24px; }

/* duyarlı */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  aside { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .app { padding: 10px 10px 24px; }
  .sub { display: none; }
  h1 { font-size: 17px; }
  .today { grid-template-columns: 1fr; }
  .today > div { padding: 14px 16px; }
  .today-date { font-size: 26px; }
  .toolbar { gap: 8px; }
  .pager { flex-basis: 100%; }
  .tabs { flex: 1; }
  .tab { flex: 1; padding: 7px 8px; }
  aside { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .month { padding: 8px 6px 10px; }
  .mrange { display: none; }
  .mname { font-size: 14px; }
  .grid7 { gap: 2px; }
  .day { font-size: 11.5px; min-height: 0; border-radius: 6px; }
  .dh { font-size: 9px; }
  .month.big .day { min-height: 54px; }
  .month.big .day .n { font-size: 17px; }
  .month.big .day .g { font-size: 9.5px; }
  .wrow { grid-template-columns: 44px 1fr; }
  .wgreg { grid-column: 2; text-align: start; }
}
@media (max-width: 360px) { .year-grid { grid-template-columns: 1fr; } }

/* ---------- üst menü ---------- */
.topbar { flex-wrap: wrap; }
.brand { flex: 1 1 auto; }
.mainnav { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.mainnav button {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 700; color: var(--muted);
}
.mainnav button:hover { color: var(--ink); }
.mainnav button.on { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .mainnav button.on { color: #0f1420; } }

/* ---------- Hakkında sayfası ---------- */
.about { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.about-toc { position: sticky; top: 12px; }
.about-toc ol { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.about-toc li button {
  width: 100%; text-align: start; border: 0; background: none; padding: 7px 8px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink); line-height: 1.3;
}
.about-toc li button:hover { background: var(--surface-2); color: var(--brand-2); }
.about-main { min-width: 0; display: grid; gap: 16px; }
.about-hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: var(--radius);
  padding: 22px 24px;
}
@media (prefers-color-scheme: dark) { .about-hero { background: linear-gradient(135deg, #123a66, #1d5a99); } }
.about-hero h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.01em; }
.about-hero p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.92); }
.about-hero strong { color: var(--sun); }
.about-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; scroll-margin-top: 12px; }
.about-sec h2 { margin: 0 0 10px; font-size: 19px; color: var(--brand); }
.about-sec p { margin: 0 0 10px; line-height: 1.65; }
.about-sec ul { margin: 0 0 6px; padding-inline-start: 20px; line-height: 1.6; }
.about-sec li { margin: 5px 0; }
.about-sec li::marker { color: var(--sun); }
.about-end { text-align: center; margin: 4px 0 0; }

.demo-grid { max-width: 420px; margin: 14px 0 4px; gap: 4px; }
.day.demo { cursor: default; }
.day.demo:hover { background: var(--surface-2); }
.day.demo.sun { background: var(--weekend); color: #fff; }
.day.demo.mon { background: var(--brand-2); color: #fff; }
.demo-cap { margin: 4px 0 0; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.tbl caption { text-align: start; font-weight: 700; font-size: 15px; padding: 0 2px 8px; color: var(--ink); }
.tbl th, .tbl td { padding: 9px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl thead th { background: var(--surface-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tbl tbody th { font-weight: 600; color: var(--muted); }
.tbl .sst { font-weight: 700; color: var(--brand); }
.tbl thead .sst { color: var(--brand); }
.tbl .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.tbl tr.hl td { background: var(--sun-soft); }
.about-sec .tbl-wrap { margin-top: 12px; }

@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; }
  .about-toc { position: static; }
}
@media (max-width: 640px) {
  .mainnav { order: 3; width: 100%; }
  .mainnav button { flex: 1; }
  .about-hero { padding: 18px; }
  .about-hero h2 { font-size: 21px; }
  .about-sec { padding: 14px 16px; }
  .tbl th, .tbl td { padding: 8px 10px; font-size: 13px; }
}

/* ---------- takvim aboneliği ---------- */
.subscribe p { margin: 4px 0 10px; }
.sub-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sub-btns .btn { text-align: center; text-decoration: none; color: inherit; padding: 9px 8px; font-size: 14px; }
.sub-btns .btn.primary { color: #23180a; }
.sub-copy { display: flex; gap: 6px; margin-top: 8px; }
.sub-copy input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px;
  background: var(--surface-2); color: var(--muted); font-size: 12px;
}
.sub-copy .btn { padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.subscribe .btn.link { display: inline-block; text-decoration: none; font-size: 13px; }

/* çevirici: MÖ/MS girişli Miladi tarih */
.field-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.row4 { display: grid; grid-template-columns: .8fr 1.6fr 1.1fr 1fr; gap: 6px; }
.row4 .field input, .row4 .field select { padding: 7px 6px; }
.result .note { margin-top: 6px; line-height: 1.4; }
.icon-btn:disabled { opacity: .35; cursor: default; }
