: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;
  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);
}

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

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

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

.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 {
  display: grid;
  min-height: 54px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

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

.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: 13px;
}

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

.detail-form small {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  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);
}

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: 13px;
}

.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-weight: 700;
}

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

.checkbox-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 500;
}

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

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

.rra-form .wide-field textarea {
  min-height: 116px;
}

.rra-form .checkbox-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  font-size: 16px;
  font-weight: 500;
}

.rra-form .checkbox-panel input {
  width: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
}

.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 span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #e6e1da;
  color: var(--muted);
  font-weight: 700;
}

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

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

.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 {
  font-size: 25px;
  line-height: 1.2;
}

.result-hero__visual {
  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-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: 12px;
  font-weight: 700;
}

.result-hero__metrics strong,
.flow-comparison strong {
  font-size: 18px;
  line-height: 1.25;
}

.result-hero__metrics em,
.flow-comparison em {
  color: var(--muted);
  font-size: 12px;
  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;
}

.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 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 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,
  .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__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));
  }

  .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;
  }
}

[data-rra-app] {
  --rra-bg: #f6f7f4;
  --rra-ink: #20242a;
  --rra-muted: #66717d;
  --rra-line: #d9ddd8;
  --rra-surface: #ffffff;
  --rra-soft: #eef4f1;
  --rra-primary: #245b54;
  --rra-primary-dark: #173f3a;
  --rra-accent: #a66f2d;
  --rra-danger: #a33a31;
  background: var(--rra-bg);
  color: var(--rra-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, "Hiragino Sans", Meiryo, sans-serif;
  letter-spacing: 0;
}

[data-rra-app] *,
[data-rra-app] *::before,
[data-rra-app] *::after {
  box-sizing: border-box;
}

[data-rra-app] [hidden] {
  display: none !important;
}

[data-rra-app] button,
[data-rra-app] input,
[data-rra-app] select,
[data-rra-app] textarea {
  font: inherit;
}

[data-rra-app] img {
  display: block;
  max-width: 100%;
}

.rra-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--rra-line);
  backdrop-filter: blur(12px);
}

.rra-topbar > div:first-child {
  display: grid;
  gap: 1px;
}

.rra-topbar strong {
  font-size: 14px;
}

.rra-topbar span {
  color: var(--rra-muted);
  font-size: 12px;
}

.rra-progress {
  overflow: hidden;
  width: min(220px, 34vw);
  height: 8px;
  background: #e5e8e2;
  border-radius: 999px;
}

.rra-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rra-primary), var(--rra-accent));
  transition: width 0.25s ease;
}

.rra-screen {
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 5vw, 64px) 0;
}

.rra-screen[hidden] {
  display: none;
}

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

.rra-hero-logo {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: block;
  width: clamp(220px, 22vw, 260px);
}

.rra-hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}

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

.rra-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 35, 32, 0.22), rgba(19, 35, 32, 0.78));
}

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

.rra-hero-copy {
  width: min(760px, calc(100% - 32px));
  color: #fff;
  text-align: center;
}

.rra-hero-copy h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.3;
}

.rra-hero-copy p:not(.rra-kicker) {
  width: min(620px, 100%);
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
}

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

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

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

[data-rra-app] h2,
[data-rra-app] h3,
[data-rra-app] h4 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0;
}

[data-rra-app] h2 {
  font-size: clamp(24px, 3vw, 36px);
}

[data-rra-app] h3 {
  font-size: 20px;
}

.rra-intro-grid,
.rra-result-numbers,
.rra-image-grid,
.rra-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rra-intro-grid {
  margin: 24px 0;
}

.rra-intro-grid article,
.rra-result-numbers article,
.rra-plan-card,
.rra-timeline article {
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(34, 45, 50, 0.06);
}

.rra-intro-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.rra-intro-grid span {
  color: var(--rra-muted);
  font-size: 14px;
}

.rra-card-options,
.rra-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.rra-option-card,
.rra-check-grid label,
.rra-form label {
  display: grid;
  gap: 8px;
}

.rra-option-card,
.rra-check-grid label {
  cursor: pointer;
  min-height: 58px;
  padding: 14px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
}

.rra-option-card:has(input:checked),
.rra-check-grid label:has(input:checked) {
  border-color: var(--rra-primary);
  background: var(--rra-soft);
}

.rra-option-card input,
.rra-check-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--rra-primary);
}

.rra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.rra-actions--sticky {
  position: sticky;
  bottom: 0;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(246, 247, 244, 0), var(--rra-bg) 32%);
}

.rra-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  color: var(--rra-primary-dark);
  background: var(--rra-surface);
  border: 1px solid var(--rra-primary);
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.rra-button--primary {
  color: #fff;
  background: var(--rra-primary);
}

.rra-button--ghost {
  color: var(--rra-muted);
  border-color: var(--rra-line);
}

.rra-form {
  margin-top: 22px;
}

.rra-detail-section {
  margin-top: 22px;
  padding: 22px;
  background: var(--rra-soft);
  border: 1px solid var(--rra-line);
  border-radius: 0;
}

.rra-detail-section:first-of-type {
  margin-top: 26px;
}

.rra-detail-section .rra-form {
  margin-top: 16px;
}

.rra-form-subheading {
  margin: 24px 0 0;
  color: var(--rra-primary);
  font-weight: 800;
}

.rra-form-subheading:first-child {
  margin-top: 0;
}

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

.rra-form-wide {
  grid-column: 1 / -1;
}

.rra-form input,
.rra-form select,
.rra-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  color: var(--rra-ink);
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
}

.rra-error {
  margin: 14px 0 0;
  color: var(--rra-danger);
  font-weight: 700;
}

.rra-loading {
  display: grid;
  place-items: center;
  min-height: 58vh;
  text-align: center;
}

.rra-loading > [hidden] {
  display: none;
}

.rra-loading-shell {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 58px) clamp(20px, 6vw, 56px);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(166, 111, 45, 0.2);
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(84, 65, 45, 0.06);
}

.rra-loading-brand {
  color: #756833;
}

.rra-loading-logo {
  position: relative;
  display: block;
  width: min(236px, 64vw);
  margin: 0 auto;
  line-height: 0;
  overflow: visible;
}

.rra-loading-logo svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.rra-loading-logo__svg path,
.rra-loading-logo__svg polygon {
  fill: currentColor;
  fill-opacity: 0;
  stroke: currentColor;
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--rra-loading-logo-length, 320);
  stroke-dashoffset: var(--rra-loading-logo-length, 320);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
  animation-delay: var(--rra-loading-logo-delay, 0s);
  will-change: opacity, stroke-dashoffset, fill-opacity, transform;
}

.rra-loading-logo__svg polygon {
  stroke-width: 0.62;
}

.rra-loading-logo.is-animating .rra-loading-logo__svg path,
.rra-loading-logo.is-animating .rra-loading-logo__svg polygon {
  animation-name: rra-loading-logo-draw;
  animation-duration: 4.8s;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-iteration-count: infinite;
}

.rra-loading-logo__fallback .rra-loading-logo__line {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}

.rra-loading-logo.is-animating .rra-loading-logo__fallback .rra-loading-logo__line {
  animation: rra-loading-logo-draw 3.8s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.rra-loading-logo::after {
  content: "";
  position: absolute;
  inset: -18% -10%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.72) 49%, transparent 62%);
  opacity: 0;
  transform: translateX(-120%) skewX(-15deg);
}

.rra-loading-logo.is-animating::after {
  animation: rra-loading-logo-sheen 4.8s ease-in-out infinite;
}

.rra-loading-copy {
  margin-top: 28px;
}

.rra-loading-copy .rra-kicker {
  margin-bottom: 8px;
}

.rra-loading-copy h2 {
  margin: 0;
  color: var(--rra-primary-dark);
  font-size: clamp(21px, 3vw, 30px);
  line-height: 1.45;
}

.rra-loading-message {
  min-height: 82px;
  margin-top: 24px;
}

.rra-loading-message h3 {
  margin: 0;
  color: var(--rra-primary-dark);
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.5;
}

.rra-loading-message p {
  margin: 4px 0 0;
  color: var(--rra-muted);
  font-size: 14px;
  line-height: 1.65;
}

.rra-loading-message.is-changing h3,
.rra-loading-message.is-changing p {
  animation: rra-loading-message-in 0.42s ease both;
}

.rra-loading-progress-label {
  margin-top: 15px;
  color: var(--rra-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.rra-loading-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rra-loading-steps li {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  color: #b8b1a8;
  font-size: 11px;
  line-height: 1.35;
  transition: color 0.35s ease;
}

.rra-loading-steps li span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #d8c8b2;
  border-radius: 50%;
  color: #b8b1a8;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.rra-loading-steps li b {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.rra-loading-steps li.is-active,
.rra-loading-steps li.is-done {
  color: var(--rra-primary-dark);
}

.rra-loading-steps li.is-active span {
  color: #fff;
  background: var(--rra-accent);
  border-color: var(--rra-accent);
  box-shadow: 0 0 0 4px rgba(166, 111, 45, 0.1);
}

.rra-loading-steps li.is-done span {
  color: #fff;
  background: var(--rra-primary);
  border-color: var(--rra-primary);
}

.rra-loading-complete {
  width: min(520px, 100%);
  padding: 36px 24px;
  text-align: center;
}

.rra-loading-complete h2 {
  margin: 0;
  color: var(--rra-primary-dark);
  font-size: clamp(22px, 3vw, 30px);
}

.rra-loading-complete p:last-child {
  margin: 10px 0 0;
  color: var(--rra-muted);
}

@keyframes rra-loading-logo-draw {
  0%, 7% {
    stroke-dashoffset: var(--rra-loading-logo-length, 320);
    fill-opacity: 0;
    opacity: 0;
    transform: translateY(3px) scale(0.985);
  }

  18% {
    opacity: 1;
  }

  54% {
    stroke-dashoffset: 0;
    fill-opacity: 0;
    opacity: 1;
  }

  68%, 86% {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    stroke-dashoffset: 0;
    fill-opacity: 0;
    opacity: 0;
    transform: translateY(-2px) scale(1.006);
  }
}

@keyframes rra-loading-logo-sheen {
  0%, 48% {
    opacity: 0;
    transform: translateX(-120%) skewX(-15deg);
  }

  62% {
    opacity: 1;
  }

  76% {
    opacity: 0;
    transform: translateX(120%) skewX(-15deg);
  }

  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-15deg);
  }
}

@keyframes rra-loading-message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

@media (max-width: 640px) {
  .rra-loading {
    min-height: 62vh;
  }

  .rra-loading-shell {
    padding: 28px 16px 24px;
  }

  .rra-loading-copy {
    margin-top: 22px;
  }

  .rra-loading-message {
    min-height: 96px;
    margin-top: 18px;
  }

  .rra-loading-steps {
    gap: 4px;
  }

  .rra-loading-steps li {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rra-loading-logo__svg path,
  .rra-loading-logo__svg polygon,
  .rra-loading-logo::after,
  .rra-loading-logo__fallback .rra-loading-logo__line,
  .rra-loading-message.is-changing h3,
  .rra-loading-message.is-changing p {
    animation: none;
  }

  .rra-loading-logo__svg path,
  .rra-loading-logo__svg polygon,
  .rra-loading-logo__fallback .rra-loading-logo__line {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    opacity: 1;
    transform: none;
  }

  .rra-loading-logo::after {
    display: none;
  }

  .rra-loading-steps li,
  .rra-loading-steps li span {
    transition: none;
  }
}

.rra-diagnosis-error {
  width: min(560px, 100%);
  padding: 28px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  text-align: center;
}

.rra-diagnosis-error .rra-actions {
  justify-content: center;
}

.rra-loader {
  width: 54px;
  height: 54px;
  margin: 26px auto 12px;
  border: 5px solid #dae4df;
  border-top-color: var(--rra-primary);
  border-radius: 50%;
  animation: rra-spin 0.9s linear infinite;
}

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

.rra-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.rra-result-hero > div,
.rra-result-section {
  padding: clamp(18px, 3vw, 28px);
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
}

.rra-result-hero img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  border-radius: 8px;
}

.rra-recommended {
  margin: 12px 0 18px;
  color: var(--rra-primary);
  font-size: 22px;
  font-weight: 800;
}

.rra-result-hero h2 {
  margin: 0 0 18px;
  color: var(--rra-accent);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.rra-result-owner {
  margin: 0 0 10px;
  color: var(--rra-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.rra-result-hero h2.rra-result-headline {
  margin: 0 0 12px;
  color: var(--rra-primary-dark);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.45;
}

.rra-result-budget-copy {
  margin: 0 0 20px;
  color: var(--rra-primary);
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 700;
  line-height: 1.7;
}

.rra-personalized-result {
  margin: 0 0 20px;
  color: var(--rra-primary-dark);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-line;
}

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

.rra-result-numbers article {
  padding: 14px;
  transition: background 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
}

.rra-result-numbers.is-calculating article {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, #eeefed 8%, #fbfaf8 18%, #eeefed 33%);
  background-size: 220% 100%;
  animation: rra-result-shimmer 1.8s linear infinite;
}

.rra-result-numbers.is-calculating article::after {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(38, 55, 70, 0.48);
  content: '計算中';
  font-size: 11px;
  letter-spacing: 0.04em;
}

.rra-result-numbers.is-calculating article > span,
.rra-result-numbers.is-calculating article > strong {
  opacity: 0.62;
  filter: blur(1.4px);
}

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

.rra-result-numbers span,
.rra-breakdown span {
  display: block;
  color: var(--rra-muted);
  font-size: 13px;
}

.rra-result-numbers strong,
.rra-breakdown strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.rra-result-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  color: var(--rra-muted);
  font-size: 13px;
  line-height: 1.5;
}

.rra-result-progress.is-error {
  color: var(--rra-danger);
}

.rra-inline-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(38, 55, 70, 0.16);
  border-top-color: var(--rra-primary);
  border-radius: 50%;
  animation: rra-inline-spin 0.8s linear infinite;
}

.rra-inline-spinner[hidden] {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .rra-result-numbers.is-calculating article {
    animation: none;
  }
}

.rra-result-section {
  margin-top: 18px;
}

.rra-summary-lead {
  margin: 0;
  white-space: pre-line;
  font-size: 17px;
  line-height: 1.8;
}

.rra-result-accordion {
  margin-top: 18px;
  border-top: 1px solid var(--rra-line);
  border-bottom: 1px solid var(--rra-line);
}

.rra-result-accordion summary {
  position: relative;
  padding: 14px 34px 14px 0;
  color: var(--rra-primary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.rra-result-accordion summary::-webkit-details-marker {
  display: none;
}

.rra-result-accordion summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
}

.rra-result-accordion[open] summary::after {
  content: '−';
}

.rra-result-accordion__body {
  padding: 0 0 16px;
}

.rra-result-accordion__body p {
  margin-top: 0;
}

.rra-image-grid {
  margin-top: 16px;
}

.rra-image-grid figure {
  margin: 0;
}

.rra-image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.rra-image-grid figcaption {
  margin-top: 6px;
  color: var(--rra-muted);
  font-size: 13px;
}

.rra-special-specs-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.rra-special-specs-heading .rra-note {
  max-width: 680px;
  margin: 8px 0 0;
}

.rra-special-specs-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.rra-carousel-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--rra-primary);
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rra-carousel-button:hover,
.rra-carousel-button:focus-visible {
  color: #fff;
  background: var(--rra-primary);
  border-color: var(--rra-primary);
}

.rra-special-specs-track {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--rra-accent) transparent;
  cursor: grab;
  touch-action: pan-y;
}

.rra-special-specs-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.rra-special-spec-card {
  display: flex;
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(38, 55, 70, 0.06);
  scroll-snap-align: start;
}

.rra-special-spec-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e3dc;
}

.rra-special-spec-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.rra-special-spec-card:hover .rra-special-spec-card__image img {
  transform: scale(1.03);
}

.rra-special-spec-card__body {
  flex: 1;
  padding: 18px 18px 20px;
}

.rra-special-spec-card__body h4,
.rra-special-spec-card__body p {
  margin: 0;
}

.rra-special-spec-card__body h4 {
  color: var(--rra-primary);
  font-size: 20px;
  line-height: 1.4;
}

.rra-special-spec-card__body p {
  margin-top: 8px;
  color: var(--rra-muted);
  font-size: 14px;
  line-height: 1.75;
}

.rra-special-specs-note {
  margin: 10px 0 0;
}

@media (max-width: 820px) {
  .rra-special-specs-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .rra-special-spec-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 520px) {
  .rra-special-specs-track {
    gap: 12px;
    margin-right: -16px;
    padding-right: 18px;
  }

  .rra-special-spec-card {
    flex-basis: calc(88% - 6px);
  }

  .rra-special-spec-card__body {
    padding: 16px 16px 18px;
  }

  .rra-special-spec-card__body h4 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rra-carousel-button,
  .rra-special-spec-card__image img {
    transition: none;
  }
}

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

.rra-breakdown div {
  padding: 14px;
  background: var(--rra-soft);
  border-radius: 8px;
}

.rra-note {
  color: var(--rra-muted);
  font-size: 13px;
}

.rra-plan-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rra-plan-tabs button {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--rra-primary-dark);
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 8px;
  cursor: pointer;
}

.rra-plan-tabs button.is-active {
  color: #fff;
  background: var(--rra-primary);
  border-color: var(--rra-primary);
}

.rra-plan-card {
  display: none;
  margin-top: 14px;
  padding: 18px;
}

.rra-plan-card.is-active {
  display: block;
}

.rra-plan-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rra-plan-card header strong {
  color: var(--rra-primary);
  font-size: 24px;
}

.rra-plan-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.rra-plan-card div {
  padding: 10px;
  background: var(--rra-soft);
  border-radius: 8px;
}

.rra-plan-card dt {
  color: var(--rra-muted);
  font-size: 12px;
}

.rra-plan-card dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.rra-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.rra-timeline article {
  padding: 16px;
}

.rra-timeline-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--rra-line);
}

.rra-timeline-row small {
  grid-column: 2;
  color: var(--rra-muted);
}

[data-rra-app] .rra-timeline-row {
  display: block;
}

[data-rra-app] .rra-timeline-row h5 {
  margin: 0 0 8px;
  color: var(--rra-ink);
  font-size: 17px;
  line-height: 1.4;
}

[data-rra-app] .rra-timeline-metric {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
}

[data-rra-app] .rra-timeline-metric > span {
  flex: 0 0 96px;
  color: var(--rra-muted);
  font-size: 14px;
  font-weight: 700;
}

[data-rra-app] .rra-timeline-metric > strong {
  min-width: 0;
  font-size: 17px;
}

[data-rra-app] .rra-timeline-metric--primary {
  padding-top: 0;
}

[data-rra-app] .rra-timeline-metric--primary > span {
  color: var(--rra-ink);
}

[data-rra-app] .rra-timeline-metric--primary > strong {
  font-size: 21px;
}

.rra-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rra-check-list li {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--rra-line);
  background: #fbfaf7;
  line-height: 1.5;
}

.rra-check-list li::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 14px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--rra-accent);
  border-radius: 50%;
  color: var(--rra-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}

.rra-complete {
  display: grid;
  place-items: start;
  min-height: 54vh;
}

@media (max-width: 820px) {
  .rra-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .rra-progress {
    width: 100%;
  }

  .rra-intro-grid,
  .rra-result-numbers,
  .rra-image-grid,
  .rra-form-grid,
  .rra-card-options,
  .rra-check-grid,
  .rra-breakdown,
  .rra-timeline,
  .rra-check-list,
  .rra-result-hero,
  .rra-plan-card dl {
    grid-template-columns: 1fr;
  }

  .rra-result-hero img {
    min-height: 260px;
  }

  [data-rra-app] .rra-timeline-metric > span {
    flex-basis: 96px;
  }
}

@media (max-width: 520px) {
  .rra-screen {
    padding: 24px 0;
  }

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

  .rra-button {
    width: 100%;
  }
}

[data-rra-app] {
  --rra-bg: #f4f1ec;
  --rra-ink: #23272f;
  --rra-muted: #686f78;
  --rra-line: #ddd7cf;
  --rra-surface: #ffffff;
  --rra-soft: #faf8f4;
  --rra-primary: #1f2d3b;
  --rra-primary-dark: #1f2d3b;
  --rra-accent: #8b745a;
  --rra-danger: #8f342b;
  min-height: 100vh;
  background: var(--rra-bg);
  color: var(--rra-ink);
  font-size: 14px;
  line-height: 1.75;
}

[data-rra-current-screen="hero"] .rra-topbar {
  display: none;
}

.rra-topbar {
  position: static;
  display: grid;
  gap: 8px;
  width: min(760px, calc(100% - 28px));
  min-height: 0;
  margin: 0 auto -12px;
  padding: 36px 0 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

[data-rra-current-screen="current"] .rra-topbar,
[data-rra-current-screen="destination"] .rra-topbar,
[data-rra-current-screen="household"] .rra-topbar,
[data-rra-current-screen="result"] .rra-topbar {
  width: min(1100px, calc(100% - 28px));
}

.rra-topbar > div:first-child {
  display: block;
}

.rra-topbar strong {
  display: none;
}

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

.rra-progress {
  width: 100%;
  height: 5px;
  background: #e5ded5;
  border-radius: 0;
}

.rra-progress span {
  background: var(--rra-primary);
  border-radius: 0;
}

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

.rra-screen[data-rra-screen="q1"]:not([hidden]),
.rra-screen[data-rra-screen="q2"]:not([hidden]),
.rra-screen[data-rra-screen="q3"]:not([hidden]) {
  display: grid;
  align-items: center;
}

.rra-screen--hero {
  min-height: 100vh;
}

.rra-hero-copy {
  width: min(680px, calc(100% - 28px));
  padding: 28px 0;
}

.rra-hero-copy h1 {
  font-size: 30px;
  line-height: 1.35;
}

.rra-hero-copy p:not(.rra-kicker) {
  margin-top: 14px;
  font-size: 15px;
}

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

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

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

.rra-screen[data-rra-screen="q1"] .rra-container--narrow,
.rra-screen[data-rra-screen="q2"] .rra-container--narrow,
.rra-screen[data-rra-screen="q3"] .rra-container--narrow,
.rra-screen[data-rra-screen="current"] .rra-container,
.rra-screen[data-rra-screen="destination"] .rra-container,
.rra-screen[data-rra-screen="household"] .rra-container,
.rra-screen[data-rra-screen="lead"] .rra-container--narrow,
.rra-screen[data-rra-screen="complete"] .rra-container--narrow {
  padding: 28px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.rra-kicker {
  margin: 0 0 8px;
  color: var(--rra-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

[data-rra-app] h2 {
  font-size: 22px;
}

[data-rra-app] h3 {
  font-size: 20px;
}

.rra-card-options,
.rra-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.rra-option-card,
.rra-check-grid label {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 700;
}

.rra-option-card input,
.rra-check-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rra-option-card span,
.rra-check-grid label span {
  display: grid;
  min-height: 44px;
  align-items: center;
  padding: 12px;
  background: var(--rra-soft);
  border: 1px solid var(--rra-line);
  color: var(--rra-ink);
  font-size: 14px;
}

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

.rra-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.rra-button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid var(--rra-primary);
  border-radius: 6px;
  color: var(--rra-surface);
  background: var(--rra-primary);
  font-size: 14px;
  font-weight: 700;
}

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

.rra-button--ghost {
  color: var(--rra-primary);
  background: transparent;
  border-color: var(--rra-primary);
}

.rra-form {
  margin-top: 16px;
}

.rra-form label {
  display: grid;
  gap: 6px;
  color: var(--rra-ink);
  font-size: 14px;
  font-weight: 700;
}

.rra-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rra-required-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 30px;
  height: 19px;
  padding: 0 6px;
  color: var(--rra-danger);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: var(--rra-surface);
  border: 1px solid var(--rra-danger);
  border-radius: 5px;
}

.rra-form input,
.rra-form select,
.rra-form textarea {
  min-height: 46px;
  padding: 10px 11px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 0;
  color: var(--rra-ink);
  font-size: 14px;
}

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

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

.rra-result-hero > div,
.rra-result-section,
.rra-result-numbers article,
.rra-plan-card,
.rra-timeline article {
  border-color: var(--rra-line);
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.rra-result-hero > div,
.rra-result-section {
  padding: 20px;
}

.rra-recommended {
  color: var(--rra-primary);
  font-size: 18px;
}

.rra-result-numbers article,
.rra-breakdown div,
.rra-plan-card div {
  background: var(--rra-soft);
  border: 1px solid var(--rra-line);
  border-radius: 0;
}

.rra-plan-tabs button {
  border-radius: 6px;
}

.rra-plan-tabs button.is-active {
  background: var(--rra-primary);
  border-color: var(--rra-primary);
}

@media (max-width: 820px) {
  .rra-topbar {
    width: min(760px, calc(100% - 28px));
  }

  [data-rra-current-screen="current"] .rra-topbar,
  [data-rra-current-screen="destination"] .rra-topbar,
  [data-rra-current-screen="household"] .rra-topbar,
  [data-rra-current-screen="result"] .rra-topbar {
    width: min(1100px, calc(100% - 28px));
  }

  .rra-form-grid,
  .rra-card-options,
  .rra-check-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .rra-hero-logo {
    top: 16px;
    left: 16px;
    width: min(220px, calc(100% - 32px));
  }

  .rra-screen[data-rra-screen="q1"] .rra-container--narrow,
  .rra-screen[data-rra-screen="q2"] .rra-container--narrow,
  .rra-screen[data-rra-screen="q3"] .rra-container--narrow,
  .rra-screen[data-rra-screen="current"] .rra-container,
  .rra-screen[data-rra-screen="destination"] .rra-container,
  .rra-screen[data-rra-screen="household"] .rra-container,
  .rra-screen[data-rra-screen="lead"] .rra-container--narrow,
  .rra-screen[data-rra-screen="complete"] .rra-container--narrow {
    padding: 18px;
  }

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

[data-rra-app] {
  font-size: 18.2px;
}

.rra-topbar span,
.rra-kicker {
  font-size: 16px;
}

.rra-hero-copy h1 {
  font-size: 39px;
}

@media (max-width: 520px) {
  .rra-hero-copy h1 {
    font-size: 39px;
  }
}

/* Compact detail form: one visible form owns every diagnostic input. */
[data-rra-app] .rra-detail-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

[data-rra-app] .rra-detail-form .rra-detail-section {
  margin-top: 0;
  padding: 20px;
}

[data-rra-app] .rra-detail-form .rra-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

[data-rra-app] .rra-detail-form label {
  gap: 5px;
  min-width: 0;
  font-size: 16px;
}

[data-rra-app] .rra-detail-form .rra-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 1.5em;
  line-height: 1.45;
}

[data-rra-app] .rra-detail-form input,
[data-rra-app] .rra-detail-form select,
[data-rra-app] .rra-detail-form textarea {
  min-height: 50px;
  padding: 8px 10px;
}

[data-rra-app] .rra-input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

[data-rra-app] .rra-input-with-unit > span {
  display: grid;
  place-items: center;
  min-width: 58px;
  padding: 0 8px;
  background: var(--accent-soft);
  border: 1px solid var(--rra-line);
  border-left: 0;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

[data-rra-app] .rra-input-with-unit input,
[data-rra-app] .rra-input-with-unit select {
  min-width: 0;
}

[data-rra-app] .rra-detail-intro {
  margin: 4px 0 0;
  color: var(--rra-muted);
  font-size: 14px;
}

[data-rra-app] .rra-detail-accordion {
  margin-top: 14px;
  border: 1px solid var(--rra-line);
  background: var(--rra-surface);
}

[data-rra-app] .rra-detail-accordion summary {
  padding: 12px 14px;
  color: var(--rra-primary);
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

[data-rra-app] .rra-detail-accordion[open] summary {
  border-bottom: 1px solid var(--rra-line);
}

[data-rra-app] .rra-detail-accordion .rra-form-grid {
  padding: 16px;
}

[data-rra-app] .rra-detail-form .checkbox-panel {
  margin: 16px 0 12px;
  padding: 14px;
}

[data-rra-app] .rra-detail-form .checkbox-panel legend {
  font-size: 18px;
}

[data-rra-app] .rra-detail-form .rra-function-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

[data-rra-app] .rra-detail-form .checkbox-panel label {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 15px;
}

[data-rra-app] .rra-detail-form .checkbox-panel input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}

.rra-lead-builder-request {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--rra-line);
}

.rra-lead-builder-request legend {
  padding: 0 6px;
  color: var(--rra-ink);
  font-weight: 700;
}

.rra-lead-builder-request > p {
  margin: 0 0 10px;
  color: var(--rra-muted);
  font-size: 13px;
}

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

.rra-builder-request-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  cursor: pointer;
}

.rra-builder-request-option:has(input:checked) {
  border-color: var(--rra-accent);
  box-shadow: inset 0 0 0 1px var(--rra-accent);
  background: #f1ebe3;
}

.rra-builder-request-option input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--rra-accent);
}

.rra-builder-request-option span {
  display: block;
  line-height: 1.45;
}

.rra-builder-request-option small {
  display: block;
  margin-top: 2px;
  color: var(--rra-accent);
  font-size: 11px;
}

@media (max-width: 640px) {
  .rra-builder-request-options {
    grid-template-columns: 1fr;
  }
}

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

.rra-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rra-support-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--rra-line);
  background: var(--rra-surface);
}

.rra-support-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rra-support-card__head h4 {
  margin: 0;
  color: var(--rra-primary);
  font-size: 17px;
  line-height: 1.45;
}

.rra-support-card__rating {
  flex: 0 0 auto;
  color: #b58a3a;
  font-size: 17px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.rra-support-card__priority,
.rra-support-card__description,
.rra-support-card__caution {
  margin: 8px 0 0;
  line-height: 1.6;
}

.rra-support-card__priority {
  color: var(--rra-accent);
  font-size: 12px;
  font-weight: 700;
}

.rra-support-card__description {
  color: var(--rra-text);
  font-size: 14px;
}

.rra-support-card__caution {
  color: var(--rra-muted);
  font-size: 12px;
}

.rra-builder-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--rra-line);
  background: var(--rra-surface);
}

.rra-builder-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8e3dc;
}

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

.rra-builder-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  overflow: hidden;
  padding: 4px 0;
  border-bottom: 1px solid var(--rra-line);
}

.rra-builder-card__logo img {
  display: block;
  max-width: 160px;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.rra-builder-card__logo--footer {
  height: 54px;
  margin-top: auto;
  padding: 8px 0 0;
  border-bottom: 0;
  text-decoration: none;
}

.rra-builder-card__logo--footer:focus-visible {
  outline: 2px solid var(--rra-primary);
  outline-offset: 3px;
}

.rra-builder-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
}

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

.rra-builder-card__body h4 {
  font-size: 20px;
  line-height: 1.35;
  min-height: 1.35em;
}

.rra-builder-card__rank,
.rra-builder-card__model {
  color: var(--rra-muted);
  font-size: 14px;
}

.rra-builder-card__model {
  min-height: 1.45em;
}

.rra-builder-card__rank strong {
  margin-left: 8px;
  color: var(--rra-accent);
  font-size: 18px;
}

.rra-builder-card__reason {
  color: var(--rra-muted);
  font-size: 14px;
  line-height: 1.65;
}

.rra-builder-card__description,
.rra-builder-card__reason {
  display: -webkit-box;
  min-height: 3.1em;
  max-height: 3.1em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rra-builder-card__link {
  margin-top: auto;
  text-decoration: none;
}

@media (max-width: 820px) {
  .rra-support-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 520px) {
  .rra-builder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rra-image-card.is-partial.is-generating:not(.is-mock) img {
  opacity: 1;
  filter: blur(1.2px) saturate(0.86) brightness(0.82);
  transform: scale(1.01);
}

.rra-image-card.is-partial .rra-image-loading {
  background: rgba(28, 42, 56, 0.36);
}

.rra-image-card img.rra-image-final-in {
  animation: rraImageFinalIn 0.42s ease-out both;
}

@keyframes rraImageFinalIn {
  from {
    opacity: 0.35;
    transform: scale(1.01);
  }

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

@media (prefers-reduced-motion: reduce) {
  .rra-image-card img.rra-image-final-in {
    animation: none;
  }
}

[data-rra-app] .rra-detail-form .wide-field {
  margin-top: 12px;
}

[data-rra-app] .rra-detail-form .wide-field textarea {
  min-height: 86px;
}

[data-rra-app] .rra-detail-form .rra-questionnaire-review-section {
  padding-top: 18px;
}

[data-rra-app] .rra-questionnaire-review {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

[data-rra-app] .rra-review-field {
  gap: 5px;
  min-width: 0;
  font-size: 15px;
}

[data-rra-app] .rra-review-field span {
  display: block;
  min-height: 1.45em;
  line-height: 1.4;
}

[data-rra-app] .rra-review-field select {
  min-height: 48px;
}

[data-rra-app] input[type="number"]::-webkit-inner-spin-button,
[data-rra-app] input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

[data-rra-app] input[type="number"] {
  -moz-appearance: textfield;
}

@media (max-width: 820px) {
  [data-rra-app] .rra-detail-form .rra-form-grid,
  [data-rra-app] .rra-detail-form .rra-function-grid,
  [data-rra-app] .rra-questionnaire-review {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  [data-rra-app] .rra-detail-form .rra-detail-section {
    padding: 16px;
  }

  [data-rra-app] .rra-detail-form .rra-form-grid,
  [data-rra-app] .rra-detail-form .rra-function-grid,
  [data-rra-app] .rra-questionnaire-review {
    grid-template-columns: 1fr;
  }
}

.rra-hero-copy p:not(.rra-kicker) {
  font-size: 20px;
}

[data-rra-app] h2 {
  font-size: 29px;
}

[data-rra-app] h3 {
  font-size: 26px;
}

.rra-form-heading {
  margin-top: 64px;
  margin-bottom: 16px;
  padding-top: 8px;
}

.rra-option-card span,
.rra-check-grid label span,
.rra-button,
.rra-form label,
.rra-form input,
.rra-form select,
.rra-form textarea,
.rra-error {
  font-size: 18px;
}

.rra-button {
  min-height: 56px;
}

.rra-option-card span,
.rra-check-grid label span {
  min-height: 56px;
}

.rra-screen[data-rra-screen="q1"] .rra-option-card span,
.rra-screen[data-rra-screen="q2"] .rra-option-card span,
.rra-screen[data-rra-screen="q3"] .rra-option-card span,
.rra-questionnaire-review .rra-option-card span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rra-screen[data-rra-screen="q1"] .rra-option-card span::before,
.rra-screen[data-rra-screen="q2"] .rra-option-card span::before,
.rra-screen[data-rra-screen="q3"] .rra-option-card span::before,
.rra-questionnaire-review .rra-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;
}

.rra-screen[data-rra-screen="q1"] .rra-option-card span::after,
.rra-screen[data-rra-screen="q2"] .rra-option-card span::after,
.rra-screen[data-rra-screen="q3"] .rra-option-card span::after,
.rra-questionnaire-review .rra-option-card span::after {
  content: "";
  position: absolute;
  top: 47%;
  left: 18px;
  width: 12px;
  height: 7px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  border-radius: 1px;
  transform: translateY(-58%) rotate(-45deg);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rra-screen[data-rra-screen="q1"] .rra-option-card input:checked + span::before,
.rra-screen[data-rra-screen="q2"] .rra-option-card input:checked + span::before,
.rra-screen[data-rra-screen="q3"] .rra-option-card input:checked + span::before,
.rra-questionnaire-review .rra-option-card input:checked + span::before {
  border-color: #b58a3a;
  background: #b58a3a;
  animation: rraGoldSplash 0.55s ease forwards;
}

.rra-screen[data-rra-screen="q1"] .rra-option-card input:checked + span::after,
.rra-screen[data-rra-screen="q2"] .rra-option-card input:checked + span::after,
.rra-screen[data-rra-screen="q3"] .rra-option-card input:checked + span::after,
.rra-questionnaire-review .rra-option-card input:checked + span::after {
  opacity: 1;
}

@keyframes rraGoldSplash {
  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;
  }
}

.rra-form input,
.rra-form select,
.rra-form textarea {
  min-height: 58px;
}

.rra-form input::placeholder,
.rra-form textarea::placeholder {
  color: #9aa0a6;
  opacity: 1;
}

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

.rra-check-grid label span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rra-check-grid 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;
}

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

.rra-check-grid input:checked + span::before {
  border-color: #b58a3a;
  background: #b58a3a;
  animation: rraGoldSplash 0.55s ease forwards;
}

.rra-check-grid input:checked + span::after {
  opacity: 1;
}

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

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

.rra-recommended,
.rra-result-numbers strong,
.rra-breakdown strong {
  font-size: 23px;
}

.rra-result-numbers span,
.rra-breakdown span,
.rra-image-grid figcaption,
.rra-note,
.rra-plan-card dt {
  font-size: 17px;
}

.rra-plan-card header strong {
  font-size: 31px;
}

.rra-money-value {
  color: #68717d;
  font-weight: 700;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: nowrap;
}

.rra-money-value .rra-money-amount {
  display: inline;
  color: currentColor;
  font-size: 1.4em;
  font-weight: 800;
}

.rra-money-value.is-negative,
.rra-money-inline.is-negative {
  color: var(--rra-danger);
}

.rra-breakdown .rra-breakdown-unit {
  display: block;
  margin-top: 2px;
  color: var(--rra-muted);
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1.35;
}

.rra-monthly-comparison {
  display: block;
  margin-top: 3px;
  color: var(--rra-muted);
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.35;
}

.rra-monthly-comparison.is-reduced {
  color: var(--rra-danger);
}

.rra-monthly-comparison.is-increased {
  color: #2f6fa3;
}

.rra-monthly-comparison.is-neutral {
  color: var(--rra-muted);
}

.rra-money-line,
.rra-money-nowrap {
  display: inline-block;
  white-space: nowrap;
}

.rra-timeline-row strong.rra-money-value {
  display: inline-block;
  color: #1f2d3b;
}

.rra-timeline-row strong.rra-money-value.is-negative {
  color: var(--rra-danger);
}

.rra-money-inline {
  color: inherit;
  font-weight: 700;
}

.rra-money-inline .rra-money-amount {
  font-size: 1em;
}

.rra-result-hero .rra-result-numbers {
  grid-template-columns: 1fr;
}

.rra-image-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--rra-surface);
  border: 1px solid var(--rra-line);
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(31, 45, 59, 0.05);
}

.rra-image-lightbox-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

.rra-image-lightbox-trigger:disabled {
  cursor: progress;
}

.rra-image-caption {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 7px 9px;
  background: rgba(31, 45, 59, 0.82);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.rra-result-hero .rra-image-card {
  height: auto;
}

.rra-result-hero .rra-image-card img,
.rra-image-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  border-radius: 0;
}

.rra-image-card.is-generating img {
  filter: saturate(0.72) brightness(0.66);
  transform: scale(1.01);
}

.rra-image-card.is-empty:not(.is-mock) img,
.rra-image-card.is-generating:not(.is-mock) img {
  opacity: 0;
}

/* Keep the first streamed preview visible above the generic loading rule. */
.rra-image-card.is-partial.is-generating:not(.is-mock) img {
  opacity: 1;
  filter: blur(1.2px) saturate(0.86) brightness(0.82);
  transform: scale(1.01);
}

.rra-image-card.is-failed:not(.is-mock) img {
  opacity: 0;
}

.rra-image-card.is-failed .rra-image-lightbox-trigger {
  cursor: default;
}

.rra-image-card.is-failed .rra-image-lightbox-trigger::after {
  display: none;
}

.rra-image-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(31, 45, 59, 0.88);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

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

.rra-image-error .rra-button {
  min-height: 42px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
  cursor: pointer;
}

.rra-image-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(31, 45, 59, 0.88);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

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

.rra-image-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rraImageSpin 0.9s linear infinite;
}

.rra-image-card--main img {
  height: min(68vw, 620px);
  min-height: 520px;
}

.rra-result-hero .rra-image-card--main {
  align-self: stretch;
  width: 100%;
  height: 100%;
}

.rra-result-hero .rra-image-card--main .rra-image-lightbox-trigger {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.rra-result-hero .rra-image-card--main img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

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

.rra-image-card figcaption {
  padding: 16px 20px;
  color: var(--rra-muted);
  background: var(--rra-surface);
  border-top: 1px solid var(--rra-line);
  font-size: 16px;
  line-height: 1.75;
}

.rra-image-grid {
  gap: 18px;
  margin-top: 18px;
}

.rra-image-grid .rra-image-card img {
  height: 360px;
  min-height: 330px;
}

@media (max-width: 820px) {
  .rra-image-card--main img {
    height: 420px;
    min-height: 360px;
  }

  .rra-image-grid .rra-image-card img {
    height: 320px;
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  .rra-image-card--main img,
  .rra-image-grid .rra-image-card img {
    height: 280px;
    min-height: 240px;
  }
}

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

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

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

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

.rra-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;
}

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

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

.rra-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;
}

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

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

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

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

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

@keyframes rraLightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

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

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

@media (prefers-reduced-motion: reduce) {
  .rra-image-spinner,
  .rra-image-lightbox:not([hidden]),
  .rra-image-lightbox:not([hidden]) .rra-image-lightbox__panel,
  .rra-image-lightbox:not([hidden]) .rra-image-lightbox__content img {
    animation: none;
  }

  .rra-image-lightbox {
    opacity: 1;
  }
}

/* Keep the compact option controls compact after the shared form rules. */
[data-rra-app] .rra-detail-form .checkbox-panel input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}
