.tides-shell { overflow-wrap: anywhere; }
.tides-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 48px;
  min-height: 490px;
  padding: 64px 0;
}
.tides-intro { max-width: 540px; }
.tides-intro h1 { font-size: clamp(2.75rem, 4.3vw, 3.75rem); line-height: 1.2; }
.tides-ampersand { color: var(--primary); }
.tides-intro .description { max-width: 440px; }
.tides-demo { display: grid; justify-items: center; align-content: center; gap: 26px; }
.tides-demo .appearance-toggle { width: 256px; height: 256px; border-radius: 50%; }
.tides-demo .appearance-current, .tides-static-demo { width: 240px; height: 240px; }
.tides-static-demo { color: var(--primary); fill: currentColor; }
.tides-demo .caption { text-align: center; font-size: 0.6875rem; letter-spacing: 0.09em; }
.tides-design { border-top: 1px solid var(--border); padding: 40px 0 48px; }
.tides-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 24px 48px; }
.tides-shell h2 { margin: 0; font: 400 1.5rem/1.45 var(--font-serif); letter-spacing: -0.025em; }
.tides-section-heading p, .tides-detail-copy { margin: 0; max-width: 440px; color: var(--muted-foreground); font-size: 1rem; line-height: 1.7; }
.tides-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; }
.tides-specimen { display: grid; justify-items: center; gap: 22px; margin: 0; padding: 36px 24px 30px; background: var(--card); }
.tides-specimen svg { width: 160px; height: 160px; fill: currentColor; color: var(--primary); }
.tides-specimen figcaption { text-align: center; }
.tides-specimen h3 { margin: 0; font: 400 1.25rem/1.5 var(--font-serif); }
.tides-specimen p { margin: 8px 0 0; color: var(--muted-foreground); font-size: 0.875rem; line-height: 1.6; }
.tides-details { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; border-top: 1px solid var(--border); padding: 40px 0 64px; }
.tides-detail-copy { margin-top: 16px; }
.tides-palette, .tides-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; padding: 0; margin: 28px 0 0; }
.tides-palette li, .tides-sizes li { color: var(--muted-foreground); font-size: 0.75rem; line-height: 1.5; }
.tides-swatch { display: block; height: 10px; margin-bottom: 12px; }
.tides-sun { background: var(--appearance-sun); }
.tides-moon { background: var(--appearance-moon); border: 1px solid var(--border); }
.tides-dawn { background: var(--appearance-dawn); }
.tides-dusk { background: var(--appearance-dusk); }
.tides-sizes { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tides-sizes li { display: grid; justify-items: center; gap: 12px; }
.tides-size-pair { display: flex; align-items: center; justify-content: center; min-height: 48px; gap: 8px; color: var(--primary); }
.tides-size-pair svg { display: block; fill: currentColor; }
/* Apply after the heading font shorthands so every serif keeps its reading drawing. */
.tides-shell h2, .tides-specimen h3 { font-optical-sizing: none; font-variation-settings: 'opsz' var(--serif-optical-size); }
@media (max-width: 1050px) {
  .tides-hero { gap: 24px; }
  .tides-details { gap: 32px; }
}
@media (max-width: 700px) {
  .tides-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 44px 0 36px; }
  .tides-demo { gap: 16px; }
  .tides-demo .appearance-toggle { width: 208px; height: 208px; }
  .tides-demo .appearance-current, .tides-static-demo { width: 192px; height: 192px; }
  .tides-section-heading { display: block; }
  .tides-section-heading p { margin-top: 16px; }
  .tides-design { padding: 32px 0; }
  .tides-pair { gap: 12px; margin-top: 24px; }
  .tides-specimen { padding: 24px 12px; gap: 16px; }
  .tides-specimen svg { width: min(100%, 120px); height: auto; }
  .tides-specimen h3 { font-size: 1rem; }
  .tides-specimen p { font-size: 0.8125rem; }
  .tides-details { grid-template-columns: 1fr; padding: 32px 0 40px; gap: 40px; }
}

.tides-slow { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: -14px; color: var(--foreground); font-size: 0.8125rem; cursor: pointer; }
.tides-slow[hidden], .tides-motion[hidden] { display: none; }
.tides-slow input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); cursor: inherit; }
.tides-slow input:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
.tides-slow span { color: var(--muted-foreground); font-size: 0.75rem; }
.tides-slow:has(:disabled) { opacity: 0.55; cursor: default; }
.tides-reduced-note { margin: -18px 0 0; color: var(--muted-foreground); font-size: 0.75rem; text-align: center; }
.tides-motion { border-top: 1px solid var(--border); padding: 40px 0 48px; }
.tides-sequence { margin-top: 32px; }
.tides-sequence h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; font-size: 0.875rem; font-weight: 500; }
.tides-sequence h3 span { color: var(--muted-foreground); font-size: 0.75rem; font-weight: 400; }
.tides-frames { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.tides-frame { padding: 12px 4px; background: var(--background); color: var(--primary); text-align: center; }
.tides-frame > .appearance-current { width: 100%; height: auto; aspect-ratio: 1; }
.tides-frame > span { display: block; margin-top: 8px; color: var(--muted-foreground); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
/* Snapshot movement is sampled from these elements' computed CSS endpoints,
   baked into static styles, and cancelled before the frames become visible. */
.tides-frame .appearance-glyph { transition: none; }
@media (max-width: 700px) {
  .tides-motion { padding: 32px 0; }
  .tides-frames { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tides-frame { padding: 8px 2px; }
  .tides-frame > span { font-size: 0.625rem; }
}
