/* ===========================================================================
   STRUCTURAL STYLES  (theme-agnostic — colors come from themes/<name>.css)
   =========================================================================== */

*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img,svg { max-width: 100%; }
p { margin: 0 0 1rem; }

/* -- Layout ---------------------------------------------------------------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.main { padding: 28px 0 56px; min-height: 60vh; }
.section { margin: 40px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.section-title { font-size: 1.35rem; margin: 0; }

/* -- Utilities ------------------------------------------------------------- */
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 70ch; }
.home-intro { margin: 2px 0 18px; }
.month-intro { margin: 0 0 20px; }
.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link {
  position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--brand); color:#fff; padding:10px 16px; border-radius:0 0 8px 0;
}
.skip-link:focus { left:0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* -- Buttons / badges / dots ---------------------------------------------- */
.btn {
  display:inline-flex; align-items:center; gap:.4em;
  padding:.6em 1.1em; border-radius: var(--radius-pill);
  background: var(--brand); color:#fff; font-weight:600; font-size:.95rem;
  border:1px solid transparent; cursor:pointer; transition:.18s;
  box-shadow: var(--shadow-sm); text-decoration:none;
}
.btn:hover { background: var(--brand-600); text-decoration:none; transform: translateY(-1px); }
.btn--ghost {
  background: var(--surface); color: var(--ink); border-color: var(--border-strong);
  box-shadow:none;
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--muted); }

.badge {
  display:inline-block; padding:.28em .7em; border-radius: var(--radius-pill);
  font-size:.78rem; font-weight:600; line-height:1.4;
  background: var(--surface-2); color: var(--ink-soft);
}
.badge.is-federal    { background: var(--federal-bg);    color: var(--federal); }
.badge.is-observance { background: var(--observance-bg); color: var(--observance); }
.badge.is-religious  { background: var(--religious-bg);  color: var(--religious); }
.badge.is-season     { background: var(--season-bg);     color: var(--season); }

.dot { display:inline-block; width:.6em; height:.6em; border-radius:50%; background:var(--muted); vertical-align:middle; margin-right:.45em; }
.dot.is-federal    { background: var(--federal); }
.dot.is-observance { background: var(--observance); }
.dot.is-religious  { background: var(--religious); }
.dot.is-season     { background: var(--season); }

/* ===========================================================================
   HEADER
   =========================================================================== */
.site-header {
  position: sticky; top:0; z-index: 40;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display:flex; align-items:center; gap:16px; height:64px; }
.brand { display:inline-flex; align-items:center; gap:10px; color:var(--brand); font-weight:800; font-size:1.15rem; letter-spacing:-.02em; }
.brand:hover { text-decoration:none; }
.brand__name { color: var(--ink); }
.primary-nav { margin-left:auto; display:flex; align-items:center; gap:4px; }
.primary-nav a {
  color: var(--ink-soft); font-weight:600; font-size:.95rem;
  padding:.5em .85em; border-radius: var(--radius-pill); transition:.16s;
}
.primary-nav a:hover { background: var(--brand-soft); color: var(--brand-700); text-decoration:none; }

.nav-toggle { display:none; margin-left:auto; background:none; border:0; padding:8px; cursor:pointer; }
.nav-toggle span { display:block; width:22px; height:2px; background:var(--ink); margin:4px 0; border-radius:2px; transition:.2s; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.site-footer { border-top:1px solid var(--border); background: var(--surface); margin-top: 48px; }
.site-footer__top {
  display:grid; grid-template-columns: 1fr 2.9fr; gap:32px 24px;
  padding:44px 20px 36px;
}
.site-footer__brand .brand { color: var(--brand); font-weight:800; font-size:1.12rem; }
.site-footer__brand .brand__name { color: var(--ink); }
.site-footer__brand p { margin:.6rem 0 0; max-width: 34ch; font-size:.92rem; }

.site-footer__cols { display:grid; grid-template-columns: repeat(4, 1fr); gap:24px; }
.footcol { display:flex; flex-direction:column; gap:9px; min-width:0; }
.footcol__title {
  font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em;
  color: var(--muted); margin:0 0 4px;
}
.footcol a {
  color: var(--ink-soft); font-size:.93rem; line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:color .14s;
}
.footcol a:hover { color: var(--brand); text-decoration:none; }

.site-footer__bar { border-top:1px solid var(--border); }
.site-footer__bar-inner {
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:16px 20px; font-size:.84rem;
}
@media (max-width: 760px) {
  .site-footer__top { grid-template-columns: 1fr; gap:28px; padding:32px 20px 28px; }
}
@media (max-width: 460px) {
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================================
   HERO + UPCOMING (home top)
   =========================================================================== */
.home-top { margin: 8px 0 8px; }
.home-top--split { display:grid; grid-template-columns: 1.5fr 1fr; gap:20px; align-items:stretch; }

.hero {
  position:relative; overflow:hidden; color:#fff;
  background: var(--brand-grad);
  border-radius: var(--radius); padding: 34px 32px;
  display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap;
  box-shadow: var(--shadow);
}
.hero::after {
  content:""; position:absolute; right:-60px; top:-60px; width:240px; height:240px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
  pointer-events:none;
}
.hero__eyebrow { text-transform:uppercase; letter-spacing:.14em; font-size:.72rem; font-weight:700; opacity:.85; margin:0 0 6px; }
.hero__weekday { font-size:1.25rem; font-weight:600; margin:0; opacity:.95; }
.hero__date { display:flex; align-items:baseline; gap:14px; margin:.1em 0 0; }
.hero__day { font-size:4.6rem; font-weight:800; line-height:.9; letter-spacing:-.04em; }
.hero__monthyear { font-size:1.4rem; font-weight:600; opacity:.95; }
.hero__events { list-style:none; padding:0; margin:18px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.hero__events .badge { background: rgba(255,255,255,.18); color:#fff; backdrop-filter: blur(4px); }
.hero__stats { display:flex; flex-direction:column; gap:10px; margin:0; min-width:150px; }
.hero__stat {
  background: rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm); padding:10px 14px;
  display:flex; justify-content:space-between; align-items:baseline; gap:12px;
}
.hero__stat dt { font-size:.78rem; opacity:.85; margin:0; }
.hero__stat dd { margin:0; font-size:.95rem; }
.hero__stat dd strong { font-size:1.25rem; }

/* Upcoming */
.upcoming { display:flex; flex-direction:column; }
.upcoming__list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.upcoming__item + .upcoming__item { border-top:1px solid var(--border); }
.upcoming__link { display:flex; align-items:center; gap:14px; padding:11px 6px; border-radius:10px; color:inherit; transition:.14s; }
.upcoming__link:hover { background: var(--surface-2); text-decoration:none; }
.upcoming__date {
  flex:0 0 auto; width:48px; text-align:center; border-radius:12px; padding:6px 0;
  background: var(--surface-2); line-height:1;
}
.upcoming__date.is-federal    { background: var(--federal-bg); }
.upcoming__date.is-observance { background: var(--observance-bg); }
.upcoming__date.is-religious  { background: var(--religious-bg); }
.upcoming__d { display:block; font-size:1.3rem; font-weight:800; color: var(--ink); }
.upcoming__mo { display:block; font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-soft); }
.upcoming__body { flex:1 1 auto; min-width:0; }
.upcoming__name { display:block; font-weight:600; }
.upcoming__meta { display:flex; justify-content:space-between; gap:8px; font-size:.82rem; color: var(--muted); }
.upcoming__count.is-now { color: var(--brand); font-weight:700; }

/* ===========================================================================
   CARDS
   =========================================================================== */
.card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding:20px; box-shadow: var(--shadow-sm);
}
.card .section-title { font-size:1.05rem; margin-bottom:10px; }

/* ===========================================================================
   CALENDAR TOOLBAR
   =========================================================================== */
.cal-toolbar {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap; margin: 4px 0 18px;
}
.cal-toolbar__legend { display:flex; gap:16px; flex-wrap:wrap; font-size:.85rem; color: var(--ink-soft); }
.legend { display:inline-flex; align-items:center; }
.cal-toolbar__actions { display:flex; align-items:center; gap:10px; }
.segmented {
  display:inline-flex; background: var(--surface-2); border:1px solid var(--border);
  border-radius: var(--radius-pill); padding:3px;
}
.segmented button {
  border:0; background:none; cursor:pointer; font:inherit; font-size:.85rem; font-weight:600;
  color: var(--ink-soft); padding:.42em .9em; border-radius: var(--radius-pill); transition:.14s;
}
.segmented button.is-active { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-sm); }

/* ===========================================================================
   CALENDAR TABLES
   =========================================================================== */
.cal { border-collapse: collapse; width:100%; table-layout: fixed; }
.cal__caption { padding: 0 0 10px; }
.cal__title { font-weight:700; }
.cal__dow {
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color: var(--muted); padding:6px 0; text-align:center;
}
.cal__dow abbr { text-decoration:none; border:0; cursor:help; }
.cal__dow.is-weekend { color: var(--weekend); }
.cal__cell { text-align:center; vertical-align:top; }
.cal__num { display:inline-block; font-variant-numeric: tabular-nums; }
.cal__wk, .cal__wk-head { color: var(--muted); font-weight:600; font-size:.7rem; }

/* --- Year grid (mini months) --- */
.year-grid {
  display:grid; grid-template-columns: repeat(4, 1fr); gap:16px;
}
.year-grid__item {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding:14px 14px 8px; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.year-grid__item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cal--mini .cal__caption { text-align:center; }
.cal--mini .cal__title--link { color: var(--brand-700); font-size:1.02rem; }
.cal--mini .cal__title--link:hover { text-decoration:none; color: var(--brand); }
.cal--mini .cal__dow { padding:4px 0; font-size:.62rem; }
.cal--mini .cal__cell { padding:0; position:relative; }
.cal--mini .cal__num {
  width:30px; height:30px; line-height:30px; border-radius:9px; font-size:.85rem;
  transition: background .14s, color .14s;
}
.cal--mini .cal__cell.is-weekend .cal__num { color: var(--weekend); }
.cal--mini .cal__cell:hover .cal__num { background: var(--surface-2); }
.cal--mini .cal__dot {
  position:absolute; bottom:3px; left:50%; transform:translateX(-50%);
  width:5px; height:5px; border-radius:50%; background: var(--muted);
}

/* --- Full month --- */
.cal--full { background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow:hidden; }
.cal--full .cal__caption { padding:0; }
.cal--full .cal__caption-inner {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:18px 20px; background: var(--brand-grad); color:#fff;
}
.cal--full .cal__title { font-size:1.5rem; }
.cal__nav {
  width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center;
  border-radius: var(--radius-pill); background: rgba(255,255,255,.18); color:#fff;
  font-size:1.4rem; line-height:1; transition:.16s;
}
.cal__nav:hover { background: rgba(255,255,255,.32); text-decoration:none; }
.cal__nav.is-disabled { visibility:hidden; }
.cal--full thead { background: var(--surface-2); }
.cal--full .cal__dow { padding:12px 0; border-bottom:1px solid var(--border); }
.cal--full .cal__cell {
  height: 92px; padding:8px 6px; border:1px solid var(--border); text-align:left;
  position:relative; transition: background .12s;
}
.cal--full .cal__cell.is-empty { background: var(--surface-2); }
.cal--full .cal__num {
  width:32px; height:32px; line-height:32px; text-align:center; font-weight:600; border-radius:9px;
}
.cal--full .cal__cell.is-weekend { background: #fcfcfd; }
.cal--full .cal__cell.is-weekend .cal__num { color: var(--weekend); }
.cal--full .cal__events { display:flex; flex-direction:column; gap:3px; margin-top:5px; }
.cal--full .cal__event {
  font-size:.7rem; font-weight:600; line-height:1.25; padding:2px 6px; border-radius:6px;
  background: var(--surface-2); color: var(--ink-soft);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cal--full .cal__event.is-federal    { background: var(--federal-bg);    color: var(--federal); }
.cal--full .cal__event.is-observance { background: var(--observance-bg); color: var(--observance); }
.cal--full .cal__event.is-religious  { background: var(--religious-bg);  color: var(--religious); }
.cal--full .cal__event.is-season     { background: var(--season-bg);     color: var(--season); }
.cal__wk { background: var(--surface-2); text-align:center; width:34px; }

/* --- Holiday highlight (cell color) — toggled by JS via body[data-hl] --- */
.cal__cell.is-holiday .cal__num { font-weight:800; }
.cal--mini .cal__cell.is-federal    .cal__num { background: var(--federal-bg);    color: var(--federal); }
.cal--mini .cal__cell.is-observance .cal__num { background: var(--observance-bg); color: var(--observance); }
.cal--mini .cal__cell.is-religious  .cal__num { background: var(--religious-bg);  color: var(--religious); }
.cal--mini .cal__cell.is-season     .cal__num { background: var(--season-bg);     color: var(--season); }
.cal--mini .cal__cell.is-federal .cal__dot,
.cal--full .cal__cell.is-federal::before { background: var(--federal); }

/* Today marker */
.cal__cell.is-today .cal__num { background: var(--today) !important; color:#fff !important; box-shadow: 0 2px 8px -2px var(--brand); }

/* Highlight filter states (body[data-hl=none|federal|all]) */
body[data-hl="none"] .cal__cell:not(.is-today) .cal__num { background: transparent !important; color: inherit !important; }
body[data-hl="none"] .cal--full .cal__event { display:none; }
body[data-hl="none"] .cal__dot { display:none; }
body[data-hl="federal"] .cal__cell.is-observance:not(.is-federal) .cal__num,
body[data-hl="federal"] .cal__cell.is-religious:not(.is-federal) .cal__num,
body[data-hl="federal"] .cal__cell.is-season:not(.is-federal) .cal__num { background:transparent !important; color:inherit !important; }
body[data-hl="federal"] .cal--full .cal__event:not(.is-federal) { display:none; }

/* ===========================================================================
   YEAR SWITCH
   =========================================================================== */
.year-switch { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.year-switch__years { display:inline-flex; gap:2px; background: var(--surface-2); border:1px solid var(--border); border-radius: var(--radius-pill); padding:3px; }
.year-switch__y { padding:.4em .8em; border-radius: var(--radius-pill); color: var(--ink-soft); font-weight:600; font-size:.9rem; }
.year-switch__y:hover { background: var(--surface); text-decoration:none; }
.year-switch__y.is-active { background: var(--brand); color:#fff; }
.year-switch__arrow {
  width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; background: var(--surface); border:1px solid var(--border); color: var(--ink); font-size:1.1rem;
}
.year-switch__arrow:hover { background: var(--surface-2); text-decoration:none; }
.year-switch__jump { display:inline-flex; gap:4px; margin-left:auto; }
.year-switch__jump input {
  width:88px; padding:.4em .6em; border:1px solid var(--border-strong); border-radius:8px; font:inherit;
}
.year-switch__jump button {
  border:0; background: var(--surface-2); border:1px solid var(--border-strong);
  border-radius:8px; padding:.4em .8em; cursor:pointer; font:inherit; font-weight:600;
}
.year-switch__jump button:hover { background: var(--brand-soft); }

/* ===========================================================================
   HOLIDAYS TABLE
   =========================================================================== */
.table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.holidays-table { border-collapse: collapse; width:100%; min-width:520px; }
.holidays-table caption { text-align:left; padding:14px 18px 0; font-weight:700; }
.holidays-table th { text-align:left; font-size:.74rem; text-transform:uppercase; letter-spacing:.05em; color: var(--muted); padding:14px 18px; border-bottom:1px solid var(--border); }
.holidays-table td { padding:14px 18px; border-bottom:1px solid var(--border); vertical-align:top; }
.holidays-table tr:last-child td { border-bottom:0; }
.holidays-table tbody tr:hover { background: var(--surface-2); }
.ht-date a { font-weight:700; color: var(--ink); white-space:nowrap; }
.ht-date a:hover { color: var(--brand); }
.ht-wd { color: var(--ink-soft); white-space:nowrap; }
.ht-name { font-weight:600; }
.ht-link { color: var(--ink); }
.ht-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.ht-desc { display:block; font-weight:400; font-size:.85rem; margin-top:2px; }
.holidays-table tr.is-past td { opacity:.6; }
.holidays-table tr.is-today-row { background: var(--today-bg); }
.holidays-table tr.is-today-row:hover { background: var(--today-bg); }

/* ===========================================================================
   PAGES
   =========================================================================== */
.page-head { margin: 8px 0 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.page-title { font-size:2rem; margin:0; }
.breadcrumb { font-size:.85rem; color: var(--muted); margin:4px 0 14px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.breadcrumb a { color: var(--ink-soft); }

.month-layout { display:grid; grid-template-columns: 1fr 320px; gap:24px; align-items:start; }
.month-nav { display:flex; gap:10px; justify-content:space-between; margin-top:16px; }

.prose { max-width: 760px; }
.prose h2 { font-size:1.25rem; margin-top:1.6em; }
.prose p { color: var(--ink-soft); }

.contact-form { max-width:480px; margin-top:18px; }
.field { margin-bottom:14px; display:flex; flex-direction:column; gap:6px; }
.field label { font-weight:600; font-size:.9rem; }
.field input, .field textarea {
  font:inherit; padding:.6em .8em; border:1px solid var(--border-strong); border-radius:10px; background: var(--surface);
}
.field input:focus, .field textarea:focus { outline:none; box-shadow: var(--ring); border-color: var(--brand); }
/* Honeypot: kept in the DOM for bots, off-screen for humans & screen readers. */
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.contact-email { margin-top:16px; color: var(--muted); font-size:.95rem; }
.form-note { max-width:480px; margin:16px 0; padding:.8em 1em; border-radius:10px; font-size:.95rem; border:1px solid; }
.form-note--ok  { background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.form-note--err { background:#fef2f2; border-color:#fecaca; color:#991b1b; }

/* Holiday detail */
.holiday-detail .page-head .badge { margin-bottom:8px; }
.hd-countdown {
  display:flex; align-items:center; gap:22px; margin:8px 0 8px;
  background: var(--brand-grad); color:#fff; border-radius: var(--radius);
  padding:26px 30px; box-shadow: var(--shadow);
}
.hd-countdown__num { font-size:3.6rem; font-weight:800; line-height:1; letter-spacing:-.03em; }
.hd-countdown__lead { margin:0 0 4px; font-size:1.15rem; font-weight:600; }
.hd-countdown__date { margin:0; opacity:.95; }
.hd-countdown__date a { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.hd-countdown__date a:hover { opacity:.85; }

/* Holiday rich content */
.prose p { color: var(--ink-soft); }
.callout {
  display:flex; gap:14px; align-items:flex-start;
  background: var(--brand-soft); border:1px solid var(--border);
  border-left:4px solid var(--brand); border-radius: var(--radius-sm);
  padding:16px 18px; margin: 8px 0 24px;
}
.callout__icon {
  flex:0 0 auto; width:24px; height:24px; border-radius:50%;
  background: var(--brand); color:#fff; font-weight:800; font-style:italic;
  display:flex; align-items:center; justify-content:center; font-size:.9rem;
}
.callout__title { display:block; margin-bottom:2px; color: var(--brand-700); }
.callout__text { margin:0; color: var(--ink); }
.fact-list { margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.fact-list li {
  position:relative; padding:12px 16px 12px 44px; background: var(--surface);
  border:1px solid var(--border); border-radius: var(--radius-sm); color: var(--ink-soft);
}
.fact-list li::before {
  content:"\2713"; position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:20px; height:20px; line-height:20px; text-align:center; border-radius:50%;
  background: var(--brand-soft); color: var(--brand-700); font-size:.72rem; font-weight:800;
}
.faq { display:grid; gap:10px; }
.faq__item {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-sm);
  padding:0 18px; transition: box-shadow .15s;
}
.faq__item[open] { box-shadow: var(--shadow-sm); }
.faq__q {
  cursor:pointer; font-weight:600; padding:15px 0; list-style:none;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.faq__q::-webkit-details-marker { display:none; }
.faq__q::after { content:"+"; font-size:1.3rem; color: var(--muted); line-height:1; }
.faq__item[open] .faq__q::after { content:"\2212"; color: var(--brand); }
.faq__a { padding:0 0 16px; }
.faq__a p { margin:0 0 .6rem; color: var(--ink-soft); }
.faq__a p:last-child { margin-bottom:0; }

/* ===========================================================================
   PRINTABLES — hub, blank calendar, monthly planner, weekly planner
   =========================================================================== */
/* Hub card grid */
.hub-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:18px; margin-top:8px; }
.hub-card {
  display:flex; flex-direction:column; gap:8px;
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:22px; box-shadow: var(--shadow-sm); color:inherit; transition:.18s;
}
.hub-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration:none; border-color: var(--brand); }
.hub-card__title { font-weight:700; font-size:1.12rem; color: var(--ink); }
.hub-card__desc { font-size:.9rem; color: var(--ink-soft); flex:1; }
.hub-card__cta { font-weight:600; color: var(--brand-700); font-size:.92rem; }

/* Blank calendar: taller empty cells for writing */
.cal--blank .cal__cell { height: 104px; }
.cal--blank .cal__cell .cal__num { font-weight:600; }

/* Editable, ruled writing surface */
.write {
  outline:none; white-space:pre-wrap; word-break:break-word;
  min-height:120px; line-height:30px; font-size:.95rem; color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, var(--border) 29px, var(--border) 30px);
}
.write:focus { background-color: var(--brand-soft); border-radius:6px; }

/* Editable area inside blank-calendar day cells */
.cal--blank .cal__write {
  outline:none; white-space:pre-wrap; word-break:break-word; margin-top:4px;
  min-height:54px; font-size:.72rem; line-height:1.3; color: var(--ink-soft);
}
.cal--blank .cal__write:focus { background: var(--brand-soft); border-radius:4px; }

.page-head__actions { display:flex; gap:8px; }
.edit-hint { font-size:.85rem; color: var(--muted); margin:-6px 0 18px; }

/* Monthly planner: calendar + side panels */
.planner { display:grid; grid-template-columns: 1fr 300px; gap:24px; align-items:start; }
.planner__box {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:14px 16px 18px; margin-bottom:16px; box-shadow: var(--shadow-sm);
}
.planner__title { font-size:.95rem; margin:0 0 10px; }

/* Weekly planner: day blocks */
.weekly { display:grid; grid-template-columns: repeat(2, 1fr); gap:16px; }
.weekly__day {
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding:14px 16px 18px; box-shadow: var(--shadow-sm);
}
.weekly__name { font-size:1rem; margin:0 0 10px; }
.weekly__name.is-weekend { color: var(--weekend); }
.weekly__notes { grid-column: 1 / -1; background: var(--surface-2); }

@media (max-width: 900px) { .planner { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .weekly { grid-template-columns: 1fr; } }

.ics-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:-4px 0 24px; }
.ics-hint { font-size:.88rem; }

.error-page { text-align:center; padding:60px 0; }
.error-code { font-size:6rem; font-weight:800; color: var(--brand); margin:0; letter-spacing:-.04em; line-height:1; }

/* ===========================================================================
   COOKIE CONSENT BANNER
   =========================================================================== */
.cookie-banner {
  position: fixed; left:16px; right:16px; bottom:16px; z-index:80;
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  max-width: 940px; margin:0 auto;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding:18px 22px;
}
.cookie-banner[hidden] { display:none; }   /* override .cookie-banner display:flex */
.cookie-banner__text { flex:1 1 300px; }
.cookie-banner__text strong { display:block; margin-bottom:2px; }
.cookie-banner__text p { margin:0; font-size:.9rem; color: var(--ink-soft); }
.cookie-banner__actions { display:flex; gap:10px; flex-shrink:0; }
@media (max-width:560px) {
  .cookie-banner { left:8px; right:8px; bottom:8px; padding:16px; }
  .cookie-banner__actions { width:100%; }
  .cookie-banner__actions .btn { flex:1; justify-content:center; }
}

/* ===========================================================================
   TOOLTIP (mini calendar)
   =========================================================================== */
.cal-tip {
  position:absolute; z-index:60; display:none; max-width:220px;
  background: #11151f; color:#fff; font-size:.78rem; font-weight:500; line-height:1.35;
  padding:7px 10px; border-radius:8px; box-shadow: var(--shadow-lg);
  pointer-events:none; opacity:0; transform: translateY(3px); transition: opacity .12s, transform .12s;
}
.cal-tip.is-visible { opacity:1; transform: translateY(0); }
.cal-tip::after {
  content:""; position:absolute; bottom:-5px; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-top-color:#11151f; border-bottom:0;
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 900px) {
  .home-top--split { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: repeat(3, 1fr); }
  .month-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display:block; }
  .primary-nav {
    position:absolute; top:64px; left:0; right:0; margin:0; flex-direction:column; align-items:stretch;
    background: var(--surface); border-bottom:1px solid var(--border); padding:10px; gap:2px;
    box-shadow: var(--shadow); display:none;
  }
  .primary-nav.is-open { display:flex; }
  .primary-nav a { padding:.8em 1em; border-radius:10px; }
  .year-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding:26px 22px; }
  .hero__day { font-size:3.6rem; }
  .hero__stats { flex-direction:row; flex-wrap:wrap; width:100%; }
  .hero__stat { flex:1 1 30%; flex-direction:column; align-items:flex-start; gap:2px; }
  .page-title { font-size:1.6rem; }
  .cal--full .cal__cell { height:auto; min-height:62px; }
  /* Inline event labels are illegible at phone width; the holiday list below
     the calendar shows the names instead. Day colors still mark holidays. */
  .cal--full .cal__event { display:none; }
}
@media (max-width: 420px) {
  .year-grid { grid-template-columns: 1fr; }
  .year-switch__jump { display:none; }
}
