/* theme.css — loaded last on every page. One place for the shared design-system fixes
   (contrast, minimum text size, touch targets). See DESIGN.md. */
:root{--accent-fill:#a83c1b;--accent-fill-hover:#8b3116;--text-min:.78rem;--tap:44px}
body{font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif}
h1,h2,h3{font-family:'Playfair Display',Georgia,'Times New Roman',serif}

/* Filled accent controls: white on #a83c1b is 6.3:1 (was 3.8:1 on #d85c32) */
.button-primary,a.button-primary,.page-main a.button-primary,.action-row a.button-primary{background:var(--accent-fill);color:#fff}
.button-primary:hover,a.button-primary:hover{background:var(--accent-fill-hover);color:#fff}
.year-toggle button[aria-pressed="true"],.state-buttons button[aria-pressed="true"],.state-buttons button.active{background:var(--accent-fill);border-color:var(--accent-fill);color:#fff}

/* Quiet text that still passes AA */
.hero-note,.site-footer>small,.site-footer small{color:var(--muted)}
.world-share.wa{color:#0b6b38}.world-share.fb{color:#1259c3}

/* Minimum readable text size */
.topline,.eyebrow,.category-pill,.save-celebration,.guide-tag,.card-actions a,.map-credit,.explore-kicker,.site-footer small,.action-row .button,.world-share,.home-page .topline,.world-explore .explore-kicker,.card-actions a,.action-row .button:not(.button-primary){font-size:max(var(--text-min),12.5px)}

/* Touch targets: nav, footer, breadcrumbs, quick links */
nav a,.footer-links a,.home-quick-links a{display:inline-flex;align-items:center;min-height:var(--tap)}
.crumbs a{display:inline-block;padding:6px 0}
.card-actions a{min-height:36px;display:inline-flex;align-items:center}
.footer-links{flex-wrap:wrap;gap:4px 22px;margin:10px 0}
@media(max-width:700px){
 .site-header nav{flex-wrap:nowrap;overflow-x:auto;gap:0 18px;max-width:100%;justify-content:flex-start;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:0 4px}
 .site-header nav::-webkit-scrollbar{display:none}
 .site-header nav a{white-space:nowrap;flex:0 0 auto}
}

/* Homepage: answer first. Quick links become one row of chips under the "Next up" bar. */
.home-quick-links{margin:4px 0 18px}
@media(max-width:700px){
 .home-page .topline{display:none}
 .home-quick-links{flex-wrap:nowrap;overflow-x:auto;gap:8px;scrollbar-width:none;margin:0 -18px 14px;padding:2px 18px}
 .home-quick-links::-webkit-scrollbar{display:none}
 .home-quick-links a{flex:0 0 auto;white-space:nowrap;text-decoration:none;border:1px solid var(--line);background:#fff;border-radius:30px;padding:0 14px;font-size:.85rem}
 .section-heading p{margin-bottom:6px}
}

/* Regional map: keep it a compact illustration on phones */
@media(max-width:700px){.map-wrap svg{display:block;max-height:340px;width:100%;margin:auto}}
.map-credit a{color:var(--orange-dark)}

/* Monthly calendar on phones: a real month grid (no sideways scroll); tap a day for details */
@media(max-width:750px){
 .panchang-month-grid{grid-template-columns:repeat(7,minmax(0,1fr));overflow:visible;gap:3px;padding:3px}
 .panchang-weekday{padding:8px 0;font-size:.75rem}
 .panchang-day{min-height:54px;padding:6px 2px;align-items:center;justify-content:flex-start;text-align:center;gap:2px;position:relative}
 .panchang-day-date{font-size:1.15rem;line-height:1.1}
 .panchang-day-tithi,.panchang-day-sun,.panchang-day-nak,.panchang-day-rashi{display:none}
 .panchang-day .panchang-event{font-size:0;line-height:0}
 .panchang-day.has-event::after{content:"";width:8px;height:8px;border-radius:50%;background:#7a2412;margin-top:2px}
 .panchang-day .panchang-event:not(:first-of-type){display:none}
}

/* One header everywhere: logo left, one nav row; current section marked.
   :root + doubled class out-ranks the older per-template rules in styles-extra.css and home.css. */
:root .site-header.site-header{flex-direction:row;justify-content:space-between;align-items:center;gap:24px;max-width:none;margin:0;padding:12px max(20px,calc((100vw - 1240px)/2 + 24px));background:#fffaf5;border-bottom:1px solid #efe2d6}
:root .site-header.site-header .brand img{width:200px;height:auto}
:root .site-header.site-header nav{flex-wrap:nowrap;justify-content:flex-end;gap:4px 22px;font-size:inherit}
:root .site-header.site-header nav a[href]{display:inline-flex;font-size:.92rem;padding:0;color:var(--muted)}
:root .site-header.site-header nav a:hover,:root .site-header.site-header nav a[aria-current="page"]{color:var(--orange-dark)}
:root .site-header.site-header nav a[aria-current="page"]{font-weight:700}
@media(max-width:700px){
 .topline{display:none}
 :root .site-header.site-header{flex-direction:column;align-items:stretch;gap:0;padding:10px 16px 0}
 :root .site-header.site-header .brand{align-self:flex-start}
 :root .site-header.site-header .brand img{width:150px}
 :root .site-header.site-header nav{justify-content:flex-start;overflow-x:auto;margin:0 -16px;padding:0 16px;gap:0 20px;scrollbar-width:none}
 :root .site-header.site-header nav a[href]{font-size:.9rem;white-space:nowrap;flex:0 0 auto}
}
:root .flag-stripe.flag-stripe{height:4px}
.site-footer>small{display:block;line-height:1.55;max-width:62ch;margin:6px auto 0}

/* Festival guide articles */
.ifd-byline{font-size:.85rem;color:var(--muted);margin:0 0 10px}
.ifd-editorial ol,.ifd-editorial ul{padding-left:1.3em;margin:0 0 1em}
.ifd-editorial li{margin:.3em 0}
.calendar-explainer{max-width:72ch;margin:40px auto}.calendar-explainer h3{margin-top:1.6em}

/* Homepage cards on phones: date, summary and one calendar action. Sources and .ics stay on each festival page. */
@media(max-width:700px){
 .festival-card{padding:18px;min-height:0}
 .festival-card .festival-meta:has(em){display:none}
 .festival-card .card-actions a[download]{display:none}
 .festival-card h3{margin:12px 0 6px}
}
@media(max-width:700px){#countryBox .country-date-cards{display:none}}
.planner-kicker{font-size:.78rem}
.select-wrap select{min-height:44px}
:not(.ifd-cal-icon)>small{font-size:max(.78rem,12.5px)}

/* Homepage on phones: drop decorative extras so the useful sections come sooner */
@media(max-width:700px){
 .festival-pdf-download .pdf-download-art,.world-explore,.home-page .quick-facts{display:none}
}
.table-wrap{overflow-x:auto;margin:1em 0}
.calendar-explainer table{border-collapse:collapse;width:100%;font-size:.95rem;background:#fff}
.calendar-explainer th,.calendar-explainer td{border:1px solid var(--line);padding:8px 10px;text-align:left}
.calendar-explainer th{background:var(--peach);color:var(--ink)}
