:root {
  --corp-primary: #001020;
  --corp-border: #e0e0e0;
  --corp-text-gray: #666;
  --corp-bg-light: #f8f9fa;
  --corp-success: #28a745;
  --corp-info: #17a2b8;
  --corp-warning: #ffc107;
  --corp-danger: #dc3545;

  --font-sans: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bebas Neue", sans-serif;

  --header-height: 64px;
  --sidebar-width: 280px;
  --content-max-width: 1200px;

  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--corp-primary);
  background-color: #fff;
}

.section-group {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.section-item {
  margin-bottom: 20px;
}

.section-item[data-level="2"] .section-group {
  margin-top: 1rem;
}

.section-item[data-level="3"] {
  transition: border-color 0.2s ease, padding-left 0.2s ease;
}

.section-item[data-level="3"]:hover {
  border-left-color: var(--corp-primary);
  padding-left: 1.75rem;
}

.section-group
  > .section-item:not([data-level])
  + .section-item:not([data-level]) {
  border-top: 1px solid #e5e5e5;
  padding-top: 20px;
}

.section-header {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 20px 0;
  padding: 0;
  color: #333;
  line-height: 1.4;
  display: block;
  text-decoration: none;
  background: transparent;
  border-radius: 0;
}

.section-content {
  margin-top: 0;
}

.section-item[data-level="2"],
.section-item--nested {
  margin-left: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 0.25rem;
  border: none;
  border-top: 1px solid #e5e5e5;
  padding-top: 0.25rem;
}

.section-item[data-level="2"]:first-child {
  border-top: none;
  padding-top: 0;
}

.section-header[data-level="2"],
.section-header--nested {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--corp-primary);
  margin-bottom: 0.25rem;
  padding-bottom: 0;
  border-bottom: none;
}

.section-item[data-level="3"],
.section-item--double-nested {
  margin-left: 0;
  padding: 0;
  padding-left: 1.5rem;
  background: transparent;
  border-radius: 0;
  margin-bottom: 0.75rem;
  border: none;
  border-left: 2px solid #f0f0f0;
  box-shadow: none;
}

.section-header[data-level="3"],
.section-header--double-nested {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.375rem;
  position: relative;
  padding-left: 0;
}

.section-header[data-level="3"]::before,
.section-header--double-nested::before {
  display: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--corp-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
}

.logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--corp-primary);
  line-height: 1;
}

.property-badge {
  background: var(--corp-bg-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--corp-border);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--corp-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  line-height: 1;
  height: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 16, 32, 0.1);
}

.print-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.print-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 16, 32, 0.2);
  background: #001830;
}

.print-button:hover::after {
  width: 300px;
  height: 300px;
}

.print-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 16, 32, 0.2);
}

.print-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 16, 32, 0.1), 0 4px 12px rgba(0, 16, 32, 0.2);
}

.print-button span,
.print-button i {
  position: relative;
  z-index: 1;
}

.print-button svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.smart-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--corp-bg-light);
  border-right: 1px solid var(--corp-border);
  overflow-y: auto;
  z-index: 900;
}

.sidebar-content {
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--corp-text-gray);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--corp-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: all 0.2s;
  position: relative;
}

.nav-link:hover {
  background: rgba(0, 16, 32, 0.05);
}

.nav-link.active {
  background: rgba(0, 16, 32, 0.1);
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--corp-primary);
  border-radius: 0 2px 2px 0;
}

.generation-timestamp {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--corp-border);
  font-size: 0.75rem;
  color: var(--corp-text-gray);
}

.main-wrapper {
  margin-top: var(--header-height);
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
  background: #fff;
}

.main-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-section {
  margin-bottom: 3rem;
}

.property-hero {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.property-image-wrapper {
  position: relative;
  height: 400px;
  background: var(--corp-bg-light);
  transition: all 0.3s ease-in-out;
}

.property-image-wrapper.map-container-expanded {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  width: 100vw;
  z-index: 9999;
  margin: 0;
  border-radius: 0;
}

.map-toggle-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--corp-primary);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.map-toggle-btn:hover {
  background: var(--corp-primary);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.map-toggle-btn:active {
  transform: scale(0.95);
}

.map-toggle-btn svg {
  display: block;
  width: 20px;
  height: 20px;
}

.map-container-expanded .property-overlay {
  max-width: 600px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.map-layer-controls {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 160px;
}

.layer-controls-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--corp-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.layer-controls-header svg {
  width: 16px;
  height: 16px;
}

.layer-control-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease;
}

.layer-control-item:last-child {
  border-bottom: none;
}

.layer-control-item:hover {
  background-color: rgba(0, 16, 32, 0.02);
}


.layer-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.layer-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  width: 100%;
  margin: 0;
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 10px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.layer-toggle-checkbox:checked + .layer-toggle-label .toggle-switch {
  background: var(--corp-primary);
}

.layer-toggle-checkbox:checked + .layer-toggle-label .toggle-slider {
  transform: translateX(20px);
}

.layer-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--corp-text);
}

.layer-control-item[data-layer="rattigheter"] .layer-toggle-checkbox:checked + .layer-toggle-label .toggle-switch {
  background: #ef4444;
}

.layer-control-item[data-layer="bestammelser"] .layer-toggle-checkbox:checked + .layer-toggle-label .toggle-switch {
  background: #f97316;
}

.map-container-expanded .map-layer-controls {
  top: 1.5rem;
  left: 1.5rem;
}

@media (max-width: 768px) {
  .map-toggle-btn {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem;
  }
  
  .map-toggle-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .map-layer-controls {
    top: 3.5rem;
    left: 0.5rem;
    min-width: 140px;
  }
  
  .layer-controls-header {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }
  
  .layer-control-item {
    padding: 0.5rem 0.875rem;
  }
  
  .layer-name {
    font-size: 0.8rem;
  }
  
  .toggle-switch {
    width: 40px;
    height: 22px;
  }
  
  .toggle-slider {
    width: 18px;
    height: 18px;
  }
  
  .layer-toggle-checkbox:checked + .layer-toggle-label .toggle-slider {
    transform: translateX(18px);
  }
  
  .map-container-expanded .property-overlay {
    max-width: 100%;
    left: 0;
    transform: none;
    border-radius: 0;
  }
  
  .map-container-expanded .map-layer-controls {
    top: 3.5rem;
    left: 0.5rem;
  }
}

.property-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 16, 32, 0.9), transparent);
  color: white;
}

.property-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.property-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--corp-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s;
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.metric-card.highlight {
  background: var(--corp-bg-light);
  border-color: var(--corp-primary);
}

.metric-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
  color: var(--corp-primary);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--corp-text-gray);
  margin: 0;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.25rem 0 0 0;
  color: var(--corp-primary);
}

.document-section {
  background: #fff;
  border: 1px solid var(--corp-border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  overflow: clip;
}

.document-section > .section-header {
  background: var(--corp-bg-light);
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--corp-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.section-header.sticky {
  position: -webkit-sticky;
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: var(--corp-bg-light);
  margin: 0 -1px;
  width: calc(100% + 2px);
  border-radius: 0;
}

.document-section > .section-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--corp-primary);
  flex: 0 0 auto;
}

.document-section > .section-content {
  padding: 2rem;
}

.section-item .section-content {
  padding: 0.5rem 0 0 0;
  margin-top: 0;
}

@media screen and (max-width: 1024px) {
  .smart-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .smart-sidebar.active {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

.screen-only {
  display: block;
}

.print-only {
  display: none;
}

.print-cover-page {
  display: none;
}

.custom-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.custom-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e5e5e5;
  background-color: #f8f8f8;
}

.custom-table td {
  padding: 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid #e5e5e5;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background-color: #fafafa;
}

.custom-table.table-divider td {
  border-bottom: 1px solid #e5e5e5;
}

.custom-table.table-divider tbody tr:last-child td {
  border-bottom: 1px solid #e5e5e5;
}

.custom-table td[colspan="2"] img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 600px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.custom-table td[colspan="2"] {
  padding: 0.5rem;
  text-align: left;
  overflow: hidden;
}

.section-content .custom-table.table-divider:has(img) {
  margin-bottom: 2rem;
}

/* Ortofoto styling */
.ortofoto-container {
  margin-bottom: 2.5rem;
}

.ortofoto-container:last-child {
  margin-bottom: 0;
}

.ortofoto-metadata {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  background: var(--corp-bg-light);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--corp-border);
}

.ortofoto-metadata-item {
  flex: 1;
  min-width: 0;
}

.ortofoto-metadata-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--corp-text-gray);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.ortofoto-metadata-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--corp-primary);
}

.ortofoto-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--corp-border);
  margin-bottom: 1rem;
}

.ortofoto-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.ortofoto-download-section {
  margin-top: 1.5rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.download-info {
  margin-bottom: 1rem;
}

.download-badge {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--corp-primary);
  font-size: 1rem;
}

.download-badge span {
  display: inline;
}

.download-icon {
  display: none;
}

.download-description {
  margin: 0;
  color: var(--corp-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.file-info {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--corp-text-gray);
  font-weight: 500;
}

.btn-download-hires {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: var(--corp-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 47, 75, 0.1);
}

.btn-download-hires:hover {
  background: #001830;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 47, 75, 0.15);
  color: white;
  text-decoration: none;
}

.btn-download-hires:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 47, 75, 0.1);
}

.btn-icon {
  flex-shrink: 0;
}

.screen-only {
  display: block;
}

@media print {
  .screen-only {
    display: none !important;
  }
}

.custom-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-list li {
  padding: 0.25rem 0;
}

.custom-list.list-striped li {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.custom-list.list-striped li:nth-child(even) {
  background-color: #f8f8f8;
}

.custom-list.list-striped li:last-child {
  border-bottom: none;
}

.uk-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.uk-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #e5e5e5;
  background-color: #f8f8f8;
}

/* Custom Tooltip Styles */
.tooltip-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  cursor: help;
  position: relative;
  margin-left: 4px;
  vertical-align: middle;
  font-family: Arial, sans-serif;
}

.tooltip-icon:hover {
  background: #e8e8e8;
  border-color: #ccc;
  color: #333;
}

.tooltip-icon::before {
  content: attr(data-tooltip);
  position: fixed;
  top: var(--tooltip-top, auto);
  left: var(--tooltip-left, 50%);
  transform: translateX(-50%);
  background: #222;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
  max-width: 350px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tooltip-icon::after {
  content: "";
  position: fixed;
  top: calc(var(--tooltip-top, auto) + var(--tooltip-height, 30px) - 5px);
  left: var(--tooltip-left, 50%);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #222;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10000;
}

.tooltip-icon.tooltip-bottom::after {
  top: calc(var(--tooltip-top, auto) - 10px);
  border-top-color: transparent;
  border-bottom-color: #222;
}

.tooltip-icon:hover::before,
.tooltip-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

.tooltip-icon.tooltip-top-left::before {
  left: auto;
  right: -10px;
  transform: none;
}

.tooltip-icon.tooltip-top-left::after {
  left: auto;
  right: 5px;
  transform: none;
}

.tooltip-icon.tooltip-top-right::before {
  left: -10px;
  transform: none;
}

.tooltip-icon.tooltip-top-right::after {
  left: 5px;
  transform: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
}

.section-header .source-attribution {
  display: block;
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: auto;
}

.source-label {
  font-weight: 500;
  color: #6b7280;
  margin-right: 0.25rem;
}

.source-timestamp {
  font-weight: 600;
  color: #374151;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-right: 0.5rem;
}

.source-divider {
  color: #d1d5db;
  margin: 0 0.5rem;
}

.source-text {
  color: #6b7280;
}

@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-header .source-attribution {
    margin-left: 0;
    margin-top: 0.5rem;
    font-size: 0.7rem;
  }
}

@media print {
  .tooltip-icon {
    display: none !important;
  }
  
  .source-attribution {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    margin-bottom: 0.75rem;
    page-break-inside: avoid;
  }
}

.mobile-notice {
  display: none;
}

@media (max-width: 768px) {
  .main-wrapper {
    margin-left: 0;
  }

  .main-content {
    padding: 0.5rem;
    max-width: 100%;
  }

  .document-section {
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .document-section > .section-header {
    padding: 0.75rem;
  }

  .document-section > .section-content {
    padding: 0.75rem;
  }

  .property-hero {
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
  }

  .metrics-grid {
    gap: 0.5rem;
  }

  .metric-card {
    padding: 0.75rem;
  }

  .mobile-notice {
    display: block;
    background: #f0f4f8;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 0.75rem;
  }

  .mobile-notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .mobile-notice-content svg {
    flex-shrink: 0;
    color: #718096;
  }

  .mobile-notice-content p {
    margin: 0;
  }

  .smart-sidebar {
    display: none;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  .print-button {
    display: none !important;
  }

  .tooltip-icon {
    display: none !important;
  }

  .custom-table {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .custom-table th {
    padding: 0.5rem;
    font-size: 0.8125rem;
    background-color: #f8f9fa;
  }

  .custom-table td {
    padding: 0.625rem;
    vertical-align: top;
  }

  .custom-table td:first-child {
    font-weight: 600;
    background-color: #f8f9fa;
    min-width: 140px;
    font-size: 0.8125rem;
    color: #2d3748;
  }

  .custom-table .custom-list {
    padding-left: 1rem;
    margin: 0;
  }

  .custom-table .custom-list li {
    font-size: 0.8125rem;
    padding: 0.25rem 0;
  }

  .custom-table .custom-table {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
  }

  .custom-table .custom-table td {
    padding: 0.375rem;
    font-size: 0.75rem;
  }

  .custom-table a {
    word-break: break-word;
    font-size: 0.8125rem;
  }


  .section-item[data-level="2"] h3,
  .section-header[data-level="2"] {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .section-item[data-level="3"] .section-header {
    font-size: 0.875rem;
  }

  .section-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-content {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* =================================
   Error-sida
   ================================= */

body.error-page {
  font-family: var(--font-sans);
  background-color: var(--corp-bg-light);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--corp-primary);
}

.error-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  padding: 60px 40px;
  text-align: center;
}

.error-logo {
  height: 50px;
  margin-bottom: 40px;
}

.error-code {
  font-size: 72px;
  font-weight: 700;
  color: var(--corp-primary);
  margin-bottom: 20px;
  line-height: 1;
}

.error-container h1 {
  color: var(--corp-primary);
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 600;
}

.error-message {
  color: var(--corp-text-gray);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.support-info {
  background: var(--corp-bg-light);
  border-radius: 4px;
  padding: 25px;
  margin: 30px 0;
}

.support-info h2 {
  font-size: 18px;
  color: var(--corp-primary);
  margin-bottom: 15px;
  font-weight: 600;
}

.support-info p {
  color: var(--corp-text-gray);
  font-size: 14px;
  line-height: 1.8;
}

.support-info a {
  color: var(--corp-primary);
  text-decoration: none;
  font-weight: 500;
}

.support-info a:hover {
  text-decoration: underline;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.error-btn {
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 15px;
  display: inline-block;
}

.error-btn-primary {
  background: var(--corp-primary);
  color: white;
}

.error-btn-primary:hover {
  background: #002040;
  transform: translateY(-1px);
}

.error-btn-secondary {
  background: white;
  color: var(--corp-primary);
  border: 1px solid var(--corp-border);
}

.error-btn-secondary:hover {
  background: var(--corp-bg-light);
}

.request-id {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--corp-border);
  color: var(--corp-text-gray);
  font-size: 13px;
}

.request-id code {
  background: var(--corp-bg-light);
  padding: 4px 8px;
  border-radius: 3px;
  font-family: monospace;
  color: var(--corp-primary);
  font-size: 12px;
  margin: 0 4px;
}

.request-id p {
  margin-top: 8px;
  font-size: 12px;
  color: var(--corp-text-gray);
}

@media (max-width: 600px) {
  .error-container {
    padding: 40px 20px;
  }

  .error-code {
    font-size: 56px;
  }

  .error-container h1 {
    font-size: 20px;
  }

  .error-message {
    font-size: 15px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .error-btn {
    width: 100%;
  }
}
