/* Untethered Media dashboard style, shared by every client. Navy headlines and bands,
   green as the one accent, mint for highlights, slate body copy on a cool off-white page.
   Hanken Grotesk for headlines, Inter for everything else, and every number.
   Variable names are kept from the original build so the rest of this file stays untouched:
   --sand is the page colour, --navy the ink, --royal the accent, --ink the dark band. */
:root {
  color-scheme: light;
  --sand: #f2f7f8;
  --navy: #173041;
  --royal: #0e7c63;
  --slate: #44596a;
  --ink: #11263a;
  --mint: #3ad4a7;
  --deep: #1d4560;
  --card-bg: #ffffff;

  --bg: var(--sand);
  --surface: var(--card-bg);
  --rule: #d5e0e6;
  --rule-strong: #c3d3dc;
  --grid: rgba(23, 48, 65, 0.10);
  --wash: rgba(23, 48, 65, 0.045);
  --ink-3: rgba(68, 89, 106, 0.85);
  --accent: var(--royal);
  --accent-wash: #e6f4ee;
  --compare: rgba(68, 89, 106, 0.6);
  --good: var(--royal);
  --bad: #a3402b;
  --focus: var(--royal);
  --radius: 10px;
  --serif: 'Hanken Grotesk', Inter, system-ui, sans-serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--slate); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); margin: 0; }
p { text-wrap: pretty; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
#download-pdf { margin-left: auto; }

/* Download PDF: the browser's print-to-PDF, laid out as a static report of the dates on screen. */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar-actions, #ads-link, .filters .field, .custom-range, #download-pdf, .detail-link, .table-view > summary, .tooltip, #login { display: none !important; }
  .filters { position: static; border: 0; padding: 0; margin-bottom: 14px; }
  .range-label { font-size: 13px; }
  .card, .tile, tr, .section-head, .explain-stat { break-inside: avoid; }
  .section-head { break-after: avoid; }
  .table-wrap { overflow: visible !important; }
  table.data { font-size: 10px; }
  .wrap, .band-inner { max-width: none; padding-left: 0; padding-right: 0; }
}
.muted { color: var(--ink-3); }
.kicker { font: 500 11px/1.4 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--royal); }

/* Brand header: primary lockup on sand, navy hairline below */
.band { background: var(--sand); color: var(--slate); border-bottom: 1px solid var(--rule-strong); }
.band-inner { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.logo { height: 60px; width: auto; display: block; }
.wordmark { font: 400 30px/1 var(--serif); color: var(--navy); letter-spacing: 0.02em; }
.band .freshness { color: var(--slate); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--royal); animation: pulse 2.6s ease-out infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(2, 37, 132, 0.35); } 70% { box-shadow: 0 0 0 8px rgba(2, 37, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(2, 37, 132, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } * { transition: none !important; } }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--sand); }
.login-wrap { width: 100%; max-width: 400px; display: grid; gap: 28px; justify-items: center; }
.login-wrap .logo { height: 76px; }
.login-wrap .wordmark { font-size: 40px; }
.login-card { width: 100%; background: var(--sand); border: 1px solid var(--rule-strong); border-top: 2px solid var(--navy); border-radius: var(--radius); padding: 32px 28px; }
.login-card h1 { font-size: 32px; line-height: 1.15; margin-top: 8px; }
.login-card p { margin: 8px 0 22px; }
.login-card label { display: block; font-size: 13px; margin-bottom: 6px; }
.login-card input { width: 100%; padding: 11px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sand); color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius); border: 1px solid transparent; background: var(--navy); color: var(--sand); cursor: pointer; font: 500 12px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.btn:hover { background: var(--royal); }
.btn-block { width: 100%; margin-top: 16px; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--wash); }
.form-error { color: var(--royal); font-size: 14px; min-height: 20px; margin-top: 10px; }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 24px 0; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 42px; line-height: 1.1; margin-top: 6px; }
.freshness { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.topbar-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink-3); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* Filter row */
.filters { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--rule); margin-bottom: 26px; }
.field { display: flex; align-items: center; gap: 8px; }
.field label { font: 500 11px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.select, .date-input { appearance: none; background: var(--sand); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 8px 12px; min-height: 40px; color: var(--navy); }
.select { padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.custom-range { display: flex; align-items: center; gap: 6px; }
.range-label { font-size: 13px; color: var(--ink-3); margin-left: auto; }

/* Sections and cards */
.section { margin-top: 44px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.section-head h2 { font-size: 30px; line-height: 1.15; margin-top: 4px; }
.section-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.card-pad { padding: 20px 22px; }

/* Stat tiles: one ruled grid, editorial */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule); }
.tiles .tile { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tile { padding: 18px 20px; min-height: 126px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font: 500 11px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.tile-value { font: 400 32px/1.15 var(--sans); letter-spacing: -0.01em; color: var(--navy); margin-top: 2px; }
.tile-delta { font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--ink-3); flex-wrap: wrap; }
.delta-good { color: var(--good); font-weight: 500; }
.delta-bad { color: var(--bad); font-weight: 500; }
.delta-flat { color: var(--ink-3); }
.tile-note { font-size: 12px; color: var(--ink-3); margin-top: auto; }
.tile-warn { color: var(--royal); }

/* Trend chart */
.chart-card { padding: 18px 20px 12px; }
.chart-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--rule); background: transparent; padding: 7px 13px; cursor: pointer; color: var(--slate); font-size: 13px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--sand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key-line { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis-text { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .crosshair { stroke: var(--rule-strong); stroke-width: 1; }
.tooltip { position: absolute; pointer-events: none; background: var(--sand); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; box-shadow: 0 6px 20px rgba(4, 4, 28, 0.12); min-width: 170px; z-index: 3; }
.tooltip .tt-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.tooltip .tt-val { font-weight: 500; color: var(--navy); font-variant-numeric: tabular-nums; }
.tooltip .tt-lab { color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
details.table-view { margin-top: 8px; font-size: 13px; }
details.table-view summary { cursor: pointer; padding: 6px 0; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { font: 500 11px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); background: var(--surface); }
table.data td { font-variant-numeric: tabular-nums; }
table.data td:first-child { color: var(--navy); }
table.data tbody tr:hover { background: var(--wash); }
table.data tfoot td { font-weight: 500; color: var(--navy); border-bottom: 0; border-top: 1px solid var(--rule-strong); }
.bar-cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.mini-bar { width: 72px; height: 6px; background: var(--wash); border-radius: 3px; overflow: hidden; flex: none; }
.mini-bar i { display: block; height: 100%; background: var(--royal); border-radius: 0 3px 3px 0; }
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); padding: 0 14px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 14px 10px; cursor: pointer; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font: 500 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--royal); }
.empty { padding: 26px 22px; font-size: 14px; }
.empty p { margin: 0 0 6px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.two-col > * { min-width: 0; }
.mini-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini-tiles .tile { min-height: 0; border-right: 1px solid var(--rule); }
.mini-tiles .tile:last-child { border-right: 0; }
.mini-tiles .tile-value { font-size: 24px; }

/* Ink footer band */
.footer-band { background: var(--ink); color: rgba(245, 240, 235, 0.86); margin-top: 60px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 36px 24px 28px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.footer-band h3 { font-size: 24px; color: var(--sand); margin: 6px 0 12px; }
.footer-band .kicker { color: rgba(245, 240, 235, 0.6); }
.footer-band p { font-size: 13px; margin: 0 0 10px; }
.status-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.status-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(245, 240, 235, 0.14); }
.status-list li:last-child { border-bottom: 0; }
.status-list .muted { color: rgba(245, 240, 235, 0.62); }
.ok-icon, .err-icon { color: var(--sand); }
.footer-mark { max-width: 1180px; margin: 0 auto; padding: 14px 24px 30px; font-size: 12px; color: rgba(245, 240, 235, 0.5); border-top: 1px solid rgba(245, 240, 235, 0.1); }
.loading { opacity: 0.55; transition: opacity 0.2s; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .mini-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-tiles .tile:nth-child(2) { border-right: 0; }
  .mini-tiles .tile:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .wrap { padding: 20px 16px 0; }
  .band-inner { padding: 16px; }
  .logo { height: 44px; }
  .page-head h1 { font-size: 34px; }
  .section-head h2 { font-size: 26px; }
  .tile { padding: 14px; min-height: 110px; }
  .tile-value { font-size: 25px; }
  .range-label { margin-left: 0; width: 100%; }
  .filters { gap: 8px; }
  .field { width: 100%; }
  .field .select { flex: 1; }
  .custom-range { width: 100%; }
  .custom-range .date-input { flex: 1; min-width: 0; }
  table.data th, table.data td { padding: 10px; }
  .footer-inner { padding: 28px 16px 24px; }
  .footer-mark { padding: 14px 16px 24px; }
}
@media (max-width: 560px) {
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .seg button { white-space: nowrap; }
}
.small { font-size: 13px; line-height: 1.55; }
#social > p.small { margin: 14px 18px 16px; max-width: 62ch; }


/* ---------- Untethered Media overrides ---------- */
h1, h2, h3 { letter-spacing: -0.01em; }
.kicker { font-weight: 600; letter-spacing: 0.14em; }
.card { background: var(--card-bg); border-color: var(--rule); }
.band { background: var(--navy); color: #fff; border-bottom: 0; position: relative; }
.band::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(520px 260px at 92% 0%, rgba(58, 212, 167, 0.16), transparent 70%); }
.band-inner { position: relative; z-index: 1; }
.band .freshness, .band .link-btn { color: rgba(255, 255, 255, 0.78); }
.band .live-dot { background: var(--mint); }
.lockup { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wordmark { font: 600 22px/1 var(--serif); color: inherit; letter-spacing: -0.01em; }
.lockup-client { font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); }
.lockup-client:not(:empty)::before { content: "× "; color: rgba(255, 255, 255, 0.5); }
.login .lockup { color: var(--navy); justify-content: center; }
.login .lockup-client { color: var(--royal); }
.login .lockup-client:not(:empty)::before { color: var(--ink-3); }
.login-wrap .wordmark { font-size: 30px; }
.login-card { background: var(--card-bg); border-top: 3px solid var(--mint); }
.login-card input { background: #fff; }
.btn { border-radius: 999px; letter-spacing: 0.06em; }
.btn:hover { background: var(--deep); }
.btn-mint { background: var(--mint); color: var(--ink); text-decoration: none; }
.btn-mint:hover { background: #2fc296; color: var(--ink); text-decoration: none; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-weight: 500; }
.hl { background: linear-gradient(transparent 62%, var(--mint) 62%, var(--mint) 90%, transparent 90%); padding: 0 0.04em; }
.section-head a { color: var(--royal); font-weight: 600; }
.select, .date-input { background: #fff; }
.footer-band { background: var(--ink); color: rgba(255, 255, 255, 0.82); }
.footer-band h3 { color: #fff; }
.footer-band .kicker { color: var(--mint); }
.ok-icon { color: var(--mint); }
.err-icon { color: #f4e025; }
.footer-mark { color: rgba(255, 255, 255, 0.5); border-top-color: rgba(255, 255, 255, 0.1); }

/* ---------- direct-bookings layout ---------- */
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tiles-5 .tile-value { font-size: 30px; }
.mini-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mini-tiles .tile-note { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.explain { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px 24px; margin-bottom: 18px; border-left: 3px solid var(--mint); }
.explain-stat .tile-value { font-size: 26px; }
.explain-text { margin: 0; color: var(--slate); font-size: 14px; line-height: 1.55; }
.warn-text { color: var(--bad); font-weight: 600; }
.paid-card { margin-bottom: 18px; overflow: hidden; }
.paid-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 4px; }
.paid-head h3 { margin: 0; font: 600 18px/1.2 var(--serif); color: var(--navy); }
.channel-line { border-top: 1px solid var(--rule); padding: 12px 20px; }
.channel-line p { margin: 0; color: var(--slate); font-size: 14px; }
.channel-line strong { color: var(--navy); }
#ai .mini-tiles { border-bottom: 1px solid var(--rule); }
#ai .muted.small, #ai-answers .muted.small { padding: 10px 20px 14px; margin: 0; }
#ai-answers { margin-top: 16px; }
#ai-answers .mini-tiles { border-bottom: 1px solid var(--rule); }
@media (max-width: 1100px) {
  .tiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-5 .tile { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 900px) {
  .tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explain { grid-template-columns: 1fr 1fr; }
  .explain-text { grid-column: 1 / -1; }
}

.trend-summary { margin: 4px 0 12px; font-size: 15px; color: var(--slate); line-height: 1.5; }
.trend-summary strong { color: var(--navy); font-size: 20px; font-weight: 600; }
.key-dashed { background: repeating-linear-gradient(90deg, var(--compare) 0 5px, transparent 5px 9px) !important; }

.detail-link { color: var(--royal); font-weight: 600; font-size: 14px; text-decoration: none; }
.detail-link:hover { text-decoration: underline; }
.paid-note { margin: 0; padding: 12px 20px 16px; font-size: 13px; color: var(--slate); border-top: 1px solid var(--rule); }
