:root {
  --bg: #f4f1ec;
  --surface: #ffffff;
  --surface-soft: #faf8f4;
  --ink: #23272f;
  --muted: #686f78;
  --line: #ddd7cf;
  --navy: #1f2d3b;
  --accent: #8b745a;
  --accent-soft: #ede5dc;
  --danger: #8f342b;
  --shadow: 0 12px 24px rgba(31, 45, 59, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.proto-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 68px;
  padding: 0 12px 0 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 clamp(220px, 22vw, 260px);
  width: clamp(220px, 22vw, 260px);
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-brand img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}

.site-header__status {
  display: grid;
  align-self: center;
  gap: 1px;
  flex: 0 1 auto;
  text-align: right;
}

.site-header__status span:first-child {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.site-header__status span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.screen {
  min-height: calc(100vh - 57px);
  padding: 26px 0 48px;
}

.screen[hidden] {
  display: none;
}

.container {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

.container--narrow {
  width: min(760px, calc(100% - 28px));
}

.screen--hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 57px);
  padding: 0;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #202833;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 25, 31, 0.12), rgba(20, 25, 31, 0.72));
}

.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-content {
  width: min(680px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
  color: var(--surface);
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

.hero-content h1 {
  font-size: 30px;
}

.hero-lead {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}

.hero-content .time-note,
.hero-content .legal-note {
  color: rgba(255, 255, 255, 0.76);
}

.hero-content .button--primary {
  border-color: var(--surface);
  background: var(--surface);
  color: var(--navy);
}

.button--hero-cta {
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 13px 22px;
  line-height: 1.35;
}

.button--hero-cta span:last-child {
  color: rgba(20, 31, 46, 0.68);
  font-size: 12px;
  font-weight: 600;
}

.hero-actions,
.screen-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.hero-actions {
  align-items: center;
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  color: var(--surface);
  background: var(--navy);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button--ghost {
  color: var(--navy);
  background: transparent;
}

.button--primary {
  background: var(--navy);
}

.button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(139, 116, 90, 0.36);
  outline-offset: 2px;
}

.time-note,
.legal-note,
small {
  color: var(--muted);
  font-size: 12px;
}

.legal-note {
  margin: 14px 0 0;
}

.legal-note--block {
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.legal-note--image {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 4;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  background: rgba(120, 128, 132, 0.58);
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
}

.section-head {
  margin: 0 0 16px;
}

.section-head h2 {
  font-size: 23px;
}

.section-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.process-grid,
.program-grid,
.image-detail-grid,
.flow-comparison,
.optimization-list {
  display: grid;
  gap: 14px;
}

.process-grid article,
.program-grid article,
.flow-comparison article,
.optimization-list article,
.complete-card,
.question-card,
.form-section,
.early-result {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.process-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
}

.process-grid span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.process-grid h3,
.program-grid h3 {
  font-size: 18px;
}

.process-grid p,
.program-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.screen--question {
  display: grid;
  align-items: center;
}

.question-wrap {
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
}

.step-indicator {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.step-indicator span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.step-indicator div {
  height: 5px;
  overflow: hidden;
  background: #e5ded5;
}

.step-indicator i {
  display: block;
  height: 100%;
  background: var(--navy);
}

.question-card {
  padding: 18px;
}

.screen--question.is-active .step-indicator,
.screen--question.is-active .question-card {
  animation: questionReveal 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.screen--question.is-active .option-card {
  animation: optionReveal 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.screen--question.is-active .option-card:nth-child(2) {
  animation-delay: 0.04s;
}

.screen--question.is-active .option-card:nth-child(3) {
  animation-delay: 0.08s;
}

.screen--question.is-active .option-card:nth-child(4) {
  animation-delay: 0.12s;
}

.screen--question.is-active .option-card:nth-child(5) {
  animation-delay: 0.16s;
}

.question-card h2 {
  font-size: 22px;
}

.question-card p:not(.eyebrow):not(.form-error) {
  color: var(--muted);
}

.option-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.option-card {
  position: relative;
  display: block;
  cursor: pointer;
}

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

.option-card span {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.option-card input:checked + span {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #f1ebe3;
}

.option-card span::before {
  content: "";
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 2px solid #c4b08a;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.option-card span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 18px;
  width: 12px;
  height: 7px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  border-radius: 1px;
  opacity: 0;
  transform: translateY(-58%) rotate(-45deg);
  transition: opacity 0.25s ease;
}

.option-card input:checked + span::before {
  border-color: #b58a3a;
  background: #b58a3a;
  animation: choiceGoldSplash 0.55s ease forwards;
}

.option-card input:checked + span::after {
  opacity: 1;
}

.option-card input:focus-visible + span {
  outline: 2px solid rgba(181, 138, 58, 0.42);
  outline-offset: 2px;
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--danger);
  background: #fff3ef;
  border: 1px solid #d7a19a;
}

.form-status {
  margin: 0;
  padding: 10px 12px;
  color: var(--navy);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}

.section-nav {
  position: sticky;
  top: 58px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: -1px;
  padding: 0;
  background: transparent;
}

.section-nav a {
  position: relative;
  --tab-bg: #162231;
  --tab-border: #273a54;
  min-height: 36px;
  padding: 10px 8px 9px;
  color: #fff;
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-bottom-color: var(--tab-bg);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.18) inset;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:nth-child(2) {
  --tab-bg: #20324a;
  --tab-border: #334965;
}

.section-nav a:nth-child(3) {
  --tab-bg: #2b4360;
  --tab-border: #3d5878;
}

.section-nav a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.section-nav + .detail-form .form-section:first-child {
  position: relative;
  z-index: 1;
}

.detail-form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 16px;
  scroll-margin-top: 130px;
}

.form-section__head {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.form-section__head > span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: var(--surface);
  font-weight: 700;
}

.form-section__head h3 {
  font-size: 20px;
}

.form-section__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.detail-form small {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
}

.field-label {
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

textarea {
  resize: vertical;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.unit-input span {
  display: grid;
  place-items: center;
  min-width: 76px;
  padding: 0 10px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-left: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.location-picker {
  display: grid;
  gap: 10px;
}

.location-select-grid {
  display: grid;
  gap: 10px;
}

.location-picker__group {
  display: grid;
  gap: 6px;
  margin: 0;
}

.location-picker__group > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-panel {
  margin: 16px 0;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.checkbox-panel legend {
  padding: 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.checkbox-panel div {
  display: grid;
  gap: 8px;
}

.checkbox-panel:not(.checkbox-panel--lead) label {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-panel:not(.checkbox-panel--lead) input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox-panel:not(.checkbox-panel--lead) label span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkbox-panel:not(.checkbox-panel--lead) label span::before {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid #c4b08a;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.checkbox-panel:not(.checkbox-panel--lead) label span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 11px;
  height: 7px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  border-radius: 1px;
  opacity: 0;
  transform: translateY(-58%) rotate(-45deg);
  transition: opacity 0.25s ease;
}

.checkbox-panel:not(.checkbox-panel--lead) input:checked + span {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: #f1ebe3;
}

.checkbox-panel:not(.checkbox-panel--lead) input:checked + span::before {
  border-color: #b58a3a;
  background: #b58a3a;
  animation: choiceGoldSplash 0.55s ease forwards;
}

.checkbox-panel:not(.checkbox-panel--lead) input:checked + span::after {
  opacity: 1;
}

.checkbox-panel:not(.checkbox-panel--lead) input:focus-visible + span {
  outline: 2px solid rgba(181, 138, 58, 0.42);
  outline-offset: 2px;
}

.checkbox-panel--lead input {
  width: 18px;
  min-height: 18px;
}

.wide-field,
.upload-box {
  margin-top: 14px;
}

.upload-box {
  padding: 14px;
  border: 1px dashed #b9afa4;
  background: var(--surface-soft);
}

.loading-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loading-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.loading-steps .loading-step-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #e6e1da;
  color: var(--muted);
  font-weight: 700;
}

.loading-steps li.is-done .loading-step-icon {
  background: var(--navy);
  color: var(--surface);
}

.loading-steps li.is-active {
  border-color: var(--accent);
}

.loading-steps li.is-active .loading-step-icon {
  background: var(--surface);
  border: 2px solid rgba(139, 116, 90, 0.28);
}

.loading-step-spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(139, 116, 90, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loadingSpin 0.75s linear infinite;
}

.early-result {
  margin-top: 18px;
  padding: 18px;
}

.mini-metrics {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-metrics span {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}

.result-hero {
  display: grid;
  gap: 16px;
}

.result-block {
  margin-top: 36px;
  scroll-margin-top: 74px;
}

.screen-actions--result-bottom {
  padding-top: 12px;
}

.result-hero__copy,
.result-hero__visual,
.result-hero__metrics,
.image-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.result-hero__copy {
  padding: 20px;
}

.result-hero__copy h2 {
  font-size: 23px;
}

.result-main-message {
  margin: 12px 0 0;
  color: #3f444a;
  font-weight: 700;
}

.asset-message {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding: 14px;
  background: var(--navy);
  color: var(--surface);
}

.asset-message span,
.asset-message em {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-style: normal;
}

.asset-message strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.result-hero__asset-panel {
  display: grid;
  gap: 12px;
}

.ai-summary-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.ai-summary-box span,
.ai-summary-box dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-summary-box p {
  margin: 0;
  color: #34383d;
  font-size: 14px;
  line-height: 1.75;
}

.ai-summary-box p.is-cost-down {
  color: var(--danger);
  font-weight: 700;
}

.ai-summary-box dl,
.ai-summary-box dd {
  margin: 0;
}

.ai-summary-box dl {
  display: grid;
  gap: 8px;
}

.ai-summary-box dd {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.ai-summary-box small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.flow-comparison strong.is-cost-down {
  color: var(--danger);
}

.result-hero__visual {
  position: relative;
  min-height: 250px;
  overflow: hidden;
}

.image-stage,
.image-card > div {
  position: relative;
  width: 100%;
  min-height: 250px;
}

.image-lightbox-trigger {
  position: relative;
  display: block;
  width: 100%;
  min-height: 250px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.image-stage img,
.image-card img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: block;
  object-fit: cover;
}

.image-stage.is-partial-preview img {
  opacity: 0.78;
  filter: saturate(0.92) contrast(0.96);
}

.image-preview-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 8px;
  color: #fff;
  background: rgba(31, 45, 59, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.image-lightbox-trigger .plan-svg {
  display: block;
  width: 100%;
  min-height: 250px;
}

.skeleton {
  display: grid;
  place-items: center;
  min-height: 250px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.55), rgba(255,255,255,0)),
    #e7e1d9;
  background-size: 220% 100%;
  animation: shimmer 1.6s infinite;
}

.result-hero__metrics {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.result-hero__metrics article,
.flow-comparison article {
  display: grid;
  gap: 2px;
  padding: 13px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.finance-summary {
  margin-bottom: 16px;
}

.result-hero__metrics span,
.flow-comparison span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.result-hero__metrics strong,
.flow-comparison strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.amount-number {
  display: inline-block;
  color: var(--ink);
  font-size: 140%;
  font-weight: 900;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  vertical-align: baseline;
}

.result-hero__metrics .amount-number,
.flow-comparison .amount-number,
.asset-message .amount-number,
.ai-summary-box dd .amount-number {
  font-size: 190%;
}

.asset-message .amount-number {
  color: #fff;
}

.ai-summary-box p .amount-number,
.mini-metrics .amount-number,
.comparison-table .amount-number {
  font-size: 150%;
}

.amount-unit {
  color: var(--muted);
  font-size: 0.95em;
  font-weight: 600;
}

.asset-message .amount-unit {
  color: rgba(255, 255, 255, 0.62);
}

.result-hero__metrics em,
.flow-comparison em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.image-card {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.image-caption {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 8px;
  background: rgba(31, 45, 59, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox:not([hidden]) {
  animation: lightboxFadeIn 0.18s ease-out both;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 17, 24, 0.84);
}

.image-lightbox__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 1100px);
  max-height: calc(100vh - 32px);
  transform-origin: center center;
}

.image-lightbox:not([hidden]) .image-lightbox__panel {
  animation: lightboxZoomIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.image-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-weight: 700;
}

.image-lightbox__close {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.image-lightbox__content {
  display: grid;
  place-items: center;
  overflow: auto;
  max-height: calc(100vh - 92px);
  background: #101722;
}

.image-lightbox__content img,
.image-lightbox__content svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 92px);
  object-fit: contain;
}

.image-lightbox:not([hidden]) .image-lightbox__content img,
.image-lightbox:not([hidden]) .image-lightbox__content svg {
  animation: lightboxMediaIn 0.28s ease-out both;
}

.image-lightbox__content .plan-svg {
  width: 100%;
  min-height: 0;
}

html.has-lightbox,
html.has-lightbox body {
  overflow: hidden;
}

.image-card figcaption {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.program-grid article {
  padding: 18px;
}

.program-grid ul {
  margin: 10px 0 0;
  padding-left: 1.25em;
}

.ratio-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.ratio-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.ratio-list dt,
.ratio-list dd {
  margin: 0;
}

.ratio-list dd {
  font-weight: 700;
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: #333941;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.comparison-table tbody th {
  width: 120px;
  color: var(--charcoal);
  font-weight: 700;
}

.comparison-table tbody tr:last-child th,
.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.optimization-list article {
  padding: 14px;
  font-weight: 700;
}

.lead-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.lead-form label span {
  color: var(--danger);
  font-size: 12px;
}

.checkbox-panel--lead {
  margin: 0;
}

.reservation-form-embed {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(20px, 4vw, 42px);
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.reservation-form-placeholder {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.reservation-form-placeholder p {
  margin: 0;
  color: var(--muted);
}

.reservation-form-back {
  width: min(860px, 100%);
  padding: 0;
  justify-content: center;
}

.screen--reservation .section-head {
  text-align: center;
}

.screen--reservation .form {
  width: min(860px, 100%);
  max-width: 860px;
  margin: 0 auto;
  align-items: stretch;
}

.screen--reservation .form_title {
  display: none;
}

.screen--reservation .form_inner {
  width: 100%;
  align-items: stretch;
}

.screen--reservation .form_item {
  justify-content: center;
}

.screen--reservation .form_item_content {
  max-width: 620px;
}

.screen--reservation .form_item_input-radio {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
}

.screen--reservation input[type=radio],
.screen--reservation input[type=checkbox] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: #007aff;
}

.screen--reservation .form input[type=submit] {
  align-self: center;
  width: auto;
  min-height: 46px;
  padding: 12px 46px;
  font-size: 16px;
}

.complete-card {
  padding: 22px;
}

.complete-card p {
  color: var(--muted);
}

.complete-card ol {
  padding-left: 1.2em;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

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

@keyframes questionReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes optionReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes choiceGoldSplash {
  0% {
    transform: scale(1.08);
  }

  42% {
    transform: scale(1);
    box-shadow: 0 -18px 0 -9px #b58a3a, 16px -8px 0 -9px #b58a3a, 16px 8px 0 -9px #b58a3a, 0 18px 0 -9px #b58a3a, -16px 8px 0 -9px #b58a3a, -16px -8px 0 -9px #b58a3a;
  }

  100% {
    transform: scale(1);
    box-shadow: 0 -32px 0 -10px transparent, 28px -16px 0 -10px transparent, 28px 16px 0 -10px transparent, 0 32px 0 -10px transparent, -28px 16px 0 -10px transparent, -28px -16px 0 -10px transparent;
  }
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.965);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lightboxMediaIn {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skeleton,
  .screen--question.is-active .step-indicator,
  .screen--question.is-active .question-card,
  .screen--question.is-active .option-card,
  .option-card input:checked + span::before,
  .checkbox-panel:not(.checkbox-panel--lead) input:checked + span::before,
  .image-lightbox:not([hidden]),
  .image-lightbox:not([hidden]) .image-lightbox__panel,
  .image-lightbox:not([hidden]) .image-lightbox__content img,
  .image-lightbox:not([hidden]) .image-lightbox__content svg {
    animation: none;
  }

  .image-lightbox {
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .screen {
    padding: 44px 0 70px;
  }

  .hero-content {
    margin-bottom: 0;
    padding: 40px 0;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

  .hero-actions,
  .screen-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .option-grid,
  .form-grid,
  .result-hero__metrics,
  .flow-comparison,
  .optimization-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-card {
    padding: 28px;
  }

  .form-section {
    padding: 22px;
  }

  .checkbox-panel div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .result-hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
  }

  .result-hero__asset-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .result-hero__metrics {
    grid-column: 1 / -1;
  }

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

  .image-detail-grid .image-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding-right: 28px;
    padding-left: 0;
  }

  .hero-content {
    width: min(820px, calc(100% - 56px));
  }

  .result-hero {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .result-hero__metrics,
  .flow-comparison {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .finance-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

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

  .image-detail-grid .image-card:first-child {
    grid-column: auto;
  }
}

/* Builder recommendations are rendered from the plugin result payload. */
.cha-builder-section {
  margin-top: 24px;
}

.cha-builder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.cha-builder-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.06);
}

.cha-builder-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.cha-builder-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy);
}

.cha-builder-card__image img,
.cha-builder-card__image-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cha-builder-card__image-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
}

.cha-builder-card__rank {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  color: #fff;
  background: rgba(31, 45, 59, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.cha-builder-card__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.cha-builder-card__body h4,
.cha-builder-card__body p {
  margin: 0;
}

.cha-builder-card__body h4 {
  font-size: 19px;
  line-height: 1.35;
}

.cha-builder-card__model {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.cha-builder-card__body p:not(.cha-builder-card__model) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.cha-builder-card__logo {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.cha-builder-card__logo img {
  display: block;
  width: auto;
  max-width: 150px;
  max-height: 32px;
  object-fit: contain;
  object-position: left center;
}

.cha-builder-card__link-label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.cha-builder-card__link:hover .cha-builder-card__image img {
  transform: scale(1.03);
}

.cha-builder-card__image img {
  transition: transform 0.35s ease;
}

@media (max-width: 820px) {
  .cha-builder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .cha-builder-grid {
    grid-template-columns: 1fr;
  }
}
