:root {
  --ink: #262626;
  --muted: #62666a;
  --line: #e9e9e9;
  --accent: #087da8;
  color: var(--ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: clip; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main { min-height: 0; padding: 0; }

/* Only the home page draws the grid: vertical rules through the header, page and footer,
   with a joint where they cross the line under the header. */
.site-header-frame, .home-frame, .foot { border-inline: 1px solid var(--line); }
.site-header-frame::before, .site-header-frame::after {
  content: '';
  position: absolute;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: var(--line);
  mask: radial-gradient(circle at 0 0, transparent 4.5px, black 5px) top left,
        radial-gradient(circle at 100% 0, transparent 4.5px, black 5px) top right,
        radial-gradient(circle at 0 100%, transparent 4.5px, black 5px) bottom left,
        radial-gradient(circle at 100% 100%, transparent 4.5px, black 5px) bottom right;
  mask-size: 50% 50%;
  mask-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}
.site-header-frame::before { left: -5.5px; }
.site-header-frame::after { right: -5.5px; }
.home-frame { width: var(--frame); margin-inline: auto; background: white; }
.landing-hero {
  --ruler-inset: 3.2%;
  --long-tick: 27px;
  --short-tick: 10px;
  position: relative;
  isolation: isolate;
  padding-top: clamp(8.8125rem, 9.09vw + 3.085rem, 9.625rem);
  text-align: center;
}
.landing-hero::before, .landing-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 13% 10%;
  width: var(--long-tick);
  pointer-events: none;
  background:
    linear-gradient(#a9ccd9, #a9ccd9) left / 1px 100% no-repeat,
    repeating-linear-gradient(#70aac0 0 1.4px, transparent 1.4px 45px),
    repeating-linear-gradient(#a8c5d0 0 1px, transparent 1px 9px) left / var(--short-tick) 100% no-repeat;
  mask-image: linear-gradient(transparent, black 12% 88%, transparent);
}
.landing-hero::before { left: var(--ruler-inset); }
.landing-hero::after { right: var(--ruler-inset); transform: scaleX(-1); }
.hero-copy { margin: 0 auto; padding-inline: 1rem; }
.hero-badge {
  display: block;
  width: fit-content;
  margin: 0 auto 1rem;
  padding: .25rem .75rem;
  border: 1px solid #c1e4f0;
  border-radius: 999px;
  background: #edf8fc;
  color: #126b88;
  font-size: .6875rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .08em;
}
.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.65rem, 4.3vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.077;
}
.headline-line { display: block; text-wrap: balance; }
.headline-line em { color: var(--accent); font-style: normal; white-space: nowrap; }
.hero-description { margin: 2rem auto 0; font-size: 1rem; line-height: 1.5; text-wrap: balance; }
.hero-actions { display: flex; justify-content: center; margin-top: 1.5rem; }
.connect-trigger, .send-query {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: .625rem;
  font-weight: 500;
  font-size: .875rem;
  text-decoration: none;
}
.send-query {
  flex: none;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  color: #fff;
  background: var(--accent);
  box-shadow: inset 0 1px 0 #ffffff38, inset 0 -2px 2px #00415c26, 0 2px 3px #153b4d14;
}
.send-query:hover { background: #086b90; }
.send-query:disabled, .station-search input:invalid + .send-query {
  background: #e7ebed;
  color: #69747a;
  box-shadow: none;
  pointer-events: none;
}
.connect { display: inline-flex; flex-direction: column; align-items: center; }
.connect-trigger { gap: .55rem; min-height: 2.5rem; padding: .35rem .75rem; background: #eee; color: var(--ink); }
.connect-trigger:hover, .connect:has(:popover-open) .connect-trigger { background: #e6e6e6; }
#connect-logos { display: inline-flex; align-items: center; isolation: isolate; }
#connect-logos img { display: block; flex: none; width: 1.5rem; height: 1.5rem; border: 1px solid #fff; border-radius: 50%; background: #fff; object-fit: contain; }
#connect-logos .chatgpt-logo { color-scheme: dark; background: #000; }
#connect-logos img + img { margin-inline-start: -.2rem; }
#connect-logos img:nth-child(1) { z-index: 3; }
#connect-logos img:nth-child(2) { z-index: 2; }
#connect-logos img:nth-child(3) { z-index: 1; }
.connect-trigger > .icon { width: .9rem; height: .9rem; color: #656565; }
.connect:has(:popover-open) .connect-trigger > .icon { transform: rotate(180deg); }
#connect-options, #agent-instructions {
  position: absolute;
  inset: auto;
  max-height: 50vh;
  overflow: auto;
  margin: 2.8rem 0 0;
  padding: .3rem;
  list-style: none;
  border: 1px solid #dedede;
  border-radius: .8rem;
  background: #fff;
  box-shadow: 0 8px 24px #17171716;
}
@supports (position-area: bottom) {
  #connect-options, #agent-instructions { position: fixed; position-area: bottom; justify-self: anchor-center; margin: .3rem 0; position-try-fallbacks: flip-block; }
}
#connect-options { width: anchor-size(width); }
@supports not (width: anchor-size(width)) {
  .connect .connect-trigger, #connect-options { width: min(18rem, calc(100vw - 3.5rem)); }
  #connect-options { inset-inline: 0; margin-inline: auto; }
}
#agent-setup { display: flex; align-items: center; width: 100%; min-height: 2.5rem; padding: .45rem .6rem; border: 0; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 500; }
#agent-setup span:not([hidden]) { display: inline-flex; align-items: center; gap: .6rem; }
#agent-setup:is(:hover, :focus-visible) { background: #edf8fc; }
#agent-instructions { width: min(23rem, calc(100vw - 2rem)); padding: .875rem; text-align: start; }
#agent-instructions p { margin: 0 0 .5rem; font-size: .875rem; }
#agent-prompt { display: block; width: 100%; padding: .55rem; border: 1px solid var(--line); border-radius: .4rem; background: #f8fafb; color: var(--ink); font: .8125rem/1.5 monospace; resize: vertical; }

.station-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: .625rem;
  width: min(34.5rem, calc(100% - 1.875rem));
  margin: 1.5rem auto 0;
  padding: .375rem .375rem .375rem 1rem;
  border: 1px solid #e4e4e4;
  border-radius: 1rem;
  background: white;
  box-shadow: 0 16px 32px -16px #2223, 0 2px 7px #20202006;
}
.station-search:has(input:focus) { border-color: var(--muted); }
.station-search > svg { width: 1.1rem; height: 1.1rem; flex: none; color: #8e9497; }
.station-search input { height: 2.75rem; padding: .4rem 0; border: 0; border-radius: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.station-search input:focus { outline: none; }
@media (forced-colors: active) {
  .station-search:has(input:focus) { border-color: Highlight; }
}
.station-search input::placeholder { color: #71767a; opacity: 1; }
.station-search input:placeholder-shown { text-overflow: ellipsis; }
.send-query:focus-visible { outline-color: var(--ink); }
.landing-hero:focus-within { z-index: 1; }
.station-search:focus-within { z-index: 3; }
.station-dropdown {
  position: absolute;
  inset: calc(100% + .375rem) -1px auto;
  max-height: min(19rem, var(--dropdown-space, 40dvh));
  overflow: auto;
  margin: 0;
  padding: .375rem;
  border: 1px solid #d8e0e3;
  border-radius: .875rem;
  background: white;
  box-shadow: 0 12px 28px #1c36441a;
  text-align: start;
}
.station-dropdown[data-above] { inset-block: auto calc(100% + .375rem); }
.station-dropdown [role="option"] {
  display: grid;
  gap: .125rem;
  padding: .55rem .75rem;
  border-radius: .5rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.station-dropdown [role="option"]:hover, .station-dropdown [aria-selected="true"] { background: #edf7fa; }
.station-dropdown [aria-selected="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.station-dropdown strong { font-size: 1rem; }
.station-dropdown span, #station-search-status.station-dropdown { color: var(--muted); font-size: .8125rem; }
#station-search-status.station-dropdown { padding: .875rem 1.125rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 47.99rem) {
  .landing-hero {
    --ruler-inset: 1%;
    --long-tick: 12px;
    --short-tick: 6px;
    padding: 1.75rem 0 1rem;
  }
  .hero-copy { padding-inline: .9rem; }
  .hero-copy h1 { font-size: clamp(1.9rem, 9.25vw, 2.25rem); line-height: 1.11; }
  .hero-description { margin-top: .75rem; font-size: 1.125rem; line-height: 1.445; }
  .hero-actions { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
  .connect { width: min(20rem, calc(100% - 2rem)); }
  .connect-trigger { width: 100%; gap: .375rem; padding-inline: .5rem; }
}
