:root {
  --brand-deep: #024a3c;
  --brand-primary: #85c362;
  --brand-secondary: #3a8756;
  --brand-soft: #e7f7de;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --text: #17322a;
  --muted: #537066;
  --line: #d8e7dd;
  --shadow: 0 18px 48px rgba(2, 74, 60, 0.22);
  --danger: #9d2b2b;
  --danger-bg: #ffe9e9;
  --warning: #7c5714;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(2, 74, 60, 0.91), rgba(2, 74, 60, 0.9)),
    url("/static/background.webp") center top / cover no-repeat,
    #024a3c;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 74, 60, 0.05), rgba(2, 74, 60, 0.22)),
    radial-gradient(circle at top right, rgba(133, 195, 98, 0.14), transparent 22rem);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button,
.button-link {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 18px;
  box-shadow: 0 10px 24px rgba(58, 135, 86, 0.28);
}

.button-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.08);
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
figure,
dl,
dd {
  margin: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  padding: 22px 14px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: 520px;
  min-width: 0;
}

.brand-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #f7fff9;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.seal-mark img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-copy small {
  display: block;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .9;
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.header {
  margin-bottom: 24px;
  color: #f6fffa;
}

.controller-header {
  margin-bottom: 18px;
}

.final-header {
  margin-bottom: 8px;
}

.step-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f6fffa;
  font-size: 13px;
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-soft);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 99px;
  background: var(--brand-primary);
}

h1 {
  color: #fff;
  font-size: clamp(29px, 7vw, 36px);
  line-height: 1.08;
  font-weight: 850;
}

h1 span {
  display: block;
}

.single-line-title {
  font-size: clamp(27px, 7vw, 34px);
  white-space: nowrap;
}

.subtitle {
  margin-top: 10px;
  color: rgba(247, 255, 250, 0.9);
  font-size: 15px;
  line-height: 1.55;
}

.card,
.result-card {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
}

.card {
  display: grid;
  gap: 18px;
}

.state-card {
  gap: 14px;
}

.card-intro {
  padding: 4px 2px 0;
}

.card-intro h2,
.result-card h2,
.state-card h2 {
  color: var(--brand-deep);
  font-size: 21px;
  line-height: 1.18;
}

.card-intro p,
.result-card p,
.state-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.seal-hero {
  display: grid;
  place-items: center;
  margin: 0 0 18px;
  min-height: 150px;
}

.seal-hero picture,
.seal-hero img {
  width: min(54vw, 210px);
}

.seal-hero picture {
  display: block;
}

.seal-hero img {
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.24));
}

.identity-form,
.manual-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  display: block;
  font-weight: 800;
  font-size: 15px;
}

.field-help {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 16px;
}

input:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 4px rgba(133, 195, 98, 0.18);
}

input:disabled {
  color: var(--muted);
  background: #f4faf6;
  opacity: 1;
}

.serial-form input {
  text-transform: uppercase;
  letter-spacing: .02em;
}

.serial-path-help strong {
  display: block;
  margin-top: 7px;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

.serial-guide {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.serial-guide img {
  width: 100%;
  height: auto;
}

.actions {
  display: grid;
  gap: 10px;
}

.preview-entry-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.08);
}

.presence-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.presence-actions button {
  min-height: 56px;
}

.presence-actions button.selected,
.panel-options button.selected {
  border-color: rgba(96, 176, 92, 0.8);
  box-shadow: 0 0 0 4px rgba(96, 176, 92, 0.14);
}

.precheck-warning {
  margin-top: -2px;
}

.presence-form {
  display: grid;
  gap: 14px;
}

.location-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbf9;
}

.location-preview[hidden] {
  display: none;
}

.location-map {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid #cfe0d6;
  background:
    linear-gradient(90deg, rgba(2, 74, 60, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(2, 74, 60, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, #eaf5ed, #f8fbf9);
  background-size: 28px 28px, 28px 28px, auto;
}

.location-map iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.location-map iframe:not([src]) {
  display: none;
}

.location-map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.map-pin {
  width: 22px;
  height: 22px;
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--brand-secondary);
  box-shadow: 0 8px 18px rgba(2, 74, 60, 0.3);
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.location-copy {
  display: grid;
  gap: 4px;
}

.location-copy strong {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
}

.location-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.location-error {
  margin-top: -2px;
}

.location-help-links {
  display: grid;
  gap: 8px;
  margin-top: -4px;
  padding: 12px;
  border: 1px solid rgba(2, 74, 60, 0.14);
  border-radius: 16px;
  background: rgba(248, 251, 249, 0.88);
}

.location-help-links[hidden] {
  display: none;
}

.location-help-links span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.location-help-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-help-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.panel-choice {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.panel-choice[hidden] {
  display: none;
}

.panel-options {
  display: grid;
  gap: 10px;
}

.panel-options button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 58px;
  text-align: left;
}

.panel-type-card {
  gap: 16px;
}

.panel-choice-form {
  display: grid;
  gap: 14px;
}

.panel-card-grid {
  display: grid;
  gap: 12px;
}

.panel-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 246, 0.94));
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.09);
}

.panel-card.selected,
.panel-card:focus-visible,
.panel-card:focus-within {
  border-color: rgba(58, 135, 86, 0.82);
  background: linear-gradient(180deg, rgba(235, 249, 229, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 0 4px rgba(133, 195, 98, 0.18), 0 14px 26px rgba(8, 47, 36, 0.12);
}

.panel-card.disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.58;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.98), rgba(236, 241, 238, 0.95));
  box-shadow: none;
}

.panel-card.disabled:focus-within,
.panel-card.disabled:hover {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.98), rgba(236, 241, 238, 0.95));
  box-shadow: none;
}

.panel-card:active {
  transform: translateY(1px);
}

.panel-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.panel-symbol {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfffc, #edf8ef);
  border: 1px solid rgba(2, 74, 60, 0.12);
  box-shadow: inset 0 -8px 18px rgba(2, 74, 60, 0.045);
}

.panel-symbol img {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.panel-symbol-third {
  background: linear-gradient(180deg, #ffffff, #eef7f1);
}

.panel-card-copy {
  display: grid;
  gap: 6px;
}

.panel-card-copy strong {
  color: var(--brand-deep);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.panel-card-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.panel-select-mark {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(2, 74, 60, 0.28);
  border-radius: 50%;
  background: #fff;
}

.panel-card.selected .panel-select-mark {
  border-color: var(--brand-secondary);
  background: var(--brand-secondary);
  box-shadow: inset 0 0 0 5px #fff;
}

.panel-continue-button {
  margin-top: 2px;
}

.panel-continue-button:disabled {
  cursor: not-allowed;
  background: #b8c9bf;
  color: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  opacity: 1;
}

.portal-choice-card,
.portal-result-card {
  gap: 16px;
}

.portal-action-grid {
  display: grid;
  gap: 12px;
}

.portal-action-button,
.portal-action-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.portal-action-button {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 246, 0.96));
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.09);
}

.portal-action-button strong,
.portal-action-heading strong {
  display: block;
  color: var(--brand-deep);
  font-size: 19px;
  line-height: 1.12;
  font-weight: 900;
}

.portal-action-button small,
.portal-action-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.portal-action-symbol {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(2, 74, 60, 0.12);
  background: #fff;
  box-shadow: inset 0 -8px 18px rgba(2, 74, 60, 0.045);
}

.portal-action-symbol img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.info-symbol {
  color: var(--brand-deep);
  font-size: 28px;
  font-family: Georgia, serif;
  font-weight: 800;
  font-style: italic;
}

.portal-consult-box {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.08);
}

.mobile-required-card {
  text-align: left;
}

.mobile-required-icon {
  justify-self: center;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(2, 74, 60, 0.12);
  background: linear-gradient(180deg, rgba(231, 247, 222, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 -10px 22px rgba(2, 74, 60, 0.055);
}

.mobile-required-icon span {
  position: relative;
  width: 30px;
  height: 48px;
  border: 3px solid var(--brand-deep);
  border-radius: 9px;
  background: #fff;
}

.mobile-required-icon span::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-primary);
  transform: translateX(-50%);
}

.mobile-required-icon span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: rgba(2, 74, 60, 0.22);
  transform: translateX(-50%);
}

.mobile-required-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.mobile-required-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.mobile-required-list dt {
  color: var(--brand-deep);
}

.mobile-required-list dd {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.portal-result-card {
  margin-top: 16px;
}

.portal-result-card.warning-result {
  border-color: #f1d8a8;
}

.portal-result-action {
  display: grid;
}

.choice-radio {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(2, 74, 60, 0.42);
  border-radius: 50%;
  background: #fff;
}

.choice-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand-secondary);
  opacity: 0;
}

.radio-choice-button:active .choice-radio,
.radio-choice-button:focus-visible .choice-radio,
.radio-choice-button.selected .choice-radio {
  border-color: var(--brand-secondary);
}

.radio-choice-button:active .choice-radio::after,
.radio-choice-button:focus-visible .choice-radio::after,
.radio-choice-button.selected .choice-radio::after {
  opacity: 1;
}

.field-error {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #f4caca;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.soft-warning {
  border-color: #f1d8a8;
  background: #fff8e9;
  color: var(--warning);
}

.requirement-card {
  gap: 16px;
}

.requirement-photo {
  display: none;
}

.requirement-example-photo {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.08);
}

.requirement-example-photo img {
  display: block;
  width: 100%;
  height: clamp(300px, 88vw, 460px);
  object-fit: cover;
  object-position: center;
}

.requirement-example-screen img {
  height: auto;
  max-height: 280px;
  object-fit: contain;
  background: #f8fbf9;
}

.eps-wires-example img {
  object-position: center 66%;
}

.alarm-battery-example img {
  object-position: center 48%;
}

.sensor-cables-example img {
  max-height: 340px;
}

.individual-sensor-cables-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.cable-terminals-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.source-grounding-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.pressure-set-carousel .requirement-slide img {
  box-sizing: border-box;
  height: clamp(260px, 70vw, 390px);
  padding: 6px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.dimmer-distance-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.curtain-trigger-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.controller-sirens-example img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.requirement-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.08);
}

.requirement-carousel-track {
  position: relative;
}

.requirement-slide {
  background: #fff;
}

.requirement-slide[hidden] {
  display: none;
}

.requirement-slide img {
  width: 100%;
  height: clamp(300px, 88vw, 460px);
  object-fit: cover;
  object-position: center 72%;
}

.requirement-slide-diagram img {
  padding: 8px;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.requirement-screen-carousel .requirement-slide img {
  box-sizing: border-box;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  background: #f8fbf9;
}

.requirement-path-line {
  display: block;
  margin: 6px 0 2px;
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.requirement-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(2, 74, 60, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.12);
  transform: translateY(-50%);
}

.requirement-carousel-nav.previous {
  left: 10px;
}

.requirement-carousel-nav.next {
  right: 10px;
}

.requirement-carousel-nav span {
  display: block;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-1px);
}

.requirement-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(2, 74, 60, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.1);
  transform: translateX(-50%);
}

.requirement-carousel-dots button {
  width: 7px;
  min-height: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  background: rgba(2, 74, 60, 0.28);
  box-shadow: none;
}

.requirement-carousel-dots button.active {
  width: 18px;
  background: var(--brand-secondary);
}

.requirement-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.requirement-reference-list {
  display: grid;
  gap: 6px;
  margin-top: -4px;
}

.requirement-reference {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  color: rgba(83, 112, 102, 0.92);
  font-size: 12px;
  line-height: 1.4;
}

.requirement-reference-list .requirement-reference {
  margin-top: 0;
}

.requirement-reference-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(2, 74, 60, 0.18);
  border-radius: 50%;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  background: rgba(231, 247, 222, 0.58);
}

.requirement-reference a {
  color: var(--brand-deep);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.requirement-form {
  display: grid;
  gap: 14px;
}

.requirement-choice-grid {
  display: grid;
  gap: 10px;
}

.compact-choice-grid {
  gap: 8px;
}

.requirement-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 246, 0.94));
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.09);
  cursor: pointer;
}

.requirement-choice.selected {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 246, 0.94));
  box-shadow: 0 10px 22px rgba(8, 47, 36, 0.09);
}

.compact-choice {
  min-height: 82px;
  border-radius: 18px;
  padding: 13px 12px;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.07);
}

.compact-choice strong {
  font-size: 15px;
  line-height: 1.15;
}

.requirement-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.requirement-choice-copy {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.requirement-choice-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.requirement-choice-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.requirement-choice-icon.success {
  background: rgba(58, 135, 86, 0.12);
  color: var(--brand-secondary);
}

.requirement-choice-icon.danger {
  background: rgba(157, 43, 43, 0.1);
  color: var(--danger);
}

.requirement-choice-icon.neutral {
  background: rgba(44, 104, 94, 0.1);
  color: #2c685e;
}

.requirement-choice-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.requirement-choice strong {
  color: var(--brand-deep);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.requirement-choice small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.requirement-select-mark {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(2, 74, 60, 0.28);
  border-radius: 50%;
  background: #fff;
}

.requirement-choice.selected .requirement-select-mark {
  border-color: var(--brand-secondary);
  background: var(--brand-secondary);
  box-shadow: inset 0 0 0 5px #fff;
}

.requirement-choice-no.selected .requirement-select-mark {
  border-color: var(--danger);
  background: var(--danger);
}

.requirement-choice-neutral.selected .requirement-select-mark {
  border-color: #2c685e;
  background: #2c685e;
}

.photo-capture-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(58, 135, 86, 0.26);
  border-radius: 18px;
  background: #f8fbf9;
}

.nested-question-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(2, 74, 60, 0.16);
  border-radius: 18px;
  background: rgba(248, 251, 249, 0.72);
}

.photo-capture-panel[hidden],
.nested-question-panel[hidden],
.photo-empty-state[hidden],
.photo-preview[hidden],
.photo-saved-state[hidden],
.photo-modal[hidden],
.shielded-guidance[hidden] {
  display: none;
}

.photo-capture-copy {
  display: grid;
  gap: 4px;
}

.photo-capture-copy strong {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
}

.photo-capture-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.photo-empty-state,
.photo-saved-state {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.photo-empty-state strong,
.photo-saved-state strong {
  color: var(--brand-deep);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 850;
}

.photo-empty-state span,
.photo-saved-state span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.camera-action-button,
.photo-retake-button {
  min-height: 48px;
  border: 1px solid rgba(2, 74, 60, 0.22);
  border-radius: 16px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
  box-shadow: none;
}

.camera-action-button {
  margin-top: 4px;
}

.camera-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-preview {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.photo-preview img {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
}

.photo-preview figcaption {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.photo-preview figcaption strong {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
}

.photo-preview figcaption span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.photo-retake-button {
  margin-top: 6px;
  min-height: 40px;
  padding: 9px 12px;
  font-size: 13px;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 30, 24, 0.66);
}

.photo-modal-card {
  width: min(100%, 430px);
  display: grid;
  gap: 14px;
  padding: 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: 0 28px 70px rgba(2, 20, 16, 0.42);
}

.photo-modal-card h2 {
  color: var(--brand-deep);
  font-size: 21px;
  line-height: 1.18;
}

.photo-modal-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.photo-modal-actions {
  display: grid;
  gap: 10px;
}

.requirement-form button:disabled {
  cursor: not-allowed;
  background: #b8c9bf;
  color: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  opacity: 1;
}

.requirement-submit-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(58, 135, 86, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(231, 247, 222, 0.96), rgba(255, 255, 255, 0.98));
  color: var(--brand-deep);
  box-shadow: 0 12px 28px rgba(15, 74, 59, 0.08);
}

.requirement-submit-status[hidden] {
  display: none;
}

.requirement-submit-status strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 850;
}

.requirement-submit-status p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.requirement-submit-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid rgba(58, 135, 86, 0.2);
  border-top-color: var(--brand-deep);
  border-radius: 999px;
  animation: requirement-submit-spin 0.8s linear infinite;
}

.requirement-form.is-submitting,
.requirement-form.is-submitting button {
  cursor: wait;
}

.requirement-form.is-submitting [data-requirement-submit]:disabled {
  cursor: wait;
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  color: #fff;
  box-shadow: 0 10px 24px rgba(58, 135, 86, 0.22);
  opacity: 0.88;
}

@keyframes requirement-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.result-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.success-card {
  border-color: rgba(133, 195, 98, 0.46);
}

.manual-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 248, 0.98));
}

.status-pill {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(133, 195, 98, 0.18);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-pill.warning {
  background: #fff6e7;
  color: var(--warning);
}

dl {
  display: grid;
  gap: 10px;
}

dl div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.controller-product {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.controller-product img {
  width: 92px;
  height: 76px;
  object-fit: contain;
}

.controller-product h2 {
  color: var(--brand-deep);
  font-size: 20px;
  line-height: 1.12;
}

.controller-product p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.muted-product {
  background: #f8fbf9;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

dd {
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 800;
}

.document-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-button {
  min-height: 50px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.08);
}

.choice-button.selected {
  border-color: rgba(96, 176, 92, 0.8);
  background: linear-gradient(180deg, rgba(233, 248, 230, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 0 0 4px rgba(96, 176, 92, 0.14);
}

.legal-note {
  margin: 16px auto 0;
  max-width: 46ch;
  color: rgba(247, 255, 250, 0.72);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.question-preview-mode .shell {
  padding-bottom: 86px;
}

.question-preview-toolbar {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(2, 38, 30, 0.2);
  backdrop-filter: blur(12px);
}

.question-preview-toolbar > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.question-preview-toolbar strong {
  color: var(--brand-deep);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}

.question-preview-toolbar span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 750;
}

.question-preview-close {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--brand-deep);
  font-size: 25px;
  line-height: 1;
  text-decoration: none;
}

.question-preview-navigation {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 14;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 28px), 520px);
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 36px rgba(2, 35, 28, 0.28);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.question-preview-navigation > a,
.question-preview-navigation > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(2, 74, 60, 0.2);
  border-radius: 50%;
  background: #e8f3eb;
  color: var(--brand-deep);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.question-preview-navigation > span.disabled {
  border-color: rgba(81, 113, 100, 0.12);
  background: #edf2ef;
  color: #a5b4ac;
}

.question-preview-chevron {
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}

.question-preview-chevron.previous {
  transform: translateX(2px) rotate(-135deg);
}

.question-preview-chevron.next {
  transform: translateX(-2px) rotate(45deg);
}

.question-preview-navigation > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.question-preview-navigation strong,
.question-preview-navigation div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-preview-navigation strong {
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.question-preview-navigation div span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
}

.question-preview-mode .requirement-choice {
  cursor: default;
  pointer-events: none;
}

.question-preview-mode .requirement-choice input {
  cursor: default;
}

.question-preview-mode [data-requirement-submit] {
  display: none;
}

.question-preview-mode [data-shielded-panel][hidden] {
  display: grid;
}

.final-review-card {
  display: grid;
  gap: 18px;
}

.final-seal-hero {
  min-height: auto;
  margin: 4px auto 18px;
  font-size: 0;
  line-height: 0;
}

.final-seal-image {
  justify-self: center;
  width: min(54vw, 210px);
  max-height: 210px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 999px;
  filter: drop-shadow(0 18px 30px rgba(2, 24, 20, 0.28));
}

.final-seal-image.cracked {
  width: min(54vw, 210px);
  max-height: 210px;
  border-radius: 999px;
}

.final-card-intro {
  gap: 8px;
}

.final-photo-summary {
  display: grid;
  gap: 12px;
}

.final-summary-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.final-summary-heading h2 {
  color: var(--brand-deep);
  font-size: 19px;
  line-height: 1.18;
}

.final-summary-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.final-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.final-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.06);
}

.final-photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef5f1;
}

.final-photo-card figcaption {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.final-photo-card strong {
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
}

.final-photo-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.final-confirm-form {
  display: grid;
}

.final-confirm-form button:disabled {
  cursor: default;
  background: #b8c9bf;
  box-shadow: none;
  opacity: 1;
}

.completed-card {
  margin-top: 0;
}

.signature-card {
  gap: 16px;
}

.signature-form {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 850;
}

.signature-pad-wrap {
  display: grid;
  gap: 10px;
  margin: 4px 0 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 251, 249, 0.86);
}

.signature-pad-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signature-pad-heading strong {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 850;
}

.signature-clear-button {
  width: auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 850;
  box-shadow: none;
}

.signature-pad {
  width: 100%;
  height: 178px;
  border: 1px solid rgba(2, 74, 60, 0.2);
  border-radius: 16px;
  background: #fff;
  touch-action: none;
}

.signature-pad.needs-signature {
  border-color: rgba(157, 43, 43, 0.7);
  box-shadow: 0 0 0 4px rgba(157, 43, 43, 0.1);
}

.signature-pad-wrap span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.signature-submit-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(58, 135, 86, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(231, 247, 222, 0.96), rgba(255, 255, 255, 0.98));
  color: var(--brand-deep);
  box-shadow: 0 12px 28px rgba(15, 74, 59, 0.08);
}

.signature-submit-status[hidden] {
  display: none;
}

.signature-submit-status strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 850;
}

.signature-submit-status p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.signature-submit-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid rgba(58, 135, 86, 0.2);
  border-top-color: var(--brand-deep);
  border-radius: 999px;
  animation: signature-submit-spin 0.8s linear infinite;
}

.signature-form.is-submitting {
  cursor: wait;
}

.signature-form.is-submitting button {
  cursor: wait;
}

.status-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.status-summary-list {
  gap: 10px;
  margin: 0;
}

.status-summary-list dd {
  font-size: 16px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.status-controller-product {
  margin-top: 2px;
}

.status-section-title {
  margin: 4px 0 -2px;
  color: var(--brand-deep);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.status-section-title + .status-summary-list {
  margin-top: -8px;
}

.status-warranty-list,
.status-extended-list {
  padding-top: 0;
}

.status-detail-list div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.status-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-detail-list dd {
  margin: 0;
  color: var(--brand-deep);
  font-size: 16px;
  line-height: 1.22;
  font-weight: 800;
  overflow-wrap: anywhere;
}

@keyframes signature-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.final-pending-list {
  display: grid;
  gap: 10px;
}

.final-pending-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--brand-deep);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(8, 47, 36, 0.08);
}

.final-pending-button span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.final-pending-button strong {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
}

.final-pending-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
}

.final-pending-button b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(133, 195, 98, 0.16);
  color: var(--brand-deep);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

@media (max-width: 420px) {
  .page {
    padding: 18px 14px 28px;
  }

  .step-line {
    gap: 8px;
  }

  .step-chip {
    max-width: 100%;
    font-size: 12px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .seal-hero {
    min-height: 138px;
    margin-top: 0;
  }

  .final-seal-hero {
    min-height: auto;
    margin: 0 auto 12px;
  }

  .final-photo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 28px;
  }

  .card,
  .result-card {
    border-radius: 20px;
    padding: 16px 14px;
  }

  .panel-card {
    grid-template-columns: 64px minmax(0, 1fr) 22px;
    gap: 10px;
    padding: 14px 12px;
  }

  .panel-symbol {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .panel-card-copy strong {
    font-size: 19px;
  }

  .panel-card-copy small {
    font-size: 12px;
  }
}
