/* ==========================================================================
   Kajakkdokk Hafrsfjord - Product Documentation Shell
   Theme: 
     content: #FAFBFC
     sidebar: #E8EEF2
     ink: #0F172A
     link: #1E3A8A
   Fonts: 'Source Sans 3' for all UI; 'Space Mono' for TOC numbers only.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #FAFBFC;
  color: #0F172A;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: #FAFBFC;
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #1E3A8A;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: #0F172A;
}

/* Top Navigation Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 48px;
  background-color: #E8EEF2;
  border-bottom: 1px solid #D1DDE6;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.top-bar-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-title {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #0F172A;
}

.docs-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  background: #D5E1E9;
  color: #0F172A;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #BACCD8;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8125rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #0F172A;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #1E3A8A;
  display: inline-block;
}

.phone-label {
  color: #0F172A;
}

.phone-link {
  font-weight: 600;
  text-decoration: none;
  color: #1E3A8A;
}

.phone-link:hover {
  text-decoration: underline;
}

/* Two-Column Shell Layout */
.shell-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  min-height: calc(100vh - 48px);
}

/* Left Sticky TOC Sidebar */
.sidebar-nav {
  width: 280px;
  flex-shrink: 0;
  background-color: #E8EEF2;
  border-right: 1px solid #D1DDE6;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-header {
  margin-bottom: 1.5rem;
}

.sidebar-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0F172A;
  text-transform: uppercase;
}

.sidebar-sub {
  display: block;
  font-size: 0.75rem;
  color: #475569;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 4px;
  color: #0F172A;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.toc-link:hover {
  background-color: #DDE5EC;
  color: #1E3A8A;
}

.toc-link.active {
  background-color: #D5E1E9;
  color: #1E3A8A;
  border-left-color: #1E3A8A;
}

.toc-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #1E3A8A;
  font-weight: 700;
}

.toc-text {
  flex: 1;
}

.sidebar-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #D1DDE6;
  font-size: 0.75rem;
  color: #334155;
}

.loc-pin {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.3;
}

.loc-pin svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #1E3A8A;
}

/* Right Column Content Stream */
.docs-content {
  flex: 1;
  background-color: #FAFBFC;
  padding: 2.5rem 3rem 4rem 3rem;
  max-width: calc(100% - 280px);
}

.doc-section {
  padding-bottom: 3.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #E2E8F0;
  scroll-margin-top: 70px;
}

.doc-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 2rem;
}

.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1E3A8A;
  margin-bottom: 0.5rem;
}

.doc-h1 {
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0F172A;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.lead-paragraph {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 1.5rem;
}

.doc-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0F172A;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 0.9375rem;
  color: #475569;
  margin-bottom: 1.75rem;
}

/* Callout box */
.callout-box {
  background-color: #E8EEF2;
  border-left: 4px solid #1E3A8A;
  padding: 1.25rem 1.5rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.9375rem;
  color: #0F172A;
}

.callout-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #1E3A8A;
}

/* Definition block (<dl> style) */
.definition-block {
  display: grid;
  gap: 1.25rem;
}

.def-item {
  background: #FAFBFC;
  border: 1px solid #D1DDE6;
  border-radius: 4px;
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}

.def-item:hover {
  border-color: #1E3A8A;
}

.def-term {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.def-code {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  background-color: #E8EEF2;
  border: 1px solid #C4D4E0;
  padding: 2px 6px;
  border-radius: 3px;
  color: #1E3A8A;
  font-weight: 700;
}

.def-desc {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
  margin-left: 0;
}

/* Ordered Steps / Process */
.process-steps {
  list-style: none;
  counter-reset: step-counter;
  display: grid;
  gap: 1.25rem;
}

.step-item {
  display: flex;
  gap: 1.25rem;
  background: #FAFBFC;
  border: 1px solid #D1DDE6;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
}

.step-marker {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1E3A8A;
  background-color: #E8EEF2;
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  height: fit-content;
  white-space: nowrap;
  border: 1px solid #BACCD8;
}

.step-body {
  flex: 1;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.35rem;
}

.step-body p {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
}

/* Specs Table */
.specs-table-wrapper {
  overflow-x: auto;
  border: 1px solid #D1DDE6;
  border-radius: 4px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
  background-color: #FAFBFC;
}

.specs-table th {
  background-color: #E8EEF2;
  color: #0F172A;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #D1DDE6;
}

.specs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
}

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

.specs-table code {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: #1E3A8A;
  background-color: #E8EEF2;
  padding: 2px 4px;
  border-radius: 2px;
}

/* FAQ Section */
.faq-item {
  background-color: #FAFBFC;
  border-left: 3px solid #D1DDE6;
  padding: 0.75rem 0 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-left-color: #1E3A8A;
}

.faq-q {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.35rem;
}

.faq-a {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
}

/* Contact Section Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: start;
}

.service-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0F172A;
}

.req {
  color: #1E3A8A;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9375rem;
  color: #0F172A;
  background-color: #FAFBFC;
  border: 1px solid #BACCD8;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1E3A8A;
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
}

.btn-submit {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  background-color: #1E3A8A;
  color: #FAFBFC;
  border: none;
  border-radius: 4px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  align-self: flex-start;
}

.btn-submit:hover {
  background-color: #0F172A;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.form-success-note {
  background: #E8EEF2;
  border: 1px solid #1E3A8A;
  border-radius: 4px;
  padding: 1rem;
  font-size: 0.875rem;
  color: #0F172A;
  line-height: 1.5;
}

/* Station Card & Social block */
.station-card {
  background-color: #E8EEF2;
  border: 1px solid #D1DDE6;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.station-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.75rem;
}

.station-addr {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.meta-entry {
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
}

.meta-lbl {
  color: #64748B;
  font-weight: 600;
}

.meta-val {
  color: #0F172A;
  font-weight: 600;
  text-decoration: none;
}

a.meta-val:hover {
  color: #1E3A8A;
  text-decoration: underline;
}

.social-card {
  background-color: #FAFBFC;
  border: 1px solid #D1DDE6;
  border-radius: 4px;
  padding: 1.25rem;
}

.social-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.75rem;
}

.social-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.social-a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1E3A8A;
  text-decoration: none;
}

.social-a:hover {
  text-decoration: underline;
}

/* Footer */
.docs-footer {
  padding-top: 2.5rem;
  border-top: 1px solid #D1DDE6;
  margin-top: 2rem;
}

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

.copy-text {
  font-size: 0.8125rem;
  color: #64748B;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.8125rem;
  color: #1E3A8A;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Modal (Privacy Policy) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background-color: #FAFBFC;
  border: 1px solid #D1DDE6;
  border-radius: 6px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #D1DDE6;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.modal-h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748B;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #0F172A;
}

.modal-body {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.6;
}

.modal-body h3 {
  font-size: 1rem;
  color: #0F172A;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.modal-body ul {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #D1DDE6;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Styling */
@media (max-width: 960px) {
  .shell-container {
    flex-direction: column;
  }

  .sidebar-nav {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #D1DDE6;
    padding: 1rem 1.25rem;
  }

  .toc-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .toc-link {
    padding: 0.35rem 0.65rem;
    background-color: #FAFBFC;
    border: 1px solid #BACCD8;
    border-radius: 4px;
    border-left-width: 1px;
    font-size: 0.8125rem;
  }

  .sidebar-footer {
    display: none;
  }

  .docs-content {
    max-width: 100%;
    padding: 1.5rem 1.25rem 3rem 1.25rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .top-bar-inner {
    flex-direction: column;
    height: auto;
    padding: 0.5rem 0;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .top-bar {
    height: auto;
    padding: 0.5rem 1rem;
  }

  .top-meta {
    font-size: 0.75rem;
    gap: 0.75rem;
  }

  .doc-h1 {
    font-size: 1.65rem;
  }

  .doc-h2 {
    font-size: 1.25rem;
  }
}