/* NautPlot "Tides & weather" cards (js/plot-tides.js). Colours come from the page tokens (css/app.css: --surface, --text,
   --muted, --border, --accent, --bg, --warn-*, --err-*), so light / dark follow the page. Phone first; 44 px targets. */
.mt-stack { display: grid; gap: 12px; }
@media (min-width: 900px) { .mt-stack.mt-wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; } }
.mt-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.mt-head { margin-bottom: 6px; }
.mt-h { margin: 0; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.mt-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.86rem; }
.mt-foot { margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.mt-foot a { color: var(--accent); display: inline-flex; align-items: center; min-height: 44px; }
.mt-err { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--err-bg); color: var(--err-text); font-size: 0.9rem; }
.mt-stale { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-text); font-size: 0.88rem; }
.mt-card .offline-note { margin: 6px 0; }
.mt-loading .mt-sub { min-height: 1.4em; }
.mt-now-line { margin: 4px 0 8px; font-size: 0.98rem; }
.mt-now-line strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* tabs (panels): one card at a time */
.mt-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.mt-tabs button { flex: 1; min-height: 44px; padding: 0 10px; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer; white-space: nowrap; }
.mt-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.mt-tabs button.mt-tab-red:not([aria-selected="true"]) { border-color: #e5322d; color: #b3261e; }
.mt-tabs button.mt-tab-amber:not([aria-selected="true"]) { border-color: #e0a100; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-tabs button.mt-tab-red:not([aria-selected="true"]) { color: #ffb4ab; } }
.mt-point { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.mt-point button { min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--border); font: inherit;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.mt-point button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.mt-point button:disabled { opacity: 0.5; cursor: default; }
.mt-point small { flex-basis: 100%; color: var(--muted); }

/* next high / low tiles */
.mt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mt-tile { display: grid; gap: 1px; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.mt-tile small { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mt-tile strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.mt-tile span { font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* tide curve */
.mt-svg { display: block; width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; }
.mt-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.mt-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.mt-grid { stroke: var(--border); stroke-width: 1; }
.mt-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.mt-tick, .mt-dl { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mt-dl { fill: var(--text); font-weight: 600; }
.mt-dot { stroke: var(--surface); stroke-width: 1.5; }
.mt-hi { fill: var(--accent); }
.mt-lo { fill: var(--muted); }
.mt-now { stroke: #e5322d; stroke-width: 1.6; stroke-dasharray: 4 3; }
.mt-nowdot { fill: #e5322d; stroke: var(--surface); stroke-width: 2; }

/* lists */
.mt-list { list-style: none; margin: 6px 0 0; padding: 0; }
.mt-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; min-height: 36px; padding: 2px 0;
  border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.mt-list li:first-child { border-top: 0; }
.mt-list li > span:last-child { text-align: right; min-width: 4.5em; }
.mt-list li.past { color: var(--muted); }
.mt-list small { color: var(--muted); }
.mt-next li { grid-template-columns: 6.5em 1fr auto; }
.mt-more { margin-top: 6px; }
.mt-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.92rem; }

/* forecast */
.mt-ww { display: grid; gap: 6px; margin: 6px 0; }
.mt-ww p { margin: 0; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-size: 0.95rem; }
.mt-ww small { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mt-periods { margin: 6px 0 0; }
.mt-periods dt { font-weight: 700; font-size: 0.86rem; margin-top: 8px; }
.mt-periods dd { margin: 2px 0 0; font-size: 0.93rem; line-height: 1.45; }
.mt-loc h4, .mt-more h4 { margin: 10px 0 0; font-size: 0.9rem; }
.mt-headline { margin: 6px 0; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; }

/* alerts: red = warnings, amber = advisories / watches / caution, info = statements. The words are always the official ones. */
.mt-alert { margin: 6px 0; border-radius: 10px; border: 1px solid; }
.mt-alert > summary { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 6px 10px; cursor: pointer; }
.mt-alert > :not(summary) { margin: 0 10px 8px; }
.mt-alert pre { white-space: pre-wrap; font: inherit; font-size: 0.88rem; }
.mt-alert.red, .mt-headline.red { background: #fdecea; color: #8a1c14; border-color: #e5322d; }
.mt-alert.amber, .mt-headline.amber { background: #fff4d6; color: #6b4b00; border-color: #e0a100; }
.mt-alert.info, .mt-headline.info { background: var(--bg); color: var(--text); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mt-alert.red, :root:not([data-theme="light"]) .mt-headline.red { background: #3a1714; color: #ffb4ab; border-color: #ff6b6f; }
  :root:not([data-theme="light"]) .mt-alert.amber, :root:not([data-theme="light"]) .mt-headline.amber { background: #362a0b; color: #f2d48a; border-color: #f5a524; }
}
:root[data-theme="dark"] .mt-alert.red, :root[data-theme="dark"] .mt-headline.red { background: #3a1714; color: #ffb4ab; border-color: #ff6b6f; }
:root[data-theme="dark"] .mt-alert.amber, :root[data-theme="dark"] .mt-headline.amber { background: #362a0b; color: #f2d48a; border-color: #f5a524; }

/* in /plot/'s panel: a little taller on phones (one card at a time behind the tabs) */
