:root {
  color-scheme: light;
  --sea-ink: #10294a;
  --sea-navy: #102c52;
  --sea-blue: #0056d6;
  --sea-link: #0056d6;
  --sea-accent: #1d79d4;
  --sea-hero-start: #0e2646;
  --sea-hero-end: #195291;
  --sea-bg: #f3f6fb;
  --sea-surface: #ffffff;
  --sea-line: #d9e2ef;
  --sea-muted: #52647d;
  --sea-font: Tahoma, Arial, sans-serif;
  --sea-radius: 0.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--sea-bg);
  scroll-padding-top: 1rem;
}

body.sea-site {
  margin: 0;
  color: var(--sea-ink);
  font-family: var(--sea-font);
  font-size: 0.9375rem;
  line-height: 1.45;
  background: linear-gradient(180deg, #eaf0f9 0, var(--sea-bg) 22rem);
  overflow-wrap: break-word;
}

.sea-site a {
  color: var(--sea-link);
  text-underline-offset: 0.18em;
}

.sea-site a:hover {
  text-decoration-thickness: 0.125rem;
}

.sea-site button,
.sea-site input,
.sea-site select {
  font: inherit;
}

.sea-site button,
.sea-site a {
  -webkit-tap-highlight-color: transparent;
}

.sea-site button,
.sea-site input,
.sea-site select,
.sea-site a,
.sea-site [tabindex] {
  outline-offset: 0.2rem;
}

.sea-site :focus-visible {
  outline: 0.1875rem solid var(--sea-blue);
}

.sea-site img,
.sea-site svg,
.sea-site video {
  max-width: 100%;
  height: auto;
}

.sea-shell {
  width: 100%;
  max-width: 77rem;
  margin: 0 auto;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

.sea-skip {
  position: absolute;
  z-index: 10;
  top: -6rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.4rem;
  background: var(--sea-surface);
}

.sea-skip:focus {
  top: 0.5rem;
}

.sea-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sea-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--sea-navy) !important;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.sea-brand-mark {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cad8ed;
  border-radius: 0.65rem;
  background: var(--sea-surface);
  color: var(--sea-blue);
}

.sea-brand-mark svg {
  width: 1.45rem;
  height: 1.45rem;
}

.sea-languages {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.125rem;
  border: 1px solid var(--sea-line);
  border-radius: 0.6rem;
  background: var(--sea-surface);
}

.sea-languages a {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  color: var(--sea-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.sea-languages a:hover {
  background: #edf3fd;
  color: var(--sea-blue);
}

.sea-languages a[aria-current="page"] {
  background: var(--sea-navy);
  color: #ffffff;
}

.sea-main {
  min-width: 0;
  padding-bottom: 2rem;
}

.sea-port-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.2rem 1.25rem;
}

.sea-overline {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--sea-link);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sea-port-heading h1 {
  margin: 0;
  color: var(--sea-navy);
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.sea-port-heading p {
  max-width: 50rem;
  margin: 0.5rem 0 0;
  color: var(--sea-muted);
  font-size: 0.875rem;
}

.sea-back-link {
  display: inline-flex;
  flex-shrink: 0;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.sea-timetable {
  min-width: 0;
  scroll-margin-top: 1rem;
}

.sea-filter-panel,
.sea-directory-panel {
  padding: 1rem 1.125rem;
  border: 1px solid var(--sea-line);
  border-radius: var(--sea-radius);
  background: var(--sea-surface);
  box-shadow: 0 0.25rem 1rem #15365b05;
}

.sea-filter-panel {
  margin: 0 0 1rem;
}

.sea-filter-panel fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sea-filter-panel legend {
  padding: 0 0.1rem;
  margin-bottom: 0.75rem;
  color: var(--sea-navy);
  font-size: 0.8125rem;
  font-weight: 700;
}

.sea-filter-fields {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(9rem, 11rem) minmax(9rem, 11rem) auto;
  align-items: end;
  gap: 0.75rem;
}

.sea-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.sea-field label,
.sea-directory-search label {
  margin-left: 0.1rem;
  color: var(--sea-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.sea-field input,
.sea-directory-search input {
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #7e91ab;
  border-radius: 0.45rem;
  background: #ffffff;
  color: var(--sea-ink);
  box-shadow: inset 0 1px 2px #15365b03;
}

.sea-field input[type="date"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sea-field input::placeholder,
.sea-directory-search input::placeholder {
  color: var(--sea-muted);
  opacity: 1;
}

.sea-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--sea-blue);
  border-radius: 0.45rem;
  background: var(--sea-blue);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.sea-button:hover {
  filter: brightness(0.87);
}

.sea-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.sea-button svg {
  width: 1rem;
  height: 1rem;
}

.sea-filter-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0 -0.3rem;
  color: var(--sea-muted);
  font-size: 0.75rem;
}

.sea-filter-links a {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
}

.sea-status:empty {
  display: none;
}

.sea-status,
.sea-notice,
.sea-no-script {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #bfd3ee;
  border-radius: 0.55rem;
  background: #edf4fd;
  color: #254a76;
  font-size: 0.875rem;
  text-align: center;
}

.sea-recovery {
  margin: 0.65rem 0 1rem;
  text-align: center;
}

.sea-loading-line {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.6rem 0;
  color: var(--sea-navy);
  font-size: 0.875rem;
}

.sea-loading-anchor {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  color: var(--sea-blue);
}

.sea-loading-anchor svg {
  width: 1.75rem;
  height: 1.75rem;
  animation: sea-anchor-sway 1.7s ease-in-out infinite;
  transform-origin: 50% 20%;
}

.sea-loading-placeholder {
  padding: 2.5rem 1rem;
  border: 1px solid var(--sea-line);
  border-radius: var(--sea-radius);
  background: var(--sea-surface);
  color: var(--sea-muted);
  text-align: center;
  font-size: 0.875rem;
}

.sea-table-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1rem 0.15rem 0.65rem;
  color: var(--sea-muted);
  font-size: 0.75rem;
}

.sea-table-summary strong {
  color: var(--sea-navy);
  font-weight: 700;
}

.sea-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--sea-line);
  border-radius: var(--sea-radius);
  background: var(--sea-surface);
  scrollbar-color: #a4bbd8 #ecf1f8;
  scrollbar-width: thin;
}

.sea-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
}

.sea-table th,
.sea-table td {
  padding: 0.85rem 1rem;
  border: 0;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.sea-table th {
  background: var(--sea-navy);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.8125rem;
}

.sea-table th:first-child {
  width: 36%;
}

.sea-table th:nth-child(2),
.sea-table th:nth-child(3) {
  width: 32%;
  text-align: right;
}

.sea-table tbody tr:nth-child(even) {
  background: #f5f8fc;
}

.sea-table tbody tr:hover {
  background: #edf4fd;
}

.sea-table tbody tr + tr td {
  border-top: 1px solid #e6edf5;
}

.sea-ship-name {
  display: block;
  color: var(--sea-navy);
  font-size: 0.9375rem;
  font-weight: 700;
}

.sea-ship-name a {
  text-decoration: none;
}

.sea-ship-name a:hover {
  text-decoration: underline;
}

.sea-berth,
.sea-route,
.sea-technical,
.sea-destination {
  display: block;
  margin-top: 0.25rem;
}

.sea-berth,
.sea-destination {
  color: #365474;
  font-size: 0.8125rem;
}

.sea-route,
.sea-technical {
  color: var(--sea-muted);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.sea-route {
  letter-spacing: 0.02em;
}

.sea-date {
  display: block;
  color: var(--sea-navy);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.sea-table .sea-empty {
  padding: 2rem 1rem;
  color: var(--sea-muted);
  text-align: center;
}

.sea-table-note {
  margin: 0.55rem 0.15rem;
  color: var(--sea-muted);
  font-size: 0.6875rem;
}

.sea-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.sea-pagination a,
.sea-pagination [aria-current="page"] {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid #c7d4e5;
  border-radius: 0.4rem;
  background: var(--sea-surface);
  font-size: 0.8125rem;
  text-decoration: none;
}

.sea-pagination a:hover {
  border-color: #91b3e2;
  background: #e9f2ff;
}

.sea-pagination [aria-current="page"] {
  border-color: var(--sea-navy);
  background: var(--sea-navy);
  color: #ffffff;
}

.sea-timetable[aria-busy="true"] .sea-table-wrap {
  opacity: 0.65;
}

.sea-port-copy {
  max-width: 50rem;
  margin: 1.75rem 0.15rem 0;
  color: var(--sea-muted);
  font-size: 0.875rem;
}

.sea-port-copy h2 {
  margin: 0 0 0.5rem;
  color: var(--sea-navy);
  font-size: 1rem;
}

.sea-port-copy p {
  margin: 0.5rem 0;
}

.sea-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.8rem;
  margin-top: 1rem;
  font-size: 0.75rem;
}

.sea-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--sea-line);
  color: var(--sea-muted);
  font-size: 0.6875rem;
}

.sea-footer p {
  margin: 0;
}

.sea-portal-hero {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(115deg, var(--sea-hero-start), var(--sea-hero-end));
  color: #ffffff;
}

.sea-portal-hero .sea-overline {
  color: #adceff;
}

.sea-portal-hero h1 {
  position: relative;
  max-width: 40rem;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.875rem, 1.6rem + 1vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.sea-portal-hero p {
  position: relative;
  max-width: 38rem;
  margin: 0.75rem 0 0;
  color: #d2e2f7;
  font-size: 0.875rem;
}

.sea-portal-tag {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #7ca4d352;
  border-radius: 2rem;
  background: #ffffff0a;
  color: #dfecfc;
  font-size: 0.7rem;
}

.sea-portal-tag svg {
  width: 0.9rem;
  height: 0.9rem;
}

.sea-harbor-art {
  position: absolute;
  width: 23rem;
  height: 11rem;
  right: 0.5rem;
  bottom: 0;
  opacity: 0.55;
  pointer-events: none;
}

.sea-directory-panel {
  margin-top: 1rem;
  padding: 1.25rem;
}

.sea-directory-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sea-directory-heading h2 {
  margin: 0 0 0.25rem 0.1rem;
  color: var(--sea-navy);
  font-size: 1.0625rem;
  font-weight: 700;
}

.sea-directory-count {
  margin: 0 0 0 0.1rem;
  color: var(--sea-muted);
  font-size: 0.75rem;
}

.sea-directory-search {
  display: flex;
  width: 19rem;
  max-width: 100%;
  flex-direction: column;
  gap: 0.35rem;
}

.sea-directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sea-directory-grid li {
  min-width: 0;
  border-top: 1px solid #e4ebf4;
}

.sea-port-link {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.3rem;
  color: var(--sea-navy) !important;
  text-decoration: none;
}

.sea-port-link:hover {
  color: var(--sea-blue) !important;
}

.sea-port-link > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sea-port-link strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.sea-port-link small {
  display: block;
  margin-top: 0.15rem;
  color: var(--sea-muted);
  font-size: 0.6875rem;
}

.sea-port-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #7094c1;
}

.sea-directory-empty {
  padding: 1.5rem 1rem;
  color: var(--sea-muted);
  text-align: center;
}

.sea-directory-note {
  max-width: 50rem;
  margin: 1rem 0.1rem 0;
  color: var(--sea-muted);
  font-size: 0.75rem;
}

.sea-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes sea-anchor-sway {
  0%,
  100% {
    transform: translateY(-0.125rem) rotate(-9deg);
  }
  50% {
    transform: translateY(0.125rem) rotate(9deg);
  }
}

@media (max-width: 64rem) {
  .sea-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sea-harbor-art {
    opacity: 0.2;
  }

  .sea-filter-fields {
    grid-template-columns: minmax(10rem, 1fr) minmax(8rem, 9rem) minmax(8rem, 9rem) auto;
    gap: 0.55rem;
  }

  .sea-filter-panel .sea-button {
    padding-inline: 0.85rem;
  }
}

@media (max-width: 47rem) {
  .sea-shell {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .sea-header {
    min-height: 4.5rem;
  }

  .sea-filter-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .sea-field-search,
  .sea-filter-fields .sea-button {
    grid-column: 1 / -1;
  }

  .sea-field input,
  .sea-button {
    width: 100%;
  }

  .sea-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sea-table {
    min-width: 37rem;
  }

  .sea-portal-hero {
    padding: 1.5rem;
  }

  .sea-port-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 1rem;
  }

  .sea-back-link {
    min-height: 2rem;
  }
}

@media (max-width: 30rem) {
  body.sea-site {
    font-size: 0.875rem;
  }

  .sea-shell {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .sea-header {
    gap: 0.5rem;
  }

  .sea-brand {
    gap: 0.4rem;
    font-size: 0.9375rem;
  }

  .sea-brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .sea-brand-mark svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .sea-languages a {
    min-width: 2.1rem;
    min-height: 2.25rem;
  }

  .sea-filter-panel,
  .sea-directory-panel {
    padding: 0.85rem;
  }

  .sea-field input {
    padding-right: 0.45rem;
    padding-left: 0.45rem;
    font-size: 0.8125rem;
  }

  .sea-directory-heading,
  .sea-directory-search {
    width: 100%;
  }

  .sea-directory-grid {
    gap: 0 0.75rem;
  }

  .sea-port-link {
    min-height: 4.25rem;
    gap: 0.3rem;
  }

  .sea-port-link strong {
    font-size: 0.8125rem;
  }

  .sea-portal-hero {
    padding: 1.25rem 1rem;
  }

  .sea-portal-hero h1 {
    font-size: 1.875rem;
  }

  .sea-harbor-art {
    opacity: 0.12;
  }

  .sea-table th,
  .sea-table td {
    padding: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sea-loading-anchor svg {
    animation: none;
  }
}

@media print {
  html,
  body.sea-site {
    background: #ffffff;
  }

  .sea-shell {
    max-width: none;
    padding: 0;
  }

  .sea-filter-panel,
  .sea-languages,
  .sea-back-link,
  .sea-pagination,
  .sea-loading-line,
  .sea-directory-search {
    display: none;
  }

  .sea-table-wrap {
    overflow: visible;
    border: 0;
  }

  .sea-table {
    min-width: 0;
    font-size: 0.75rem;
  }

  .sea-table thead {
    display: table-header-group;
  }

  .sea-table th {
    border-bottom: 1px solid #777777;
    background: #ffffff;
    color: #000000;
  }

  .sea-table tr {
    break-inside: avoid;
  }
}
