body.fund-page { display: block; background: #f4f6fa; }
.fund-wrap { max-width: 1450px; margin-inline: auto; padding-inline: clamp(15px, 4vw, 58px); }
.fund-header { background: white; border-bottom: 1px solid var(--line); }
.fund-header-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; }
.fund-header .brand { margin: 0; }
.fund-back { padding: 6px 13px; border: 1px solid #cbd4e2; border-radius: 8px; color: var(--navy); font-size: .9rem; font-weight: 700; }
.fund-back:hover { background: #f0f3fa; }
.fund-main { padding-block: 23px 45px; }
.fund-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 18px; }
.fund-heading h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); color: var(--navy); margin: 0; letter-spacing: .03em; }
.fund-heading label { display: grid; gap: 4px; min-width: min(260px, 100%); color: var(--navy); font-size: .875rem; font-weight: 700; }
.fund-heading select { appearance: none; padding: 8px 32px 8px 12px; color: var(--navy); background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%231f2e55' stroke-width='2'/%3E%3C/svg%3E") right 12px center no-repeat; border: 1px solid #aebbd0; border-radius: 8px; font: inherit; font-size: 1rem; }
.fund-format { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.fund-format legend { padding: 0 0 7px; color: var(--navy); font-size: .9rem; font-weight: 750; }
.format-options, .fund-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.format-choice { display: grid; grid-template-columns: 17px minmax(0,1fr); align-content: center; gap: 1px 8px; min-height: 68px; padding: 9px clamp(8px, 1.5vw, 16px); border: 1px solid #c6d1e0; border-radius: 10px; background: white; cursor: pointer; color: var(--navy); }
.format-choice:hover { border-color: #8297ba; }
.format-choice:has(input:checked) { border-color: var(--navy); background: #ecf1fb; box-shadow: 0 0 0 1px var(--navy); }
.format-choice input, .rate-check input { accent-color: var(--navy); margin: auto 0; }
.format-title { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; }
.paper-size-label, .format-choice small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.format-choice small { grid-column: 2; }
.fund-totals { margin: 0 0 16px; background: var(--navy); color: white; border-radius: 11px; padding: 13px clamp(10px, 2vw, 23px); }
.fund-totals div { min-width: 0; padding-left: clamp(4px, 1.4vw, 17px); }
.fund-totals div + div { border-left: 1px solid #ffffff45; }
.fund-totals dt { color: #e7ecf8; font-size: .875rem; }
.fund-totals dt span { font-size: .75rem; white-space: nowrap; color: #dbe1ef; }
.fund-totals dd { margin: 3px 0 0; font-size: clamp(.95rem, 2.35vw, 1.65rem); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fund-workspace { display: grid; grid-template-columns: minmax(320px, .84fr) minmax(0, 1.46fr); align-items: start; gap: clamp(14px, 2vw, 27px); }
#fund-form { display: grid; min-width: 0; gap: 12px; }
.fund-panel, .fund-preview { border: 1px solid var(--line); border-radius: 13px; background: white; min-width: 0; }
.fund-panel { padding: 13px clamp(14px, 1.6vw, 22px); }
.fund-panel h2, .fund-panel summary, .paper-toolbar h2 { color: var(--navy); font-size: 1.05rem; font-weight: 750; margin: 0; }
.fund-panel h2 { border-left: 3px solid #b9870e; padding-left: 8px; }
.fund-panel summary { cursor: pointer; padding: 2px 0; }
.fund-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 12px; margin-top: 12px; }
.fund-field { display: grid; gap: 4px; align-content: start; }
.fund-field.full, .rate-check { grid-column: 1 / -1; }
.fund-field label, .rate-check { font-size: .875rem; font-weight: 700; color: var(--ink); }
.rate-check { display: flex; gap: 8px; align-items: center; }
.fund-input { position: relative; }
.fund-input input, .fund-input textarea { width: 100%; min-height: 41px; display: block; padding: 7px 9px; border: 1px solid #b8c5d8; border-radius: 7px; color: var(--ink); font: inherit; }
.fund-input:has(span) input { padding-inline-end: 43px; font-variant-numeric: tabular-nums; }
.fund-input span { position: absolute; right: 9px; top: 10px; color: var(--muted); pointer-events: none; font-size: .83rem; }
.fund-input textarea { resize: vertical; }
.fund-input input[readonly] { background: #eef3fa; }
.fund-input [aria-invalid="true"] { border-color: #a52b26; }
.field-error { color: #9d2725; }
.field-help, .fund-note, .paper-toolbar p { color: var(--muted); font-size: .82rem; margin: 0; }
.fund-note { padding-inline: 4px; }
.fund-preview { scroll-margin-top: 10px; position: sticky; top: 10px; }
.paper-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.fund-primary { background: var(--navy); color: white; border: 0; border-radius: 8px; min-height: 42px; padding: 7px 13px; font-weight: 750; }
.fund-primary:disabled { opacity: .55; cursor: default; }
.fund-primary:enabled:hover { background: #304574; }
#fund-status { margin: 0; padding: 7px 16px; font-size: .85rem; color: #8a2823; }
#fund-status:empty { display: none; }
.paper-mat { background: #e5ebf4; border-radius: 0 0 13px 13px; padding: clamp(9px, 1.9vw, 25px); }
#fund-paper { display: block; width: min(100%, 210mm); height: auto; margin-inline: auto; background: white; box-shadow: 0 2px 12px #18243e24; }
#fund-paper.landscape { width: 100%; }
.fund-jump { display: none; }
@media (max-width: 860px) {
  .fund-workspace { grid-template-columns: minmax(0,1fr); }
  .fund-preview { position: static; }
  .fund-jump { display: inline-block; margin: 0 0 12px; text-decoration: underline; text-underline-offset: 3px; color: var(--navy); font-weight: 700; }
}
@media (max-width: 570px) {
  .format-options { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .format-choice { min-height: 50px; }
  .fund-totals dt { font-size: .76rem; }
  .fund-totals dt span { display: block; }
}
@media print {
  :root, body.fund-page { display: block; background: white; width: auto; min-width: 0; min-height: 0; margin: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .fund-header, .fund-heading, .fund-format, .fund-totals, .fund-jump, #fund-form, .paper-toolbar, #fund-status, noscript { display: none !important; }
  .fund-main, .fund-workspace, .fund-preview, .paper-mat { display: block; position: static; width: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: white; }
  #fund-paper { width: 209.9mm; height: 296.9mm; margin: 0; border: 0; box-shadow: none; }
  #fund-paper.landscape { width: 419.9mm; height: 296.9mm; }
}


.fund-subrow { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fc; }
.fund-subhead { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.fund-subrow .rate-check, .item-settings .rate-check { grid-column: auto; }
.fund-action { justify-self: start; border: 1px solid #adbad0; border-radius: 7px; background: white; color: var(--navy); font-size: .875rem; font-weight: 700; padding: 5px 10px; }
.fund-action:hover { background: #eaf0fa; }
.item-settings small { color: var(--muted); }
.fund-extra-page { width: min(100%,210mm); margin: 16px auto 0; padding: 7%; background: white; color: #222; box-shadow: 0 2px 12px #18243e24; overflow-wrap: anywhere; }
.fund-extra-page.landscape { width: 100%; }
.fund-extra-page h2 { color: var(--navy); border-bottom: 1px solid var(--navy); font-size: 1.17rem; margin: 0 0 .65em; }
.fund-extra-page h3 { font-size: .96rem; margin: 1em 0 .45em; }
.fund-extra-page table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: clamp(.59rem,1.1vw,.83rem); }
.fund-extra-page td, .fund-extra-page th { border: 1px solid #9da6b5; padding: .35em .42em; text-align: left; }
.fund-extra-page th { background: var(--navy); color: white; font-weight: 600; }
.fund-extra-page td:last-child { text-align: right; }
@media print {
  .fund-extra-page, .fund-extra-page.landscape { break-before: page; width: 100%; padding: 13mm 15mm; margin: 0; box-shadow: none; }
  .fund-extra-page table { font-size: 10pt; }
  .fund-extra-page tr { break-inside: avoid; }
}
