:root {
  --bg-canvas: #1e1612;
  --bg-surface: #30231b;
  --bg-surface-hover: #3c2c22;
  --text-primary: #f5ecdf;
  --text-muted: #cbbba8;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --accent-ink: #1e1612;
  --border-subtle: #4b382c;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.35);
  --glow-accent: 0 0 24px -6px rgba(245, 158, 11, 0.35);
  --glass-backdrop: blur(12px) saturate(140%);
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
}

p {
  margin: 0 0 1.1rem;
  max-width: 70ch;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a[href^="mailto:"],
.publisher-line a,
.spec-item dd a,
.live-status {
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  font-weight: 700;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.reading-col {
  max-width: 70ch;
  min-width: 0;
}

.split-layout > *,
.article-grid > *,
.register-row > *,
.spec-item > *,
.hero-row > *,
.section-head > * {
  min-width: 0;
}

/* Header */
.site-header {
  position: relative;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.25rem;
  margin-left: auto;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.25rem 0;
  white-space: nowrap;
  transition: color 0.25s var(--ease-kinetic);
}

.nav-link::after,
.inline-action::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-kinetic);
}

.nav-link:hover,
.nav-link[aria-current="page"],
.inline-action:hover {
  color: var(--accent-primary);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after,
.inline-action:hover::after {
  transform: scaleX(1);
}

.inline-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  color: var(--accent-primary);
  font-weight: 600;
  padding-bottom: 2px;
}

.btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  background-color: var(--accent-primary);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic), background-color 0.25s ease;
}

.btn-amber:hover {
  background-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  max-width: 100%;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  padding: 0.68rem 1.2rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--ease-kinetic);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface-hover);
  transform: translateY(-2px);
}

/* Mobile 3-dot Menu */
.menu-toggle {
  display: none;
  flex-shrink: 0;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.25rem 1.35rem;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.mobile-nav-list a {
  display: block;
  padding: 0.6rem 0.25rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 500;
}

.mobile-nav-list a[aria-current="page"] {
  color: var(--accent-primary);
}

/* Tonal Bands & Grid Backdrop */
.band {
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.band-base {
  background-color: var(--bg-canvas);
}

.band-surface {
  background-color: var(--bg-surface);
}

.band-grid {
  background-image:
    linear-gradient(to right, rgba(245, 236, 223, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 236, 223, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Hero */
.hero-band {
  padding: 2.6rem 0 2.3rem;
}

.eyebrow {
  display: inline-block;
  max-width: 100%;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-row > div {
  flex: 1 1 36rem;
}

.hero-row > .btn-amber {
  flex: 0 1 auto;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-bottom: 0;
}

.page-hero {
  padding: 2.75rem 0 2.25rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

/* Section Headers */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Icon-led Divided Rows */
.register-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.register-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 0.85fr);
  align-items: start;
  gap: 1rem 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease;
}

.register-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.row-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
  margin-top: 0.2rem;
}

.row-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
}

.row-meta {
  display: block;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.row-body {
  color: var(--text-muted);
  margin: 0;
  max-width: 62ch;
}

.row-link {
  white-space: normal;
  line-height: 1.5;
  align-self: center;
  justify-self: start;
}

/* Two-column Editorial Split */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: start;
}

.split-reverse {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

/* Annotated Wide Photographs */
.figure-panel {
  margin: 0;
  min-width: 0;
}

.figure-frame {
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

.aspect-16x9 {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.aspect-4x3 {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.figure-caption {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.figure-caption > span {
  flex: 1 1 15rem;
  min-width: 0;
}

/* Specification Definition Lists */
.spec-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

.spec-item {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.5rem 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-item dt {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.93rem;
}

.spec-item dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.split-layout .spec-item,
.sidebar-notes .spec-item {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
}

/* Horizontal Scrollable Vessel Tables */
.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background-color: var(--bg-canvas);
}

.vessel-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.vessel-table th,
.vessel-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.vessel-table thead th {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.vessel-table tbody tr:last-child td {
  border-bottom: none;
}

.vessel-table tbody tr:hover {
  background-color: rgba(245, 158, 11, 0.05);
}

/* Chain Steps */
.chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0;
  border-top: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
}

.chain-step {
  min-width: 0;
  padding: 1.35rem 1.25rem;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.step-num {
  display: inline-block;
  font-family: var(--font-serif);
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Long-form Article Layout */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.reading-col > h2:not(:first-child),
.reading-col > h3:not(:first-child) {
  margin-top: 2rem;
}

.sidebar-notes {
  border-left: 2px solid var(--accent-primary);
  padding-left: 1.25rem;
}

.sidebar-notes h2,
.sidebar-notes h3 {
  font-size: 1.08rem;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.sidebar-links li {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.55rem 0;
}

/* FAQ Ruled Items */
.faq-list {
  border-top: 1px solid var(--border-subtle);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.2rem 0;
}

.faq-item h2,
.faq-item h3 {
  font-size: 1.15rem;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  text-wrap: pretty;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* Contact Correspondence Sheet */
.sheet-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.75rem;
}

.field-group {
  margin-bottom: 1.2rem;
}

.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.field-input,
.field-textarea {
  width: 100%;
  min-width: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.72rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.6;
  transition: border-color 0.2s ease;
}

.field-textarea {
  resize: vertical;
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.sheet-actions > button {
  flex: 1 1 12rem;
  min-width: 0;
}

.live-status {
  margin-top: 0.9rem;
  min-height: 1.4rem;
  font-size: 0.9rem;
  color: var(--accent-primary);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Footer */
.site-footer {
  background-color: var(--bg-canvas);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-band {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-band:last-child {
  border-bottom: none;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.75rem;
}

.footer-label {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.75rem 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.publisher-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}

.publisher-line > * {
  min-width: 0;
  max-width: 100%;
}

.site-langs {
  padding: 0 1.25rem 1.25rem;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .split-layout,
  .split-reverse,
  .article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .register-row {
    grid-template-columns: 28px minmax(0, 0.85fr) minmax(0, 1.5fr);
    gap: 0.65rem 1.25rem;
  }

  .row-link {
    grid-column: 3;
  }
}

@media (max-width: 767px) {
  .register-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.65rem 0.9rem;
    padding: 1.35rem 0;
  }

  .row-link {
    grid-column: 2;
    justify-self: start;
  }

  .row-body {
    grid-column: 2;
  }

  .spec-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .section-head {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .section-head > * {
    flex-basis: 100%;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 479px) {
  .band {
    padding: 2.35rem 0;
  }

  .hero-band {
    padding: 2rem 0 1.85rem;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .brand-link {
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal;
    line-height: 1.4;
  }

  .brand-link span {
    min-width: 0;
  }

  .sheet-panel {
    padding: 1.2rem;
  }
}