/* =====================================================================
   Nagpur Happenings — styles
   Mobile first. Desktop calendar grid from 720px.
   ===================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ----------
   Order matters: Devanagari, then Latin Extended, then Latin, so the
   rupee sign (₹) comes from the small Latin Extended file. */
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-devanagari-400-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-devanagari-400-italic.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Tiro Devanagari Marathi'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('assets/fonts/tiro-devanagari-marathi-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/mukta-devanagari-400-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/mukta-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('assets/fonts/mukta-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/mukta-devanagari-500-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/mukta-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('assets/fonts/mukta-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/mukta-devanagari-700-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/mukta-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Mukta'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('assets/fonts/mukta-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --paper: #FFF4E6;        /* peach-cream page */
  --paper-deep: #FCE6CC;   /* weekends, notices */
  --surface: #FFFAF3;      /* popups */
  --ink: #1E3B2F;          /* forest green: text, today, tiger stripes */
  --ink-hover: #2C5242;
  --moss: #4F6357;         /* secondary text */
  --line: #F0DCC2;         /* grid lines */
  --line-strong: #DDBF9B;  /* outlines */
  --orange: #F08A2E;       /* Nagpur orange: header, submit band, featured, Register */
  --orange-hover: #F59F50;
  --rind: #A4470B;         /* orange that is dark enough for text */

  --serif: 'Tiro Devanagari Marathi', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Mukta', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --radius-chip: 3px;
  --radius-btn: 6px;
  --radius-sheet: 10px;

  --cat: var(--moss);
}

/* Category colours: each passes 4.5:1 on the page colour */
.cat-books     { --cat: #A63A2A; }
.cat-games     { --cat: #2F5E8C; }
.cat-arts      { --cat: #76408F; }
.cat-music     { --cat: #8F6400; }
.cat-learning  { --cat: #1D7369; }
.cat-community { --cat: #B0386E; }
.cat-outdoors  { --cat: #3F7A2A; }
.cat-other     { --cat: #6B675A; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--rind); outline-offset: 2px; }

.wrap { width: min(100% - 2rem, 80rem); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper); border-radius: var(--radius-btn);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.15rem .5rem;
  border: 1px solid transparent; border-radius: var(--radius-btn);
  font: 500 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn--small {
  min-height: 2.5rem; padding: .4rem .9rem .35rem;
  border-color: var(--line-strong); background: transparent; color: var(--ink); font-size: .9375rem;
}
.btn--small:hover { background: var(--paper-deep); border-color: var(--moss); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.btn--ink { background: var(--ink); color: var(--paper); font-weight: 700; }
.btn--ink:hover { background: var(--ink-hover); }
.btn--line { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn--line:hover { border-color: var(--moss); background: var(--paper-deep); }
.btn--accent { background: var(--orange); color: var(--ink); font-weight: 700; }
.btn--accent:hover { background: var(--orange-hover); }
.btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--paper-deep); border-color: var(--moss); }

.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* ---------- Masthead ---------- */
.masthead { position: relative; overflow: hidden; background: var(--orange); color: var(--ink); }
/* Tiger coat on the right, fading into the orange */
.masthead::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 14vw;
  background: url('assets/tiger-coat.svg') repeat-x right center / auto 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 60%);
  mask-image: linear-gradient(to right, transparent, #000 60%);
  pointer-events: none;
}
.masthead__inner { position: relative; z-index: 1; }
.masthead :focus-visible { outline-color: var(--ink); }
.masthead__inner {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding-block: 1rem 1rem;
}
.masthead__brand { display: flex; align-items: center; gap: .75rem; }
.milestone { flex: none; width: 2.25rem; height: auto; overflow: visible; }
.milestone__body { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.milestone__cap { fill: var(--ink); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.milestone__zero { font-family: var(--serif); font-size: 21px; fill: var(--ink); }
.masthead__title {
  font-family: var(--serif); font-size: clamp(1.625rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.05; letter-spacing: -0.01em;
}
.masthead__tagline {
  margin-top: .3rem; font-family: var(--serif); font-style: italic;
  font-size: clamp(.96875rem, .9rem + .3vw, 1.1875rem); color: var(--ink);
}
.masthead__submit {
  display: none; flex: none; min-height: 2.5rem; padding: .4rem .9rem .35rem; font-size: .9375rem;
  background: var(--surface); font-weight: 700;
}

/* ---------- Calendar header ---------- */
.calendar-section { padding-top: 1.25rem; }
.calendar-section:focus { outline: none; }

.cal-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem;
  flex-wrap: wrap; margin-bottom: .9rem;
}
.cal-title { display: flex; align-items: baseline; gap: .55rem; font-family: var(--serif); }
.cal-title { flex-direction: column; align-items: flex-start; gap: .1rem; }
.cal-title__month { font-size: clamp(2rem, 1.2rem + 4.4vw, 4.75rem); line-height: .95; letter-spacing: -0.02em; }
.cal-title__year { font-size: clamp(1.125rem, 1rem + 1.1vw, 1.875rem); color: var(--moss); }
.cal-nav { display: flex; align-items: center; gap: .375rem; padding-bottom: .2rem; }
.cal-nav .icon-btn { width: 2.5rem; height: 2.5rem; }

/* ---------- Category filters ---------- */
.filters {
  display: flex; gap: .4rem; margin: 0 -1rem .9rem; padding: .1rem 1rem .3rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.5rem; padding: .3rem .85rem .25rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  font: 500 .9375rem/1.2 var(--sans); color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.filter:hover { border-color: var(--moss); background: var(--paper-deep); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--paper); }
.filter__full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dot {
  display: inline-block; flex: none; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--cat);
}
.dot--cancelled { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cat); }

/* ---------- Status messages ---------- */
.status {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin-bottom: .9rem; padding: .7rem 1rem .65rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--moss);
  border-radius: var(--radius-btn); font-size: .96875rem;
}
.status__text { flex: 1 1 18rem; }
.status--setup, .status--sample { border-left-color: var(--orange); }
.status--sample { background: var(--paper-deep); }
.status--error, .status--stale { border-left-color: var(--rind); }
.status--loading { background: transparent; border-color: transparent; padding-inline: 0; color: var(--moss); }

/* ---------- Calendar grid (mobile: compact) ---------- */
.cal {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(30, 59, 47, .04), 0 18px 40px -28px rgba(30, 59, 47, .35);
}
.cal__weekdays, .cal__grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.cal__weekdays { border-bottom: 1px solid var(--line-strong); }
.cal__weekdays li {
  padding: .45rem 0 .35rem; text-align: center;
  font: 500 .8125rem/1.2 var(--sans); color: var(--moss);
}
.cal__weekdays li.is-weekend { background: var(--paper-deep); }
.wd-full { display: none; }

.cal__grid { gap: 1px; background: var(--line); }

.day {
  position: relative; min-width: 0; min-height: 3.5rem;
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .3rem 0 .4rem; background: var(--paper);
}
.day--weekend { background: var(--paper-deep); }
.day--outside { background: var(--paper); }

.day__head { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.day__num {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding-top: .1rem;
  border-radius: 50%; font: 500 .9375rem/1 var(--sans); font-variant-numeric: tabular-nums;
}
.day--past .day__num { color: var(--moss); }
.day--has-events .day__num { font-weight: 700; color: var(--ink); }
.day--today .day__num { background: var(--ink); color: var(--paper); font-weight: 700; }
.day__label { display: none; }
.day--special .day__num { box-shadow: inset 0 -3px 0 var(--orange); border-radius: 50% 50% 4px 4px; }
.day--today.day--special .day__num { box-shadow: 0 0 0 2px var(--orange); border-radius: 50%; }

.day__events, .day__more { display: none; }
.day__dots { display: flex; justify-content: center; gap: 3px; min-height: .55rem; }
.day__dots .dot { width: .45rem; height: .45rem; }

.day__tap {
  position: absolute; inset: 0; width: 100%; padding: 0;
  border: 0; background: transparent; cursor: pointer;
}
.day__tap:focus-visible { outline-offset: -3px; }
.day--has-events:active { background: color-mix(in srgb, var(--orange) 22%, var(--paper)); }

.cal-note { margin-top: .9rem; color: var(--moss); }
.cal-note a { color: var(--rind); }

/* ---------- Month list (mobile only) ---------- */
.agenda { margin-top: 1.75rem; }
.agenda__title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; margin-bottom: .5rem; }
.agenda__days { margin: 0; padding: 0; list-style: none; }
.agenda__day { padding: .8rem 0 .2rem; border-top: 1px solid var(--line-strong); scroll-margin-top: 1rem; }
.agenda__date { display: flex; align-items: center; gap: .6rem; margin-bottom: .1rem; }
.agenda__num {
  display: inline-grid; place-items: center; min-width: 2.25rem; height: 2.25rem; padding-top: .15rem;
  font: 400 1.5rem/1 var(--serif);
}
.agenda__day--today .agenda__num { border-radius: 50%; background: var(--ink); color: var(--paper); }
.agenda__wd { font: 500 .9375rem/1.2 var(--sans); color: var(--moss); }
.agenda__special { font: 500 .875rem/1.2 var(--sans); color: var(--rind); }
.agenda__day--quiet { padding-bottom: .6rem; }
.agenda .event-row:first-child { border-top: 0; }

/* ---------- Event rows (lists) ---------- */
.event-list { margin: 0; padding: 0; list-style: none; }
.event-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem 1rem;
  padding: .85rem 0; border-top: 1px solid var(--line);
}
.event-row:has(.leaf) { grid-template-columns: 3.5rem minmax(0, 1fr); }
.event-row:has(.leaf) .event-row__tags { grid-column: 2; }

.event-row__title { font: 400 1.25rem/1.25 var(--serif); }
.event-list--compact .event-row__title { font-size: 1.125rem; }
.event-row__open {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.event-row__open::after { content: ''; position: absolute; inset: 0; }
.event-row__open:focus-visible { outline: none; }
.event-row__open:focus-visible::after { outline: 2px solid var(--rind); outline-offset: 2px; border-radius: 4px; }
.event-row:hover .event-row__open { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.event-row__meta {
  display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; margin-top: .3rem;
  font-size: .9375rem; line-height: 1.4; color: var(--moss);
}
.event-row__cat { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); font-weight: 500; }
.event-row__tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .35rem; }
.event-row__tags:empty { display: none; }

.event-row--cancelled .event-row__open { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--moss); }
.event-row--past .event-row__open,
.event-row--past .event-row__cat { color: var(--moss); }

.leaf {
  display: flex; flex-direction: column; align-items: center; padding: .15rem .25rem 0 0;
  border-right: 1px solid var(--line); line-height: 1; text-align: center;
}
.leaf__month { font: 500 .8125rem/1 var(--sans); color: var(--rind); }
.leaf__day { margin: .3rem 0 .2rem; font: 400 2rem/1 var(--serif); }
.leaf__weekday { font: 400 .8125rem/1 var(--sans); color: var(--moss); }
.leaf--today .leaf__weekday { color: var(--rind); font-weight: 500; }

.tag {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .32rem .55rem .26rem; border: 1px solid var(--line-strong); border-radius: 4px;
  background: var(--surface); color: var(--ink); font: 500 .8125rem/1 var(--sans);
}
.tag--free { background: #E8F0E6; border-color: #A9C0AE; }
.tag--audience { background: #EFE7F4; border-color: #C9B5D6; }
.tag--featured { background: var(--orange); border-color: var(--orange); }
.tag--cancelled { background: transparent; border-color: var(--rind); color: var(--rind); }
.tag--category { background: transparent; }

/* ---------- Coming up ---------- */
.upcoming { padding-block: 3rem 3rem; }
.section-title { font-family: var(--serif); font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); line-height: 1.1; margin-bottom: 1rem; }
.upcoming .event-list { border-bottom: 1px solid var(--line); }
.empty-note { margin-top: .75rem; color: var(--moss); }
.empty-note a { color: var(--rind); }

/* ---------- Submit band ---------- */
.submit { background: var(--orange); color: var(--ink); }
.submit :focus-visible { outline-color: var(--ink); }
.submit__inner { display: grid; gap: 1rem; padding-block: 2.5rem; }
.submit__title { font-family: var(--serif); font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.25rem); line-height: 1.15; }
.submit__body { display: grid; justify-items: start; gap: 1rem; }
.submit__lede { font-family: var(--serif); font-style: italic; font-size: 1.1875rem; line-height: 1.45; max-width: 34ch; }
.submit__note { font-size: .875rem; }
.submit__buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.submit .btn--outline { box-shadow: inset 0 0 0 1px var(--ink); }
.submit .btn.is-disabled { opacity: .7; }

/* "Show all" under long lists */
.list-more:empty { display: none; }
.list-more { padding-top: .75rem; }
.list-toggle {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .45rem 1rem .4rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 .9375rem/1.2 var(--sans); cursor: pointer;
}
.list-toggle:hover { border-color: var(--moss); background: var(--paper-deep); }
.list-toggle__chev {
  width: .5rem; height: .5rem; margin-top: -.2rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.list-toggle[aria-expanded="true"] .list-toggle__chev { margin-top: .25rem; transform: rotate(-135deg); }

/* "Follow @handle" line */
.follow-line { margin-top: 1rem; font-size: .9375rem; color: var(--moss); }
.follow-line a { color: var(--rind); font-weight: 500; }
.follow-line--section { margin-top: 1.25rem; }

/* "New home!" bar above the header */
.newhome {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .45rem 2.75rem .4rem; background: var(--ink); color: var(--paper); position: relative;
  font-size: .9375rem; line-height: 1.35; text-align: center;
}
.newhome[hidden] { display: none; }
.newhome__domain { color: #F5B97F; font-weight: 700; }
.newhome__close {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: transparent; color: var(--paper);
  font-size: 1.375rem; line-height: 1; cursor: pointer;
}
.newhome__close:hover { background: rgba(255, 244, 230, .12); }
.newhome__close:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
/* Faint tiger coat in the corner */
.footer::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 18rem; opacity: .16;
  background: url('assets/tiger-coat-orange.svg') repeat-x right center / auto 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 70%);
  mask-image: linear-gradient(to right, transparent, #000 70%);
  pointer-events: none;
}
.footer__inner { position: relative; display: grid; gap: 1.5rem; padding-block: 2.75rem 2rem; }
.footer__name { font-family: var(--serif); font-size: 1.625rem; line-height: 1.1; }
.footer__tagline { margin-top: .3rem; font-family: var(--serif); font-style: italic; color: #D9DDCF; }
.footer__place { margin-top: .6rem; font-size: .9375rem; color: #F5B97F; }
/* Visit counter: an odometer, one rolling wheel per digit */
.visits { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1rem; }
.visits[hidden] { display: none; }
.visits__label { font-size: .9375rem; color: #D9DDCF; }
.odo {
  --odo-h: 2.25rem;
  display: inline-flex; align-items: flex-end; gap: 3px;
  padding: 4px; border-radius: 7px; background: #142A21; box-shadow: inset 0 0 0 1px rgba(255, 244, 230, .14);
}
.odo__cell {
  position: relative; overflow: hidden; width: 1.55rem; height: var(--odo-h); border-radius: 4px;
  background: var(--paper); color: var(--ink);
  box-shadow: inset 0 -6px 8px -6px rgba(30, 59, 47, .35), inset 0 6px 8px -6px rgba(30, 59, 47, .35);
}
.odo__cell--last { background: var(--orange); }
.odo__cell--pad { color: rgba(30, 59, 47, .3); }
.odo__cell::after { /* the seam across the middle of a real meter wheel */
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(30, 59, 47, .12);
}
.odo__strip { display: block; transform: translateY(0); }
.odo__strip > span {
  display: block; height: var(--odo-h); line-height: var(--odo-h); text-align: center;
  font: 700 1.375rem/var(--odo-h) var(--sans); font-variant-numeric: tabular-nums;
}
.odo.is-rolled .odo__strip { transform: translateY(calc(var(--d) * var(--odo-h) * -1)); }
.odo__sep { align-self: flex-end; padding: 0 1px 2px; font: 700 1.125rem/1 var(--sans); color: var(--paper); }

.creator { display: flex; align-items: center; gap: .85rem; }
.creator__text { display: grid; gap: .1rem; }
.creator__by { font-family: var(--serif); font-size: 1.125rem; line-height: 1.2; }
.creator__links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.25rem; }
.creator__links a { color: var(--paper); }
.creator__site {
  justify-self: start; color: var(--paper); font: 400 1.375rem/1.2 var(--serif);
  text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.creator__site:hover { color: var(--orange); }
.creator__photo { flex: none; display: inline-block; border-radius: 50%; }
.creator__photo .avatar { width: 3.5rem; height: 3.5rem; transition: box-shadow .15s ease; }
.creator__photo:hover .avatar { box-shadow: 0 0 0 3px var(--orange); }
.footer :focus-visible { outline-color: var(--orange); }

.avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--orange); color: var(--ink); font: 700 1.125rem/1 var(--sans);
  box-shadow: 0 0 0 2px var(--orange);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--small { width: 2.25rem; height: 2.25rem; font-size: .9375rem; box-shadow: none; }
.footer__nav ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer__nav a, .footer__nav .link-btn { color: var(--paper); font-size: 1rem; }
/* "Also by Arinjay" */
.also { padding: 1.1rem 1.15rem 1.2rem; border: 1px solid rgba(255, 244, 230, .18); border-radius: 10px; background: rgba(255, 244, 230, .04); }
.also__title { font: 500 .8125rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #F5B97F; }
.also__list { display: grid; gap: 1rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.also__item--logo { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .9rem; align-items: start; }
.also__logo { display: block; width: 3.5rem; height: 3.5rem; border-radius: 6px; object-fit: cover; }
.also__logo--round { border-radius: 50%; }
.also__logo-link { display: block; border-radius: 50%; }
.also__name { display: inline-block; font: 400 1.1875rem/1.25 var(--serif); color: var(--paper); }
a.also__name { text-decoration-color: var(--orange); text-underline-offset: 4px; }
a.also__name:hover { color: var(--orange); }
.also__note { margin-top: .2rem; font-size: .9375rem; line-height: 1.45; color: #D9DDCF; }
.also__link { margin-top: .4rem; font-size: .9375rem; }
.also__link a { color: #F5B97F; font-weight: 500; text-underline-offset: 3px; }
.also__link a:hover { color: var(--orange); }

.footer__disclaimer {
  padding-top: 1.25rem; border-top: 1px solid rgba(250, 245, 232, .2);
  font-size: .875rem; line-height: 1.55; color: #C5CEC2; max-width: 75ch;
}

/* ---------- Popups ---------- */
.dialog {
  width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0;
  padding: 0; border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 14px 14px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -10px 40px -20px rgba(30, 59, 47, .45);
  overflow: hidden;
}
.dialog[open] { display: flex; flex-direction: column; }
.dialog::backdrop { background: rgba(30, 59, 47, .45); }
.dialog__content { overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1.25rem 1.75rem; }
.dialog__content > p { max-width: 62ch; margin-bottom: .8rem; }

.dialog__close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.dialog__close:hover { background: var(--paper-deep); }

.dialog__cover {
  display: block; width: calc(100% + 2.5rem); max-width: none; aspect-ratio: 16 / 9; object-fit: cover;
  margin: -1.5rem -1.25rem 1.25rem; background: var(--paper-deep);
}
.dialog__back {
  display: inline-flex; align-items: center; gap: .25rem; margin: 0 0 .9rem -.2rem; padding: .25rem 0;
  border: 0; background: none; color: var(--rind); font: 500 .9375rem/1.2 var(--sans); cursor: pointer;
}
.dialog__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.dialog__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; padding-right: 3rem; }
.dialog__title {
  margin: 0 2.75rem .9rem 0; font: 400 clamp(1.6rem, 1.3rem + 1.5vw, 2.125rem)/1.15 var(--serif);
}
.dialog__title:focus { outline: none; }
.dialog__title.is-cancelled { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--moss); }

.notice {
  margin-bottom: 1rem; padding: .55rem .8rem .5rem; border-radius: var(--radius-btn);
  background: var(--paper-deep); font-weight: 500;
}
.notice--cancelled { background: #F7E3D6; border: 1px solid #E7BFA4; color: #7A2F05; }

.facts { display: grid; gap: .7rem; margin: 0 0 1.25rem; }
.facts__row { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: .75rem; }
.facts dt { padding-top: .05rem; font-size: .9375rem; color: var(--moss); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts a { color: var(--rind); }
.facts__special, .dialog__special { color: var(--rind); font-weight: 500; }
.dialog__special { margin: -.5rem 0 1rem; }

.dialog__desc { padding-top: 1rem; border-top: 1px solid var(--line); }
.dialog__desc p { max-width: 62ch; margin-bottom: .8rem; white-space: pre-line; overflow-wrap: anywhere; }
.dialog__desc p:last-child { margin-bottom: 0; }

.dialog__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.dialog__hint { font-size: .875rem; color: var(--moss); }
.dialog__disclaimer { margin-top: 1rem; font-size: .8125rem; line-height: 1.45; color: var(--moss); max-width: 62ch; }
.dialog__actions .btn { min-height: 2.5rem; padding: .4rem .9rem .35rem; font-size: .9375rem; }
.maps-link { display: inline-block; margin-top: .15rem; font-size: .9375rem; color: var(--rind); }

.changed {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .85rem;
  margin-top: 1.25rem; padding: .8rem .9rem; border-radius: var(--radius-btn); background: var(--paper-deep);
}
.changed__text { flex: 1 1 12rem; font-size: .9375rem; line-height: 1.35; }
.changed__links { display: flex; gap: .5rem; flex-wrap: wrap; }
.changed__links .btn { min-height: 2.25rem; padding: .3rem .75rem .25rem; font-size: .875rem; }

.event-list--dialog .event-row:first-child { border-top: 0; }

.noscript { padding: 1rem; text-align: center; }

/* ---------- Motion (respects reduced-motion settings) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .dialog[open] { animation: sheet-in .22s ease-out; }
  .dialog[open]::backdrop { animation: fade-in .22s ease-out; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
  @keyframes fade-in { from { opacity: 0; } }
  .odo__strip { transition: transform 1.8s cubic-bezier(.16, .84, .3, 1); transition-delay: calc(var(--i, 0) * 120ms); }
}

/* =====================================================================
   Wider screens
   ===================================================================== */
@media (min-width: 560px) {
  .masthead__submit { display: inline-flex; }
  .masthead::after { width: min(36vw, 24rem); }
  .milestone { width: 2.5rem; }
  .cal-title { flex-direction: row; align-items: baseline; gap: .55rem; }
  .filters { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .filter__full { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .filter__short { display: none; }
}

@media (min-width: 720px) {
  .calendar-section { padding-top: 1.5rem; }
  .cal-nav { gap: .5rem; }
  .cal-nav .icon-btn { width: 2.75rem; height: 2.75rem; }
  .filter { gap: .4rem; padding-inline: .55rem .65rem; font-size: .8125rem; min-height: 2.375rem; }
  .filters { gap: .3rem; }
  .wd-full { display: inline; }
  .wd-short { display: none; }
  .cal__weekdays li { padding: .55rem .65rem .45rem; text-align: left; font-size: .875rem; }

  .day {
    min-height: clamp(6rem, 11.5vh, 8.25rem);
    align-items: stretch; gap: .3rem; padding: .4rem .45rem .5rem;
  }
  .day__head { justify-content: flex-start; }
  .day__num { width: 1.9rem; height: 1.9rem; margin: -.1rem 0 0 -.15rem; }
  .day--has-events .day__num { font-weight: 500; }
  .day--today .day__num { width: 2.2rem; height: 2.2rem; font-size: 1rem; font-weight: 700; }
  .day--today .day__head::after { content: 'Today'; flex: none; font-size: .8125rem; font-weight: 500; color: var(--rind); }
  .day__head { min-width: 0; gap: .4rem; }
  .day__label {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font: 500 .78125rem/1.2 var(--sans); color: var(--rind);
  }
  .day--special .day__num { box-shadow: none; border-radius: 50%; }
  .day--today.day--special .day__num { box-shadow: none; }

  .day__dots, .day__tap { display: none; }
  .day__events {
    display: flex; flex-direction: column; gap: .2rem; min-width: 0;
    margin: 0; padding: 0; list-style: none;
  }
  .day--past .chip { background: color-mix(in srgb, var(--cat) 6%, var(--paper)); color: var(--moss); }
  .day--has-events:active { background: inherit; }

  .chip {
    display: flex; align-items: baseline; gap: .3rem; width: 100%; min-width: 0;
    padding: .22rem .4rem .14rem .4rem; border: 0; border-left: 3px solid var(--cat); border-radius: var(--radius-chip);
    background: var(--paper-deep); background: color-mix(in srgb, var(--cat) 11%, var(--paper));
    color: var(--ink); font: 400 .8125rem/1.3 var(--sans); text-align: left; cursor: pointer;
  }
  .chip:hover { background: color-mix(in srgb, var(--cat) 17%, var(--paper)); }
  .chip:focus-visible { outline-offset: 1px; }
  .chip__time { flex: none; color: var(--moss); font-weight: 500; font-variant-numeric: tabular-nums; }
  .chip__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chip--featured { box-shadow: inset 0 0 0 1px var(--orange); }
  .chip--featured .chip__title { font-weight: 500; }
  .chip--cancelled { background: var(--paper-deep); color: var(--moss); }
  .chip--cancelled .chip__title { text-decoration: line-through; }

  .day__more {
    display: inline-block; align-self: flex-start; padding: .1rem .2rem; margin-left: .1rem;
    border: 0; background: none; color: var(--rind); cursor: pointer;
    font: 500 .8125rem/1.2 var(--sans); text-decoration: underline; text-underline-offset: 2px;
  }

  .agenda { display: none; }

  .event-row:has(.leaf) { grid-template-columns: 4.25rem minmax(0, 1fr) auto; padding-block: 1rem; }
  .event-row:has(.leaf) .event-row__tags { grid-column: auto; justify-content: flex-end; padding-top: .2rem; }
  .event-row:not(:has(.leaf)) { grid-template-columns: minmax(0, 1fr) auto; }
  .event-row__title { font-size: 1.375rem; }

  .dialog {
    width: min(100% - 2rem, 36rem); margin: auto; max-height: min(88vh, 50rem);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sheet);
    box-shadow: 0 30px 70px -30px rgba(30, 59, 47, .55);
  }
  .dialog__content { padding: 1.75rem 1.75rem 1.75rem; }
  .dialog__cover { width: calc(100% + 3.5rem); margin: -1.75rem -1.75rem 1.4rem; }
  .facts__row { grid-template-columns: 6.5rem minmax(0, 1fr); }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
  }
}

@media (min-width: 860px) {
  .submit__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2rem 4rem; padding-block: 3.25rem; }
  .footer__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .footer__disclaimer, .creator, .also { grid-column: 1 / -1; }
  .also__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

@media (min-width: 1024px) {
  .chip { font-size: .84375rem; }
}

@media print {
  .filters, .cal-nav, .submit, .footer__nav, .status, .list-more, .follow-line, .also, .newhome { display: none !important; }
  .cal { box-shadow: none; }
}
