:root {
  color-scheme: light;
  --ink: #2b2824;
  --muted: #6b655b;
  --line: #ddd8cc;
  --blue: #2f5fc4;
  --pale: #e8edf7;
  --surface: #fbf9f4;
  --page: #f4f1ea;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--blue); }
.container { width: 90%; max-width: 1120px; margin-inline: auto; } /* 한글 메인과 같은 폭·왼쪽 시작선 */
.site-header, .site-footer { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-footer { margin-top: auto; padding: 28px 0; border: 0; background: #111827; color: #98a2b3; font-size: 13px; }
.nav { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header .nav { height: 72px; min-height: 0; }
.brand { --logo-h: clamp(34px, 5vw, 50px); display: inline-flex; align-items: center; gap: clamp(6px, 1vw, 10px); color: var(--ink); font-size: clamp(16px, 2.2vw, 20px); font-weight: 800; letter-spacing: -1px; text-decoration: none; white-space: nowrap; }
.brand img { width: calc(var(--logo-h) * 1.4); height: var(--logo-h); flex-shrink: 0; object-fit: contain; }
.language-link { font-size: 14px; font-weight: 600; }
main { flex: 1; width: 90%; max-width: 1120px; margin: 0 auto; padding: 38px 0 56px; }
h1 { margin: 0 0 8px; font-size: clamp(27px, 5vw, 38px); line-height: 1.2; letter-spacing: -.025em; }
h2 { margin: 0 0 12px; font-size: 21px; line-height: 1.35; }
h3 { margin: 18px 0 8px; font-size: 17px; }
p { margin: 9px 0; }
.lead { max-width: 760px; margin: 0 0 24px; color: var(--muted); font-size: 17px; }
.card { margin: 16px 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.card-link { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; }
.card-link:hover, .card-link:focus-visible { border-color: var(--blue); box-shadow: 0 4px 18px #1d5fd11a; }
.card-link h2 { color: var(--blue); font-size: 18px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin: 5px 8px 5px 0; padding: 8px 14px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 650; text-decoration: none; }
.button-link:hover, .button-link:focus-visible { background: #1d4ed8; }
.button-link.secondary { background: #fbf9f4; color: var(--blue); }
.muted, .note { color: var(--muted); font-size: 14px; }
.note { padding: 12px 14px; border-left: 3px solid #90b4f5; background: var(--pale); }
.toc ol { margin-bottom: 0; }
.form-grid, .result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
label { display: block; margin-bottom: 5px; color: #5a554d; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #cbd3df; border-radius: 7px; background: #fbf9f4; color: var(--ink); font: inherit; }
input:focus, select:focus { outline: 2px solid #dce9ff; border-color: var(--blue); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
button { min-height: 44px; padding: 9px 17px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
button.secondary { background: #fbf9f4; color: var(--blue); }
.result { padding: 14px; border-radius: 9px; background: var(--pale); overflow-wrap: anywhere; }
.result-label { color: var(--muted); font-size: 13px; }
.result-value { margin-top: 3px; font-size: 21px; font-weight: 750; }
.error { margin: 12px 0 0; color: #b42318; }
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap table { min-width: 620px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
th { position: sticky; top: 0; background: #f0f3f7; }
th:first-child, td:first-child { text-align: center; }
details { margin-top: 12px; }
summary { color: var(--blue); cursor: pointer; font-weight: 650; }
.pdf-viewer iframe { display: block; width: 100%; height: min(75vh, 900px); min-height: 480px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.terms-list dt { margin-top: 18px; font-weight: 700; }
.terms-list dd { margin: 3px 0 0; color: #5a554d; }
.small { font-size: 13px; }
@media (max-width: 560px) {
  main { padding: 26px 0 38px; }
  .card { padding: 17px; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
  .pdf-viewer iframe { height: 60vh; min-height: 320px; }
}
@media (max-width: 800px) {
  .site-header .nav { height: auto; min-height: 72px; padding: 10px 0; }
  .brand { gap: 8px; font-size: 17px; letter-spacing: -.8px; }
  .brand img { width: 52px; height: 42px; }
}

/* Lease overview page (mirrors Korean page styling) */
.lease-overview {
    --lo-text: #1f2933;
    --lo-muted: #667085;
    --lo-line: #dde3ea;
    --lo-accent: #1d5fd1;
    --lo-accent-weak: #e8f0fc;
    flex: 1;
    width: min(100% - 32px, 960px);
    min-width: 0;
    margin: 0 auto;
    padding: 28px 0 48px;
    color: var(--lo-text);
}
.lease-overview h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 4vw, 30px);
    overflow-wrap: anywhere;
}
.lease-overview h2 {
    margin: 0 0 14px;
    font-size: 18px;
}
.lease-overview h3 {
    margin: 20px 0 8px;
    font-size: 16px;
}
.lease-overview h4 {
    margin: 16px 0 6px;
    font-size: 15px;
    color: var(--lo-accent);
}
.lease-overview .lease-table-wrap {
    margin: 8px 0;
    overflow-x: auto;
}
.lease-overview .lease-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: normal;
}
.lease-overview .lease-table th,
.lease-overview .lease-table td {
    padding: 8px 10px;
    border: 1px solid var(--lo-border, #ddd8cc);
    text-align: left;
}
.lease-overview .lease-table th {
    position: static;
    background: var(--lo-accent-weak);
    overflow-wrap: anywhere;
}
.lease-overview .lease-table.num td:nth-child(2) {
    text-align: right;
    white-space: nowrap;
}
.lease-overview .lease-table.compare {
    table-layout: fixed;
}
.lease-overview .lease-table.compare th:first-child,
.lease-overview .lease-table.compare td:first-child {
    width: 22%;
    font-weight: 700;
    background: var(--lo-accent-weak);
}
.lease-overview .lease-table.compare td {
    vertical-align: top;
    overflow-wrap: anywhere;
}
.lease-overview p {
    margin: 8px 0;
}
.lease-overview .sub,
.lease-overview .note {
    color: var(--lo-muted);
    font-size: 13px;
}
.lease-overview > section.card,
.lease-overview > nav.card {
    min-width: 0;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--lo-line);
    border-radius: 10px;
    background: #fbf9f4;
    scroll-margin-top: 88px;
}
.lease-overview .toc {
    display: block;
    position: static;
    gap: 0;
    box-shadow: none;
    font-size: inherit;
    color: inherit;
}
.lease-overview .toc a {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
}
.lease-overview .toc h2 {
    font-size: 16px;
}
.lease-overview .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
    font-size: 14px;
}
.lease-overview .toc li {
    counter-increment: toc;
}
.lease-overview .toc li::before {
    content: counter(toc) ". ";
    color: var(--lo-muted);
}
.lease-overview .toc a {
    color: var(--lo-accent);
    font-weight: 600;
}
.lease-overview .toc a:hover {
    text-decoration: underline;
}
.lease-overview .definition {
    margin: 12px 0 16px;
    padding: 14px 16px;
    border-left: 4px solid var(--lo-accent);
    border-radius: 0 8px 8px 0;
    background: var(--lo-accent-weak);
}
.lease-overview .benefit-grid,
.lease-overview .comparison,
.lease-overview .lease-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.lease-overview .benefit,
.lease-overview .lease-item {
    padding: 16px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
}
.lease-overview .benefit-number {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--lo-accent-weak);
    color: var(--lo-accent);
    font-size: 13px;
    font-weight: 700;
}
.lease-overview .benefit h3,
.lease-overview .lease-item h3 {
    margin: 0 0 6px;
}
.lease-overview .benefit p,
.lease-overview .lease-item p {
    margin: 0;
    color: var(--lo-muted);
    font-size: 14px;
}
.lease-overview .lease-item .en {
    display: block;
    margin-bottom: 4px;
    color: var(--lo-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    overflow-wrap: anywhere;
}
.lease-overview .placeholder {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #cbd3dc;
    border-radius: 8px;
    color: var(--lo-muted);
    font-size: 14px;
}
.lease-overview .placeholder strong {
    color: var(--lo-text);
}
.lease-overview .type-panel {
    padding: 16px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
}
.lease-overview .type-panel.finance {
    background: var(--lo-accent-weak);
    border-color: #c9dbf7;
}
.lease-overview .type-panel.operating {
    background: #f4f1ea;
}
.lease-overview .type-panel h3 {
    margin: 0 0 6px;
}
.lease-overview .type-panel p {
    margin: 0;
    color: var(--lo-muted);
    font-size: 14px;
}
.lease-overview .criteria {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: criteria;
}
.lease-overview .criteria li {
    position: relative;
    margin: 10px 0;
    padding: 12px 14px 12px 52px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    font-size: 14px;
    counter-increment: criteria;
}
.lease-overview .criteria li::before {
    content: counter(criteria);
    position: absolute;
    top: 12px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--lo-accent-weak);
    color: var(--lo-accent);
    font-size: 12px;
    font-weight: 700;
}
.lease-overview .criteria strong {
    display: block;
    margin-bottom: 2px;
    font-size: 15px;
}
.lease-overview .formula {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f0f3f7;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.lease-overview .change-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}
.lease-overview .flow-step {
    display: grid;
    place-items: center;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}
.lease-overview .flow-arrow {
    color: var(--lo-accent);
    font-size: 20px;
    font-weight: 700;
}
.lease-overview .flow-figure {
    margin: 16px 0;
    text-align: center;
}
.lease-overview .flow-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--lo-line);
    border-radius: 8px;
    background: #fbf9f4;
}
.lease-overview .flow-figure figcaption {
    margin-top: 8px;
    color: var(--lo-muted);
    font-size: 13px;
}
.lease-overview .note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f1ea;
}
.lease-overview .note strong {
    color: var(--lo-text);
}
.lease-overview .note.key-point {
    padding: 16px 18px;
    border-left: 4px solid var(--lo-accent, #2563eb);
    background: var(--lo-accent-weak, #eef4ff);
}
.lease-overview .note.key-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.1em;
    color: var(--lo-accent, #2f5fc4);
}
@media (max-width: 760px) {
    .lease-overview {
        padding-top: 24px;
    }
}
@media (max-width: 600px) {
    .lease-overview .benefit-grid,
    .lease-overview .comparison,
    .lease-overview .lease-list {
        grid-template-columns: 1fr;
    }
    .lease-overview .change-flow {
        grid-template-columns: 1fr;
    }
    .lease-overview .flow-arrow {
        text-align: center;
        transform: rotate(90deg);
    }
    .lease-overview > section.card,
    .lease-overview > nav.card {
        padding: 16px;
    }
    .lease-overview .lease-table.compare,
    .lease-overview .lease-table.compare tbody,
    .lease-overview .lease-table.compare tr,
    .lease-overview .lease-table.compare td {
        display: block;
        width: 100%;
    }
    .lease-overview .lease-table.compare thead {
        display: none;
    }
    .lease-overview .lease-table.compare tr {
        margin-bottom: 12px;
        border: 1px solid var(--lo-border, #ddd8cc);
        border-radius: 8px;
        overflow: hidden;
    }
    .lease-overview .lease-table.compare td {
        border: 0;
        border-top: 1px solid var(--lo-border, #ddd8cc);
    }
    .lease-overview .lease-table.compare td:first-child {
        width: 100%;
        border-top: 0;
    }
    .lease-overview .lease-table.compare td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--lo-accent);
        font-size: 12px;
        font-weight: 700;
    }
}
@media print {
    .site-header,
    .site-footer,
    .lease-overview .toc {
        display: none;
    }
    .lease-overview > section.card {
        break-inside: avoid;
    }
}

.next-steps ul { margin: 8px 0 0; padding-left: 20px; }
.next-steps li { margin: 6px 0; }

.news { margin: 0 0 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.news-title { margin: 0 0 6px; font-size: 14px; color: var(--blue); }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.news-list li:first-child { border-top: 0; }
.news-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.news-tag { padding: 2px 8px; border-radius: 10px; background: var(--pale); color: var(--blue); font-size: 12px; font-weight: 700; }
.news-list a { color: var(--ink); font-weight: 600; }
.news-list a:hover { color: var(--blue); }
.footer-links { margin-top: 10px; font-size: 13px; } .footer-links a { color: inherit; text-decoration: underline; } .site-footer a { color: inherit; text-decoration: underline; }

/* 헤더 오른쪽: 언어 링크 + 밝기 전환 */
.nav-right { display: flex; align-items: center; gap: 14px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 0; padding: 5px; border: 1px solid #ddd8cc; border-radius: 999px; background: #fbf9f4; color: #2b2824; cursor: pointer; font-weight: 400; }
.theme-toggle span { display: flex; align-items: center; justify-content: center; width: 32px; height: 28px; border-radius: 999px; font-size: 15px; }
.theme-toggle .light { background: #dbeafe; }
.theme-toggle .dark { background: transparent; }
.theme-toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* 어두운 화면: 한글 사이트와 같은 색 계열. 헤더는 한글 사이트처럼 밝게 고정한다. */
html.dark-mode { color-scheme: dark; --ink: #e4e4e4; --muted: #a8abae; --line: #2a2c2e; --blue: #60a5fa; --pale: #2c2e32; --surface: #2c2e32; --page: #26282b; }
html.dark-mode .site-header { background: #fff; border-bottom-color: #e4e8ef; }
html.dark-mode .site-header .brand { color: #2c2e32; }
html.dark-mode .site-header .language-link { color: #2563eb; }
html.dark-mode .theme-toggle .light { background: transparent; }
html.dark-mode .theme-toggle .dark { background: #dbeafe; }
html.dark-mode .note { border-left-color: #3b82f6; }
html.dark-mode .card-link:hover, html.dark-mode .card-link:focus-visible { box-shadow: 0 4px 18px #00000066; }

/* 헤더의 '한국어' 링크: 서브페이지와 같은 버튼(알약) 모양 */
.language-link { display: inline-block; padding: 4px 10px; border: 1px solid #d0d5dd; border-radius: 999px; color: #5a554d; font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: none; white-space: nowrap; }
.language-link:hover { border-color: #2563eb; color: #2f5fc4; }
html.dark-mode .site-header .language-link { color: #475467; }
html.dark-mode .site-header .language-link:hover { color: #2563eb; }

/* 로고 그림의 흰 배경이 따뜻한 헤더 위에서 네모로 보이지 않게 한다(밝은 화면) */
html:not(.dark-mode) header img { mix-blend-mode: multiply; }

/* 푸터 색은 css/theme-en.css가 정한다 */
