:root {
  --atlas-blue: #0057ad;
  --atlas-blue-dark: #004182;
  --atlas-bg: #f4f7fb;
  --atlas-line: #d8e2ef;
  --atlas-line-soft: #e8eef6;
  --atlas-muted: #5f6f86;
  --atlas-navy: #071d3a;
  --atlas-green: #16803a;
  --atlas-orange: #b75c00;
  --atlas-red: #b42318;
  --atlas-soft-blue: #edf6ff;
  --atlas-soft-green: #e9f8ee;
  --atlas-soft-orange: #fff3e3;
  --shadow-soft: 0 16px 44px rgba(7, 29, 58, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--atlas-navy);
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--atlas-bg);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
}

.login-hero,
.login-card,
.reports-hero,
.metric-strip article,
.report-sidebar,
.report-workspace {
  background: #fff;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.login-hero {
  padding: 46px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-brand img,
.login-logo,
.topbar-brand img {
  height: 54px;
  width: auto;
}

.hero-brand span,
.topbar-brand span {
  width: 1px;
  height: 36px;
  background: var(--atlas-line);
}

.hero-brand p,
.hero-copy p,
.login-card p,
.reports-hero p,
.section-title-row p,
.selected-muted,
.simple-muted,
.chapter-meta,
.save-status {
  color: var(--atlas-muted);
}

.hero-copy h1 {
  margin: 42px 0 10px;
  font-size: 32px;
}

.login-card {
  padding: 38px;
  text-align: center;
}

.login-card form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
  text-align: left;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #40516a;
  font-weight: 700;
}

.login-card input {
  min-height: 42px;
  border: 1px solid #c9d5e5;
  border-radius: 7px;
  padding: 0 12px;
}

.form-message {
  min-height: 20px;
  color: var(--atlas-red);
  font-size: 13px;
}

.app-view {
  min-height: 100vh;
}

.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--atlas-line);
}

.topbar-brand,
.topbar-actions,
.side-nav a,
.db-status,
.breadcrumbs,
.section-title-row,
.reports-hero,
.project-bar,
.report-header,
.report-actions,
.workspace-tabs,
.item-row,
.chapter-card__top,
.chapter-meta {
  display: flex;
  align-items: center;
}

.topbar-brand {
  min-width: 0;
  gap: 18px;
}

.topbar-brand button {
  border: 0;
  background: transparent;
  color: var(--atlas-navy);
  font-size: 18px;
  font-weight: 800;
}

.topbar-actions {
  gap: 10px;
}

.session-pill {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--atlas-soft-blue);
  color: var(--atlas-blue);
  font-weight: 750;
}

.app-shell.module-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
}

.side-nav {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 18px;
  padding: 20px 8px;
  background: #fff;
  border-right: 1px solid var(--atlas-line);
}

.side-nav nav {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.side-nav a {
  min-height: 42px;
  gap: 10px;
  border-radius: 6px;
  padding: 0 12px;
  color: #22334c;
  font-size: 13px;
  font-weight: 700;
}

.side-nav a:hover,
.side-nav a.active {
  color: var(--atlas-blue);
  background: var(--atlas-soft-blue);
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--atlas-blue);
}

.nav-icon,
.breadcrumb-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: currentColor;
}

.nav-icon::before,
.breadcrumb-icon::before {
  font-size: 10px;
  font-weight: 900;
}

.nav-icon.home::before { content: "IN"; }
.nav-icon.users::before { content: "CL"; }
.nav-icon.folder::before { content: "PR"; }
.nav-icon.layers::before { content: "GT"; }
.nav-icon.lab::before { content: "LB"; }
.nav-icon.chart::before { content: "TB"; }
.nav-icon.mobile::before { content: "MV"; }
.nav-icon.field::before { content: "RV"; }
.nav-icon.audit::before { content: "SG"; }
.nav-icon.bell::before { content: "NT"; }
.nav-icon.automation::before { content: "AU"; }
.nav-icon.file::before { content: "IF"; }
.nav-icon.map::before { content: "MP"; }
.nav-icon.admin::before { content: "AD"; }
.nav-icon.chat::before { content: "CH"; }
.nav-icon.database::before { content: "DB"; }
.breadcrumb-icon::before { content: "AT"; }

.db-status {
  gap: 10px;
  border-top: 1px solid var(--atlas-line-soft);
  padding: 14px 12px 0;
  color: #33445e;
}

.db-status strong,
.db-status small {
  display: block;
}

.db-status small {
  color: var(--atlas-green);
}

.version-note {
  padding: 0 12px;
  color: var(--atlas-muted);
  font-size: 12px;
}

.content-area {
  min-width: 0;
  overflow: auto;
  padding: 22px 24px 30px;
}

.breadcrumbs {
  gap: 10px;
  margin-bottom: 18px;
  color: #4d5d73;
  font-size: 13px;
}

.reports-hero {
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 16px;
}

.reports-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.reports-hero p {
  max-width: 820px;
  margin: 0;
  line-height: 1.45;
}

.project-bar {
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
}

.project-bar label {
  flex: 0 0 auto;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-bar select {
  min-width: 260px;
  min-height: 38px;
  flex: 1 1 420px;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  padding: 0 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-strip article {
  padding: 14px 16px;
}

.metric-strip small {
  display: block;
  margin-bottom: 4px;
  color: var(--atlas-muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-strip strong {
  font-size: 24px;
}

.reports-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.report-sidebar,
.report-workspace {
  min-width: 0;
}

.report-sidebar {
  padding: 16px;
}

.section-title-row {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-title-row h2,
.report-header h2 {
  margin: 0;
}

.section-title-row p {
  margin: 4px 0 0;
  font-size: 12px;
}

.report-list,
.chapter-list,
.simple-list,
.sources-list {
  display: grid;
  gap: 10px;
}

.report-item,
.empty-state,
.chapter-card,
.simple-item,
.source-card {
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
}

.report-item {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
}

.report-item.active {
  border-color: var(--atlas-blue);
  box-shadow: 0 0 0 2px rgba(0, 87, 173, 0.10);
}

.report-item strong {
  color: var(--atlas-navy);
  font-size: 13px;
  line-height: 1.3;
}

.report-item span,
.selected-muted,
.save-status {
  font-size: 12px;
}

.report-workspace {
  padding: 16px;
}

.report-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.report-header h2 {
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-action,
.ghost-button,
.workspace-tabs button,
.mini-button {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary-action {
  background: var(--atlas-blue);
  color: #fff;
}

.primary-action:hover {
  background: var(--atlas-blue-dark);
}

.ghost-button,
.mini-button {
  background: #fff;
  border-color: var(--atlas-line);
  color: #2d405a;
}

.ghost-button:hover,
.mini-button:hover {
  border-color: var(--atlas-blue);
  color: var(--atlas-blue);
}

.validation-strip {
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  color: #344761;
  font-size: 13px;
}

.validation-strip.ok {
  background: var(--atlas-soft-green);
  border-color: #bde8c9;
  color: var(--atlas-green);
}

.validation-strip.warning {
  background: var(--atlas-soft-orange);
  border-color: #ffd7a6;
  color: #834000;
}

.validation-strip.error {
  background: #fff1f0;
  border-color: #f2c3bf;
  color: var(--atlas-red);
}

.workspace-tabs {
  gap: 8px;
  border-bottom: 1px solid var(--atlas-line);
  margin-bottom: 14px;
}

.workspace-tabs button {
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--atlas-muted);
}

.workspace-tabs button.active {
  border-color: var(--atlas-line);
  border-bottom-color: #fff;
  background: #fff;
  color: var(--atlas-blue);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.chapter-card,
.simple-item,
.source-card {
  padding: 14px;
}

.chapter-card__top {
  justify-content: space-between;
  gap: 12px;
}

.chapter-card h3,
.simple-item h3,
.source-card h3 {
  margin: 0 0 4px;
  color: var(--atlas-navy);
  font-size: 16px;
}

.chapter-state {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-state.completo {
  background: var(--atlas-green);
}

.chapter-state.incompleto,
.chapter-state.pendiente {
  background: var(--atlas-orange);
}

.chapter-auto {
  margin: 12px 0;
  border-left: 3px solid var(--atlas-blue);
  background: var(--atlas-soft-blue);
  padding: 10px 12px;
  color: #263a54;
  font-size: 13px;
  line-height: 1.45;
}

.chapter-editor,
.simple-item {
  display: grid;
  gap: 9px;
}

.chapter-one-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.chapter-one-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.chapter-one-card--wide {
  grid-column: 1 / -1;
}

.chapter-one-card h3 {
  margin: 0;
  font-size: 16px;
}

.chapter-one-card label {
  display: grid;
  gap: 6px;
  color: #2d405a;
  font-size: 12px;
  font-weight: 800;
}

.chapter-one-card input,
.chapter-one-card select {
  min-height: 38px;
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
  padding: 0 10px;
}

.chapter-one-location-grid,
.chapter-one-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chapter-one-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 14px;
  align-items: start;
}

.chapter-three-section {
  display: grid;
  gap: 12px;
  border: 1px solid #e1ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.chapter-three-image-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}

.chapter-three-figure-before-text {
  border-style: solid;
  background: #fff;
}

.chapter-four-grid {
  display: grid;
  gap: 12px;
}

.chapter-four-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.chapter-four-card--wide {
  grid-column: 1 / -1;
}

.chapter-four-card h3,
.chapter-four-card h4 {
  margin: 0;
  color: var(--atlas-navy);
}

.chapter-four-card h3 {
  font-size: 16px;
}

.chapter-four-card h4 {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-four-card label {
  display: grid;
  gap: 6px;
  color: #2d405a;
  font-size: 12px;
  font-weight: 800;
}

.chapter-four-card textarea {
  min-height: 118px;
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}

.chapter-four-card input,
.chapter-four-card select {
  min-height: 36px;
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
  padding: 0 9px;
}

.chapter-four-subsection {
  display: grid;
  gap: 10px;
  border: 1px solid #e1ebf6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.chapter-four-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.chapter-four-table-wrap {
  max-width: 100%;
}

.chapter-four-table {
  min-width: 860px;
}

.chapter-four-table--geotech-summary {
  min-width: 1480px;
  table-layout: fixed;
  font-size: 10px;
}

.chapter-four-table--geotech-summary th {
  background: #1f2933;
  color: #fff;
  font-size: 9px;
  line-height: 1.15;
  padding: 5px 4px;
}

.chapter-four-table--geotech-summary td {
  line-height: 1.2;
  padding: 5px 4px;
  vertical-align: middle;
}

.chapter-four-table--geotech-summary th:nth-child(4),
.chapter-four-table--geotech-summary td:nth-child(4) {
  width: 280px;
  text-align: left;
  white-space: normal;
}

.chapter-four-geotech-summary {
  background: #fff;
}

.chapter-four-geotech-box {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e5f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.chapter-four-geotech-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--atlas-navy);
}

.chapter-four-geotech-box-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chapter-four-geotech-box-header strong {
  font-size: 13px;
}

.chapter-four-geotech-box-header span,
.chapter-four-geotech-box-header small {
  color: #52657f;
  font-size: 11px;
  font-weight: 800;
}

.chapter-four-block-table {
  min-width: 1120px;
}

.chapter-four-block-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.chapter-four-block-table input,
.chapter-four-block-table select {
  min-height: 32px;
  border-radius: 6px;
  font-size: 12px;
}

.chapter-four-remove-block {
  min-width: 78px;
  color: var(--atlas-red);
}

.chapter-four-remove-block:hover {
  border-color: var(--atlas-red);
  color: var(--atlas-red);
}

.chapter-four-block-table th,
.chapter-four-block-table td {
  vertical-align: middle;
}

.chapter-four-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 8px 12px;
  align-items: stretch;
}

.chapter-four-checkbox-line {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid #d8e6f5;
  border-radius: 7px;
  background: #fff;
  padding: 7px 9px;
  color: #10243f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.chapter-four-checkbox-line input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.chapter-four-checkbox-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chapter-four-field-descriptions {
  display: grid;
  gap: 10px;
  border: 1px solid #d8e6f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.chapter-four-field-descriptions h4 {
  margin: 0;
  color: var(--atlas-navy);
  font-size: 13px;
  font-weight: 900;
}

.chapter-four-field-description {
  display: grid;
  gap: 6px;
  color: #203853;
  font-size: 12px;
  font-weight: 850;
}

.chapter-four-field-description textarea {
  min-height: 132px;
  line-height: 1.45;
}

.chapter-four-field-figure-preview {
  margin: 0;
  border: 1px solid #d8e6f5;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.chapter-four-field-figure-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: #eef4fb;
}

.chapter-four-field-figure-preview figcaption {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  color: #203853;
  font-size: 11px;
  line-height: 1.25;
}

.chapter-four-field-figure-preview small {
  color: #50627a;
  font-weight: 700;
}

.chapter-four-image-slot {
  border-style: solid;
  background: #fbfdff;
}

.chapter-five-grid,
.chapter-five-card {
  display: grid;
  gap: 14px;
}

.chapter-five-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8e2ef;
  background: #fff;
}

.chapter-five-card label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #10233f;
}

.chapter-five-card textarea {
  min-height: 110px;
  resize: vertical;
}

.chapter-five-card input {
  min-height: 36px;
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
  padding: 0 9px;
}

.signature-preview {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid #cbd7e6;
  background: #f8fbff;
  padding: 12px;
}

.signature-preview-logo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 56px;
  border: 1px solid #d7e1ee;
  background: #fff;
  color: #0b4ea2;
  font-size: 24px;
  font-weight: 900;
}

.signature-preview-logo img {
  max-width: 64px;
  max-height: 48px;
  object-fit: contain;
}

.signature-preview strong,
.signature-preview p,
.signature-preview small {
  display: block;
  margin: 0;
}

.signature-preview strong {
  color: #0b2545;
}

.signature-preview p {
  margin-top: 6px;
  color: #0b2545;
  font-weight: 800;
}

.signature-preview small {
  margin-top: 3px;
  color: #52647c;
  line-height: 1.35;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.inline-table-input {
  min-width: 140px;
}

.meter-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: min(180px, 100%);
}

.meter-input-wrap input {
  min-width: 0;
}

.meter-input-wrap span {
  color: #41546d;
  font-weight: 800;
}

.chapter-five-table .simple-muted {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.chapter-five-method {
  padding: 12px;
  border-left: 3px solid #1769aa;
  background: #f6f9fc;
}

.chapter-five-method p {
  margin: 6px 0;
  line-height: 1.55;
}

.chapter-five-method div {
  display: grid;
  gap: 5px;
}

.chapter-five-method code {
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #d8e2ef;
  color: #10233f;
}

.chapter-five-equations,
.chapter-five-memory {
  display: grid;
  gap: 8px;
}

.chapter-five-memory {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d8e2ef;
  background: #fff;
}

.chapter-five-memory > span {
  color: #50627a;
  font-size: 12px;
}

.chapter-five-equation {
  padding: 9px 12px;
  border-left: 3px solid #1769aa;
  background: #f6f9fc;
  text-align: center;
  overflow-x: auto;
}

.chapter-five-equation math {
  font-family: "Cambria Math", serif;
  font-size: 18px;
}

.chapter-five-equation math + .equation-fallback {
  display: none;
}

.chapter-five-equation small {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
}

.chapter-five-equation em {
  display: block;
  margin-top: 5px;
  color: #50627a;
  font-size: 10px;
  font-style: normal;
}

.chapter-five-chart-note {
  margin: 8px 0 0;
  color: #263a54;
  font-size: 12px;
  line-height: 1.45;
  text-align: justify;
}

.chapter-five-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chapter-five-chart {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e2ef;
  background: #fff;
}

.chapter-five-chart h4 {
  min-height: 34px;
  margin: 0 0 8px;
  font-size: 13px;
}

.chapter-five-chart svg {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
}

.chapter-five-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 11px;
}

.chapter-five-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chapter-five-chart-legend i {
  width: 14px;
  height: 4px;
}

.chapter-five-bibliography {
  padding: 12px;
  background: #f6f9fc;
  border: 1px solid #d8e2ef;
}

@media (max-width: 980px) {
  .chapter-five-chart-grid {
    grid-template-columns: 1fr;
  }
}

.chapter-one-card h4 {
  color: var(--atlas-navy);
  font-size: 12px;
  font-weight: 900;
}

.chapter-one-card h4 {
  margin: 4px 0 0;
}

.chapter-two-grid {
  display: grid;
  gap: 12px;
}

.chapter-two-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.chapter-two-card h3,
.chapter-two-card h4 {
  margin: 0;
  color: var(--atlas-navy);
}

.chapter-two-card h3 {
  font-size: 16px;
}

.chapter-two-card h4 {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-two-card label {
  display: grid;
  gap: 6px;
  color: #2d405a;
  font-size: 12px;
  font-weight: 800;
}

.chapter-two-card input,
.chapter-two-card select {
  min-height: 38px;
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
  padding: 0 10px;
}

.chapter-two-selector-grid,
.chapter-two-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.chapter-two-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e6f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.chapter-two-summary small {
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-two-summary strong {
  color: var(--atlas-blue);
  font-size: 18px;
}

.chapter-two-summary span {
  color: #425670;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.chapter-two-note {
  margin: -4px 0 0;
  color: #000;
  font-size: 12px;
  line-height: 1.45;
  text-align: justify;
}

.chapter-two-card h5 {
  margin: 0;
  color: #10243f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-two-profile-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.chapter-two-profile-summary article {
  display: grid;
  gap: 3px;
  border: 1px solid #d8e6f5;
  border-radius: 7px;
  background: #f8fbff;
  padding: 10px;
}

.chapter-two-profile-summary small {
  color: var(--atlas-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-two-profile-summary strong {
  color: var(--atlas-blue);
  font-size: 14px;
}

.chapter-two-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
}

.chapter-two-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.chapter-two-table th {
  background: #eef4fb;
  color: var(--atlas-navy);
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-two-table td {
  border-top: 1px solid #d8e2ef;
  padding: 9px 10px;
  color: #10243f;
  vertical-align: top;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.chapter-two-table--construction {
  table-layout: fixed;
}

.chapter-two-table--construction th:nth-child(1),
.chapter-two-table--construction td:nth-child(1),
.chapter-two-table--construction th:nth-child(2),
.chapter-two-table--construction td:nth-child(2) {
  width: 16%;
  text-align: center;
  white-space: nowrap;
}

.chapter-two-table--construction th:nth-child(3),
.chapter-two-table--construction td:nth-child(3) {
  width: 68%;
  text-align: left;
}

.chapter-two-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #41536c;
  font-size: 12px;
}

.chapter-one-preview {
  display: grid;
  gap: 5px;
  border: 1px solid var(--atlas-line-soft);
  border-radius: 7px;
  background: #f8fbff;
  padding: 10px 12px;
  color: #30445f;
  font-size: 13px;
}

.chapter-one-preview strong {
  color: var(--atlas-navy);
}

.chapter-one-image-slot {
  display: grid;
  gap: 12px;
  border: 1px dashed #b9c8dc;
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  min-width: 0;
}

.chapter-one-image-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.chapter-one-image-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chapter-one-image-header strong,
.chapter-one-image-name strong {
  color: var(--atlas-navy);
}

.chapter-one-image-header span:not(.chapter-one-image-state) {
  color: #30445f;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.chapter-one-image-state {
  flex: 0 0 auto;
  border: 1px solid #cbd7e6;
  border-radius: 999px;
  background: #eef5ff;
  color: #24405f;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
}

.chapter-one-image-preview {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #f6f9fd;
  padding: 8px;
}

.chapter-one-image-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.chapter-one-image-preview figcaption,
.chapter-one-image-preview span {
  color: var(--atlas-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chapter-one-image-preview--empty {
  min-height: 150px;
  align-content: center;
  justify-items: center;
  border-style: dashed;
  text-align: center;
}

.chapter-one-image-name,
.chapter-one-upload-row {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chapter-one-image-name span {
  color: var(--atlas-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chapter-one-upload-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.chapter-one-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.chapter-one-upload-button {
  justify-content: center;
  cursor: pointer;
}

.chapter-one-upload-name {
  min-width: 0;
  border: 1px solid #d8e2ef;
  border-radius: 7px;
  background: #fff;
  color: #30445f;
  font-size: 12px;
  line-height: 1.35;
  padding: 9px 10px;
  overflow-wrap: anywhere;
}

.chapter-one-cartography-picker {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfe0f2;
  border-radius: 7px;
  background: #f6fbff;
}

.chapter-one-cartography-picker button {
  justify-self: start;
}

.chapter-one-cartography-picker select {
  overflow-wrap: anywhere;
}

.chapter-one-figure-summary {
  display: grid;
  gap: 6px;
  margin: 0;
  border: 1px solid #d8e6f5;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
}

.chapter-one-figure-summary div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
}

.chapter-one-figure-summary dt {
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-one-figure-summary dd {
  margin: 0;
  color: #253955;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

textarea,
.simple-item input {
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: var(--atlas-navy);
}

textarea {
  min-height: 116px;
  padding: 10px 12px;
  resize: vertical;
}

.simple-item textarea {
  min-height: 86px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #24364e;
  font-size: 13px;
  font-weight: 750;
}

.chapter-meta {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--atlas-line);
  border-radius: 999px;
  padding: 0 8px;
  color: #41536c;
  font-size: 12px;
}

.missing-list,
.warning-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
}

.missing-list {
  color: #874000;
}

.warning-list {
  color: #526071;
}

.item-row {
  justify-content: space-between;
  gap: 12px;
}

.item-row strong {
  color: var(--atlas-navy);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compliance-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #9bcbe8;
  border-radius: 8px;
  background: #fff;
}

.compliance-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.25;
}

.compliance-table th {
  background: #4f99d3;
  color: #fff;
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.compliance-table td {
  border: 1px solid #b9d4e8;
  padding: 8px 10px;
  vertical-align: top;
}

.compliance-table tbody tr:nth-child(odd) {
  background: #c8ecf8;
}

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

.compliance-table tr.pendiente td:last-child {
  color: #874000;
  font-weight: 750;
}

.compliance-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--atlas-soft-green);
  color: var(--atlas-green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.compliance-state.pendiente {
  background: var(--atlas-soft-orange);
  color: #874000;
}

.chapter-seven-foundations {
  display: grid;
  gap: 14px;
}

.chapter-seven-foundations h5 {
  margin: 2px 0 0;
  color: var(--atlas-navy);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-seven-ui-warning {
  display: grid;
  gap: 4px;
  border: 1px solid #f4c56d;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  background: #fff8e7;
  color: #5f370e;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.chapter-seven-ui-warning strong {
  color: #7a3f00;
  font-size: 12px;
  font-weight: 900;
}

.chapter-seven-foundation-questionnaire {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}

.chapter-seven-foundation-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  min-height: 86px;
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.chapter-seven-foundation-option.selected {
  border-color: var(--atlas-blue);
  background: #eef6ff;
  box-shadow: inset 3px 0 0 var(--atlas-blue);
}

.chapter-seven-foundation-option input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}

.chapter-seven-foundation-option strong,
.chapter-seven-foundation-card__header strong {
  display: block;
  color: var(--atlas-navy);
  font-size: 13px;
  font-weight: 900;
}

.chapter-seven-foundation-option small,
.chapter-seven-foundation-card__header small {
  display: block;
  margin-top: 4px;
  color: var(--atlas-muted);
  font-size: 12px;
  line-height: 1.3;
}

.chapter-seven-foundation-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.chapter-seven-foundation-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
  gap: 10px;
}

.chapter-seven-foundation-actions,
.chapter-seven-foundation-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chapter-seven-foundation-scenarios,
.chapter-seven-foundation-components {
  display: grid;
  gap: 12px;
}

.chapter-seven-foundation-scenario,
.chapter-seven-foundation-component {
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.chapter-seven-foundation-scenario {
  box-shadow: 0 12px 26px rgba(15, 35, 60, 0.06);
}

.chapter-seven-foundation-component {
  background: #f8fbff;
}

.chapter-seven-foundation-scenario__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.chapter-seven-foundation-scenario-grid,
.chapter-seven-foundation-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.chapter-seven-foundation-component-grid {
  grid-template-columns: 110px minmax(170px, 1fr) minmax(240px, 1.4fr) minmax(150px, 0.7fr);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 800;
  color: var(--atlas-navy);
}

.checkbox-inline input {
  width: 18px;
  height: 18px;
}

.ghost.danger {
  border-color: #f2b8b5;
  color: #a12820;
  background: #fff8f7;
}

.secondary.compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.pill.warning {
  background: var(--atlas-soft-orange);
  color: #874000;
}

.source-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #41536c;
  font-size: 12px;
}

.empty-state {
  padding: 18px;
  display: grid;
  gap: 10px;
  color: var(--atlas-muted);
}

.empty-state strong {
  color: var(--atlas-navy);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(520px, calc(100vw - 44px));
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7, 29, 58, 0.18);
  color: var(--atlas-navy);
  padding: 12px 14px;
  font-size: 13px;
}

.toast.error {
  border-color: #f2c3bf;
  background: #fff4f2;
  color: var(--atlas-red);
}

.chapter-eight-editor > .chapter-five-card {
  display: grid;
  gap: 14px;
}

.chapter-eight-subsection,
.chapter-eight-treatment {
  border-top: 1px solid var(--atlas-line);
  padding-top: 12px;
}

.chapter-eight-subsection h5,
.chapter-eight-component h6,
.chapter-eight-treatment h5 {
  color: var(--atlas-navy);
  font-size: 13px;
  margin: 0 0 7px;
}

.chapter-eight-component {
  border-left: 3px solid #d5e5f7;
  margin: 12px 0 0 8px;
  padding: 3px 0 3px 12px;
}

.chapter-eight-editor textarea {
  min-height: 132px;
  width: 100%;
}

.chapter-eight-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 8px;
}

.chapter-eight-editor-actions .secondary-button {
  min-height: 30px;
  padding: 5px 9px;
}

.chapter-eight-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.chapter-eight-table {
  min-width: 720px;
  table-layout: fixed;
}

.chapter-eight-table th,
.chapter-eight-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.chapter-eight-improvement-copy {
  border-left: 3px solid #8fb7df;
  margin: 10px 0 12px;
  padding: 2px 0 2px 12px;
}

.chapter-eight-improvement-copy p {
  color: #1d2d44;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 9px;
}

.chapter-eight-schematic-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 10px 0 14px;
}

.chapter-eight-schematic {
  margin: 0;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.chapter-eight-schematic img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.chapter-eight-schematic figcaption {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 7px;
}

.chapter-eight-schematic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.chapter-eight-schematic-meta span {
  background: #eef6ff;
  border: 1px solid #c7ddf4;
  border-radius: 999px;
  color: #203853;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.chapter-eight-foundation-table th:nth-child(3),
.chapter-eight-foundation-table td:nth-child(3) {
  width: 26%;
}

.chapter-eight-materials-table th:last-child,
.chapter-eight-materials-table td:last-child {
  width: 52%;
}

.professional-card {
  display: block;
  max-width: 760px;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border: 1px solid #cfd9e6;
  background: #ffffff;
}

.chapter-eight-treatment {
  background: #f7fbff;
  border: 1px solid #cfe0f2;
  border-radius: 6px;
  padding: 12px;
}

.chapter-eight-treatment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chapter-eight-treatment-grid .span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .reports-layout,
  .metric-strip,
  .chapter-one-grid {
    grid-template-columns: 1fr;
  }

  .report-header,
  .reports-hero,
  .project-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-actions {
    justify-content: flex-start;
  }
}

.cover-editor {
  display: grid;
  grid-template-columns: minmax(390px, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.cover-controls,
.cover-preview-wrap {
  border: 1px solid var(--atlas-line);
  background: #fff;
  padding: 16px;
}

.cover-fieldset {
  border: 0;
  border-top: 1px solid var(--atlas-line);
  margin: 16px 0 0;
  padding: 14px 0 0;
}

.cover-fieldset legend {
  padding: 0 10px 0 0;
  color: var(--atlas-navy);
  font-weight: 800;
}

.cover-template-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--atlas-line);
  width: min(100%, 430px);
}

.cover-template-segments button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--atlas-line);
  background: #fff;
  color: #344761;
  font-weight: 700;
  cursor: pointer;
}

.cover-template-segments button:last-child {
  border-right: 0;
}

.cover-template-segments button.active {
  background: var(--atlas-blue);
  color: #fff;
}

.cover-color-grid,
.cover-two-columns,
.cover-slider-grid,
.cover-text-grid,
.cover-visible-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.cover-color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cover-color-reset {
  margin-top: 10px;
}

.cover-two-columns,
.cover-text-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cover-slider-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-cover-image-settings] {
  transition: opacity 160ms ease;
}

[data-cover-image-settings].is-disabled {
  opacity: 0.42;
}

.cover-visible-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cover-controls label {
  display: grid;
  gap: 5px;
  color: #344761;
  font-size: 12px;
  font-weight: 700;
}

.cover-controls input[type="text"],
.cover-controls select {
  width: 100%;
  min-width: 0;
}

.cover-controls input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--atlas-line);
  background: #fff;
}

.cover-controls input[type="range"] {
  width: 100%;
}

.cover-text-field {
  min-width: 0;
}

.cover-text-field__top,
.cover-inline-toggle,
.cover-footer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cover-text-field__top {
  justify-content: space-between;
}

.cover-inline-toggle,
.cover-footer-toggle {
  color: var(--atlas-muted);
  font-size: 11px;
  font-weight: 700;
}

.cover-inline-toggle input,
.cover-footer-toggle input {
  margin: 0;
}

.cover-controls .cover-footer-toggle {
  margin-top: 12px;
  justify-content: flex-start;
  display: flex;
}

.cover-visible-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
}

.cover-upload-control {
  align-content: end;
}

.cover-upload-control input {
  min-height: 38px;
  padding: 6px;
  border: 1px solid var(--atlas-line);
  background: #f8fbff;
}

.cover-preview-wrap {
  position: sticky;
  top: 12px;
  background: #eef2f6;
}

.cover-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--atlas-navy);
}

.cover-preview-toolbar span {
  color: var(--atlas-muted);
  font-size: 11px;
}

.cover-preview-sheet {
  width: min(100%, 430px);
  margin: 0 auto;
  aspect-ratio: 8.5 / 11;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 35, 64, 0.16);
  overflow: hidden;
}

.cover-preview-sheet img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cover-preview-sheet img[data-dragging-cover="true"] {
  cursor: grabbing;
}

.analysis-memory-editor {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.annex-workspace {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.annex-section {
  min-width: 0;
  border-top: 1px solid var(--atlas-line);
  padding-top: 18px;
}

.location-annex-panel {
  display: grid;
  gap: 14px;
}

.professional-annex-panel {
  display: grid;
  gap: 14px;
}

.professional-annex-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.professional-annex-heading h2 {
  margin: 3px 0 5px;
  color: var(--atlas-navy);
  font-size: 20px;
}

.professional-annex-heading p {
  margin: 0;
}

.professional-annex-heading > strong {
  flex: 0 0 auto;
  color: var(--atlas-blue-dark);
  font-size: 12px;
}

.professional-annex-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 6px;
  background: #f8fbff;
}

.professional-annex-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344761;
  font-size: 11px;
  font-weight: 750;
}

.professional-annex-description {
  grid-column: 1 / -1;
}

.professional-annex-files {
  display: grid;
  gap: 8px;
}

.professional-annex-files > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-left: 3px solid var(--atlas-blue);
  background: #f5f8fc;
}

.professional-annex-files strong {
  color: var(--atlas-navy);
  font-size: 12px;
}

.professional-annex-files span {
  color: #586b83;
  font-size: 11px;
}

.final-package-panel {
  display: grid;
  gap: 14px;
}

.final-package-heading,
.final-package-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.final-package-heading h2 {
  margin: 3px 0 5px;
  color: var(--atlas-navy);
  font-size: 20px;
}

.final-package-heading p {
  margin: 0;
}

.final-package-state {
  max-width: 320px;
  padding: 7px 9px;
  border: 1px solid #e6b85c;
  border-radius: 5px;
  background: #fff8e8;
  color: #77520d;
  font-size: 11px;
  font-weight: 750;
}

.final-package-state.is-ready {
  border-color: #73b58a;
  background: #eef9f1;
  color: #24613a;
}

.final-package-upload {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--atlas-line);
  border-radius: 6px;
  background: #f8fbff;
}

.final-package-upload label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344761;
  font-size: 11px;
  font-weight: 750;
}

.final-package-upload .save-status {
  grid-column: 1 / -1;
}

.final-package-manifest {
  display: grid;
  gap: 7px;
}

.final-package-manifest > strong {
  color: var(--atlas-navy);
  font-size: 12px;
}

.final-package-manifest > div {
  display: grid;
  grid-template-columns: minmax(190px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 10px;
  border-left: 3px solid var(--atlas-blue);
  background: #f5f8fc;
}

.final-package-manifest span {
  color: #1c3558;
  font-size: 11px;
  font-weight: 800;
}

.final-package-manifest small,
.final-package-note {
  color: #586b83;
  font-size: 11px;
}

.final-package-note {
  margin: 0;
}

.location-annex-heading,
.location-annex-actions,
.location-annex-toolbar,
.location-annex-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.location-annex-heading h2 {
  margin: 3px 0 5px;
  color: var(--atlas-navy);
  font-size: 20px;
}

.location-annex-heading p,
.location-annex-status-row p {
  margin: 0;
}

.location-annex-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 285px);
  gap: 14px;
  min-width: 0;
}

.location-annex-stage-wrap,
.location-annex-controls {
  min-width: 0;
}

.location-annex-stage-wrap {
  display: grid;
  gap: 9px;
  align-content: start;
}

.location-annex-stage {
  position: relative;
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid #9eb5cf;
  border-radius: 6px;
  background: #eaf0f6;
  user-select: none;
  touch-action: none;
}

.location-annex-stage.is-drawing {
  cursor: crosshair;
}

.location-annex-stage > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: contain;
  pointer-events: none;
}

.location-annex-polygon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.location-annex-marker,
.location-annex-vertex {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 2px 7px rgb(15 35 60 / 32%);
  cursor: grab;
  touch-action: none;
}

.location-annex-marker {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 9px;
  font-weight: 850;
}

.location-annex-vertex {
  width: 17px;
  height: 17px;
  padding: 0;
  background: #fff;
}

.location-annex-marker:active,
.location-annex-vertex:active {
  cursor: grabbing;
}

.location-annex-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}

.location-annex-control-group {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--atlas-line);
}

.location-annex-control-group:last-child {
  border-bottom: 0;
}

.location-annex-control-group > strong {
  color: var(--atlas-navy);
  font-size: 12px;
}

.location-annex-probe-list {
  display: grid;
  gap: 5px;
  max-height: 230px;
  overflow-y: auto;
}

.location-annex-probe-list label,
.location-annex-color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: #344761;
  font-size: 11px;
  font-weight: 700;
}

.location-annex-color-field input[type="color"] {
  width: 40px;
  height: 30px;
  padding: 2px;
}

.location-annex-color-field input[type="range"] {
  min-width: 100px;
  flex: 1 1 auto;
}

.location-annex-size-field {
  flex-wrap: wrap;
}

.location-annex-size-field > span {
  flex: 1 1 100%;
}

.location-annex-range-value {
  min-width: 42px;
  color: #10213d;
  font-size: 11px;
  text-align: right;
}

.location-annex-file-input {
  max-width: 100%;
}

.location-annex-save-status {
  color: var(--atlas-blue-dark);
  font-size: 11px;
  font-weight: 750;
}

.location-annex-save-status.is-dirty {
  color: #9a5b00;
}

.laboratory-annex-panel {
  display: grid;
  gap: 14px;
}

.laboratory-annex-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.laboratory-annex-heading h2 {
  margin: 3px 0 5px;
  color: var(--atlas-navy);
  font-size: 20px;
}

.laboratory-annex-heading p {
  margin: 0;
}

.laboratory-annex-frame {
  display: block;
  width: 100%;
  min-width: 0;
  height: 980px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  background: #fff;
}

.annex-index {
  min-width: 0;
}

.annex-index-heading,
.annex-documents-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.annex-index-heading h2,
.annex-documents-heading h2 {
  margin: 3px 0 5px;
  color: var(--atlas-navy);
  font-size: 20px;
}

.annex-index-heading p,
.annex-documents-heading p {
  margin: 0;
}

.annex-index-heading > strong,
.annex-documents-heading > span {
  flex: 0 0 auto;
  color: var(--atlas-blue-dark);
  font-size: 12px;
}

.annex-index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 9px;
  min-width: 0;
}

.annex-index-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-content: start;
  min-width: 0;
  min-height: 142px;
  border: 1px solid var(--atlas-line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.annex-index-card.has-document {
  border-color: #7ba7d7;
  box-shadow: inset 0 3px 0 var(--atlas-blue);
}

.annex-index-letter {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--atlas-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.annex-index-card > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.annex-index-card strong,
.annex-index-card p,
.annex-index-card span {
  overflow-wrap: anywhere;
}

.annex-index-card strong {
  color: var(--atlas-navy);
  font-size: 12px;
  line-height: 1.3;
}

.annex-index-card p {
  margin: 0;
  color: #40516a;
  font-size: 10px;
  line-height: 1.35;
}

.annex-index-card > div > span {
  color: var(--atlas-blue-dark);
  font-size: 10px;
  font-weight: 750;
}

.annex-index-action {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: start;
  text-decoration: none;
}

.annex-document-code {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--atlas-blue-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.annex-type-field {
  display: grid;
  gap: 5px;
  color: #344761;
  font-size: 12px;
  font-weight: 750;
}

.annex-type-field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.analysis-memory-heading {
  align-items: flex-start;
  gap: 20px;
}

.analysis-memory-heading h2 {
  margin: 3px 0 6px;
  font-size: 20px;
}

.analysis-memory-heading p {
  margin: 0;
}

.analysis-memory-snapshot {
  flex: 0 0 auto;
  max-width: 260px;
  color: var(--atlas-muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.analysis-memory-toolbar,
.analysis-memory-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.analysis-memory-toolbar strong {
  margin-left: auto;
  color: var(--atlas-blue-dark);
  font-size: 12px;
}

.analysis-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.analysis-memory-card {
  min-width: 0;
  min-height: 98px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--atlas-line);
  border-radius: 7px;
  padding: 13px;
  background: #fff;
  cursor: pointer;
}

.analysis-memory-card:has(input:checked) {
  border-color: var(--atlas-blue);
  box-shadow: inset 3px 0 0 var(--atlas-blue);
  background: #f7fbff;
}

.analysis-memory-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
  background: #f6f8fb;
}

.analysis-memory-card input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.analysis-memory-card__body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.analysis-memory-card__body strong,
.analysis-memory-card__body small,
.analysis-memory-card__body span {
  overflow-wrap: anywhere;
}

.analysis-memory-card__body strong {
  color: var(--atlas-navy);
  font-size: 13px;
}

.analysis-memory-card__body small {
  color: #40516a;
  font-size: 11px;
  line-height: 1.35;
}

.analysis-memory-card__body span {
  color: var(--atlas-muted);
  font-size: 10px;
}

.analysis-memory-submodules {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.analysis-memory-submodule {
  align-items: center;
  border: 1px solid var(--atlas-line-soft);
  border-radius: 6px;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: 16px minmax(0, 1fr);
  padding: 6px;
}

.analysis-memory-submodule.is-warning {
  background: #fff8e6;
  border-color: #e8c26d;
}

.analysis-memory-submodule input {
  margin: 0;
}

.analysis-memory-submodule small {
  grid-column: 2;
}

.analysis-memory-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding-top: 14px;
  border-top: 1px solid var(--atlas-line-soft);
}

.analysis-memory-options > label:not(.checkbox-line) {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #344761;
  font-size: 12px;
  font-weight: 750;
}

.analysis-memory-options select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.analysis-memory-check {
  min-height: 34px;
  align-self: center;
}

.analysis-memory-footer {
  justify-content: space-between;
  padding-top: 3px;
}

@media (max-width: 1100px) {
  .cover-editor {
    grid-template-columns: 1fr;
  }

  .cover-preview-wrap {
    position: static;
  }

  .analysis-memory-grid {
    grid-template-columns: 1fr;
  }

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

  .location-annex-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .annex-index-grid {
    grid-template-columns: 1fr;
  }

  .annex-index-heading,
  .annex-documents-heading,
  .professional-annex-heading,
  .final-package-heading,
  .final-package-actions,
  .laboratory-annex-heading,
  .location-annex-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .final-package-upload,
  .final-package-manifest > div {
    grid-template-columns: 1fr;
  }

  .final-package-upload .save-status {
    grid-column: auto;
  }

  .professional-annex-description {
    grid-column: auto;
  }

  .login-shell,
  .app-shell.module-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: none;
  }

  .topbar {
    height: auto;
    min-height: 70px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .chapter-one-location-grid,
  .chapter-one-image-grid,
  .chapter-one-upload-row,
  .chapter-seven-foundation-questionnaire,
  .chapter-seven-foundation-controls,
  .chapter-eight-treatment-grid {
    grid-template-columns: 1fr;
  }

  .cover-color-grid,
  .cover-two-columns,
  .cover-slider-grid,
  .cover-text-grid,
  .cover-visible-grid {
    grid-template-columns: 1fr;
  }

  .analysis-memory-heading {
    display: grid;
  }

  .analysis-memory-snapshot {
    max-width: none;
    text-align: left;
  }

  .analysis-memory-options {
    grid-template-columns: 1fr;
  }

  .analysis-memory-toolbar strong {
    width: 100%;
    margin-left: 0;
  }

  .chapter-eight-treatment-grid .span-2 {
    grid-column: auto;
  }

  .content-area {
    padding: 16px;
  }
}
