/* Публічна сторінка. Токени і спільні елементи — у tokens.css */

/* ───────────────────────── ХЕДЕР ───────────────────────── */

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.stuck { border-bottom-color: var(--line-2); }
.logo img { display: block; }
html[data-theme="dark"] .logo img { filter: invert(1) brightness(1.15); }

.top-right { display: flex; align-items: center; gap: 14px; }

.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--faint);
  white-space: nowrap;
}
.live .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
}
.live.pulse .dot { animation: pulse 1.4s ease-out 2; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
.live.off .dot { background: var(--faint); }

.ghost-link { font-size: 13px; color: var(--faint); text-decoration: none; border-bottom: 1px solid var(--line); }
.ghost-link:hover { color: var(--ink); }

/* ───────────────────────── КАРКАС ───────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 90px; }

.hero { padding: 34px 0 30px; max-width: 42ch; }
.eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
h1 {
  font-size: clamp(32px, 6.4vw, 56px); font-weight: 800;
  line-height: 1.02; letter-spacing: -0.035em;
}
.lede {
  margin-top: 18px; font-size: 16px; line-height: 1.6;
  color: var(--muted); max-width: 56ch;
}

/* ─────────────────────── СТРІЧКА МІСЯЦІВ ─────────────────────── */

.scrubber {
  position: sticky; top: 66px; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; margin-bottom: 6px;
  background: linear-gradient(var(--paper) 72%, transparent);
}
.arrow {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--ink); cursor: pointer;
  transition: border-color .18s, background .18s;
}
.arrow:hover:not(:disabled) { border-color: var(--ink); }
.arrow:disabled { opacity: .3; cursor: default; }

.rail {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; scroll-behavior: smooth;
  padding: 3px 2px; flex: 1;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .year {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--faint); padding: 0 8px 0 4px; flex: none;
}
.rail .mo {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; border: 1px solid transparent;
  transition: background .16s, color .16s, border-color .16s;
}
.rail .mo i {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  color: var(--faint); opacity: .75;
}
.rail .mo:hover { background: var(--card); border-color: var(--line); color: var(--ink); }
.rail .mo.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rail .mo.on i { color: var(--paper); opacity: .55; }

/* ───────────────────────── МІСЯЦЬ ───────────────────────── */

.month { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.month-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 20px 0 14px;
}
.month-head h2 {
  font-size: clamp(22px, 3.4vw, 28px); font-weight: 800; letter-spacing: -0.028em;
  text-transform: capitalize;
}
.back-now { font-size: 13px; color: var(--faint); text-decoration: none; border-bottom: 1px solid var(--line); }
.back-now:hover { color: var(--ink); }

.note {
  background: var(--yellow); border-radius: var(--r-card);
  padding: 18px 22px; margin-bottom: 18px;
}
.note b { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; }
.note p { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
html[data-theme="dark"] .note p { color: var(--ink-soft); }

/* ───────────────────────── СТАТИСТИКА / ФІЛЬТР ───────────────────────── */

.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.stat {
  display: flex; align-items: baseline; gap: 7px;
  padding: 9px 16px 9px 14px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  font-family: inherit; cursor: pointer; color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .16s, background .16s, transform .12s;
}
.stat:hover { border-color: var(--ink); }
.stat:active { transform: scale(.97); }
.stat b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.stat[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stat[aria-pressed="true"] span { color: var(--paper); opacity: .7; }
.stat.s-call[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.stat.s-call[aria-pressed="true"] span { color: #fff; }
.stat.s-call b { color: var(--violet); }
.stat.s-call[aria-pressed="true"] b { color: #fff; }

/* ───────────────────────── ТУТ ПОТРІБНІ ВИ ───────────────────────── */

.calls {
  background: var(--violet-soft); border-radius: 24px;
  padding: 22px clamp(18px, 3vw, 26px) 24px; margin-bottom: 34px;
}
.calls h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px;
}
.calls .hand { font-size: 19px; }
.calls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.call {
  background: var(--card); border-radius: 15px; padding: 15px 17px;
  display: flex; flex-direction: column; gap: 6px;
}
.call h4 { font-size: 14.5px; font-weight: 700; letter-spacing: -0.012em; line-height: 1.3; }
.call p { font-size: 13.5px; line-height: 1.48; color: var(--muted); flex: 1; }
.call .jump {
  font-size: 12px; font-weight: 600; color: var(--violet);
  text-decoration: none; margin-top: 2px;
}
.call .jump:hover { text-decoration: underline; }
button.call {
  border: 1px dashed color-mix(in srgb, var(--violet) 40%, transparent);
  background: none; cursor: pointer; font-family: inherit; text-align: left;
  justify-content: center; align-items: flex-start; color: var(--violet);
  transition: background .15s;
}
button.call:hover { background: color-mix(in srgb, var(--card) 60%, transparent); }
button.call b { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
button.call span { font-size: 12.5px; line-height: 1.35; font-weight: 600; }

/* ───────────────────────── ЦІЛІ ───────────────────────── */

.goal { margin-bottom: 34px; scroll-margin-top: 120px; }
.goal.hide { display: none; }
.goal-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.gemoji {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: var(--tint); border-radius: 50%;
}
.goal-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.015em; flex: 1; }
.gcount { font-size: 12px; font-weight: 700; color: var(--faint); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }

.card {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-card); padding: 17px 19px 15px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s, opacity .2s;
  scroll-margin-top: 130px;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card.pin { border-color: var(--yellow-2); }
.card.dim { display: none; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 40% { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
  100%    { border-color: var(--line-2); }
}

.card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.st {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.st i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.st-active i  { background: #E8A317; }
.st-soon i    { background: var(--blue); }
.st-done i    { background: var(--green); }
.st-paused i  { background: var(--faint); }
.tag {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.tag.new { background: var(--yellow); color: var(--ink); }
.tag.call-tag { background: var(--violet-soft); color: var(--violet); }

.card h4 { font-size: 17px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.24; }
.card .sum { margin-top: 5px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.toggle {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 11px; padding: 0;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  color: var(--faint); text-transform: uppercase;
  transition: color .15s;
}
.toggle:hover { color: var(--ink); }
.toggle svg { transition: transform .22s ease; }
.toggle .t-close { display: none; }
.toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.toggle[aria-expanded="true"] .t-open { display: none; }
.toggle[aria-expanded="true"] .t-close { display: inline; }

.detail { animation: open .22s ease; }
@keyframes open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.detail .why {
  margin-top: 11px; padding: 12px 14px;
  background: var(--card-2); border-radius: 12px;
  font-size: 14px; line-height: 1.55; color: var(--ink-soft);
}
.detail .cta {
  margin-top: 8px; padding: 12px 14px;
  background: var(--violet-soft); border-radius: 12px;
  font-size: 14px; line-height: 1.5; color: var(--ink);
}
.detail .cta b {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--violet); margin-bottom: 3px;
}
.detail .meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 10px; font-size: 12.5px; color: var(--faint);
}
.detail .meta b { color: var(--ink-soft); font-weight: 600; }
.detail .meta a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ───────────────────────── ХВІСТ ───────────────────────── */

.tail { margin-top: 30px; display: flex; flex-direction: column; gap: 10px; }
.internal {
  background: var(--card); border: 1px dashed var(--line);
  border-radius: 15px; padding: 14px 18px;
  font-size: 13.5px; line-height: 1.5; color: var(--muted);
}
.internal b { color: var(--ink); font-weight: 700; }
.frozen { font-size: 12.5px; color: var(--faint); padding-left: 4px; }
.empty { padding: 40px 0; text-align: center; color: var(--faint); font-size: 15px; }

.foot {
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-2);
  font-size: 13.5px; line-height: 1.6; color: var(--muted);
}
.foot b { color: var(--ink); font-weight: 700; }
.foot .links { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.foot .links a { color: var(--faint); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot .links a:hover { color: var(--ink); }

/* ───────────────────────── МОБІЛЬНЕ ───────────────────────── */

@media (max-width: 720px) {
  .scrubber { top: 62px; }
  .arrow { display: none; }
  .hero { padding: 26px 0 22px; }
  .cards { grid-template-columns: 1fr; }
  .live span { display: none; }
  .calls { border-radius: 20px; }
}

}
