/* The Anchor Inn, Epney — redesign
   Palette: ivy green (the pub sign), warm cream, brass.
   Motif: arched "window" images. */

:root {
  --green-900: #0f2b23;
  --green-800: #14392f;
  --green-700: #1d4e40;
  --green-600: #2b6654;
  --cream: #f6f1e7;
  --paper: #fbf8f2;
  --sand: #e9dfcb;
  --brass: #d4a758;
  --brass-light: #e3c188;
  --brass-dark: #7d561b;
  --ink: #1d2622;
  --muted: #56655e;
  --line: rgba(20, 57, 47, 0.15);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: 20px;
  --radius: 16px;
  --shadow: 0 24px 48px -24px rgba(15, 43, 35, 0.45);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.ai-skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--brass);
  color: var(--green-900);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.ai-skip-link:focus { top: 12px; }

.ai-wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { scroll-margin-top: var(--header-h); }
.ai-section { padding-block: clamp(64px, 9vw, 116px); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--green-800);
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--brass-dark); }

.ai-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-dark);
}
.ai-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.ai-lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }

/* ---------- Buttons ---------- */

.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.ai-btn:hover { transform: translateY(-2px); }
.ai-btn svg { width: 18px; height: 18px; }

.ai-btn-brass { background: var(--brass); color: var(--green-900); }
.ai-btn-brass:hover { background: var(--brass-light); }
.ai-btn-ghost { border-color: rgba(246, 241, 231, 0.5); color: var(--cream); }
.ai-btn-ghost:hover { border-color: var(--cream); background: rgba(246, 241, 231, 0.08); }
.ai-btn-green { background: var(--green-800); color: var(--cream); }
.ai-btn-green:hover { background: var(--green-700); }

.ai-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Notice bar ---------- */

.ai-notice {
  background: var(--green-900);
  color: var(--brass-light);
  font-size: 0.9rem;
  text-align: center;
  padding: 9px var(--gutter);
}
.ai-notice a { color: var(--cream); font-weight: 700; white-space: nowrap; }

/* ---------- Header ---------- */

.ai-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 231, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ai-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}
.ai-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green-800);
  letter-spacing: -0.01em;
}
.ai-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-800);
  color: var(--brass-light);
  display: grid;
  place-items: center;
}
.ai-brand-mark .ai-icon { width: 24px; height: 24px; stroke-width: 2; }

.ai-nav-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--green-800);
  cursor: pointer;
}

.ai-site-nav {
  position: absolute;
  inset: var(--header-h) 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--gutter) 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.ai-site-nav.is-open { display: flex; }
.ai-site-nav a {
  padding: 12px 4px;
  font-weight: 600;
  text-decoration: none;
  color: var(--green-800);
  border-bottom: 1px solid var(--line);
}
.ai-site-nav a.ai-btn { margin-top: 14px; border-bottom: 2px solid transparent; color: var(--green-900); justify-content: center; }

@media (min-width: 900px) {
  .ai-nav-toggle { display: none; }
  .ai-site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .ai-site-nav a { padding: 6px 0; border: 0; font-size: 0.98rem; position: relative; }
  .ai-site-nav a:not(.ai-btn)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--brass);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s;
  }
  .ai-site-nav a:not(.ai-btn):hover::after { transform: scaleX(1); }
  .ai-site-nav a.ai-btn { margin: 0; padding: 11px 20px; font-size: 0.95rem; }
}

/* ---------- Hero ---------- */

.ai-hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(43, 102, 84, 0.55), transparent 65%),
    var(--green-800);
  color: var(--cream);
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(110px, 12vw, 150px);
  overflow: hidden;
}
.ai-hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}
.ai-hero h1 { color: var(--cream); margin-bottom: 22px; }
.ai-hero h1 em { color: var(--brass-light); }
.ai-hero .ai-eyebrow { color: var(--brass-light); }
.ai-hero .ai-lead { color: rgba(246, 241, 231, 0.82); margin-bottom: 32px; }
.ai-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 9px 16px 9px 14px;
  border: 1px solid rgba(246, 241, 231, 0.22);
  border-radius: 999px;
  font-size: 0.95rem;
  color: rgba(246, 241, 231, 0.9);
}
.ai-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8b968f;
}
.ai-status[data-state="open"] .ai-status-dot { background: #6fd39a; box-shadow: 0 0 0 4px rgba(111, 211, 154, 0.2); }
.ai-status[data-state="closed"] .ai-status-dot { background: var(--brass); }

.ai-hero-figure { position: relative; max-width: 520px; width: 100%; margin-inline: auto; }
.ai-arch {
  overflow: hidden;
  border-radius: 999px 999px 20px 20px;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
  background: var(--green-700);
}
.ai-arch img { width: 100%; height: 100%; object-fit: cover; }
.ai-hero-figure .ai-arch img { object-position: 62% center; }
.ai-hero-figure::before {
  content: "";
  position: absolute;
  inset: -14px -14px 14px 14px;
  border: 2px solid rgba(227, 193, 136, 0.45);
  border-radius: 999px 999px 24px 24px;
  z-index: 0;
}
.ai-hero-figure .ai-arch { position: relative; z-index: 1; }
.ai-hero-badge {
  position: absolute;
  z-index: 2;
  left: -8px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--cream);
  color: var(--green-800);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-weight: 700;
  line-height: 1.25;
  font-size: 0.95rem;
}
.ai-hero-badge .ai-icon { color: var(--brass-dark); width: 28px; height: 28px; }
.ai-hero-badge span { display: block; font-weight: 500; color: var(--muted); font-size: 0.85rem; }

@media (min-width: 900px) {
  .ai-hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
  .ai-hero-badge { left: -36px; }
}

/* ---------- Info cards (overlap hero) ---------- */

.ai-info { margin-top: -74px; position: relative; z-index: 5; }
.ai-info-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ai-info-item {
  display: flex;
  gap: 16px;
  padding: 26px 28px;
  background: var(--paper);
}
.ai-info-item .ai-icon { color: var(--brass-dark); width: 28px; height: 28px; margin-top: 2px; }
.ai-info-item h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ai-info-item p, .ai-info-item a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--green-800);
  text-decoration: none;
}
.ai-info-item a:hover { color: var(--brass-dark); }
.ai-info-item small { display: block; margin-top: 4px; font: 500 0.92rem/1.4 var(--font-body); color: var(--muted); }

@media (min-width: 820px) {
  .ai-info-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- About ---------- */

.ai-about-grid { display: grid; gap: 56px; align-items: center; }
.ai-about-copy p + p { margin-top: 1em; }
.ai-about-copy h2 { margin-bottom: 24px; }
.ai-about-copy .ai-lead { margin-bottom: 1em; }

.ai-about-media { position: relative; padding-bottom: 60px; max-width: 520px; margin-inline: auto; width: 100%; }
.ai-about-media .ai-arch { aspect-ratio: 4 / 5; }
.ai-about-media .ai-inset {
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 62%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 6px solid var(--cream);
  box-shadow: var(--shadow);
}
.ai-about-media .ai-inset img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

.ai-facilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.ai-facility {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  color: var(--green-800);
  font-size: 0.98rem;
  line-height: 1.25;
}
.ai-facility .ai-icon { color: var(--brass-dark); }

@media (min-width: 900px) {
  .ai-about-grid { grid-template-columns: 0.95fr 1.05fr; gap: 96px; }
  .ai-about-media .ai-inset { right: -40px; }
}

/* ---------- Food & drink ---------- */

.ai-food { background: var(--paper); border-block: 1px solid var(--line); }
.ai-food-grid { display: grid; gap: 52px; align-items: center; }
.ai-food-photos { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: stretch; }
.ai-food-photos figure { border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.ai-food-photos img { width: 100%; height: 100%; object-fit: cover; }
.ai-food-photos .ai-wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.ai-food-photos .ai-tall { aspect-ratio: 3 / 4; }
.ai-food-photos .ai-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--green-800);
  color: var(--cream);
  font-size: 0.95rem;
  line-height: 1.45;
}
.ai-food-photos .ai-note strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--brass-light); display: block; margin-bottom: 6px; font-weight: 600; }

.ai-food-copy h2 { margin-bottom: 20px; }
.ai-menu-list { margin-top: 30px; border-top: 1px solid var(--line); }
.ai-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.2s, background 0.2s;
}
.ai-menu-link:hover { padding-inline: 14px; background: rgba(212, 167, 88, 0.14); }
.ai-menu-link h3 { color: var(--green-800); }
.ai-menu-link p { font-size: 0.95rem; color: var(--muted); margin-top: 2px; }
.ai-menu-link .ai-go {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--brass-light);
  transition: background 0.2s;
}
.ai-menu-link:hover .ai-go { background: var(--brass); color: var(--green-900); }
.ai-menu-link .ai-go .ai-icon { width: 20px; height: 20px; }

@media (min-width: 960px) {
  .ai-food-grid { grid-template-columns: 1fr 1fr; gap: 88px; }
}

/* ---------- Book band ---------- */

.ai-band {
  position: relative;
  isolation: isolate;
  padding-block: clamp(80px, 11vw, 140px);
  color: var(--cream);
  text-align: center;
  background: var(--green-900) url("../img/redesign/friends-toasting.jpg") center 35% / cover no-repeat;
}
.ai-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15, 43, 35, 0.86), rgba(15, 43, 35, 0.72));
}
.ai-band h2 { color: var(--cream); margin-bottom: 16px; }
.ai-band h2 em { color: var(--brass-light); }
.ai-band p { max-width: 36em; margin: 0 auto 30px; color: rgba(246, 241, 231, 0.85); font-size: 1.15rem; }
.ai-band .ai-hero-actions { justify-content: center; }

/* ---------- Opening times ---------- */

.ai-hours-grid { display: grid; gap: 48px; align-items: start; }
.ai-hours-head h2 { margin-bottom: 18px; }

.ai-hours-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ai-hours-row {
  display: grid;
  gap: 4px 20px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.ai-hours-row:last-child { border-bottom: 0; }
.ai-hours-row dt { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--green-800); }
.ai-hours-row dd { margin: 0; }
.ai-hours-row .ai-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ai-hours-row .ai-time { font-weight: 600; }
.ai-hours-row .ai-r { white-space: nowrap; }
.ai-hours-row .ai-amp { color: var(--muted); font-weight: 400; }
.ai-hours-row.is-today { background: #f3e6c8; }
.ai-hours-row.is-today::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--brass);
}
.ai-hours-row.is-today dt::after {
  content: "Today";
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  vertical-align: middle;
  background: var(--green-800);
  color: var(--cream);
  font: 700 0.7rem/1.4 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ai-basket {
  margin-top: 26px;
  padding: 18px 22px;
  border-left: 4px solid var(--brass);
  background: var(--paper);
  border-radius: 0 12px 12px 0;
  font-size: 1rem;
}
.ai-basket strong { color: var(--green-800); }

.ai-heads-up {
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--sand);
  font-size: 0.98rem;
  line-height: 1.6;
}
.ai-heads-up h3 { font-size: 1.1rem; margin-bottom: 8px; }
.ai-heads-up p + p { margin-top: 0.7em; }

@media (min-width: 620px) {
  .ai-hours-row { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .ai-hours-row dt { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .ai-hours-grid { grid-template-columns: 0.75fr 1.25fr; gap: 80px; }
  .ai-hours-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---------- Gallery ---------- */

.ai-gallery { background: var(--green-800); }
.ai-gallery h2 { color: var(--cream); }
.ai-gallery h2 em { color: var(--brass-light); }
.ai-gallery .ai-eyebrow { color: var(--brass-light); }
.ai-gallery-head { max-width: 40em; margin-bottom: 44px; }

.ai-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: 12px;
  grid-auto-flow: dense;
}
.ai-gallery-grid figure { overflow: hidden; border-radius: 12px; background: var(--green-700); }
.ai-gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.ai-gallery-grid figure:hover img { transform: scale(1.05); }
.ai-g-wide { grid-column: span 1; }
.ai-g-tall { grid-row: span 2; }
.ai-g-big { grid-column: span 2; grid-row: span 2; }

@media (min-width: 820px) {
  .ai-gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px; gap: 16px; }
  .ai-g-big { grid-column: span 2; grid-row: span 1; }
  .ai-g-wide { grid-column: span 2; }
}

/* ---------- Find us ---------- */

.ai-find-grid { display: grid; gap: 40px; align-items: stretch; }
.ai-find-card {
  padding: clamp(28px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ai-find-card h2 { margin-bottom: 22px; }
.ai-find-card address { font-style: normal; font-size: 1.15rem; margin-bottom: 26px; }
.ai-find-list { display: grid; gap: 16px; margin-bottom: 30px; }
.ai-find-list li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.ai-find-list .ai-icon { color: var(--brass-dark); }
.ai-find-list a { text-decoration: none; color: var(--green-800); }
.ai-find-list a:hover { color: var(--brass-dark); text-decoration: underline; }
.ai-map {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--sand);
}
.ai-map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

@media (min-width: 900px) {
  .ai-find-grid { grid-template-columns: 0.8fr 1.2fr; gap: 32px; }
}

/* ---------- Footer ---------- */

.ai-site-footer { background: var(--green-900); color: rgba(246, 241, 231, 0.78); padding-block: 56px 32px; font-size: 0.98rem; }
.ai-footer-grid { display: grid; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(246, 241, 231, 0.14); }
.ai-site-footer .ai-brand { color: var(--cream); margin-bottom: 14px; }
.ai-site-footer .ai-brand-mark { background: var(--green-700); }
.ai-site-footer h3 {
  font: 700 0.78rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 16px;
}
.ai-site-footer a { color: var(--cream); text-decoration: none; }
.ai-site-footer a:hover { color: var(--brass-light); text-decoration: underline; }
.ai-site-footer li + li { margin-top: 8px; }
.ai-footer-social { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; }
.ai-footer-social svg { width: 22px; height: 22px; fill: currentColor; }
.ai-copyright { padding-top: 26px; font-size: 0.88rem; color: rgba(246, 241, 231, 0.55); }

@media (min-width: 820px) {
  .ai-footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 56px; }
}

/* ---------- Events ---------- */

.ai-events { background: #ece3cf; border-block: 1px solid var(--line); }
.ai-events-head { max-width: 40em; margin-bottom: 44px; }
.ai-events-head h2 { margin-bottom: 16px; }
.ai-events-grid { display: grid; gap: 18px; }

.ai-event-card {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 22px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ai-event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brass); }

.ai-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 84px;
  height: 96px;
  border-radius: 999px 999px 12px 12px;
  background: var(--green-800);
  color: var(--cream);
  line-height: 1;
}
.ai-event-day { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; }
.ai-event-month { margin-top: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-light); }

.ai-event-body { flex: 1; display: block; }
.ai-event-when { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-dark); }
.ai-event-title { display: block; margin: 4px 0 6px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; color: var(--green-800); }
.ai-event-desc { display: block; font-size: 0.98rem; line-height: 1.5; color: var(--muted); }

.ai-event-card .ai-go {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--brass-light);
  transition: background 0.2s, color 0.2s;
}
.ai-event-card:hover .ai-go { background: var(--brass); color: var(--green-900); }
.ai-event-card .ai-go .ai-icon { width: 20px; height: 20px; }

@media (max-width: 519px) {
  .ai-event-card { align-items: flex-start; gap: 16px; padding: 18px; }
  .ai-event-date { width: 68px; height: 80px; }
  .ai-event-day { font-size: 1.8rem; }
  .ai-event-card .ai-go { display: none; }
}
@media (min-width: 820px) {
  .ai-events-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* Event details dialog */
.ai-event-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: auto;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}
.ai-event-dialog::backdrop { background: rgba(15, 43, 35, 0.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ai-dialog-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ai-dialog-body { padding: clamp(24px, 5vw, 40px); }
.ai-dialog-body > * + * { margin-top: 1em; }
.ai-dialog-body .ai-btn { margin-top: 1.6em; }
.ai-dialog-date { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-dark); }
.ai-dialog-body h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-top: 0.3em; }
.ai-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--green-800);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.ai-dialog-close:hover { background: var(--brass-light); }
