.tide-home {
  --ht-canvas: #05090e;
  --ht-surface: #0a131a;
  --ht-elevated: #122029;
  --ht-divider: #213039;
  --ht-boundary: #43545e;
  --ht-text: #f3f8fa;
  --ht-text-2: #afbfca;
  --ht-muted: #93a6b4;
  --ht-accent: var(--accent-primary, #50e3c2);
  --ht-accent-hover: color-mix(in srgb, var(--ht-accent), white 24%);
  --ht-accent-tint: color-mix(in srgb, var(--ht-accent) 11%, var(--ht-surface));
  --ht-accent-border: color-mix(in srgb, var(--ht-accent) 35%, var(--ht-canvas));
  --ht-on-accent: #02120f;
  --ht-r-control: 8px;
  --ht-r-panel: 14px;
}

.tide-home .ht-wrap { max-width: 1264px; }

.tide-skip {
  position: absolute;
  z-index: 40;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ht-surface);
  transform: translateY(calc(-100% - 12px));
}

.tide-skip:focus { transform: none; }

.tide-header {
  position: absolute;
  z-index: 10;
  top: 18px;
  left: 50%;
  width: min(calc(100% - 64px), 1200px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 10px 6px 18px;
  border: 1px solid var(--ht-divider);
  border-radius: 14px;
  background: #080e15f5;
}

.tide-header .ht-header { position: static; flex: 1; min-width: 0; background: transparent; border: 0; }
.tide-header .ht-header__bar { min-height: 44px; gap: 12px; padding: 0; }
.tide-header .ht-header__launch { display: none; }
.tide-header .ht-brand { min-height: 44px; }
.tide-home .ht-brand path { stroke: var(--ht-accent); }
.tide-header .ht-brand__name { font-size: 18px; letter-spacing: -.04em; }
.tide-header .ht-menu__panel { top: calc(100% + 6px); border: 1px solid var(--ht-divider); border-radius: 12px; }
.tide-header .ht-menu__panel .tide-menu-wallet { color: var(--ht-accent); font-weight: 600; }
.tide-header .ht-nav { justify-content: center; gap: clamp(16px, 2vw, 28px); }
.tide-header .tide-wallet { flex: none; min-height: 44px; padding-inline: 14px; font-size: 13px; white-space: nowrap; }

.tide-home .ht-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: start center;
  isolation: isolate;
  overflow: clip;
  min-height: clamp(720px, 91svh, 960px);
  padding: clamp(145px, 22svh, 235px) 24px 190px;
  background: var(--ht-canvas);
}

.tide-home .ht-hero::before { content: none; }

#waveCanvas,
.tide-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#waveCanvas { z-index: -2; display: block; }

.tide-hero__shade {
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 28%, #05090eeb 0%, #05090ebf 26%, #05090e00 59%),
    linear-gradient(to bottom, #05090e 0%, #05090e00 25%, #05090e00 84%, #05090e 100%);
}

.tide-hero__inner { width: min(100%, 1080px); text-align: center; }

.tide-status {
  --signal: var(--ht-muted);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 9px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--signal) 25%, var(--ht-divider));
  background: #091319;
  color: var(--ht-text-2);
  font: 400 11px/1.5 var(--ht-mono);
  text-decoration: none;
}

.tide-status:hover { background: var(--ht-elevated); color: var(--ht-text); }
.tide-status[data-tone="good"] { --signal: #50e3c2; }
.tide-status[data-tone="warn"] { --signal: var(--ht-warning); }
.tide-status[data-tone="bad"] { --signal: var(--ht-negative); }
.tide-status__signal { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.tide-status__reading { color: var(--signal); }
.tide-status time { color: var(--ht-muted); font-variant-numeric: tabular-nums; }

.tide-home .ht-h1 {
  margin: 22px 0 18px;
  font-size: clamp(44px, 7vw, 102px);
  line-height: .99;
  letter-spacing: -.074em;
  text-wrap: balance;
}

.tide-home .ht-h1 .ink {
  color: var(--ht-accent);
}

.tide-hero__inner .ht-lead { margin-inline: auto; max-width: 52ch; text-wrap: pretty; }
.tide-home .ht-actions { justify-content: center; gap: 10px; margin: 25px 0 4px; }
.tide-home .ht-actions .ht-btn { font-size: 14px; min-height: 50px; }
.tide-home .ht-actions .ht-btn--primary { box-shadow: 0 0 32px color-mix(in srgb, var(--glow-color, #50e3c2) 19%, transparent); }
.tide-home .ht-actions .ht-btn--secondary { background: #0b131b; }
.tide-home .ht-actions .ht-btn--secondary:hover { background: var(--ht-elevated); }
.tide-hero__research { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; margin-top: 2px; }
.tide-hero__research :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; color: var(--ht-text); font-size: 13px; text-underline-offset: 4px; }
.tide-hero__research :is(a, button):hover { color: var(--ht-accent); }
.tide-hero__research button:disabled { display: none; }
.tide-hero__inner .ht-caption { margin: 0; color: var(--ht-text-2); text-shadow: 0 1px 12px #000, 0 1px 4px #000; }

.tide-wave-control,
.tide-scroll {
  position: absolute;
  bottom: 24px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #05090ecc;
  color: var(--ht-text-2);
  font: 400 11px/1.3 var(--ht-mono);
  text-decoration: none;
}

.tide-wave-control { right: max(16px, calc((100% - 1200px) / 2)); border-color: var(--ht-divider); cursor: pointer; }
.tide-wave-control[hidden] { display: none; }
.tide-scroll { left: 50%; transform: translateX(-50%); white-space: nowrap; }
.tide-scroll span { color: var(--ht-accent); }
.tide-scroll:hover, .tide-wave-control:hover { color: var(--ht-text); border-color: var(--ht-boundary); }

.tide-home .ht-section { padding-block: clamp(54px, 7vw, 104px); }
.tide-home .ht-section[hidden] { display: none; }
.tide-home .ht-h2 { font-size: clamp(31px, 4.2vw, 57px); line-height: 1.04; letter-spacing: -.056em; }
.tide-home .ht-section .ht-lead { line-height: 1.62; }
.tide-home .ht-section .ht-head { max-width: 66ch; margin-bottom: 24px; }
.tide-home .ht-section :is(.ht-cols, .ht-ways) a:not(.ht-btn) {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  font-size: 14px;
  text-underline-offset: 4px;
}

.tide-research {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 6vw, 96px);
}

.tide-home .tide-research__steps { grid-template-columns: 1fr; }
.tide-home .tide-research__steps > li { border-bottom: 1px solid var(--ht-divider); padding: 16px 0 7px; }
.tide-home .tide-research__steps h3,
.tide-home .ht-ways h3 { font-size: 19px; letter-spacing: -.02em; }
.tide-fills-title { margin: 0 0 14px; font-size: 19px; font-weight: 600; letter-spacing: -.026em; }
.tide-home .ht-tape-column { align-self: start; }
.tide-home .ht-tape {
  max-width: none;
  padding: clamp(14px, 2.3vw, 26px);
  border-color: var(--ht-accent-border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--ht-accent) 6%, var(--ht-surface)), var(--ht-surface) 62%);
  gap: 13px;
}
.tide-home .ht-tape__head { align-items: center; }
.tide-home .ht-tape__who { min-height: 44px; align-content: center; }
.tide-home .ht-tape__cap { text-wrap: pretty; }
.tide-home .ht-tape__pause { min-height: 44px; cursor: pointer; }
.tide-home .ht-tape__copy { flex-wrap: wrap; gap: 2px 7px; }
.tide-home .ht-tape__rows { min-height: 0; }
.tide-home .ht-tape__row { overflow-wrap: anywhere; }
.tide-home .ht-race-feature { margin-top: 10px; min-height: 65px; }
.tide-home .ht-honesty { background: #080f15; padding-block: clamp(42px, 5vw, 68px); }
.tide-home #security { background: #080f15; }
.tide-home #security .ht-ledger { border-color: var(--ht-accent-border); }
.tide-home #security .ht-ledger__col { padding: clamp(16px, 2.3vw, 26px); }
.tide-home #security .ht-ledger__caption { padding-inline: clamp(16px, 2.3vw, 26px); }
.tide-home .ht-footer { background: #030609; }

@media (max-width: 1059px) {
  .tide-header { width: calc(100% - 32px); }
  .tide-header .ht-header__bar { gap: 4px; }
  .tide-header .ht-brand { flex: 1; }
  .tide-header .ht-nav { display: none; }
  .tide-header .ht-menu { display: block; }
}

@media (max-width: 899px) {
  .tide-research { grid-template-columns: minmax(0, 1fr); }
  .tide-desktop-break { display: none; }
}

@media (max-width: 599px) {
  .tide-header { top: 12px; width: calc(100% - 24px); gap: 4px; padding: 4px 6px 4px 9px; }
  .tide-header .ht-brand { gap: 4px; }
  .tide-header .ht-brand svg { width: 22px; height: 22px; }
  .tide-header .ht-brand__name { font-size: 16px; }
  .tide-header .tide-wallet { padding-inline: 10px; }
  .tide-home .ht-hero { min-height: clamp(650px, 88svh, 755px); padding: clamp(127px, 18svh, 165px) 15px 162px; }
  .tide-home .ht-h1 { font-size: clamp(37px, 10vw, 60px); line-height: 1.04; letter-spacing: -.064em; margin: 22px 0 16px; }
  .tide-hero__inner .ht-lead { max-width: 35ch; }
  .tide-home .ht-actions .ht-btn { padding-inline: 12px; font-size: 13px; }
  .tide-hero__research { gap: 0 12px; margin-top: 8px; }
  .tide-hero__research :is(a, button) { font-size: 12px; }
  .tide-scroll { left: 12px; transform: none; }
  .tide-home .ht-h2 { max-width: 20ch; }
}

@media (max-width: 359px) {
  .tide-header { width: calc(100% - 16px); }
  .tide-header .ht-brand__name { font-size: 14px; }
  .tide-header .ht-brand svg { width: 20px; }
  .tide-home .ht-hero { padding-inline: 12px; }
  .tide-home .ht-actions .ht-btn { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .tide-wave-control { display: none; }
}
