:root {
  color-scheme: light;
  --deep: #0e2e38;
  --deep-2: #153f4b;
  --teal: #2e6270;
  --teal-soft: #e8f2f2;
  --sage: #9fc1b6;
  --sand: #c9a66b;
  --sand-dark: #8a6428;
  --paper: #f5f2ea;
  --card: #ffffff;
  --line: #ded8cb;
  --ink: #17272b;
  --ink-2: #42575c;
  --ink-3: #6e8185;
  --green: #147a3e;
  --green-bg: #ecf8f0;
  --red: #b42318;
  --red-bg: #fff0ef;
  --amber: #9a5b06;
  --amber-bg: #fff7e5;
  --blue: #1d5f8a;
  --blue-bg: #edf7ff;
  --gray-bg: #f1f4f5;
  --shadow: 0 10px 28px rgba(14, 46, 56, 0.10);
  --radius: 18px;
  --nav-height: 72px;
  --topbar-height: 62px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(159, 193, 182, 0.16), transparent 30rem),
    var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label,
select {
  touch-action: manipulation;
}

button {
  border: 0;
}

img {
  max-width: 100%;
}

a {
  color: var(--teal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(46, 98, 112, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--deep);
  font-weight: 800;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  z-index: 70;
  top: 0;
  display: flex;
  min-height: calc(var(--topbar-height) + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(135deg, rgba(14,46,56,0.98), rgba(21,63,75,0.98));
  color: #fff;
  box-shadow: 0 4px 16px rgba(14,46,56,0.16);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.topbar-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16);
}

.topbar-title {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-subtitle {
  margin-top: 3px;
  color: rgba(255,255,255,0.66);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.save-status {
  display: inline-flex;
  min-width: 88px;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  font-weight: 800;
}

.save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(159,193,182,0.13);
}

.save-status[data-state="saving"] .save-dot {
  background: var(--sand);
  animation: pulse 1s ease-in-out infinite;
}

.save-status[data-state="error"] .save-dot {
  background: #ff766c;
}

.save-status[data-state="offline"] .save-dot {
  background: #f5c451;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.main-content {
  width: 100%;
  max-width: 760px;
  min-height: calc(100vh - var(--topbar-height));
  margin: 0 auto;
  padding: 16px 14px calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));
}

.bottom-nav {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(14,46,56,0.12);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 -8px 24px rgba(14,46,56,0.10);
  backdrop-filter: blur(14px);
}

.nav-button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 800;
}

.nav-button .icon {
  width: 22px;
  height: 22px;
}

.nav-button[aria-current="page"] {
  background: var(--teal-soft);
  color: var(--deep);
}

.nav-button[aria-current="page"]::after {
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sand-dark);
  content: "";
}

.page {
  animation: page-in 160ms ease-out;
}

@keyframes page-in {
  from { opacity: 0.45; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  margin: 3px 2px 16px;
}

.eyebrow {
  color: var(--sand-dark);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  margin: 5px 0 4px;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 8vw, 36px);
  line-height: 1.08;
}

.page-subtitle {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

.hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(159,193,182,0.24), transparent 48%),
    linear-gradient(145deg, var(--deep), var(--deep-2) 65%, var(--teal));
  color: #fff;
  box-shadow: 0 14px 34px rgba(14,46,56,0.20);
}

.hero-card::after {
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  content: "";
}

.hero-badges,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hero-badge {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.84);
}

.hero-card h1,
.hero-card h2 {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.08;
}

.hero-card h1 em,
.hero-card h2 em {
  color: #c5ded6;
  font-weight: 500;
}

.hero-card p {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 0;
  color: rgba(255,255,255,0.72);
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card,
.summary-card,
.question-card,
.module-card,
.report-section,
.loading-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 3px 14px rgba(14,46,56,0.05);
}

.card,
.summary-card,
.report-section {
  margin-bottom: 14px;
  padding: 16px;
}

.card-head,
.section-head,
.question-head-row,
.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title,
.section-title {
  margin: 0;
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.card-kicker {
  margin-bottom: 5px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-copy {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.stat-box {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  text-align: center;
}

.stat-box .value {
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.stat-box .label {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-box.danger .value { color: var(--red); }
.stat-box.warning .value { color: var(--amber); }
.stat-box.good .value { color: var(--green); }

.progress-bar {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e5dd;
}

.progress-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--sage));
  transition: width 180ms ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--gray-bg);
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn.primary {
  background: var(--deep);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14,46,56,0.16);
}

.btn.sand {
  background: var(--sand);
  color: #17272b;
}

.btn.outline {
  border-color: var(--line);
  background: #fff;
  color: var(--deep);
}

.btn.danger {
  border-color: #f2b6b2;
  background: var(--red-bg);
  color: var(--red);
}

.btn.small-btn {
  min-height: 44px;
  padding: 8px 11px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

.btn:disabled,
.answer-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--deep);
}

.icon-button .icon {
  width: 20px;
  height: 20px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.action-card {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-align: left;
  box-shadow: 0 3px 14px rgba(14,46,56,0.05);
}

.action-card .action-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--deep);
}

.action-card .action-icon .icon {
  width: 23px;
  height: 23px;
}

.action-card strong {
  display: block;
  color: var(--deep);
  font-size: 16px;
  line-height: 1.3;
}

.action-card span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.alert .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert.info {
  border-color: #b9d9ea;
  background: var(--blue-bg);
  color: #214f6d;
}

.alert.warning {
  border-color: #ead1a3;
  background: var(--amber-bg);
  color: #6f480c;
}

.alert.danger {
  border-color: #efb8b4;
  background: var(--red-bg);
  color: #7c251f;
}

.alert.success {
  border-color: #b8ddc3;
  background: var(--green-bg);
  color: #145a31;
}

.profile-grid,
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.profile-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eeebe4;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-label {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-value {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.filters {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  margin: 10px -14px 12px;
  padding: 2px 14px 6px;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.select-wrap {
  position: relative;
  margin-bottom: 12px;
}

.select-wrap label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-wrap select {
  width: 100%;
  min-height: 48px;
  padding: 10px 38px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-card {
  overflow: hidden;
  border-width: 2px;
}

.question-card.status-good {
  border-color: #b5ddc1;
}

.question-card.status-gap {
  border-color: #efaaa4;
}

.question-card.status-pending,
.question-card.status-nv {
  border-color: #e4c890;
}

.question-card.status-na {
  border-color: #c9d1d5;
  background: #fbfcfc;
}

.question-card.status-priority-open {
  box-shadow: 0 0 0 3px rgba(180,35,24,0.08), 0 5px 18px rgba(14,46,56,0.06);
}

.question-head {
  padding: 14px 14px 9px;
}

.question-id {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.badge.priority {
  background: var(--red-bg);
  color: var(--red);
}

.badge.info {
  background: var(--blue-bg);
  color: var(--blue);
}

.badge.reference {
  background: var(--gray-bg);
  color: var(--ink-2);
}

.badge.good {
  background: var(--green-bg);
  color: var(--green);
}

.badge.warning {
  background: var(--amber-bg);
  color: var(--amber);
}

.question-title {
  margin: 10px 0 5px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.48;
}

.question-short {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.answer-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 14px 13px;
}

.answer-button {
  min-height: 46px;
  padding: 7px 2px;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: #fafbfb;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 900;
}

.answer-button.selected.yes {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}

.answer-button.selected.no {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}

.answer-button.selected.na {
  border-color: var(--ink-3);
  background: var(--gray-bg);
  color: var(--ink-2);
}

.answer-button.selected.nv {
  border-color: var(--amber);
  background: var(--amber-bg);
  color: var(--amber);
}

.response-panel {
  margin: 0 14px 12px;
  padding: 12px;
  border-radius: 12px;
}

.response-panel.gap {
  border: 1px solid #efb1ac;
  background: var(--red-bg);
}

.response-panel.na {
  border: 1px solid #d4dadd;
  background: var(--gray-bg);
}

.response-panel.nv {
  border: 1px solid #e4cb9b;
  background: var(--amber-bg);
}

.response-panel label,
.field label,
.signoff-grid label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
}

.field-hint {
  margin: -1px 0 7px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}

textarea,
input[type="text"],
input[type="date"],
select {
  width: 100%;
  border: 1px solid #cfd6d8;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}

textarea,
input[type="text"],
input[type="date"] {
  min-height: 46px;
  padding: 10px 11px;
  font-size: 16px;
}

textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.45;
}

textarea.invalid,
input.invalid,
select.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(180,35,24,0.08);
}

.question-details {
  border-top: 1px solid #ece9e2;
}

.question-details > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: var(--teal);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
}

.question-details > summary::-webkit-details-marker {
  display: none;
}

.question-details > summary::after {
  flex: 0 0 auto;
  color: var(--ink-3);
  content: "+";
  font-size: 18px;
  font-weight: 500;
}

.question-details[open] > summary::after {
  content: "–";
}

.details-body {
  padding: 2px 14px 14px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.details-body h4 {
  margin: 12px 0 5px;
  color: var(--deep);
  font-size: 14px;
}

.details-body ul {
  margin: 5px 0 0;
  padding-left: 18px;
}

.details-body li + li {
  margin-top: 5px;
}

.note-area {
  display: grid;
  gap: 11px;
}

.photo-block {
  margin-top: 12px;
}

.photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.photo-head strong {
  color: var(--deep);
  font-size: 14px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-tile,
.photo-add {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 11px;
}

.photo-tile {
  border: 1px solid var(--line);
  background: var(--gray-bg);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 50%;
  background: rgba(20,31,34,0.78);
  color: #fff;
}

.photo-remove .icon {
  width: 18px;
  height: 18px;
}

.photo-add {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 2px dashed #b99b69;
  background: #fffaf0;
  color: var(--sand-dark);
  cursor: pointer;
  text-align: center;
}

.photo-add .icon {
  width: 22px;
  height: 22px;
}

.photo-add span {
  font-size: 14px;
  font-weight: 900;
}

.photo-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auto-na-note {
  margin: 0 14px 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--gray-bg);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.module-list {
  display: grid;
  gap: 11px;
}

.module-card {
  overflow: hidden;
}

.module-card summary {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.module-card summary::-webkit-details-marker { display: none; }

.module-card summary::after {
  color: var(--teal);
  content: "+";
  font-size: 22px;
}

.module-card[open] summary::after { content: "–"; }

.module-title {
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
}

.module-subtitle {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}

.module-body {
  padding: 0 14px 14px;
  border-top: 1px solid #ece9e2;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

.module-body ul {
  margin: 12px 0;
  padding-left: 18px;
}

.drill-box {
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--deep);
  font-weight: 750;
}

.reference-list {
  display: grid;
  gap: 9px;
}

.reference-link {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.reference-link strong {
  display: block;
  color: var(--deep);
  font-size: 14px;
}

.reference-link span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.open-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.open-item {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.open-item strong {
  display: block;
  color: var(--deep);
  font-size: 14px;
}

.open-item span {
  display: block;
  margin-top: 3px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.35;
}

.open-item .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--teal);
}

.signoff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.action-stack {
  display: grid;
  gap: 9px;
}

.storage-meter {
  margin-top: 10px;
}

.storage-meter .bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e5dd;
}

.storage-meter .bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.storage-meter p {
  margin: 7px 0 0;
  color: var(--ink-3);
  font-size: 14px;
}

.report-answer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.report-answer-table th,
.report-answer-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #ece9e2;
  text-align: left;
  vertical-align: top;
}

.report-answer-table th {
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.answer-pill {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.answer-pill.good { background: var(--green-bg); color: var(--green); }
.answer-pill.gap { background: var(--red-bg); color: var(--red); }
.answer-pill.pending { background: var(--amber-bg); color: var(--amber); }
.answer-pill.na { background: var(--gray-bg); color: var(--ink-2); }

.dialog {
  width: min(94vw, 620px);
  max-height: min(88vh, 780px);
  max-height: min(88dvh, 780px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(5,26,32,0.30);
}

.dialog::backdrop {
  background: rgba(5,26,32,0.65);
  backdrop-filter: blur(3px);
}

.dialog-form {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  color: var(--deep);
  font-size: 18px;
}

.dialog-body {
  overflow-y: auto;
  padding: 16px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.field label {
  color: var(--deep);
}

.field + .field {
  margin-top: 12px;
}

.field select {
  min-height: 46px;
  padding: 10px 11px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 14px;
  bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom));
  left: 14px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(14,46,56,0.96);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 14px 36px rgba(5,26,32,0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.loading-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 28px 20px;
  text-align: center;
}

.loading-card h1 {
  margin: 14px 0 5px;
  color: var(--deep);
  font-family: Georgia, serif;
  font-size: 23px;
}

.loading-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 4px solid #dce8e6;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.noscript {
  max-width: 520px;
  margin: 40px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.print-report {
  display: none;
}

.print-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.print-photo-grid img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border: 1px solid #ccc;
}

@media (min-width: 520px) {
  .main-content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .profile-grid,
  .form-grid,
  .signoff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .hero-card {
    padding: 24px;
  }
}

@media (min-width: 820px) {
  .app-shell {
    max-width: 820px;
    border-right: 1px solid rgba(14,46,56,0.08);
    border-left: 1px solid rgba(14,46,56,0.08);
    background: rgba(245,242,234,0.80);
    box-shadow: 0 0 50px rgba(14,46,56,0.07);
  }

  .bottom-nav {
    right: calc((100vw - 820px) / 2);
    left: calc((100vw - 820px) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111;
  }

  .topbar,
  .bottom-nav,
  .screen-only,
  .toast,
  .dialog,
  .page > :not(.print-report) {
    display: none !important;
  }

  .main-content {
    max-width: none;
    min-height: auto;
    padding: 0;
  }

  .print-report {
    display: block !important;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.35;
  }

  .print-report h1 {
    margin: 0 0 3mm;
    font-size: 18pt;
  }

  .print-report h2 {
    margin: 7mm 0 2mm;
    padding-bottom: 1mm;
    border-bottom: 1px solid #777;
    font-size: 12pt;
  }

  .print-report h3 {
    margin: 5mm 0 2mm;
    font-size: 10pt;
  }

  .print-header {
    padding-bottom: 4mm;
    border-bottom: 3px solid #0e2e38;
  }

  .print-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2mm 8mm;
    margin: 4mm 0;
  }

  .print-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2mm;
    margin: 4mm 0;
  }

  .print-stat {
    padding: 2.5mm;
    border: 1px solid #bbb;
    text-align: center;
  }

  .print-stat strong {
    display: block;
    font-size: 13pt;
  }

  .print-row {
    break-inside: avoid;
    margin-bottom: 2.5mm;
    padding: 2.5mm;
    border: 1px solid #bbb;
  }

  .print-row-head {
    display: flex;
    justify-content: space-between;
    gap: 4mm;
    font-weight: 700;
  }

  .print-row p {
    margin: 1.2mm 0 0;
  }

  .print-note {
    color: #444;
    font-size: 9pt;
  }

  .print-photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .print-signoff {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8mm;
    margin-top: 10mm;
  }

  .print-signoff > div {
    min-height: 10mm;
    padding-top: 2mm;
    border-top: 1px solid #333;
  }

  a {
    color: #111;
    text-decoration: none;
  }
}

/* v2 application utilities */
.native-progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e8e5dd;
  appearance: none;
  -webkit-appearance: none;
}

.native-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e8e5dd;
}

.native-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--sage));
}

.native-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--sage));
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  margin: -1px !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.file-action {
  position: relative;
  cursor: pointer;
}

.hero-outline {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.reference-link strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reference-link .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.dialog-actions {
  flex-wrap: wrap;
}

.dialog-actions .btn {
  flex: 1 1 auto;
}

.response-panel strong,
.auto-na-note strong,
.alert strong {
  color: inherit;
}

@media (max-width: 430px) {
  .answer-button {
    font-size: 14px;
  }

  .dialog-actions .btn {
    width: 100%;
  }
}

/* Mobile install and offline guidance */
.install-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.install-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--gray-bg);
}

.install-card + .install-card {
  margin-top: 10px;
}

.install-grid .install-card + .install-card {
  margin-top: 0;
}

.install-card h3 {
  margin: 0 0 7px;
  color: var(--deep);
  font-size: 16px;
}

.install-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.install-list li + li {
  margin-top: 5px;
}

@media (min-width: 640px) {
  .install-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Salus Nautical v2.2.1 brand and mobile question architecture
   -------------------------------------------------------------------------- */
:root {
  --deep: #0f2531;
  --deep-2: #17323f;
  --teal: #285f70;
  --teal-soft: #e8f1f3;
  --sand: #d9a44c;
  --sand-dark: #8c621f;
  --paper: #f5f2ea;
  --blue: #155f91;
  --blue-strong: #114a72;
  --blue-bg: #edf6fc;
  --topbar-height: 64px;
}

.topbar {
  min-height: calc(var(--topbar-height) + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  border-bottom: 1px solid #ded8cb;
  background: rgba(255, 255, 255, 0.97);
  color: var(--deep);
  box-shadow: 0 4px 18px rgba(15, 37, 49, 0.09);
}

.topbar-brand {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.topbar-brand img,
.topbar-logo {
  display: block;
  width: clamp(132px, 43vw, 172px);
  height: auto;
  max-height: 48px;
  flex: 0 1 auto;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}

.save-status {
  min-width: 86px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #faf9f5;
  color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(15, 37, 49, 0.04);
}

.save-status:hover {
  background: #fff;
}

.save-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-dot {
  flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 122, 62, 0.12);
}

/* Home hero uses the Salus Nautical load-line primary lockup. */
.brand-hero {
  padding: 12px;
  border: 1px solid rgba(217, 164, 76, 0.38);
  background: linear-gradient(145deg, #0f2531, #17323f);
}

.brand-hero::after {
  display: none;
}

.home-brand-lockup {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 13px;
  border-radius: 14px;
  background: #0f2531;
  object-fit: contain;
}

.brand-hero .hero-badges {
  position: relative;
  z-index: 1;
}

.brand-hero h1 {
  margin-top: 13px;
  font-size: clamp(24px, 7.2vw, 34px);
}

.brand-hero .hero-tagline {
  margin-bottom: 5px;
  color: #d9a44c;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* Main mapped questions are visually dominant. */
.core-question-card {
  border: 1px solid #c9d7e0;
  background: #fff;
  box-shadow: 0 7px 22px rgba(17, 74, 114, 0.10);
}

.core-question-banner {
  padding: 16px 14px 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.13), transparent 15rem),
    linear-gradient(145deg, var(--blue), var(--blue-strong));
  color: #fff;
}

.core-question-label,
.followup-label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.core-question-label {
  color: #f2cc82;
}

.core-question-banner .question-id {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.core-question-banner .badge {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.core-question-banner .badge.priority {
  border-color: rgba(255, 205, 199, 0.34);
  background: rgba(124, 13, 5, 0.30);
  color: #fff0ee;
}

.core-question-banner .badge.info,
.core-question-banner .badge.reference {
  color: #edf8ff;
}

.core-question-banner .question-title {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(18px, 5.2vw, 22px);
  line-height: 1.4;
}

.core-question-banner .question-short {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.55;
}

.followup-question-card {
  border-width: 1px;
  border-color: #d9d6cc;
  background: #fff;
  box-shadow: 0 4px 15px rgba(15, 37, 49, 0.055);
}

.followup-question-card .question-head {
  border-top: 4px solid #7b9bac;
  background: linear-gradient(180deg, #f8fbfc, #fff);
}

.followup-label {
  color: var(--blue);
}

.followup-section-head {
  border-left: 4px solid var(--blue);
}

/* Large, phone-friendly answer controls. */
.answer-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 14px;
}

.answer-button {
  min-height: 50px;
  padding: 9px 6px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.2;
}

.deep-answer-group .answer-button {
  min-height: 54px;
}

.question-details > summary {
  min-height: 50px;
  padding: 12px 14px;
  color: var(--blue);
  font-size: 16px;
}

.details-body {
  padding: 3px 14px 16px;
  font-size: 16px;
  line-height: 1.65;
}

.details-body h4 {
  margin-top: 15px;
  font-size: 16px;
}

.verification-steps {
  margin: 7px 0 0;
  padding-left: 23px;
}

.verification-steps li {
  padding-left: 3px;
}

.verification-steps li + li {
  margin-top: 8px;
}

/* Q1 applicability examples and terminology. */
.scope-guide {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #bfd2df;
  border-radius: 15px;
  background: #f3f9fc;
}

.scope-guide-head h4 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: 16px;
  line-height: 1.35;
}

.scope-guide > p {
  margin: 8px 0 11px;
}

.scope-grid {
  display: grid;
  gap: 8px;
}

.scope-card {
  overflow: hidden;
  border: 1px solid #d5e2e8;
  border-radius: 12px;
  background: #fff;
}

.scope-card > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  color: var(--deep);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  list-style: none;
}

.scope-card > summary::-webkit-details-marker {
  display: none;
}

.scope-card > ul {
  margin: 0;
  padding: 2px 15px 12px 29px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.scope-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.scope-badge.inside {
  background: var(--green-bg);
  color: var(--green);
}

.scope-badge.outside {
  background: var(--amber-bg);
  color: var(--amber);
}

.term-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.term-card {
  padding: 11px;
  border: 1px solid #d9d6cc;
  border-radius: 12px;
  background: #fffdf8;
}

.term-card strong {
  color: var(--deep);
  font-size: 14px;
}

.term-card p {
  margin: 5px 0 0;
}

.scope-warning {
  margin-top: 10px;
  padding: 10px 11px;
  border-left: 4px solid var(--sand);
  border-radius: 8px;
  background: #fff8e8;
  color: #634817;
  font-size: 14px;
  line-height: 1.55;
}

/* Optional follow-up invitation: clearly connected, never a second exam. */
.deep-invite {
  padding: 15px 14px 16px;
  border-top: 1px solid #c9d7e0;
  background: linear-gradient(180deg, #f2f8fb, #fff);
}

.deep-invite-kicker {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deep-invite h3 {
  margin: 0;
  color: var(--deep);
  font-size: 16px;
  line-height: 1.35;
}

.deep-invite p {
  margin: 7px 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.deep-invite-meta {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 800;
}

.deep-invite .btn {
  min-height: 48px;
  line-height: 1.25;
  white-space: normal;
}

body[data-route="home"] .main-content {
  padding-top: 12px;
}

@media (max-width: 359px) {
  .topbar {
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .topbar-brand img,
  .topbar-logo {
    width: 126px;
  }

  .save-status {
    min-width: 78px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 14px;
  }

  .main-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand-hero,
  .card,
  .summary-card,
  .report-section {
    border-radius: 16px;
  }

  .core-question-banner,
  .question-head,
  .answer-group,
  .details-body,
  .deep-invite {
    padding-right: 12px;
    padding-left: 12px;
  }

  .scope-card > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (min-width: 520px) {
  .answer-group:not(.deep-answer-group) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media print {
  .deep-invite {
    display: none !important;
  }
}

@media (max-width: 359px) {
  .filters {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* v2.2.1 — About, privacy, ownership, and pilot-metrics presentation. */
.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.page-title-row h1 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.08;
}

.page-kicker {
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.version-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(46, 98, 112, 0.24);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
}

.about-page .card {
  margin-bottom: 12px;
}

.about-page .card p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.62;
}

.about-lead {
  border-color: rgba(201, 166, 107, 0.5);
  background: linear-gradient(145deg, #fff, #fbf7ee);
}

.about-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 21px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

.about-list.compact {
  gap: 7px;
}

.notice-strip {
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 16px;
  line-height: 1.45;
}

.privacy-safe-grid {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.privacy-safe-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--gray-bg);
}

.privacy-safe-item.good {
  border-color: rgba(20, 122, 62, 0.28);
  background: var(--green-bg);
}

.privacy-safe-item strong {
  color: var(--deep);
  font-size: 16px;
}

.privacy-safe-item span {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
}

.metric-control {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(46, 98, 112, 0.25);
  border-radius: 14px;
  background: #fbfdfd;
}

.metric-control > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--deep);
  font-size: 16px;
}

.status-chip {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.status-chip.on {
  background: var(--green-bg);
  color: var(--green);
}

.status-chip.off {
  background: var(--gray-bg);
  color: var(--ink-3);
}

.small-note {
  margin-bottom: 0 !important;
  color: var(--ink-3) !important;
  font-size: 14px !important;
}

.technical-card .profile-row:last-child {
  border-bottom: 0;
}

.app-footer {
  display: grid;
  gap: 4px;
  margin: 24px 4px 8px;
  padding: 18px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
}

.app-footer strong {
  color: var(--deep);
  letter-spacing: 0.04em;
}

.footer-link {
  min-height: 40px;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--teal);
  font-size: 14px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 560px) {
  .privacy-safe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-control {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media print {
  .app-footer,
  .about-page {
    display: none !important;
  }
}

/* v2.2.1 — field-readability and contact-channel refinements. */
@media screen {
  :root {
    --nav-height: 84px;
  }

  body {
    font-size: 16px;
    line-height: 1.55;
  }

  input,
  textarea,
  select,
  button,
  summary {
    font-size: 16px;
  }

  .nav-button {
    min-height: 68px;
    padding: 5px 2px;
    line-height: 1.08;
    text-wrap: balance;
  }

  .topbar {
    min-height: calc(72px + env(safe-area-inset-top));
  }

  .save-status {
    min-width: 104px;
  }

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

  .contact-actions,
  .contact-details {
    display: grid;
    gap: 10px;
  }

  .contact-details > div {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--gray-bg);
  }

  .contact-details strong {
    color: var(--deep);
    font-size: 14px;
  }

  .contact-details span,
  .contact-details a {
    overflow-wrap: anywhere;
    color: var(--teal);
    font-size: 16px;
    font-weight: 800;
  }
}

@media screen and (min-width: 560px) {
  .contact-actions,
  .contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Deployment authenticity warning — v2.2.1 */
.deployment-warning {
  margin: 12px max(14px, env(safe-area-inset-left)) 0 max(14px, env(safe-area-inset-right));
  padding: 14px 16px;
  border: 2px solid #9d2b22;
  border-radius: 12px;
  background: #fff1ee;
  color: #5f1712;
  font-size: 16px;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(95, 23, 18, 0.14);
}
.deployment-warning[hidden] { display: none !important; }
.deployment-warning a { color: #5f1712; font-weight: 800; text-decoration: underline; }
.unverified-deployment .topbar { border-bottom-color: #9d2b22; }
