/* yamim.benbasha.com tool pages (/css/seo.css). Same identity as style.css
   (the landing): dark-first night sky, periwinkle accent, Heebo, light
   variant via prefers-color-scheme. RTL, mobile-first (390px), logical
   properties only. Self-contained: style.css is not loaded on these pages. */

:root {
  --bg: #141520;
  --surface: #1D1F2E;
  --surface-alt: #262940;
  --ink: #F0EFF7;
  --ink-soft: #A6A7BD;
  --ink-faint: #6E7089;
  --accent: #7C8CF8;
  --accent-soft: #2B2F52;
  --accent-bright: #B9C2FB;
  --line: #2E3147;
  --chip-border: #3A3F63;
  --on-accent: #141520;
  --fast: #E2A86B;
  --fast-soft: rgba(226, 168, 107, 0.16);
  --warn-soft: rgba(226, 168, 107, 0.14);
  --error: #F08A8A;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-card: 20px;
  --radius-button: 16px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F6FB;
    --surface: #FFFFFF;
    --surface-alt: #EEEDF6;
    --ink: #23243A;
    --ink-soft: #666880;
    --ink-faint: #9C9DB2;
    --accent: #5B6CF0;
    --accent-soft: #E4E7FD;
    --accent-bright: #4A5AD8;
    --line: #E5E4EF;
    --chip-border: #D8D7E6;
    --on-accent: #FFFFFF;
    --fast: #A8641F;
    --fast-soft: rgba(168, 100, 31, 0.10);
    --warn-soft: rgba(168, 100, 31, 0.09);
    --error: #B42318;
    --shadow-soft: 0 8px 24px rgba(30, 32, 60, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-bright); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-weight: 800; line-height: 1.2; letter-spacing: -0.3px; }
h1 { font-size: clamp(28px, 7vw, 40px); margin: 10px 0 12px; }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 18px 0 8px; }
p { margin: 0 0 12px; }
.nw { white-space: nowrap; }
bdi { unicode-bidi: isolate; }

/* ------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 20px; }
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); flex: none; }
.mark svg { width: 20px; height: 20px; }
.mark-lg { width: 56px; height: 56px; border-radius: 16px; }
.mark-lg svg { width: 34px; height: 34px; }
.tools-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; width: calc(100% + 32px); }
.tools-nav::-webkit-scrollbar { display: none; }
.tools-nav a { flex: none; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--chip-border); min-height: 40px; display: inline-flex; align-items: center; }
.tools-nav a[aria-current] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
@media (min-width: 760px) {
  .tools-nav { width: auto; margin: 0 auto 0 0; margin-inline-start: auto; margin-inline-end: 0; padding: 0; }
}

/* ------------------------------------------------------------- content */
.crumbs { font-size: 14px; color: var(--ink-faint); margin: 18px 0 0; }
.crumbs a { color: var(--ink-soft); }
.lead { font-size: 19px; color: var(--ink); }
.hebmonths { color: var(--accent-bright); font-weight: 700; margin-top: -4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; margin: 18px 0; box-shadow: var(--shadow-soft); }
.note { font-size: 14px; color: var(--ink-soft); }
.sources { font-size: 13px; color: var(--ink-faint); margin-top: 8px; }
.placeholder { border: 2px dashed var(--fast); background: var(--fast-soft); color: var(--fast); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.more { margin: 20px 0; font-weight: 600; }

.countdown { font-size: 16px; color: var(--ink-soft); background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; }
.countdown .cd-live { color: var(--accent-bright); font-size: 20px; }

ul.notes { margin: 0; padding-inline-start: 20px; }
ul.notes li { margin-bottom: 6px; }

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: start; font-size: 14px; color: var(--ink-soft); padding-bottom: 8px; }
th, td { padding: 9px 8px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13px; color: var(--ink-faint); font-weight: 700; }
tbody th { font-weight: 700; white-space: nowrap; }
table.sched td { font-size: 15px; }
table.sched tr.erev td, table.sched tr.erev th { color: var(--ink-soft); }
table.sched tr.next th, table.sched tr.next td { background: var(--accent-soft); }

ul.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.links li a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; }
ul.links li { position: relative; }
ul.links li > span { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 400; padding-inline: 14px; margin-top: -2px; }
@media (min-width: 600px) { ul.links { grid-template-columns: 1fr 1fr; } }
ul.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
ul.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--chip-border); text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; }

/* ------------------------------------------------------------- calendar */
table.cal { table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
table.cal th { text-align: center; padding: 4px 0; border: 0; }
table.cal td { border: 0; border-radius: 10px; background: var(--surface-alt); padding: 5px 4px; height: 64px; text-align: center; vertical-align: top; }
table.cal td.pad { background: transparent; }
table.cal td.sat { outline: 1px solid var(--chip-border); }
table.cal .g { display: block; font-weight: 800; font-size: 16px; }
table.cal .h { display: block; font-size: 12px; color: var(--ink-soft); }
table.cal .e { display: block; font-size: 10px; line-height: 1.2; color: var(--accent-bright); margin-top: 2px; overflow-wrap: anywhere; }
table.cal td.k-chag { background: var(--accent-soft); }
table.cal td.k-fast { background: var(--fast-soft); }
table.cal td.k-fast .e { color: var(--fast); }
table.cal td.k-rc .g::after, table.cal td.k-day .g::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-inline-start: 3px; vertical-align: middle; }
table.cal.mini td { height: auto; padding: 3px 2px; }
table.cal.mini .g { font-size: 13px; }
table.cal.mini .h { font-size: 10px; }
.months { display: grid; gap: 14px; }
@media (min-width: 640px) { .months { grid-template-columns: 1fr 1fr; } }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px; }
.month h2 { font-size: 18px; margin-bottom: 2px; }
.month .note { margin-bottom: 6px; }
ul.days { list-style: none; margin: 0; padding: 0; }
ul.days li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.days .when { font-weight: 700; }
ul.days .heb { color: var(--ink-soft); }
.ev-fast { color: var(--fast); }
.ev-parasha { color: var(--ink-soft); }

/* ------------------------------------------------------------- tools */
#tool { margin: 18px 0; }
.tool-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow-soft); margin: 0 0 16px; }
.tool-grid .tool-card { margin: 0; }
.tool-card h2 { font-size: 19px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; color: var(--ink-soft); margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field input, .field select {
  font: inherit; font-size: 18px; font-weight: 500; color: var(--ink); background: var(--surface-alt);
  border: 1px solid var(--chip-border); border-radius: 14px; min-height: 52px; padding: 10px 14px; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field input[type='date'] { direction: ltr; text-align: end; }
.field-row { display: grid; grid-template-columns: 1fr 1.6fr 1.4fr; gap: 10px; }
.field-row .field { margin-bottom: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 0 0 14px; font-size: 16px; cursor: pointer; }
.check input, .radios input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.radios legend { padding: 0; margin-bottom: 6px; }
.radios label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--chip-border); border-radius: 14px; margin-bottom: 8px; font-weight: 500; color: var(--ink); cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.btn {
  font: inherit; font-weight: 800; font-size: 17px; color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: var(--radius-button); min-height: 52px; padding: 12px 22px; width: 100%; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.tool-out { display: block; margin-top: 16px; }
.tool-out:empty { display: none; }
.tool-answer { font-size: clamp(24px, 6.5vw, 32px); font-weight: 800; color: var(--accent-bright); line-height: 1.25; margin: 4px 0 8px; }
.tool-note { font-size: 14px; color: var(--ink-soft); }
.tool-hint { font-size: 14px; color: var(--ink-faint); margin-top: -4px; }
.tool-warn { background: var(--warn-soft); border-inline-start: 3px solid var(--fast); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.tool-error { color: var(--error); font-weight: 700; }
.tool-table { margin-top: 12px; }
.tool-table th[scope='row'] { white-space: nowrap; }
.tool-table td { font-size: 15px; }
.today-label { font-size: 14px; color: var(--ink-faint); margin: 0; }
.today-evening { font-size: 20px; font-weight: 700; }
ol.upcoming { margin: 0; padding-inline-start: 22px; }
ol.upcoming li { padding: 6px 0; border-bottom: 1px solid var(--line); }
small { font-size: 13px; color: var(--ink-soft); }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.faq details p { margin-top: 0; }

/* ------------------------------------------------------------- CTA */
.cta { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(160deg, var(--accent-soft), var(--surface)); border: 1px solid var(--chip-border); border-radius: var(--radius-card); padding: 18px; margin: 24px 0; }
.cta h2 { font-size: 19px; margin-bottom: 6px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.badges a { display: inline-flex; min-height: 44px; align-items: center; }

/* ------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); margin-top: 32px; padding: 20px 0 32px; color: var(--ink-faint); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.foot-links a, .foot-legal a { color: var(--ink-soft); }
.foot-legal { margin: 0 0 6px; }
