:root {
  --survey-gold: oklch(78% 0.16 82);
  --survey-black: oklch(15% 0.004 90);
  --survey-paper: oklch(95.5% 0.005 250);
  --survey-line: oklch(84% 0.006 250);
  --survey-muted: oklch(47% 0.008 250);
}

.survey-page {
  background: var(--survey-paper);
}

.survey-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 58px clamp(24px, 4vw, 72px) 100px;
}

.survey-hero {
  display: grid;
  max-width: 1180px;
  margin: 0 auto 40px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 38px;
  align-items: end;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: oklch(48% 0.13 76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.survey-hero h1,
.openings-heading h2 {
  margin: 0;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  line-height: 1.02;
  text-transform: uppercase;
}

.survey-hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 5.4vw, 76px);
}

.survey-hero > div > p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--survey-muted);
  font-size: 17px;
  line-height: 1.65;
}

.survey-hero .service-limit {
  display: table;
  margin-top: 16px;
  padding: 9px 12px;
  border: 1px solid oklch(62% 0.14 78);
  border-radius: 7px;
  background: oklch(96% 0.045 84);
  color: var(--survey-black);
  font-size: 12.5px;
  line-height: 1.4;
}

.service-limit strong {
  text-transform: uppercase;
}

.mobile-tip {
  position: relative;
  padding: 26px 26px 26px 30px;
  overflow: hidden;
  border: 1px solid oklch(66% 0.13 78);
  border-radius: 14px;
  background: var(--survey-black);
  color: white;
}

.mobile-tip::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--survey-gold);
  content: "";
}

.mobile-tip strong,
.mobile-tip span {
  display: block;
}

.mobile-tip strong {
  margin-bottom: 8px;
  color: var(--survey-gold);
  font-size: 15px;
  text-transform: uppercase;
}

.mobile-tip span {
  color: oklch(82% 0.006 250);
  font-size: 13.5px;
  line-height: 1.55;
}

#installation-form {
  max-width: 1180px;
  margin: 0 auto;
}

.form-panel,
.opening-card,
.privacy-note {
  border: 1px solid var(--survey-line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 50px -42px rgba(0, 0, 0, .5);
}

.form-panel {
  margin-bottom: 22px;
  padding: 32px;
}

.panel-heading {
  display: flex;
  gap: 18px;
  margin-bottom: 26px;
  align-items: flex-start;
}

.panel-heading > span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--survey-black);
  color: var(--survey-gold);
  font-family: "Anton", sans-serif;
  font-size: 22px;
}

.panel-heading h2,
.opening-title h3 {
  margin: 0;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}

.panel-heading h2 {
  font-size: 28px;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--survey-muted);
  font-size: 13.5px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field-grid > label,
.opening-fields > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--survey-line);
  border-radius: 9px;
  background: white;
  color: var(--survey-black);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: oklch(61% 0.15 78);
  box-shadow: 0 0 0 3px oklch(78% 0.16 82 / .2);
}

.choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--survey-line);
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.segmented input:checked + span {
  border-color: oklch(63% 0.15 78);
  background: oklch(95% 0.06 84);
  box-shadow: inset 0 0 0 1px oklch(63% 0.15 78);
}

.segmented input:focus-visible + span {
  outline: 3px solid oklch(78% 0.16 82 / .3);
}

.openings-section {
  margin-top: 48px;
}

.openings-heading {
  display: flex;
  margin-bottom: 22px;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
}

.openings-heading h2 {
  max-width: 730px;
  font-size: clamp(28px, 4vw, 44px);
}

.add-opening,
.generate-button,
.report-toolbar button,
.remove-opening,
.photo-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.add-opening {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 13px 17px;
  border: 1px solid var(--survey-black);
  border-radius: 9px;
  gap: 9px;
  align-items: center;
  background: transparent;
  color: var(--survey-black);
}

.openings-add-footer {
  display: flex;
  padding: 4px 0 12px;
  justify-content: center;
}

.openings-add-footer .add-opening {
  min-width: min(100%, 340px);
  justify-content: center;
  background: white;
}

.openings-add-footer .add-opening:hover,
.openings-add-footer .add-opening:focus-visible {
  background: var(--survey-gold);
  outline: none;
}

.add-opening > span:first-child {
  font-size: 22px;
  line-height: 1;
}

.opening-card {
  position: relative;
  margin-bottom: 24px;
  overflow: hidden;
}

.opening-title {
  display: flex;
  padding: 23px 28px;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--survey-black);
  color: white;
}

.opening-title > div {
  display: flex;
  gap: 14px;
  align-items: center;
}

.opening-number {
  color: var(--survey-gold);
  font-family: "Anton", sans-serif;
  font-size: 26px;
}

.opening-title h3 {
  font-size: 24px;
}

.remove-opening {
  padding: 8px 11px;
  border-radius: 7px;
  background: transparent;
  color: oklch(73% 0.01 250);
  font-size: 12px;
}

.remove-opening:hover {
  background: oklch(24% 0.006 90);
  color: white;
}

.opening-body {
  padding: 28px;
}

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

.opening-fields .full {
  grid-column: 1 / -1;
}

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

.dimensions label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.conditional[hidden] {
  display: none;
}

.photos-block {
  padding-top: 2px;
}

.photos-block > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.photos-help {
  margin: 0 0 13px;
  color: var(--survey-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

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

.photo-button {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 9px;
  gap: 9px;
  align-items: center;
  background: var(--survey-gold);
  color: var(--survey-black);
}

.photo-button::before {
  content: "●";
  font-size: 10px;
}

.photo-area.invalid .photo-button {
  box-shadow: 0 0 0 3px oklch(60% 0.2 30 / .25);
}

.photo-error {
  display: none;
  margin: 9px 0 0;
  color: oklch(48% 0.2 30);
  font-size: 12px;
  font-weight: 700;
}

.photo-area.invalid .photo-error {
  display: block;
}

.photo-preview {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.photo-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  background: var(--survey-paper);
}

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

.photo-thumb button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .78);
  color: white;
  cursor: pointer;
}

.privacy-note {
  margin-top: 28px;
  padding: 22px 26px;
  border-left: 7px solid var(--survey-gold);
}

.privacy-note strong {
  font-size: 14px;
}

.privacy-note p {
  margin: 5px 0 0;
  color: var(--survey-muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-actions {
  padding: 34px 0 0;
  text-align: center;
}

.generate-button {
  width: min(100%, 520px);
  padding: 18px 24px;
  border-radius: 9px;
  background: var(--survey-black);
  color: white;
  font-size: 15px;
  text-transform: uppercase;
}

.generate-button:hover {
  background: oklch(48% 0.13 76);
}

.form-actions p {
  margin: 12px auto 0;
  color: var(--survey-muted);
  font-size: 12px;
}

.report-shell {
  min-height: 100vh;
  padding: 28px;
  background: oklch(91% 0.006 250);
}

.report-toolbar {
  display: flex;
  max-width: 1040px;
  margin: 0 auto 20px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.report-toolbar > div {
  display: flex;
  gap: 8px;
}

.report-toolbar button {
  padding: 11px 14px;
  border-radius: 7px;
  background: white;
  color: var(--survey-black);
}

.report-toolbar button.primary {
  background: var(--survey-black);
  color: white;
}

.report {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px;
  background: white;
  color: #171717;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}

.report-header {
  display: flex;
  padding-bottom: 22px;
  border-bottom: 5px solid #efb600;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
}

.report-logo {
  width: 150px;
  height: auto;
  padding: 10px;
  background: #171717;
}

.report-header h1 {
  margin: 0;
  font-family: "Anton", sans-serif;
  font-size: 38px;
  font-weight: 400;
  text-transform: uppercase;
}

.report-header p {
  margin: 7px 0 0;
  color: #666;
  font-size: 12px;
}

.report-section {
  margin-top: 28px;
}

.report-section h2 {
  margin: 0 0 13px;
  font-family: "Anton", sans-serif;
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
}

.report-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}

.report-data div {
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
}

.report-data strong {
  display: block;
  margin-bottom: 2px;
  color: #666;
  font-size: 10px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.report-opening {
  margin-top: 24px;
  padding: 22px;
  break-inside: avoid;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
}

.report-opening h3 {
  margin: 0 0 14px;
  font-family: "Anton", sans-serif;
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
}

.report-photos {
  display: grid;
  margin-top: 17px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-photos img {
  width: 100%;
  max-height: 340px;
  border-radius: 4px;
  object-fit: contain;
  background: #f2f2f2;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--survey-black);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 1040px) {
  .survey-main {
    margin-left: 0;
    padding-top: 118px;
  }

  .survey-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .survey-main {
    padding: 112px 16px 72px;
  }

  .survey-hero {
    margin-bottom: 26px;
    gap: 22px;
  }

  .survey-hero h1 {
    font-size: clamp(36px, 12vw, 54px);
  }

  .survey-hero > div > p {
    font-size: 15px;
  }

  .form-panel,
  .opening-body {
    padding: 21px 17px;
  }

  .panel-heading {
    gap: 12px;
  }

  .panel-heading h2 {
    font-size: 24px;
  }

  .field-grid,
  .opening-fields {
    grid-template-columns: 1fr;
  }

  .field-wide,
  .opening-fields .full {
    grid-column: auto;
  }

  .openings-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .openings-add-footer .add-opening {
    width: 100%;
    justify-content: center;
  }

  .opening-title {
    padding: 18px 17px;
  }

  .opening-title h3 {
    font-size: 21px;
  }

  .segmented.three {
    grid-template-columns: 1fr;
  }

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

  .report-shell {
    padding: 12px;
  }

  .report-toolbar,
  .report-toolbar > div {
    align-items: stretch;
    flex-direction: column;
  }

  .report {
    padding: 24px 18px;
  }

  .report-header {
    flex-direction: column-reverse;
  }

  .report-data,
  .report-photos {
    grid-template-columns: 1fr;
  }
}

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

  body {
    background: white;
  }

  .screen-only,
  .toast {
    display: none !important;
  }

  .report-shell {
    display: block !important;
    min-height: 0;
    padding: 0;
    background: white;
  }

  .report {
    max-width: none;
    padding: 0;
    box-shadow: none;
  }
}

.ia-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
