@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0d222c;
  --surface: #132e39;
  --surface-alt: #193944;
  --text: #eff6f5;
  --muted: #abc1c7;
  --border: #34505a;
  --accent: #80e4d0;
  --accent-ink: #093b37;
  --danger: #ffaaa3;
  --accent-hover: #a1eedf;
  --focus: #90e9d9;
  --error-bg: #412d34;
  --success-bg: #163d3d;
  --topbar: #102731;
  --placeholder: #8da7b0;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f7f7;
  --surface: #ffffff;
  --surface-alt: #e8f1f0;
  --text: #14343c;
  --muted: #526c73;
  --border: #c8d8d9;
  --accent: #087569;
  --accent-ink: #ffffff;
  --danger: #a03736;
  --accent-hover: #075e55;
  --focus: #087569;
  --error-bg: #fae8e7;
  --success-bg: #e1f4ed;
  --topbar: #ffffff;
  --placeholder: #647b82;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
input, textarea { caret-color: var(--accent); }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { color: var(--accent-ink); background: var(--accent); }
* { scrollbar-color: var(--border) var(--bg); }
.skip-link { position: fixed; top: -160px; left: 12px; z-index: 50; padding: 11px 18px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { top: 12px; }
#main:focus { outline: 0; }
.site-bar { background: var(--topbar); border-bottom: 1px solid var(--border); }
.site-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 1240px; padding: 13px clamp(18px, 4vw, 48px); margin: auto; min-height: 75px; }
.brand-lockup, .header-controls, .session-tools { display: flex; align-items: center; }
.brand-lockup { gap: 10px; flex-shrink: 0; }
.brand-medallion { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; background: #fff; border-radius: 50%; overflow: hidden; }
.brand-medallion img { width: 92%; height: 92%; object-fit: contain; border-radius: 50%; }
.brand-name { font-weight: 730; font-size: 1.17rem; letter-spacing: -.034em; }
.brand-product { color: var(--muted); font-size: .98rem; font-weight: 500; padding-left: 11px; border-left: 1px solid var(--border); }
.header-controls { gap: 13px; min-width: 0; }
.header-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 7px 10px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 590; }
.header-tool:hover { color: var(--text); background: var(--surface-alt); }
.header-tool svg { width: 18px; height: 18px; flex-shrink: 0; }
.session-tools { gap: 13px; border-left: 1px solid var(--border); padding-left: 16px; min-width: 0; }
.session-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 23ch; font-size: .87rem; font-weight: 600; }
.header-tool.signout { border-color: var(--border); padding: 7px 12px; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); align-items: stretch; max-width: 1130px; margin: clamp(32px, 7vh, 90px) auto 44px; padding: 0 clamp(20px, 4vw, 48px); gap: clamp(42px, 6.8vw, 104px); }
.tide-chart {
  --seal-size: clamp(148px, 15vw, 208px);
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(460px, 67vh, 650px);
  border-radius: 18px;
  background: linear-gradient(235deg, #246369 0%, transparent 61%),
    linear-gradient(152deg, #154f5b 4%, #0b3548 47%, #083044 70%, #184f5c);
  box-shadow: inset 0 0 0 1px #a8e8db30;
}
:root[data-theme="light"] .tide-chart {
  background: linear-gradient(235deg, #3b8481 0%, transparent 61%),
    linear-gradient(152deg, #206a72 4%, #12495a 47%, #0e4054 70%, #246570);
}
.tide-map { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; color: #a5dcce; }
.tide-bank { fill: none; stroke: currentColor; stroke-width: 1; }
.tide-bank-north { color: #86d3c89c; }
.tide-bank-south { color: #77cfc5a6; }
.tide-trace { stroke: #b5f6de; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 6 94; opacity: .75; }
.tide-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--seal-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 28px #00000020;
}
.tide-seal picture { display: block; width: 88%; }
.tide-seal img { display: block; width: 100%; height: auto; border-radius: 50%; }
.tide-seal::before, .tide-wake {
  position: absolute;
  inset: -9%;
  border: 1px solid #b3eee16e;
  border-radius: 50%;
  pointer-events: none;
}
.tide-seal::before { content: ""; }
.tide-wake { inset: -16%; border-color: #a9e9d92e; }
.tide-wake::after {
  content: "";
  position: absolute;
  top: 14.65%;
  right: 14.65%;
  width: 5px;
  height: 5px;
  transform: translate(50%, -50%);
  border-radius: 50%;
  background: #adebda;
}
@media (prefers-reduced-motion: no-preference) {
  .tide-bank-north { animation: tide-arrive-north 4.6s cubic-bezier(.17, .7, .23, 1) both; }
  .tide-bank-south { animation: tide-arrive-south 4.8s cubic-bezier(.17, .7, .23, 1) both; }
  .tide-trace { animation: tide-follow 4.8s ease-out both; }
  .tide-wake { animation: tide-settle 3.6s cubic-bezier(.16, .67, .24, 1) both; }
  .tide-seal::before {
    transform: rotate(var(--wake-bearing, 0deg)) scale(var(--wake-spread, 1));
    border-top-color: var(--wake-crest, #b3eee16e);
    transition: transform .85s ease-out, border-top-color .55s ease;
  }
  .access-layout:has(.access-field input:focus) { --wake-bearing: -24deg; --wake-spread: 1.045; --wake-crest: #b3eee1db; }
  .access-layout:has(.password-input input:focus) { --wake-bearing: 25deg; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tide-chart:hover { --wake-bearing: -28deg; --wake-spread: 1.055; --wake-crest: #b3eee1db; }
}
@keyframes tide-arrive-north { from { transform: translate(-18px, -14px) scale(1.09); } to { transform: none; } }
@keyframes tide-arrive-south { from { transform: translate(15px, 18px) scale(1.11); } to { transform: none; } }
@keyframes tide-follow { from { stroke-dashoffset: 14; opacity: 0; } }
@keyframes tide-settle { from { transform: scale(.83) rotate(-70deg); opacity: .1; } to { transform: none; opacity: 1; } }
.access-body { align-self: center; min-width: 0; width: 100%; max-width: 390px; margin: 20px 0; }
.access-head { margin-bottom: 28px; }
.access-head h1 { font-size: clamp(2rem, 3.35vw, 2.85rem); line-height: 1.08; font-weight: 640; margin: 0; letter-spacing: -.038em; overflow-wrap: anywhere; text-wrap: balance; }
.access-head p { margin: 12px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.access-form { display: grid; gap: 18px; }
.access-field { display: grid; gap: 7px; }
.access-field label, .password-caption label { font-size: .9rem; font-weight: 650; }
.access-field input { width: 100%; min-height: 48px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; font-size: 1rem; padding: 10px 13px; }
.access-field input::placeholder { color: var(--placeholder); }
.access-field input:hover { border-color: var(--muted); }
.access-field input:focus { border-color: var(--accent); }
.password-caption { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; }
.text-button { padding: 1px 0; border: none; background: transparent; color: var(--accent); font-size: .89rem; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: transparent; }
.text-button:hover { text-decoration-color: currentColor; }
.password-input { position: relative; }
.password-input input { padding-right: 50px; }
.show-password { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--muted); background: transparent; }
.show-password:hover { color: var(--text); background: var(--surface-alt); }
.access-hint { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.access-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 20px; min-height: 46px; background: var(--accent); border-radius: 8px; border: none; color: var(--accent-ink); font-size: .96rem; font-weight: 720; transition: background .16s; }
.access-submit:hover { background: var(--accent-hover); }
.access-submit[aria-busy="true"]::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: loading-turn .8s linear infinite; }
.form-feedback { padding: 11px 13px; border-radius: 8px; font-size: .89rem; line-height: 1.5; overflow-wrap: anywhere; }
.form-feedback.error { color: var(--danger); background: var(--error-bg); }
.form-feedback.success { color: var(--text); background: var(--success-bg); }
.access-followup { display: flex; gap: 5px 9px; align-items: baseline; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
.state-symbol { display: grid; width: 50px; height: 50px; place-items: center; color: var(--accent); background: var(--surface-alt); margin: 0 0 20px; border-radius: 14px; }
.state-symbol svg { width: 24px; height: 24px; }
.access-account { overflow-wrap: anywhere; color: var(--muted); font-size: .88rem; margin: -10px 0 23px; }
.loading-screen { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; }
.loading-screen .brand-medallion { width: 64px; height: 64px; }
.loading-screen p { font-size: .95rem; color: var(--muted); margin: 15px 0; }
.loading-track { display: block; position: relative; width: 90px; height: 3px; background: var(--border); overflow: hidden; border-radius: 6px; }
.loading-track::after { content: ""; display: block; width: 55%; height: 100%; background: var(--accent); transform-origin: left; animation: loading-slide 1s ease-in-out infinite; }
.shell-toast { position: fixed; z-index: 70; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 17px; border-radius: 8px; background: var(--text); color: var(--bg); box-shadow: 0 4px 18px #00151c24; font-size: .9rem; text-align: center; }
@keyframes loading-slide { from { transform: translateX(-110%); } to { transform: translateX(195%); } }
@keyframes loading-turn { to { transform: rotate(360deg); } }
@media (min-height: 740px) and (min-width: 761px) { .access-layout { margin-top: clamp(65px, 10vh, 125px); } }
@media (max-width: 760px), (pointer: coarse) {
  .header-tool, .show-password { min-width: 44px; min-height: 44px; }
  .text-button { min-height: 44px; }
  .password-caption, .access-followup { align-items: center; }
  .password-caption { margin-block: -6px; }
}
@media (max-width: 760px) {
  .site-bar-inner { min-height: 63px; padding: 8px 18px; }
  .brand-medallion { width: 39px; height: 39px; }
  .access-layout { display: flex; flex-direction: column; max-width: 530px; margin: 20px auto 32px; padding: 0 21px; gap: 25px; }
  .tide-chart { --seal-size: clamp(68px, 11vh, 86px); min-height: 0; height: clamp(98px, 16vh, 132px); border-radius: 12px; }
  .tide-map { inset: 50% auto auto 50%; width: 115%; height: 180%; transform: translate(-50%, -50%) rotate(-14deg); }
  .tide-wake::after { width: 3px; height: 3px; }
  .access-body { max-width: none; margin: 0; }
  .access-head { margin-bottom: 22px; }
  .access-head h1 { font-size: 2.12rem; }
  .header-controls { gap: 5px; }
  .header-tool .theme-label { display: none; }
  .session-name { display: none; }
  .session-tools { gap: 4px; padding-left: 8px; }
  .access-followup { margin-top: 18px; padding-top: 10px; }
}
@media (max-width: 390px) {
  .brand-lockup { gap: 6px; }
  .brand-name { font-size: 1rem; }
  .brand-product { font-size: .85rem; padding-left: 6px; }
  .site-bar-inner { padding-inline: 12px; gap: 7px; }
  .header-tool.signout { padding-inline: 7px; }
}
@media (max-width: 355px) {
  .access-layout { padding-inline: 14px; }
  .access-head h1 { font-size: 1.875rem; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .access-layout { margin-top: 14px; gap: 16px; }
  .access-head { margin-bottom: 16px; }
  .access-form { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
