.spreadsheet-page .shell { max-width: 1240px; }
.sheet-main { padding-top: 64px; padding-bottom: 64px; }
.sheet-main h2 { font-size: clamp(1.45rem, 2.3vw, 1.9rem); line-height: 1.2; letter-spacing: -.035em; }
.sheet-main h3 { font-size: 1rem; }
.sheet-main a:not(.primary-button) { text-decoration-thickness: 1px; }
.sheet-hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 48px; }
.sheet-hero h1 { max-width: 13ch; font-size: clamp(2rem, 3.3vw, 2.9rem); line-height: 1.13; }
.sheet-intro { margin-top: 20px; max-width: 35ch; font-size: 1.125rem; color: var(--muted); line-height: 1.6; }
.sheet-download { margin-top: 28px; padding: 14px 20px; font-size: 1rem; gap: 10px; border-radius: 6px; }
.sheet-download span { font-weight: 400; }
.sheet-download:hover { background: #104b7b; }
.sheet-free { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.sheet-google { margin-top: 22px; font-size: .9rem; }
.sheet-google > span { display: block; color: var(--muted); font-size: .8125rem; margin-top: 4px; }
.sheet-browser { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.7; }
.sheet-browser a { display: block; }
.sheet-preview { margin: 0; min-width: 0; background: #fff; border: 1px solid #cddbd4; border-radius: 9px; box-shadow: 0 10px 36px #233e3410; overflow: hidden; }
.sheet-preview-heading { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: #f2f7f4; border-bottom: 1px solid #dbe6df; font-size: .875rem; font-weight: 600; }
.sheet-file-icon { display: grid; place-items: center; width: 30px; height: 36px; border: 1px solid #b6cdbf; border-radius: 3px; color: #216946; background: #fff; font-size: .95rem; }
.sheet-file-type { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.sheet-preview > a { display: block; padding: 16px 12px; background: #f8faf9; }
.sheet-preview img { display: block; width: 100%; height: auto; border: 1px solid #e1e7e3; }
.sheet-preview figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; color: var(--muted); font-size: .75rem; border-top: 1px solid #e1e7e3; }
.sheet-preview figcaption i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; background: #fff1bd; border: 1px solid #e8d895; }
.sheet-contents { margin-top: 48px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sheet-contents h2 { font-size: .875rem; letter-spacing: 0; }
.sheet-contents dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 18px 0 0; }
.sheet-main dl dd { margin: 0; }
.sheet-contents dt { font-weight: 600; font-size: .9375rem; }
.sheet-contents dd { color: var(--muted); font-size: .875rem; line-height: 1.6; margin-top: 5px !important; }
.sheet-example { margin-top: 56px; }
.sheet-section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.sheet-section-heading > p { color: var(--muted); font-size: .8125rem; }
.sheet-example-body { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.sheet-cash-flow, .sheet-capital { padding: 28px 32px; }
.sheet-cash-flow { background: #f3f7fa; }
.sheet-capital { border-left: 1px solid var(--line); }
.sheet-ledger { margin: 18px 0 0; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.sheet-ledger > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 16px; padding: 12px 0; border-bottom: 1px solid #dce4ea; }
.sheet-ledger > div:last-child { border-bottom: 0; }
.sheet-ledger dd { text-align: right; white-space: nowrap; }
.sheet-ledger small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.5; margin-top: 4px; max-width: 30ch; }
.sheet-cash-result { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid #c5d5df; padding: 20px 0 0; margin-top: 5px; }
.sheet-cash-result > span { font-size: .9375rem; font-weight: 600; }
.sheet-cash-result strong { color: var(--positive); font-size: 2rem; line-height: 1.2; letter-spacing: -.035em; white-space: nowrap; }
.sheet-purchase { margin-top: 8px; font-size: .8125rem; color: var(--muted); line-height: 1.6; }
.sheet-capital .sheet-ledger { margin-top: 14px; }
.sheet-capital .sheet-ledger > div { padding: 9px 0; }
.sheet-ledger-total { font-weight: 700; }
.sheet-returns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 25px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.sheet-returns dt { font-size: .8125rem; }
.sheet-returns dd:not(.sheet-explain) { margin-top: 5px; font-size: 1.65rem; font-weight: 600; letter-spacing: -.03em; }
.sheet-returns .sheet-explain { color: var(--muted); font-size: .75rem; line-height: 1.5; margin-top: 6px; }
.sheet-assumptions { margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.sheet-assumptions summary { cursor: pointer; width: fit-content; padding: 8px 0; }
.sheet-assumptions > div { max-width: 85ch; line-height: 1.6; padding: 8px 0; }
.sheet-assumptions p + p { margin-top: 8px; }
.sheet-assumptions[open] { padding: 8px 16px; background: var(--surface); border-radius: 6px; }
.sheet-example-action { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; align-items: center; padding: 22px 0 0; font-size: .9375rem; }
.sheet-example-action p { color: var(--muted); }.sheet-example-action a { font-weight: 600; }
.sheet-prepare { display: grid; grid-template-columns: .8fr 1.2fr; gap: 72px; margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.sheet-prepare > div > p:last-child { color: var(--muted); line-height: 1.7; font-size: .9375rem; margin-top: 16px; max-width: 37ch; }
.sheet-input-guide { margin: 0; }
.sheet-input-guide > div { display: grid; grid-template-columns: 115px minmax(0,1fr); gap: 20px; padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); font-size: .875rem; line-height: 1.65; }
.sheet-input-guide > div:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
.sheet-input-guide dt { font-weight: 600; }.sheet-input-guide dd { color: var(--muted); }
.sheet-online { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 56px; border: 1px solid #d5e4dc; border-radius: 9px; background: #f1f7f3; padding: 36px; }
.sheet-online-intro > p:not(.eyebrow) { color: var(--muted); font-size: .9375rem; line-height: 1.7; margin: 16px 0; }
.sheet-online-intro > a { font-size: .875rem; }
.sheet-import { min-width: 0; padding-left: 32px; border-left: 1px solid #d2e1d8; }
.sheet-import > p { color: var(--muted); font-size: .8125rem; margin: 6px 0 16px; }
.sheet-file-label { display: block; font-size: .9375rem; font-weight: 600; margin: 0 0 8px; }
.sheet-import input { width: 100%; max-width: 100%; font-size: .875rem; color: var(--ink); }
.sheet-import input::file-selector-button { padding: 10px 12px; margin-right: 10px; background: white; border: 1px solid #b5c9bd; border-radius: 5px; color: var(--ink); cursor: pointer; font: inherit; }
.sheet-import #workbook-status { margin: 12px 0 0; line-height: 1.6; }
.sheet-import #workbook-status:empty { margin: 0; }
.sheet-import #workbook-summary { font-size: .875rem; margin: 14px 0; line-height: 1.6; }
.sheet-import .primary-button { white-space: normal; }
.sheet-library { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.sheet-library > p { color: var(--muted); font-size: .9375rem; margin-top: 12px; }
.sheet-library-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 28px; }
.sheet-library-list > div { display: flex; flex-direction: column; padding-left: 20px; border-left: 3px solid #d2e1d8; }
.sheet-library-list p { flex: 1; color: var(--muted); font-size: .875rem; margin: 8px 0 10px; }
.sheet-library-list a { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; width: fit-content; font-size: .875rem; }
.sheet-format { font-size: .8125rem; }
.sheet-import #workbook-choice-wrap { margin-top: 18px; }
.sheet-import #workbook-choice-wrap label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 600; }
.sheet-import #workbook-choice { width: 100%; padding: 10px 30px 10px 12px; font: inherit; font-size: .9375rem; background-color: white; color: var(--ink); border: 1px solid #b5c9bd; border-radius: 5px; }
.sheet-import #workbook-scope { font-size: .8125rem; line-height: 1.6; margin-bottom: 18px; }
.sheet-comparison-example { margin-top: 40px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sheet-comparison-example .sheet-section-heading { padding: 26px 24px; margin: 0; }
.sheet-comparison-example .sheet-assumptions { padding: 18px 24px; border-top: 1px solid var(--line); }
.sheet-comparison-example .sheet-assumptions summary { cursor: pointer; color: var(--muted); font-size: .875rem; }
.sheet-comparison-example .sheet-assumptions[open] { background: #f3f7f5; }
.sheet-comparison-example .sheet-assumptions p { font-size: .875rem; line-height: 1.7; margin: 12px 0 0; }
.comparison-table-wrap { overflow-x: auto; }
.sheet-comparison-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: .9375rem; }
.sheet-comparison-table th, .sheet-comparison-table td { padding: 16px 24px; border-bottom: 1px solid var(--line); text-align: right; white-space: normal; }
.sheet-comparison-table th:first-child { text-align: left; width: 48%; }
.sheet-comparison-table tbody th { font-weight: 500; }
.sheet-comparison-table thead { color: var(--muted); font-size: .8125rem; background: #f6f8fa; }
.sheet-comparison-table .comparison-cash { background: #edf5f1; color: #216a50; font-weight: 700; }
.sheet-comparison-table .comparison-cash th { font-weight: 700; }
.sheet-comparison-table tr:last-child > * { border-bottom: 0; }
@media (max-width: 600px) { .sheet-comparison-table th, .sheet-comparison-table td { padding: 14px 12px; font-size: .8125rem; }.sheet-comparison-table th:first-child { width: 42%; } }
.sheet-next { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .8125rem; }
.sheet-footer { padding: 26px 0; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }.sheet-footer .shell, .sheet-footer span:last-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; }
@media (max-width: 1000px) {
  .sheet-hero { gap: 28px; }.sheet-hero h1 { font-size: 2.15rem; }
  .sheet-cash-flow, .sheet-capital { padding: 24px; }
  .sheet-prepare { gap: 40px; }.sheet-online { gap: 28px; padding: 28px; }
}
@media (max-width: 760px) {
  .spreadsheet-page .shell { padding-left: 22px; padding-right: 22px; }
  .sheet-main { padding-top: 36px; padding-bottom: 40px; }
  .sheet-hero { grid-template-columns: 1fr; gap: 30px; }
  .sheet-hero h1 { max-width: 20ch; font-size: 2.25rem; }.sheet-intro { max-width: 48ch; }
  .sheet-browser { margin-top: 20px; padding-top: 16px; }.sheet-browser a { display: block; }
  .sheet-preview { max-width: 600px; }
  .sheet-contents { margin-top: 32px; padding: 24px 0; }.sheet-contents dl { grid-template-columns: 1fr; gap: 18px; }
  .sheet-contents dl > div { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 16px; }.sheet-contents dd { margin-top: 0 !important; }
  .sheet-example { margin-top: 36px; }.sheet-section-heading { display: block; }.sheet-section-heading > p { margin-top: 12px; }
  .sheet-example-body { grid-template-columns: 1fr; }.sheet-capital { border-left: 0; border-top: 1px solid var(--line); }
  .sheet-example-action { display: block; }.sheet-example-action a { display: inline-block; margin-top: 8px; }
  .sheet-prepare { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; padding-top: 36px; }.sheet-prepare > div > p:last-child { max-width: none; }
  .sheet-online { grid-template-columns: 1fr; gap: 26px; margin-top: 36px; padding: 24px; }.sheet-import { border-left: 0; border-top: 1px solid #d2e1d8; padding: 24px 0 0; }
  .sheet-next { display: grid; gap: 12px; }
  .sheet-library-list { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 420px) {
  .sheet-hero h1 { font-size: 2rem; }.sheet-intro { font-size: 1rem; }
  .sheet-download { width: 100%; }.sheet-free { text-align: center; }
  .sheet-contents dl > div { grid-template-columns: 1fr; gap: 3px; }
  .sheet-cash-flow, .sheet-capital { padding: 22px 18px; }.sheet-ledger { font-size: .875rem; }.sheet-ledger > div { gap: 12px; }
  .sheet-cash-result strong { font-size: 1.8rem; }.sheet-returns { gap: 16px; }
  .sheet-input-guide > div { grid-template-columns: 1fr; gap: 4px; }
  .sheet-online { padding: 24px 20px; }
}
