/* 2CRVR local guide: "The Dateline". The hub front page (.dateline) and the
   section pages (.guide, restyled from the starter's markup).
   Client overlay for templates/client/guide/. */

.dateline,
.guide {
  --dl-ink: var(--color-brand-primary);
  /* Text-weight variants of steel and red, darkened toward ink to clear 4.5:1 on cream. */
  --dl-steel: color-mix(in srgb, var(--color-brand-secondary) 80%, var(--color-brand-primary));
  --dl-red: color-mix(in srgb, var(--color-brand-accent) 78%, var(--color-brand-primary));
  --dl-rule: color-mix(in srgb, var(--color-brand-primary) 22%, transparent);
  --dl-muted: color-mix(in srgb, var(--color-brand-primary) 78%, var(--color-warm-cream));
  /* Cormorant defaults to old-style figures, which turn 911 into "9ıı". */
  font-variant-numeric: lining-nums;
}
.dateline {
  --dl-gutter: clamp(1rem, 5vw, 7.5rem);
  background: var(--color-warm-cream);
  color: var(--dl-ink);
  padding: 7.5rem var(--dl-gutter) 5rem;
  font-family: var(--font-body);
}
@media (min-width: 768px) {
  .dateline { padding-top: 11rem; }
}
/* Clear the site's vertical nav column, which runs to about 14rem down. */
@media (min-width: 1024px) {
  .dateline { padding-top: 15.5rem; }
}
.dateline ::selection { background: var(--color-surface-muted); color: var(--dl-ink); }
.dateline a:not(.btn) { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.dateline a:focus-visible { outline: 2px solid var(--dl-red); outline-offset: 3px; }
.dateline time, .dateline-figure__value, .dateline-strip { font-variant-numeric: tabular-nums lining-nums; }
.dateline-mast__title, .dateline-lead__headline, .dateline-story__headline { font-variant-numeric: lining-nums; }

/* Masthead */
.dateline-mast { max-width: 80rem; margin: 0 auto; }
.dateline-mast__flag {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem 0 0.75rem;
  border-bottom: 1px solid var(--dl-ink);
}
.dateline-mast__flag::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--dl-ink);
  animation: dateline-rule 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes dateline-rule {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.dateline-mast__brand,
.dateline-mast__date {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dl-steel);
}
.dateline-mast__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.dateline-mast__brand { display: flex; align-items: center; gap: 0.625rem; }
.dateline-mast__wave {
  flex: none;
  width: 2.75rem;
  height: auto;
  fill: none;
  stroke: var(--dl-steel);
  stroke-width: 1.5;
}
@media (min-width: 968px) {
  .dateline-mast__flag { grid-template-columns: 1fr auto 1fr; align-items: end; }
  .dateline-mast__title { text-align: center; }
  .dateline-mast__date { text-align: right; }
}

.dateline-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dl-ink);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dateline-strip:empty { display: none; }
@media (min-width: 968px) {
  .dateline-strip { justify-content: space-between; }
}
.dateline-deck {
  max-width: 44rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--dl-muted);
}

/* Front: lead story and rail */
.dateline-front {
  max-width: 80rem;
  margin: 1.5rem auto 0;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 968px) {
  .dateline-front { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; }
  .dateline-rail { border-left: 1px solid var(--dl-ink); padding-left: 2.5rem; }
}

.dateline-lead__headline,
.dateline-story__headline {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 30ch;
}
.dateline-lead__body,
.dateline-story p {
  max-width: 65ch;
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--dl-muted);
}

/* Tonight's listings under a featured story, or at the head of the rail. */
.dateline-lead__subhead,
.dateline-tonight__headline {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}
.dateline-lead__subhead {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dl-ink);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.dateline-tonight { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--dl-ink); }
.dateline-tonight__headline { font-size: 1.625rem; }
.dateline-rail .dateline-listing { columns: 1; }
/* The rail shows the first six, then "The week's listings". */
.dateline-rail .dateline-listing__item:nth-child(n + 7) { display: none; }

.dateline-photo { margin: 1rem 0 0; }
.dateline-photo a { display: block; overflow: hidden; }
/* A short band, so the first listings stay in the first viewport. */
.dateline-photo picture { display: block; }
/* !important: the {% picture %} tag writes an inline aspect-ratio of 3/2. */
.dateline-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1 !important; object-fit: cover; }
@media (max-width: 639px) {
  .dateline-photo img { aspect-ratio: 16 / 9 !important; }
}
.dateline-photo img { transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.dateline-photo a:hover img { transform: scale(1.03); }
.dateline-photo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dl-rule);
  font-size: 0.875rem;
  color: var(--dl-muted);
}
.dateline-photo figcaption a { color: var(--dl-ink); font-weight: 600; }

.dateline-listing {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
/* Phones: the first six, then "The week's listings", so the Inside index stays close. */
@media (max-width: 639px) {
  .dateline-listing__item:nth-child(n + 7) { display: none; }
}
@media (min-width: 640px) {
  .dateline-listing { columns: 2; column-gap: 2.5rem; column-rule: 1px solid var(--dl-rule); }
}
.dateline-listing__item {
  break-inside: avoid;
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  column-gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--dl-rule);
  font-size: 1rem;
  line-height: 1.4;
}
.dateline-listing__time { font-weight: 600; white-space: nowrap; }
.dateline-listing__venue { font-weight: 600; }
.dateline-listing__venue a { text-decoration: none; }
.dateline-listing__venue a:hover { text-decoration: underline; }
.dateline-listing__until {
  grid-column: 2;
  font-size: 0.875rem;
  color: var(--dl-muted);
}

.dateline-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dl-red) !important;
}
.dateline-more::after { content: ""; width: 1.5rem; height: 1px; background: currentColor; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.dateline-more:hover::after { width: 2.5rem; }

/* Rail figures and the Inside index */
.dateline-figure {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--dl-rule);
}
.dateline-figure__label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dl-steel);
}
.dateline-figure__value {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.25rem, 3.4vw, 2.875rem);
  line-height: 1.1;
  margin-top: 0.25rem;
}
.dateline-figure__detail { font-size: 0.9375rem; color: var(--dl-muted); }

.dateline-inside ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
/* Links keep the starter's .guide-tile hook; undo its tile box here. */
.dateline-inside a {
  height: auto;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex-direction: row;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted color-mix(in srgb, var(--dl-ink) 40%, transparent);
  text-decoration: none;
}
.dateline-inside__name { font-weight: 600; font-size: 1.0625rem; }
.dateline-inside__sub { font-size: 0.875rem; color: var(--dl-muted); }
.dateline-inside a:hover { box-shadow: none; }
.dateline-inside a:hover .dateline-inside__name { text-decoration: underline; }

/* Below the front */
.dateline-below {
  max-width: 80rem;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 3px solid var(--dl-ink);
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 968px) {
  .dateline-below { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; }
}
.dateline-story__headline { font-size: clamp(1.75rem, 3vw, 2.25rem); }

/* Close of the rail: the villas, then the note for guests already booked. */
.dateline-villas { display: flex; justify-content: center; width: 100%; margin-top: 1.75rem; }
.dateline-notice {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border: 1px solid var(--dl-ink);
}
.dateline-notice__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.1;
}
.dateline-notice p { margin-top: 0.5rem; font-size: 1rem; line-height: 1.6; color: var(--dl-muted); }

@media (prefers-reduced-motion: reduce) {
  .dateline-mast__flag::before { animation: none; }
  .dateline-photo img, .dateline-more::after { transition: none; }
}

/* ------------------------------------------------------------------
   Section pages. The starter's markup, restyled into the Dateline:
   rules and hairlines instead of cards, no icon tiles, square corners.
   Prefixed with .guide so these beat the starter rules in main.css.
   ------------------------------------------------------------------ */

.guide.guide__inner {
  max-width: 50rem;
  padding: 7.5rem 1rem 5rem;
  gap: 2.5rem;
  color: var(--dl-ink);
  background: var(--color-warm-cream);
}
@media (min-width: 768px) {
  .guide.guide__inner { padding-top: 11rem; padding-left: 0; padding-right: 0; }
}
.guide ::selection { background: var(--color-surface-muted); color: var(--dl-ink); }
.guide a:focus-visible, .guide summary:focus-visible { outline: 2px solid var(--dl-red); outline-offset: 3px; }
.guide time, .guide .guide-event__time, .guide .guide-tide__time, .guide .guide-times__time,
.guide .guide-number__phone, .guide .guide-magic__time, .guide .guide-tide-week {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Running head and title */
.guide .dateline-section { position: relative; gap: 0; padding-top: 0.75rem; }
.guide .dateline-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--dl-ink);
  animation: dateline-rule 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.guide .dateline-section__running {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--dl-ink);
}
.guide .guide-header__back,
.guide .dateline-section__meta {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dl-steel);
}
.guide .guide-header__back { gap: 0.5rem; }
.guide .guide-header__back:hover { color: var(--dl-ink); }
.guide .dateline-section__meta { display: flex; align-items: center; gap: 0.625rem; margin: 0; }
.guide .dateline-section__place { display: inline-flex; align-items: center; gap: 0.625rem; }
@media (max-width: 639px) {
  .guide .dateline-section__place { display: none; }
}
.guide .guide-header__title {
  margin-top: 1.25rem;
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
  color: var(--dl-ink);
  text-wrap: balance;
}
.guide .guide-header__intro { margin-top: 0.75rem; max-width: 60ch; font-size: 1.125rem; line-height: 1.6; color: var(--dl-muted); }

/* Group heads: a small-caps label over a ruled line, like the hub's rail */
.guide .guide-group { gap: 0; }
.guide .guide-group__heading {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dl-ink);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--dl-steel);
}

/* Cards and lists become ruled rows */
.guide .guide-card,
.guide .guide-list {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.guide .guide-stack { gap: 0; }
.guide .guide-stack > li,
.guide .guide-list > * { padding: 1rem 0; border-bottom: 1px solid var(--dl-rule); }
.guide .guide-list > * + * { border-top: 0; }
.guide .guide-list__row { padding-left: 0; padding-right: 0; }
.guide .guide-list__title { font-weight: 600; }
.guide .guide-list__meta,
.guide .guide-empty,
.guide .guide-attribution { color: var(--dl-muted); }
.guide .guide-attribution a { color: var(--dl-ink); }
.guide .guide-empty { padding: 1rem 0; font-size: 1.0625rem; }

/* No icon tiles in this world */
.guide .guide-tip__icon,
.guide .guide-mode__icon,
.guide .guide-month-card__icon { display: none; }

/* Filters: square tabs, the current one inked */
.guide .guide-filters { gap: 0.75rem; }
.guide .guide-chips { gap: 0; border-bottom: 1px solid var(--dl-ink); }
.guide .guide-chip {
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dl-muted);
  text-decoration: none;
}
.guide .guide-chip:hover { color: var(--dl-ink); }
.guide .guide-chip[aria-current="true"] { background: var(--dl-ink); color: var(--color-warm-cream); }

.guide .guide-badge {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--dl-ink);
  border-radius: 0;
  background: none;
  color: var(--dl-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.guide .guide-icon-button {
  border: 1px solid var(--dl-rule);
  border-radius: 0;
  background: none;
  color: var(--dl-ink);
}
.guide .guide-icon-button:hover { border-color: var(--dl-ink); }
.guide .guide-button {
  border-radius: 0;
  background: var(--color-brand-accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.guide .guide-button:hover { background: color-mix(in srgb, var(--color-brand-accent) 85%, black); }

/* Events */
.guide .guide-event { gap: 1rem; }
.guide .guide-event__time { width: 5.25rem; font-weight: 600; }
.guide .guide-event__end { color: var(--dl-muted); font-weight: 400; }
.guide .guide-event__category { color: var(--dl-red); letter-spacing: 0.12em; }
.guide .guide-event__title { font-weight: 600; }
.guide .guide-event__venue,
.guide .guide-event__description { color: var(--dl-muted); }

/* Places of worship */
.guide .guide-place__denomination { color: var(--dl-steel); letter-spacing: 0.14em; }
.guide .guide-place__name,
.guide .guide-mode__title,
.guide .guide-month__name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--dl-ink);
}
.guide .guide-month__name { font-size: clamp(2rem, 4vw, 2.75rem); }
.guide .guide-place__where,
.guide .guide-place__notes { color: var(--dl-muted); }
.guide .guide-times { margin-top: 0.75rem; }
.guide .guide-times__row { border-top: 1px solid var(--dl-rule); }
.guide .guide-place__links a { color: var(--dl-ink); }

/* Things to know: expanding rows */
.guide .guide-list > .guide-tip { padding: 0; }
.guide .guide-tip__summary { padding: 1rem 0; min-height: 3.5rem; }
.guide .guide-tip__title { font-weight: 600; font-size: 1.0625rem; }
.guide .guide-tip__sub { color: var(--dl-muted); }
.guide .guide-tip__body { padding: 0 0 1.25rem; max-width: 65ch; font-size: 1rem; line-height: 1.65; }
.guide .guide-tip__body a, .guide .guide-mode__body a { color: var(--dl-ink); text-underline-offset: 0.2em; }

/* Getting around */
.guide .guide-mode { gap: 0.5rem; padding: 1.25rem 0; }
.guide .guide-mode__facts { color: var(--dl-steel); font-weight: 600; letter-spacing: 0.04em; }
.guide .guide-mode__summary,
.guide .guide-mode__body { max-width: 65ch; line-height: 1.65; }

/* Month by month */
.guide .guide-month__head { padding-bottom: 0.5rem; border-bottom: 1px solid var(--dl-ink); }
.guide .guide-month-card { padding: 1.25rem 0; }
.guide .guide-month-card__title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dl-steel);
}
.guide .guide-month-card p { margin-top: 0.375rem; max-width: 65ch; font-size: 1.0625rem; line-height: 1.65; }
.guide .guide-year-wrap { padding: 1rem 0 0; overflow-x: auto; }
.guide .guide-year__cell { border-radius: 0; }
.guide .guide-year__cell--current { outline: 2px solid var(--dl-ink); outline-offset: -2px; }

/* Useful numbers */
.guide .guide-sos {
  border-radius: 0;
  background: var(--dl-ink);
  color: var(--color-warm-cream);
  padding: 1.25rem 1.5rem;
}
.guide .guide-sos:hover { background: color-mix(in srgb, var(--dl-ink) 88%, black); }
.guide .guide-sos__label { font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }
.guide .guide-sos__number { font-family: var(--font-heading); font-weight: 500; font-size: 2.75rem; line-height: 1; }
.guide .guide-number { padding: 0.75rem 0; min-height: 3.5rem; color: var(--dl-ink); }
.guide .guide-list > li:has(.guide-number) { padding: 0; }
.guide .guide-number__label { font-weight: 600; }
.guide .guide-number__note { color: var(--dl-muted); }
.guide .guide-number__phone { margin-left: auto; color: var(--dl-ink); font-weight: 600; }
.guide .guide-number:hover .guide-number__phone { text-decoration: underline; text-underline-offset: 0.2em; }

/* Tides */
.guide .guide-tide-curve { padding: 1rem 0 0.5rem; border-bottom: 1px solid var(--dl-rule); }
.guide .guide-tide-curve__line { stroke: var(--dl-ink); }
.guide .guide-tide-curve__now { stroke: var(--color-brand-accent); }
.guide .guide-tide { padding: 1rem 0; }
.guide .guide-tide__type { font-weight: 600; }
.guide .guide-tide__time { font-family: var(--font-heading); font-size: 1.75rem; line-height: 1; }
.guide .guide-tide__height { color: var(--dl-muted); }
.guide .guide-tide-week th, .guide .guide-tide-week td { padding-left: 0; }
.guide .guide-tide-week thead th { color: var(--dl-steel); letter-spacing: 0.16em; border-bottom: 1px solid var(--dl-ink); }
.guide .guide-tide-week tbody tr + tr { border-top: 1px solid var(--dl-rule); }

/* Magic hours */
.guide .guide-magic__card { padding: 1rem 0 0; }
.guide .guide-magic__bar { border-radius: 0; height: 0.75rem; }
.guide .guide-magic__marker { background: var(--dl-ink); width: 2px; }
.guide .guide-magic__dot { border-radius: 0; }
.guide .guide-magic__row { padding: 0.75rem 0; border-bottom: 1px solid var(--dl-rule); }
.guide .guide-magic__why {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--dl-ink);
  color: var(--dl-muted);
}
.guide .guide-magic__why-title { font-family: var(--font-heading); font-weight: 500; font-size: 1.5rem; color: var(--dl-ink); }

@media (prefers-reduced-motion: reduce) {
  .guide .dateline-section::before { animation: none; }
}
