/* Flexible layouts for narrow screens, enlarged text and short viewports. */
html { scroll-padding-top: calc(var(--header-offset, var(--header-h)) + 20px); scroll-padding-bottom: calc(var(--bottom-overlay, 0px) + 20px); }
img, svg { max-width: 100%; }
.brand-copy strong { text-wrap: balance; line-height: 1.4; }
.brand-copy strong > span { display: inline-block; max-width: 100%; }
.header-inner, .screening-header-inner { padding-block: 10px; }
.screening-header-inner > .text-link { flex-shrink: 0; max-width: 40%; }
.site-header { container: site-header / inline-size; }
.primary-nav { max-height: calc(var(--available-height, 100dvh) - var(--header-height, var(--header-h)) - 8px); }
.primary-nav > a { min-width: 0; }
@container site-header (max-width: 70rem) {
  .menu-btn { display: block; flex-shrink: 0; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; height: auto; gap: 0; padding: 20px 32px 30px; overflow-y: auto; background: #fff; box-shadow: var(--shadow-md); }
  .primary-nav.is-open { display: grid; }
  .primary-nav > a:not(.btn) { font-size: 1rem; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .primary-nav .btn { margin-top: 20px; }
}
.tag-cloud { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 8px; }
.tag { display: flex; align-items: center; justify-content: center; min-width: 0; max-width: 100%; min-height: 44px; text-align: center; text-wrap: balance; line-height: 1.7; }
/* Keep the underwriting copy together at meaningful Japanese phrase boundaries. */
#approach > .container { container: underwriting / inline-size; }
.approach-card { min-width: 0; }
.approach-card .index { white-space: nowrap; }
.approach-heading-line { display: block; }
.approach-phrase { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@container underwriting (max-width: 60rem) {
  .approach-grid { grid-template-columns: minmax(0, 1fr); }
  .approach-card, .approach-card:first-child, .approach-card:last-child { padding: 26px 0; border: 0; border-bottom: 1px solid var(--line-light); }
  .approach-card:last-child { border-bottom: 0; padding-bottom: 0; }
  .approach-card h3 { margin-block: 16px; }
}
.quick-action { grid-template-columns: 1.5rem minmax(0, 1fr) 1.25rem; }
.quick-action b { text-align: center; }
.faq-question { grid-template-columns: 1.5rem minmax(0, 1fr) 24px; }
.faq-question .q { min-width: 0; }
.simple-summary { container: loan-overview / inline-size; }
@container loan-overview (max-width: 18rem) {
  .summary-title { flex-wrap: wrap; gap: 8px 16px; }
  .simple-summary dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .simple-summary dl > div, .simple-summary dl > .summary-region { grid-column: auto; display: block; border-left: 0; border-top: 1px solid var(--line); padding: 16px 0; }
  .simple-summary dl > div:first-child { border-top: 0; padding-top: 0; }
  .simple-summary dd.summary-area { margin-top: 8px; }
}
.input--unit { padding-inline-end: 4.5rem; }
.input-wrap .unit { right: 1rem; max-width: 3rem; }
:is(.input, .select, .textarea, .choice-card, .check-line, .check-row) { scroll-margin-block: 20px; }
.terms-cta, .company-statement, .legal-nav { top: calc(var(--header-offset, var(--header-h)) + 24px); }
.contact-copy { top: calc(var(--header-offset, var(--header-h)) + 30px); }
.form-panel { scroll-margin-top: calc(var(--header-offset, var(--header-h)) + 20px); }
.form-panel { container: application / inline-size; }
.simple-progress { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.simple-progress li { min-width: 0; }
.simple-progress li > span { width: 2em; height: 2em; line-height: 1; }
.simple-screening .applicant-choices { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
.simple-screening .chip-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr)); }
.simple-screening .amount-chip { min-width: 0; }
.simple-screening .choice-card input { inset: 50% auto auto 50%; width: 1px; height: 1px; margin: 0; }
.simple-screening .form-actions { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.simple-screening .form-actions .right { max-width: 100%; }
.simple-screening .document-input { min-width: 0; max-width: 100%; overflow: hidden; }
@container application (max-width: 35rem) {
  .simple-screening .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .simple-screening .review-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .simple-screening .form-actions .right { flex: 1 1 100%; width: 100%; margin: 0; }
  .simple-screening .form-actions .btn { width: 100%; min-width: 0; }
  .simple-screening .form-actions #backButton { order: 2; }
}
@media (min-width: 681px) and (max-width: 960px) {
  .quick-action { grid-template-columns: minmax(0, 1fr) 1.25rem; }
}
@media (max-width: 680px) {
  body.home-body { padding-bottom: var(--bottom-overlay, calc(64px + env(safe-area-inset-bottom))); }
  .header-inner, .screening-header-inner { padding-block: 8px; }
  .simple-screening .applicant-choices { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); }
  .simple-screening .chip-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr)); }
  .mobile-cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
/* Free up reading space when sticky elements would occupy most of the screen. */
.compact-viewport :is(.site-header, .screening-header, .terms-cta, .company-statement, .contact-copy, .legal-nav) { position: relative; top: auto; }
.compact-viewport .mobile-cta { position: static; }
.compact-viewport .simple-screening .form-actions { position: static; }
.compact-viewport body.home-body { padding-bottom: 0; }
@media (max-height: 540px) {
  :is(.site-header, .screening-header, .terms-cta, .company-statement, .contact-copy, .legal-nav) { position: relative; top: auto; }
  .mobile-cta, .simple-screening .form-actions { position: static; }
  body.home-body { padding-bottom: 0; }
}
.contact-options h3 { margin: 0 0 24px; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.65; }
.contact-option + .contact-option { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.contact-option h4 { margin: 0 0 10px; font-size: 1rem; line-height: 1.6; }
.contact-option p { margin-bottom: 20px; font-size: 1rem; line-height: 1.9; color: var(--muted); }
.contact-option .field-help { margin: 14px 0 0; font-size: .875rem; }
.contact-email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; text-underline-offset: .2em; }
.contact-caption, .contact-registration { font-size: .875rem; line-height: 1.9; color: #d2dce4; }
.contact-registration { margin-top: 24px; }
.company-map { display: inline-block; margin-top: 12px; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; }
.policy-owner { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); font-size: .9375rem; line-height: 1.9; }
.footer-disclosure p { margin: 0 0 16px; }

/* Japanese reading rhythm: preserve short phrases without fixing a device width. */
.copy-phrase { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.heading-line { display: block; }
:is(h1, h2, h3, h4, .faq-question strong, .quick-action strong) { text-wrap: balance; }
:is(.eyebrow, .hero-label, .brand-copy small) { overflow-wrap: normal; word-break: normal; }
.eyebrow { text-wrap: balance; }
.hero-copy { max-width: 700px; }
.hero .lead { max-width: 37em; }
.hero .lead .copy-sentence { margin-top: .65em; text-wrap: balance; }
.hero-microcopy { max-width: 48em; }
.hero-trust span { display: inline-block; }
.summary-note { text-wrap: pretty; }
.simple-summary dd { letter-spacing: 0; text-wrap: balance; }
.section-head .lead { max-width: 35em; }
.use-card h3 { text-wrap: balance; line-height: 1.6; }
.use-card p, .approach-card p { line-height: 1.95; }

/* Equal reading widths keep the three philosophy columns visually aligned. */
.approach-grid { --column-gap: clamp(28px, 3.5vw, 48px); column-gap: var(--column-gap); border: 0; border-top: 1px solid var(--line-light); }
.approach-card, .approach-card:first-child, .approach-card:last-child { position: relative; padding-inline: 0; border-right: 0; }
.approach-card + .approach-card::before { content: ""; position: absolute; left: calc(var(--column-gap) / -2); top: 32px; bottom: 0; width: 1px; background: var(--line-light); }
.approach-heading-line { max-width: 100%; }
.approach-card p { margin-bottom: 0; }
@container underwriting (max-width: 60rem) {
  .approach-grid { column-gap: 0; }
  .approach-card + .approach-card::before { display: none; }
  .approach-card p { max-width: 46em; }
}
@container underwriting (min-width: 38rem) and (max-width: 60rem) {
  .approach-card > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 16px; }
  .approach-card h3 { margin: 0; }
}
.terms-cta h3 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); line-height: 1.65; margin-bottom: 22px; }
.terms-cta li { padding-left: 18px; }
.terms-cta .btn { padding-inline: 14px; gap: 12px; letter-spacing: 0; }
.company-statement h2, .contact-copy h2 { line-height: 1.65; }
.company-statement blockquote { font-size: 1.0625rem; line-height: 2; }
.contact-options h3 { line-height: 1.65; }
.contact-email { line-height: 1.8; letter-spacing: 0; text-decoration: underline; }
.company-row dd, .footer-disclosure { text-wrap: pretty; }
.footer-disclosure { font-size: .8125rem; }
.simple-screening .screening-intro h1 { line-height: 1.55; margin-bottom: 12px; }
.simple-screening .screening-intro p { line-height: 1.85; }
.simple-screening .amount-chip { white-space: nowrap; letter-spacing: 0; }
.simple-screening .field-label-copy { min-width: 0; }
.simple-screening .screening-footer { max-width: 46em; margin-inline: auto; line-height: 1.9; }
.legal-content { max-width: 48em; }
.legal-content h2 { line-height: 1.65; }
.legal-content h3 { margin-top: 30px; margin-bottom: 12px; line-height: 1.8; }
.legal-content li + li { margin-top: .5em; }
.home-return { flex-shrink: 0; gap: 6px; white-space: nowrap; }
.home-return .mobile-home-label { display: none; }
@media (max-width: 360px) {
  .header-inner:has(.home-return), .screening-header-inner { gap: 8px; }
  .header-inner:has(.home-return) .brand-mark, .screening-header-inner .brand-mark { width: 26px; height: 26px; }
  .header-inner:has(.home-return) .brand-copy strong, .screening-header-inner .brand-copy strong { font-size: .8125rem; letter-spacing: 0; white-space: nowrap; }
}
@media (min-width: 961px) and (max-width: 1120px) {
  .process-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .process-card { padding-inline: 12px; }
  .process-card h3 { font-size: 1rem; letter-spacing: 0; }
}
@media (min-width: 681px) and (max-width: 960px) {
  .process-grid { grid-template-columns: minmax(0, 1fr); }
  .process-card { display: grid; grid-template-columns: 5rem 10rem minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 24px 0; border-right: 0; }
  .process-card h3, .process-card p { margin: 0; }
}
@media (max-width: 680px) {
  .hero-copy { max-width: none; }
  .hero h1 { line-height: 1.55; }
  .hero .lead { line-height: 1.9; }
  .hero-trust { gap: 6px 16px; }
  .simple-summary dd { font-size: clamp(1.0625rem, 4.7vw, 1.5rem); }
  .summary-note .text-phrase { line-height: 1.95; }
  .approach-card h3 { font-size: 1.5rem; line-height: 1.6; }
  .approach-card p { margin-top: 18px; }
  .terms-cta, .qualifier-card { padding: 28px 24px; }
  .company-statement { padding: 30px 24px; }
  .contact-options h3 { font-size: clamp(1.25rem, 5.3vw, 1.5rem); }
  .contact-option + .contact-option { margin-top: 26px; padding-top: 24px; }
  .faq-question strong { line-height: 1.8; }
  .faq-answer-inner { padding-left: 0; line-height: 1.95; }
  .home-return .desktop-home-label { display: none; }
  .home-return .mobile-home-label { display: inline; }
  .legal-content h2 { font-size: clamp(1.375rem, 5.8vw, 1.75rem); letter-spacing: .01em; }
  .legal-content h3 { font-size: 1rem; }
}
