/* PrintableCalendar.online — clean, trustworthy, teal-accent planner UI.
   Light theme, card-based, rounded, Inter. Classic calendar red for holidays. */

:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #f0fdfa;
  --primary-border: #99f6e4;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-light: #fffbeb;
  --holiday: #dc2626;
  --holiday-light: #fef2f2;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #5eead4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --nav-height: 62px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ---------- Layout ---------- */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
/* Vertical only — using the `padding` shorthand here would zero out the
   horizontal padding of a `.container` sharing the same element. */
.page-wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section   { padding-top: 3rem; padding-bottom: 3rem; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
/* Grid/flex items default to min-width:auto and refuse to shrink below their
   content's min size — which lets a wide table push the whole column past the
   viewport. min-width:0 lets the column shrink so inner scroll boxes work. */
.grid-2 > *, .grid-3 > *, .grid-4 > *,
.article-layout > *, .maker-layout > * { min-width: 0; }
.mt-2 { margin-top: .75rem; } .mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-xs { font-size: .75rem; } .text-sm { font-size: .85rem; }
.text-muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.25rem; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; cursor: pointer; font-family: var(--font);
  border: 2px solid transparent; transition: all .15s; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn svg { flex-shrink: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-body { padding: 1.5rem; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 1.75rem;
}
.feature-card-icon svg { width: 40px; height: 40px; color: var(--primary); }
.feature-card h3 { margin: .75rem 0 .5rem; }
.feature-card p { font-size: .9rem; }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: var(--nav-height); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; height: var(--nav-height); gap: 1rem; }
.nav-logo {
  font-size: 1.25rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px;
  display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; flex: 1; }
.nav-links a, .nav-dropdown-trigger {
  padding: .4rem .75rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  color: var(--text); display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
}
.nav-links a:hover, .nav-links a.active, .nav-dropdown-trigger:hover { background: var(--primary-light); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.nav-has-dropdown { position: relative; }
.nav-mega {
  position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.14); width: 560px; display: none; padding: 1rem; z-index: 200;
}
.nav-has-dropdown:hover .nav-mega, .nav-has-dropdown:focus-within .nav-mega { display: block; }
.nav-mega-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .25rem 1rem; }
.nav-mega a { display: block; padding: .35rem .6rem; font-size: .85rem; border-radius: var(--radius-sm); color: var(--text); }
.nav-mega a:hover { background: var(--primary-light); color: var(--primary); }
.nav-mega-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); padding: .5rem .6rem .2rem; grid-column: 1 / -1; }
.nav-mega-footer { border-top: 1px solid var(--border); margin-top: .75rem; padding-top: .75rem; text-align: center; }

.nav-hamburger { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: all .2s; }

.nav-mobile-panel {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: var(--surface); z-index: 99; overflow-y: auto; padding: 1rem 1.5rem 3rem;
}
.nav-mobile-panel.open { display: block; }
.nav-mobile-panel a { display: block; padding: .7rem .5rem; font-size: 1rem; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--border); }
.nav-mobile-heading { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); padding: 1.1rem .5rem .3rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 55%, #14b8a6 100%);
  color: #fff; padding: 3.5rem 0 2.75rem; text-align: center;
}
.hero h1 { color: #fff; font-size: 2.6rem; margin-bottom: .75rem; letter-spacing: -.5px; }
.hero p { color: rgba(255,255,255,.88); font-size: 1.1rem; margin: 0 auto 1.75rem; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-light); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }
.badge-holiday { background: var(--holiday-light); color: var(--holiday); }
.badge-muted { background: var(--surface-3); color: var(--text-muted); }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--surface); }
.data-table th {
  text-align: left; padding: .6rem .9rem; background: var(--surface-2);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }

/* ---------- Forms ---------- */
label { font-size: .85rem; font-weight: 600; color: var(--text); display: block; margin-bottom: .3rem; }
.form-control, select.form-control {
  width: 100%; padding: .55rem .75rem; font-size: .9rem; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.form-row { margin-bottom: 1.1rem; }
.radio-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: inline-block; padding: .4rem .9rem; border: 2px solid var(--border); border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.radio-pill input:checked + span { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: .75rem; }
.faq-item summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-q { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 1.25rem 1rem; color: var(--text-muted); font-size: .92rem; }

/* ---------- Web calendar grid ---------- */
.cal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem .9rem; }
.cal-title h2, .cal-title h1 { font-size: 1.5rem; }
.cal-title .cal-title-year { color: var(--text-muted); font-weight: 500; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th {
  background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; padding: .5rem 0; text-align: center;
}
.cal-grid td {
  border: 1px solid var(--border); vertical-align: top; height: 84px; padding: .3rem .4rem;
  font-size: .9rem; position: relative; background: var(--surface);
}
.cal-grid td.out { background: var(--surface-2); }
.cal-grid td.out .cal-day { color: var(--text-light); font-weight: 400; }
.cal-grid td.weekend { background: #fafcfb; }
.cal-day { font-weight: 700; font-size: .95rem; color: var(--text); }
td.today .cal-day {
  background: var(--primary); color: #fff; border-radius: 999px;
  display: inline-flex; width: 1.7em; height: 1.7em; align-items: center; justify-content: center;
}
.cal-holiday { display: block; margin-top: .15rem; font-size: .64rem; line-height: 1.25; font-weight: 600; color: var(--holiday); }
td.is-holiday .cal-day { color: var(--holiday); }
td.today.is-holiday .cal-day { color: #fff; }
.cal-moon { position: absolute; top: .3rem; right: .4rem; font-size: .7rem; opacity: .75; }
.cal-weeknum { width: 2.2rem; background: var(--surface-2) !important; text-align: center; font-size: .68rem; color: var(--text-light); vertical-align: middle !important; }

/* Mini month (year page) */
.mini-month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem 1rem; box-shadow: var(--shadow-sm); }
.mini-month h3 { font-size: .95rem; margin-bottom: .5rem; }
.mini-month h3 a { color: var(--primary); }
.mini-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mini-grid th { font-size: .6rem; color: var(--text-light); text-transform: uppercase; padding: .15rem 0; text-align: center; }
.mini-grid td { font-size: .74rem; text-align: center; padding: .18rem 0; color: var(--text); }
.mini-grid td.out { color: transparent; }
.mini-grid td.weekend { color: var(--text-muted); }
.mini-grid td.is-holiday { color: var(--holiday); font-weight: 700; }
.mini-grid td.today span { background: var(--primary); color: #fff; border-radius: 999px; display: inline-flex; width: 1.5em; height: 1.5em; align-items: center; justify-content: center; }

/* ---------- Download bar ---------- */
.dl-bar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding: 1rem 1.4rem; background: var(--surface-2); border-top: 1px solid var(--border);
}
.dl-bar .label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-right: .25rem; }

/* ---------- Template gallery ---------- */
.tpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
  display: block; color: inherit;
}
.tpl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-border); color: inherit; }
.tpl-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-3); overflow: hidden; }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-thumb .tpl-grid-overlay {
  position: absolute; inset: 12% 14%; background: rgba(255,255,255,.55); border-radius: 4px;
  backdrop-filter: blur(1px);
  background-image:
    linear-gradient(rgba(100,116,139,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,116,139,.35) 1px, transparent 1px);
  background-size: 14.28% 20%;
  border: 1px solid rgba(100,116,139,.4);
}
.tpl-card-body { padding: .9rem 1.1rem 1.1rem; }
.tpl-card-body h3 { font-size: 1rem; }
.tpl-card-body p { font-size: .82rem; margin-top: .25rem; }

/* Template detail preview: calendar over background */
.tpl-preview { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.tpl-preview .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-preview .fg { position: relative; margin: 2.2rem; background: rgba(255,255,255,.88); border-radius: 8px; padding: 1rem; }
.tpl-preview .fg .cal-grid td { background: transparent; height: 52px; }
.tpl-preview .fg .cal-grid td.out { background: rgba(241,245,249,.5); }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 3rem; padding: 3rem 0 0; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-brand { font-size: 1.15rem; font-weight: 800; color: #5eead4; margin-bottom: .5rem; }
.footer-desc { color: #94a3b8; font-size: .84rem; line-height: 1.6; }
.footer-heading { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #64748b; margin-bottom: .75rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a { color: #cbd5e1; font-size: .84rem; }
.footer-links a:hover { color: #5eead4; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  border-top: 1px solid #1e293b; padding: 1.25rem 0; color: #64748b; font-size: .8rem;
}

/* ---------- Article / prose ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.article-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.25rem; }
.article-body h2 { margin: 1.75rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 1.35rem; }
.article-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1rem; }
.article-body p { margin-bottom: .9rem; font-size: .97rem; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 1rem 1.4rem; color: var(--text-muted); }
.article-body li { margin-bottom: .4rem; font-size: .95rem; line-height: 1.7; }
.article-body table { margin: 1rem 0 1.25rem; }
.article-meta { display: flex; align-items: center; gap: .75rem; font-size: .8rem; color: var(--text-light); margin: .5rem 0 1.25rem; }
.sidebar-sticky { position: sticky; top: calc(var(--nav-height) + 1.25rem); display: grid; gap: 1.25rem; }
.related-list a { display: block; font-weight: 600; font-size: .86rem; }
.related-list .rel-item { padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px solid var(--border); }
.related-list .rel-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* ---------- Article extras: TL;DR, table of contents, read-next ---------- */
.tldr-box { margin-top: 0; }
.toc-box {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem;
}
.toc-box .toc-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-light); margin-bottom: .5rem;
}
.toc-box ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.toc-box li { color: var(--text-muted); font-size: .92rem; }
.toc-box a { color: var(--primary); font-weight: 500; }
.toc-box a:hover { color: var(--primary-dark); text-decoration: underline; }
/* Offset jump targets so a sticky nav doesn't hide the heading. */
.article-body h2[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }

.read-next { margin-top: 2rem; }
.read-next .rn-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-light); margin-bottom: .5rem;
}
.rn-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); color: inherit;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.rn-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.rn-card .rn-title { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.rn-card .rn-desc { display: block; font-size: .9rem; color: var(--text-muted); margin: .3rem 0 .5rem; line-height: 1.55; }
.rn-card .rn-go { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--primary); }
.related-list .rel-desc { font-size: .76rem; color: var(--text-muted); line-height: 1.5; margin-top: .2rem; }

/* ---------- Maker (customizer) ---------- */
.maker-layout { display: grid; grid-template-columns: minmax(380px, 1fr) 2fr; gap: 2rem; align-items: start; }
.bg-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.bg-choice { position: relative; }
.bg-choice input { position: absolute; opacity: 0; }
.bg-choice .bg-swatch {
  display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; transition: border-color .15s;
  background: var(--surface-3); font-size: .62rem; text-align: center; color: var(--text-muted);
}
.bg-choice .bg-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-choice input:checked + .bg-swatch { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15,118,110,.25); }
.color-row { display: flex; gap: .45rem; flex-wrap: wrap; }
.color-dot { position: relative; }
.color-dot input { position: absolute; opacity: 0; }
.color-dot span { display: block; width: 30px; height: 30px; border-radius: 999px; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.color-dot input:checked + span { border-color: var(--text); }

/* ---------- Content components (tips, key points, quick answer) ---------- */
.quick-answer {
  background: var(--primary-light); border: 1px solid var(--primary-border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem;
}
.quick-answer .qa-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--primary-dark); margin-bottom: .3rem;
}
.quick-answer p { color: var(--text); margin: 0; font-size: .95rem; }

.callout {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--accent-light); border: 1px solid #fde68a; border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin: 1.25rem 0; font-size: .92rem;
}
.callout .callout-ico { font-size: 1.1rem; line-height: 1.3; flex-shrink: 0; }
.callout p { margin: 0; color: var(--text); }
.callout strong { color: var(--accent-dark); }
.callout-info { background: var(--primary-light); border-color: var(--primary-border); border-left-color: var(--primary); }
.callout-info strong { color: var(--primary-dark); }

.key-points {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.1rem 1.4rem; margin: 1.25rem 0;
}
.key-points .kp-title { font-weight: 700; font-size: .95rem; margin-bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
.key-points ul { margin: 0 0 0 1.1rem; padding: 0; }
.key-points li { margin-bottom: .35rem; font-size: .92rem; color: var(--text-muted); }
.key-points li strong { color: var(--text); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin: 1.25rem 0; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; text-align: center; }
.stat-tile .stat-num { font-size: 1.7rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat-tile .stat-lbl { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

.article-body .callout, .article-body .key-points, .article-body .quick-answer { margin-left: 0; margin-right: 0; }
.prose-section { max-width: none; }
.prose-section h2 { font-size: 1.35rem; margin: 1.75rem 0 .6rem; }
.prose-section h3 { font-size: 1.05rem; margin: 1.25rem 0 .4rem; color: var(--text); }
.prose-section p { margin-bottom: .85rem; line-height: 1.75; }
.prose-section ul, .prose-section ol { margin: 0 0 1rem 1.35rem; color: var(--text-muted); }
.prose-section li { margin-bottom: .4rem; line-height: 1.65; }
.prose-section em { color: var(--text); }

/* ---------- Alerts ---------- */
.alert { padding: .8rem 1.1rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: var(--holiday-light); color: var(--holiday); border: 1px solid #fecaca; }

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; margin: 0; padding: 0; }
  .site-nav, .site-footer, .no-print { display: none !important; }
  .print-only { display: block; }
  body.print-page > * { visibility: hidden; }
  body.print-page #print-area, body.print-page #print-area * { visibility: visible; }
  body.print-page #print-area {
    position: absolute; top: 0; left: 0; width: 100%; margin: 0; padding: 0;
  }
  body.print-landscape { size: landscape; }
  @page { margin: 1cm; }
  .cal-card, .cal-grid td { box-shadow: none !important; }
  .cal-grid td { height: 90px; }
  .cal-grid th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dl-bar { display: none !important; }
  a { color: inherit; text-decoration: none; }
}
@media print { body.print-landscape { transform: none; } }
@page landscape-page { size: letter landscape; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .article-layout, .maker-layout { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
}

/* ---- Tablet / phone: collapse nav to hamburger ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  /* The accent CTA lives in the mobile menu — hiding it here frees the row so
     the logo + hamburger never overflow the viewport. */
  .nav-actions .btn-accent { display: none; }
  .nav-logo { font-size: 1.1rem; min-width: 0; }
  .hero { padding: 2.75rem 0 2.25rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cal-grid td { height: 62px; padding: .2rem .25rem; }
  .cal-holiday { display: none; }
  .cal-title { flex-direction: column; align-items: flex-start; gap: .25rem; }
  /* Wide data tables scroll inside their own box instead of the whole page. */
  .data-table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  /* 16px input text stops iOS from auto-zooming when a field gains focus. */
  .form-control, select.form-control { font-size: 16px; }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
  .container, .container-sm { padding: 0 1rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }   /* year page: 2 mini-months across */
  .bg-picker { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.65rem; }
  .cal-title h1, .cal-title h2 { font-size: 1.25rem; }
  .page-wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .section { padding-top: 2rem; padding-bottom: 2rem; }
  .article-body { padding: 1.25rem 1.1rem; }
  /* Bigger, thumb-friendly download buttons that share the row evenly. */
  .dl-bar { padding: .85rem 1rem; gap: .5rem; }
  .dl-bar .btn { flex: 1 1 40%; min-width: 0; min-height: 44px; }
  .dl-bar .label { flex-basis: 100%; margin: 0 0 .1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---- Small phone ---- */
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .nav-logo span span { display: none; }   /* drop the ".online" suffix on tiny screens */
  .cal-grid td { height: 54px; font-size: .82rem; }
  .cal-weeknum { width: 1.5rem; }
}

/* Comfortable tap targets on touch devices (buttons, nav, FAQ toggles). */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .nav-mobile-panel a { padding: .8rem .5rem; }
  .faq-item summary { padding: 1.05rem 1.15rem; }
}
