:root {
  color-scheme: light;
  --ink: #18323a;
  --muted: #63767b;
  --line: #d8e4e5;
  --panel: rgba(255, 255, 255, 0.92);
  --page: #f6f1e6;
  --aqua: #317f8f;
  --great: #4f9d5d;
  --kelp: #2d6653;
  --sun: #e4ad4c;
  --coral: #d96a4d;
  --sky: #74aeca;
  --bad: #ad6459;
  --shadow: 0 22px 70px rgba(24, 50, 58, 0.18);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(217, 236, 241, 0.9) 0%, rgba(246, 241, 230, 0.98) 46%),
    var(--page);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(620px, 1.28fr);
  min-height: 100vh;
}

.hero-panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #dceeed;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 51, 59, 0.12), rgba(11, 51, 59, 0.55)),
    linear-gradient(90deg, rgba(13, 39, 45, 0.72), rgba(13, 39, 45, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(28px, 5vw, 72px);
  color: white;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.72;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: min(100%, 11ch);
  margin-bottom: 0;
  font-size: clamp(2.45rem, 5.6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-subtitle {
  max-width: min(100%, 28rem);
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 1.14rem;
  letter-spacing: 0;
}

.score-lockup {
  display: grid;
  justify-items: center;
  align-self: flex-start;
  gap: 12px;
  max-width: 340px;
  text-align: center;
}

.score-ring {
  --ring: calc(var(--score) * 1%);
  --rating-color: var(--aqua);
  flex: 0 0 auto;
  width: 146px;
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.92) 0 56%, transparent 57%),
    conic-gradient(var(--rating-color) var(--ring), rgba(255, 255, 255, 0.32) 0);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  color: var(--ink);
}

.score-ring-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-ring strong {
  font-size: 2.72rem;
  font-weight: 840;
  line-height: 1;
}

.score-copy {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.score-label {
  margin-bottom: 0;
  font-size: 1.45rem;
  font-weight: 760;
  line-height: 1.08;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.score-meta {
  max-width: 340px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  line-height: 1.28;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.dashboard {
  min-width: 0;
  padding: clamp(18px, 3vw, 42px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.search {
  position: relative;
  flex: 1 1 520px;
}

.search label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
}

.location-search-row {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.search-field {
  position: relative;
  min-width: 0;
}

.search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  outline: none;
}

.search-field input {
  min-height: 48px;
  border-color: rgba(53, 103, 124, 0.22);
  border-radius: 999px;
  padding-left: 46px;
  padding-right: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.search input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(47, 159, 154, 0.16);
}

.search-field input:focus {
  border-color: rgba(116, 174, 202, 0.94);
  box-shadow: 0 0 0 4px rgba(116, 174, 202, 0.22);
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 18px;
  width: 17px;
  aspect-ratio: 1;
  border: 2px solid #35677c;
  border-radius: 50%;
  transform: translateY(-54%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #35677c;
  transform: rotate(45deg);
  transform-origin: center;
}

.search button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
  font-weight: 760;
  cursor: pointer;
}

.search button:hover {
  background: #244751;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.hidden-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search button.hidden-submit {
  min-height: 1px;
  border: 0;
  padding: 0;
}

.ghost-button.location-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(49, 127, 143, 0.34);
  background: rgba(255, 255, 255, 0.72);
  color: #244d57;
  box-shadow: none;
}

.ghost-button.location-button::before {
  content: "";
  width: 16px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 50%;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2.5px),
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat,
    linear-gradient(90deg, currentColor, currentColor) center / 100% 2px no-repeat;
  opacity: 0.86;
}

.ghost-button.location-button:hover {
  border-color: rgba(49, 127, 143, 0.56);
  background: rgba(255, 255, 255, 0.94);
  color: #16343a;
}

.results-popover {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: min(340px, 55vh);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.result-option {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf2f2;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.result-option:last-child {
  border-bottom: 0;
}

.result-option:hover,
.result-option:focus {
  background: #eef7f6;
}

.result-option span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.results-popover .loading {
  border: 0;
  border-radius: 0;
  padding: 13px 14px;
  box-shadow: none;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.selected-day-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: -4px;
}

.selected-day-header h2 {
  margin: 2px 0 0;
  font-size: clamp(1.42rem, 2vw, 1.85rem);
  line-height: 1.1;
}

.selected-day-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-score-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.selected-score-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.selected-score-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.selected-score-rating {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 860;
  line-height: 1.15;
}

.score-info {
  --tooltip-border: #b8d8e7;
  --tooltip-bg: #f1f8fb;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 17px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e7f3f8;
  color: #35677c;
  cursor: help;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.score-info::before,
.score-info::after {
  position: absolute;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.score-info::before {
  content: "";
  top: calc(100% + 5px);
  right: 2px;
  z-index: 8;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--tooltip-border);
  border-left: 1px solid var(--tooltip-border);
  background: var(--tooltip-bg);
  transform: translateY(-4px) rotate(45deg);
}

.score-info::after {
  content: attr(data-tooltip);
  top: calc(100% + 10px);
  z-index: 7;
  width: min(340px, 74vw);
  border: 1px solid var(--tooltip-border);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--tooltip-bg);
  box-shadow: 0 16px 38px rgba(24, 50, 58, 0.16);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 640;
  line-height: 1.42;
  text-align: left;
  white-space: normal;
}

.score-info:hover::before,
.score-info:hover::after,
.score-info:focus-visible::before,
.score-info:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.score-info:hover::before,
.score-info:focus-visible::before {
  transform: translateY(0) rotate(45deg);
}

.score-info:focus-visible {
  outline: 3px solid rgba(47, 159, 154, 0.24);
  outline-offset: 3px;
}

.side-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.detail-panel,
.forecast-panel {
  border: 1px solid rgba(216, 228, 229, 0.92);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(24, 50, 58, 0.08);
}

.detail-panel {
  min-width: 0;
  padding: 20px;
}

.today-grid > .detail-panel:first-child {
  display: flex;
  flex-direction: column;
}

.flag-panel .panel-heading {
  margin-bottom: 12px;
}

.forecast-panel {
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.confidence-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e8f4ef;
  color: var(--kelp);
  font-size: 0.78rem;
  font-weight: 800;
}

.confidence-pill {
  --tooltip-border: #c7d7dc;
  --tooltip-bg: #f8fbfb;
  background: #eef3f6;
  color: #42677a;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  cursor: help;
  user-select: none;
}

.confidence-pill:focus-visible {
  outline: 3px solid rgba(47, 159, 154, 0.24);
  outline-offset: 3px;
}

.confidence-pill::before,
.confidence-pill::after {
  position: absolute;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.confidence-pill::before {
  content: "";
  top: calc(100% + 5px);
  width: 12px;
  height: 12px;
  right: 18px;
  border-top: 1px solid var(--tooltip-border);
  border-left: 1px solid var(--tooltip-border);
  background: var(--tooltip-bg);
  transform: translateY(-4px) rotate(45deg);
  z-index: 8;
}

.confidence-pill::after {
  content: attr(data-tooltip);
  top: calc(100% + 10px);
  z-index: 7;
  width: min(330px, 68vw);
  border: 1px solid var(--tooltip-border);
  border-radius: 8px;
  padding: 12px 13px;
  background: var(--tooltip-bg);
  box-shadow: 0 16px 38px rgba(24, 50, 58, 0.16);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 640;
  line-height: 1.42;
  text-align: left;
  white-space: normal;
}

.confidence-pill:hover::before,
.confidence-pill:hover::after,
.confidence-pill:focus-visible::before,
.confidence-pill:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.confidence-pill:hover::before,
.confidence-pill:focus-visible::before {
  transform: translateY(0) rotate(45deg);
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.confidence-pill.confidence-high {
  --tooltip-border: #a8d2b3;
  --tooltip-bg: #f2fbf5;
  background: #e8f4ef;
  color: #2d6653;
}

.confidence-pill.confidence-wave {
  --tooltip-border: #b8d8e7;
  --tooltip-bg: #f1f8fb;
  background: #e7f3f8;
  color: #35677c;
}

.confidence-pill.confidence-weather {
  --tooltip-border: #cbdada;
  --tooltip-bg: #f7fafa;
  background: #eef3f6;
  color: #526a72;
}

.confidence-pill.confidence-unclear {
  --tooltip-border: #e5c16f;
  --tooltip-bg: #fff8ea;
  background: #fff3da;
  color: #866327;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4ecec;
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.metric::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--great);
}

.metric.good::after {
  background: var(--sky);
}

.metric.fair::after {
  background: var(--sun);
}

.metric.poor::after {
  background: var(--bad);
}

.metric strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.34rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.beach-flags {
  min-width: 0;
}

.flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flag-chip {
  --flag-color: var(--great);
  --flag-bg: #e8f4ef;
  --flag-text: #2d6653;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--flag-color), white 62%);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--flag-bg);
  color: var(--flag-text);
}

.flag-chip span:last-child {
  min-width: 0;
}

.flag-chip strong,
.flag-chip small {
  display: block;
}

.flag-chip strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.flag-chip small {
  margin-top: 2px;
  color: color-mix(in srgb, var(--flag-text), var(--muted) 42%);
  font-size: 0.72rem;
  line-height: 1.25;
}

.flag-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
  border-left: 2px solid currentColor;
}

.flag-icon::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 15px;
  height: 11px;
  border-radius: 2px 3px 3px 2px;
  background: var(--flag-color);
  clip-path: polygon(0 0, 100% 14%, 82% 50%, 100% 86%, 0 100%);
}

.flag-green {
  --flag-color: var(--great);
  --flag-bg: #e8f4ef;
  --flag-text: #2d6653;
}

.flag-yellow {
  --flag-color: var(--sun);
  --flag-bg: #fff3da;
  --flag-text: #866327;
}

.flag-red {
  --flag-color: var(--bad);
  --flag-bg: #fae8e4;
  --flag-text: #984d3d;
}

.flag-purple {
  --flag-color: #8a5fbf;
  --flag-bg: #f0e9fb;
  --flag-text: #5b3f83;
}

.time-window {
  flex: 1;
  margin-top: 14px;
  border: 1px solid #e4ecec;
  border-radius: 8px;
  min-height: 220px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(217, 236, 241, 0.72) 0%, rgba(246, 241, 230, 0.76) 72%),
    white;
}

.time-window-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.time-window h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.time-reasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.time-reasons span {
  min-width: 0;
  border: 1px solid #dce8e9;
  border-radius: 8px;
  padding: 9px 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.time-reasons strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 0.94rem;
}

.hour-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  gap: clamp(3px, 0.65vw, 7px);
  overflow: visible;
  min-height: 52px;
  padding-top: 5px;
}

.hour-slot {
  display: grid;
  grid-template-rows: 18px auto;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.hour-dot {
  align-self: center;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #cbdada;
}

.hour-slot.active .hour-dot {
  width: 14px;
  box-shadow: 0 0 0 4px rgba(47, 127, 143, 0.16);
}

.hour-slot.great .hour-dot {
  background: var(--great);
}

.hour-slot.good .hour-dot {
  background: var(--sky);
}

.hour-slot.fair .hour-dot {
  background: var(--sun);
}

.hour-slot.poor .hour-dot {
  background: var(--bad);
}

.hour-label {
  width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: clamp(0.54rem, 0.72vw, 0.68rem);
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.hour-slot.active .hour-label {
  color: var(--ink);
}

.time-window-empty {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.time-window-empty strong {
  color: var(--ink);
}

.tide-chart {
  grid-column: 1 / -1;
  border: 1px solid #e4ecec;
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(24, 50, 58, 0.08);
}

.tide-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tide-chart h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.tide-summary {
  flex: 0 0 auto;
  max-width: 48%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
  text-align: right;
}

.tide-chart-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.28fr);
  gap: 18px;
  align-items: stretch;
}

.tide-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tide-fill {
  fill: rgba(116, 174, 202, 0.17);
}

.tide-grid {
  stroke: #dce8e9;
  stroke-width: 1;
}

.tide-axis {
  stroke: #cbdada;
  stroke-width: 1;
}

.tide-line {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tide-dot {
  fill: white;
  stroke: var(--aqua);
  stroke-width: 2;
}

.tide-dot-low {
  stroke: var(--sun);
}

.tide-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.tide-events {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
}

.tide-event-group {
  border: 1px solid #dce8e9;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.66);
}

.tide-event-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tide-event-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tide-event {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tide-event strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.tide-event small {
  color: var(--muted);
  font-size: 0.76rem;
}

.tide-event-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.tide-chart-empty {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.tide-chart-empty strong {
  color: var(--ink);
}

.breakdown-list {
  display: grid;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.95fr) minmax(110px, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.breakdown-title {
  min-width: 0;
}

.breakdown-title strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.breakdown-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ecec;
}

.bar span {
  display: block;
  width: calc(var(--value) * 1%);
  height: 100%;
  border-radius: inherit;
  background: var(--aqua);
}

.breakdown-row.great .bar span {
  background: var(--great);
}

.breakdown-row.good .bar span {
  background: var(--sky);
}

.breakdown-row.fair .bar span {
  background: var(--sun);
}

.breakdown-row.poor .bar span {
  background: var(--bad);
}

.breakdown-score {
  text-align: right;
  font-weight: 820;
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--great);
}

.legend-dot.good {
  background: var(--sky);
}

.legend-dot.fair {
  background: var(--sun);
}

.legend-dot.poor {
  background: var(--bad);
}

.day-list {
  display: grid;
  grid-template-columns: repeat(10, 132px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-card {
  position: relative;
  display: grid;
  width: 132px;
  min-width: 132px;
  min-height: 164px;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  gap: 6px;
  border: 1px solid #dce8e9;
  border-radius: 8px;
  padding: 13px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.day-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: var(--great);
}

.day-card.good::after {
  background: var(--sky);
}

.day-card.fair::after {
  background: var(--sun);
}

.day-card.poor::after {
  background: var(--bad);
}

.day-card:hover,
.day-card:focus-visible,
.day-card.active {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(47, 159, 154, 0.16);
  outline: none;
}

.day-name {
  font-weight: 820;
  white-space: nowrap;
}

.mini-conditions {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.mini-conditions span {
  overflow-wrap: anywhere;
}

.mini-score {
  --ring: calc(var(--score) * 1%);
  --rating-color: var(--aqua);
  display: grid;
  place-items: center;
  align-self: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 56%, transparent 57%),
    conic-gradient(var(--rating-color) var(--ring), #e5eff0 0);
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 860;
  box-shadow: 0 4px 12px rgba(24, 50, 58, 0.1);
}

.footnote {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.footnote.warning-note {
  border: 1px solid #f3d7a3;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff8ea;
  color: #75572a;
}

.section-divider {
  width: 100%;
  height: 10px;
  margin: 20px 2px 0;
  border: 0;
  background:
    radial-gradient(15px 9px at 15px 10px, rgba(49, 127, 143, 0.32) 46%, transparent 50%) 0 0 / 30px 10px
    repeat-x;
}

.site-summary {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.site-summary h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.98rem;
}

.site-summary p {
  margin: 0;
}

.site-footer {
  display: grid;
  gap: 8px;
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.site-footer p {
  margin: 0;
}

.footer-divider {
  width: 100%;
  height: 1px;
  margin: 4px 0;
  border: 0;
  background: rgba(190, 211, 214, 0.72);
}

.site-footer a,
.privacy-link {
  color: var(--ink);
  font-weight: 760;
}

.privacy-link {
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.privacy-dialog {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.privacy-dialog::backdrop {
  background: rgba(13, 39, 45, 0.48);
}

.privacy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.privacy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2f2;
}

.privacy-heading h2 {
  margin: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  background: #eef7f6;
}

.privacy-body {
  display: grid;
  gap: 12px;
  padding: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.privacy-body p {
  margin: 0;
}

.loading,
.error-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  color: var(--muted);
}

.error-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--bad);
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    position: relative;
    min-height: 420px;
  }

  .hero-content {
    min-height: 420px;
  }

  h1 {
    max-width: 16ch;
    font-size: clamp(2.7rem, 12vw, 5rem);
  }
}

@media (max-width: 760px) {
  .dashboard {
    padding: 16px;
  }

  .topbar,
  .today-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .selected-day-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .selected-score-summary {
    justify-content: flex-start;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .location-search-row {
    gap: 10px;
  }

  .ghost-button.location-button {
    width: 100%;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .time-reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-window {
    min-height: 0;
  }

  .tide-chart-body {
    grid-template-columns: 1fr;
  }

  .tide-chart-header {
    flex-direction: column;
  }

  .tide-summary {
    max-width: none;
    text-align: left;
  }

  .breakdown-row {
    grid-template-columns: 1fr 1fr 42px;
  }

  .hero-content {
    padding: 28px;
  }

  .score-lockup {
    align-self: center;
  }

  .score-ring {
    width: 122px;
  }
}
