/* BURI dashboard theme. Layout and presentation only; calculation styles retain
   their semantic states (loss / unrecovered cash / unconfirmed costs). */
:root {
  --bg: #f5f6f9;
  --subtle: #f7f8fa;
  --subtle-2: #edf0f4;
  --line: #e5e8ef;
  --line-2: #d5dae4;
  --ink: #242737;
  --ink-2: #51586b;
  --muted: #6b7385;
  --teal: #756093;
  --teal-2: #604b7e;
  --teal-50: #f5f1fa;
  --teal-100: #e7ddf1;
  --brown: #87602d;
  --brown-2: #bb9767;
  --brown-50: #faf5ed;
  --orange: #926127;
  --orange-50: #fcf8ef;
  --orange-line: #eee0c7;
  --danger: #bf4458;
  --danger-50: #fff2f4;
  --danger-line: #f1cbd3;
  --ok: #596c87;
  --radius: 16px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --rail: 190px;
  --shadow: 0 2px 3px rgba(29, 36, 58, .025);
}
body { font-size: 14px; letter-spacing: -.015em; word-break: keep-all; overflow-wrap: break-word; }
button, input { font-family: var(--font); }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.top { position: relative; z-index: 20; background: #fff; }
.top__inner { max-width: none; padding: 0 30px 0 22px; height: 72px; flex-wrap: nowrap; gap: 24px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: .02em; flex: none; }
.brand__mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: var(--teal); color: #fff; font-size: 27px; letter-spacing: -.07em; padding: 0 3px 4px 0; }
.brand__sub { display: block; font-size: 8px; letter-spacing: .11em; color: var(--muted); font-weight: 600; margin-top: 6px; }
.top__context { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 24px; }
.top__actions { margin-left: auto; gap: 18px; flex-wrap: nowrap; }
.save-state { font-size: 12px; color: var(--muted); }
.save-state::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #8d82a1; margin-right: 7px; vertical-align: 2px; }
.btn { border-radius: 8px; font-size: 13px; padding: 9px 13px; transition: background .15s, border-color .15s; }
.btn--line { border-color: var(--line); box-shadow: var(--shadow); }
.btn--small { padding: 6px 10px; font-size: 12px; }
#resetBtn { white-space: nowrap; }
#resetBtn .ui-icon { width: 14px; height: 14px; }
.link { font-size: 13px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rail); padding: 104px 14px 24px; background: #fff; border-right: 1px solid var(--line); z-index: 10; display: flex; flex-direction: column; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin: 0 12px 12px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 9px; font-size: 13px; font-weight: 550; color: var(--ink-2); text-decoration: none; transition: background .15s; }
.nav-item .ui-icon { width: 17px; height: 17px; }
.nav-item:hover { background: var(--subtle); }
.nav-item.is-active { color: var(--teal-2); background: #eee8f5; font-weight: 700; }
.sidebar__foot { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.sidebar__foot .ui-icon { width: 15px; height: 15px; margin-bottom: 7px; display: block; }
.sidebar__foot strong { display: block; color: var(--ink-2); font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.workspace { margin: 0 0 0 var(--rail); padding: 30px 32px 0; max-width: 1500px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.page-eyebrow { color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.workspace-heading h1 { font-size: clamp(22px, 2vw, 28px); font-weight: 750; letter-spacing: -.045em; }
.top__plan { font-size: 12px; font-weight: 450; color: var(--muted); margin: 7px 0 0; }
.workspace-label { font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); padding: 5px 10px; background: #fff; border-radius: 6px; white-space: nowrap; }
.layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; padding: 0; }
.card, .results__inner { box-shadow: var(--shadow); }
.quick { padding: 0 24px; }
.card__head { margin: 0 -24px; padding: 20px 24px; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: nowrap; }
.card__heading { display: flex; align-items: center; gap: 12px; }
.section-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; color: var(--teal); flex: none; }
.card__head h2 { font-size: 16px; font-weight: 700; }
.card__head .hint { margin-top: 3px; font-size: 12px; }
.mini-label { font-size: 10px; color: var(--muted); white-space: nowrap; background: var(--subtle); padding: 3px 7px; border-radius: 5px; }
.step, .step:first-of-type { padding: 17px 0; }
.step__label { font-size: 14px; gap: 9px; margin-bottom: 10px; }
.num-badge { color: var(--teal); background: var(--teal-50); width: 23px; height: 23px; font-size: 11px; font-weight: 750; border-radius: 7px; }
.presets { gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; }
.preset { position: relative; border-color: var(--line); padding: 10px; border-radius: 9px; gap: 5px; transition: background .15s, border-color .15s; }
.preset strong { font-size: 14px; font-weight: 650; white-space: nowrap; }
.preset span { font-size: 11px; color: var(--muted); line-height: 1.65; }
.preset[aria-pressed="true"] { background: var(--teal-50); border-color: #aa96c1; box-shadow: inset 0 0 0 .5px #aa96c1; }
.preset[aria-pressed="true"] strong { color: var(--teal-2); }
.preset:hover { background: var(--teal-50); }
.hint { font-size: 12px; line-height: 1.7; }
.hint strong { font-weight: 550; color: var(--ink-2); }
.applied { background: var(--subtle); border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px; justify-content: space-between; align-items: center; gap: 6px; }
.applied__vals { font-size: 15px; font-weight: 650; letter-spacing: -.025em; }
#appliedEdit { font-size: 12px; padding: 3px 8px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.sentence { font-size: 14px; font-weight: 500; color: var(--ink-2); gap: 8px; }
.sentence .in { font-size: 20px; font-weight: 650; padding: 10px 12px; }
.sentence .unit { background: #fff; padding-left: 0; font-size: 12px; color: var(--muted); }
.sentence .control--inline { width: 150px; }
.sentence .control--sm { width: 104px; }
.in { border-color: var(--line-2); border-radius: 8px; font-size: 15px; }
.in:focus { box-shadow: 0 0 0 3px rgba(117, 96, 147, .12); }
.in:hover { border-color: #aaa1b7; }
.in::placeholder { color: #858b99; }
.unit { border-radius: 0 8px 8px 0; font-size: 12px; }
.field > label, .field__label { font-size: 13px; }
.results__inner { padding: 22px; scrollbar-width: thin; scrollbar-color: #d5cddd transparent; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.result-heading h2 { font-size: 16px; font-weight: 700; }
.live-label { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--teal); background: var(--teal-50); border-radius: 5px; padding: 3px 6px; }
.live-label::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }
.cond { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cond__line { font-size: 12px; font-weight: 500; line-height: 1.7; }
.cond__basis { font-size: 10px; margin-top: 4px; line-height: 1.7; }
.cond__basis .link { font-size: 10px; }
.core { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 16px; }
.core__item, .core__item:first-child { display: block; min-width: 0; border: 0; border-radius: 10px; background: var(--subtle); padding: 13px 12px; }
.core__item[data-core="profit"] { background: var(--teal-50); }
.core__label { font-size: 11px; font-weight: 550; color: var(--ink-2); }
.core__value { color: var(--ink); font-size: 27px; font-weight: 750; line-height: 1.3; letter-spacing: -.055em; margin-top: 6px; overflow-wrap: anywhere; }
[data-core="profit"] .core__value { color: var(--teal); }
.core__exact { font-size: 10px; margin-top: 3px; }
.core__desc { font-size: 10px; line-height: 1.6; margin-top: 7px; }
.core__item[data-core="payback"] { grid-column: 1 / -1; background: #fff; border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; padding: 12px; }
[data-core="payback"] .core__label { grid-column: 1; grid-row: 1; }
[data-core="payback"] .core__value { grid-column: 2; grid-row: 1; color: var(--teal); font-size: 22px; margin: 0; text-align: right; }
[data-core="payback"] .core__exact { grid-column: 1 / -1; font-size: 11px; }
[data-core="payback"] .core__desc { grid-column: 1 / -1; margin: 0; }
.core__item.is-unrecovered .core__value { color: var(--brown); font-size: 18px; }
.core__item.is-loss { background: var(--danger-50); }
.tag { font-size: 10px; margin-left: 4px; padding: 1px 5px; vertical-align: 3px; }
.scope { font-size: 11px; padding: 12px; border-radius: 9px; line-height: 1.65; margin-top: 12px; }
.scope strong { font-size: 12px; margin-bottom: 3px; }
.scope .btn { font-size: 11px; background: #fff; color: var(--orange); border: 1px solid var(--orange-line); padding: 6px 9px; border-radius: 6px; }
.scope .btn:hover { background: #f8f0e2; }
.scope.is-ok .btn { color: var(--teal); border-color: var(--teal-100); }
.secondary { border: 0; border-radius: 0; background: none; gap: 12px; margin-top: 18px; }
.secondary > div { padding: 0; }
.secondary dt { font-size: 10px; }
.secondary dd { font-size: 15px; margin-top: 3px; font-weight: 650; }
.detail { margin-top: 16px; padding-top: 12px; }
.detail > summary { font-size: 12px; color: var(--ink-2); font-weight: 550; }
.details { gap: 9px; }
.block-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.block-title small { font-size: 12px; margin-top: 5px; color: var(--muted); font-weight: 400; }
.optional-label { color: var(--muted); font-size: 10px; font-weight: 500; border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 5px; margin-left: 6px; vertical-align: 2px; }
.group { border-radius: 11px; transition: border-color .15s; }
.group:hover { border-color: #cdc4d8; }
.group > summary { display: grid; grid-template-columns: minmax(0, 1fr) 10px; padding: 15px 18px; gap: 4px 10px; }
.group > summary::before { grid-column: 2; grid-row: 1 / 3; width: 6px; height: 6px; margin: 0; }
.group__q { font-size: 13px; font-weight: 600; grid-column: 1; grid-row: 1; }
.group__sum { font-size: 11px; color: var(--muted); margin: 0; text-align: left; justify-content: flex-start; grid-column: 1; grid-row: 2; gap: 3px 7px; min-width: 0; }
.group__body { padding: 20px; }
.badge { font-size: 10px; padding: 1px 6px; font-weight: 550; }
.badge--missing { border-style: solid; border-color: var(--orange-line); }
.badge--missing::before { content: none; }
.badge--ok { border-color: var(--teal-100); }
.analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 30px; padding: 0; border: 0; }
.analysis > .block-title { grid-column: 1 / -1; margin-bottom: 4px; }
.ana { min-width: 0; border-radius: 12px; transition: border-color .15s; }
.ana:hover { border-color: #cdc4d8; }
.ana > summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) 10px; grid-template-rows: auto auto; padding: 20px; column-gap: 12px; row-gap: 3px; }
.ana > summary::before { grid-column: 3; grid-row: 1 / 3; width: 6px; height: 6px; margin: 0; }
.analysis-icon { grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal); }
.analysis-icon .ui-icon { width: 18px; height: 18px; }
.ana > summary .group__q { grid-column: 2; grid-row: 1; font-size: 14px; }
.ana > summary .group__sum { grid-column: 2; grid-row: 2; margin: 0; text-align: left; justify-content: flex-start; width: auto; font-size: 11px; }
.ana[open] { grid-column: 1 / -1; border-color: #c6b7d7; }
.ana[open] > summary { background: #fcfbfe; border-radius: 12px 12px 0 0; }
.ana__body { padding: 24px; }
#assumptions { grid-column: 1 / -1; background: transparent; box-shadow: none; }
#assumptions > summary { padding: 14px 20px; }
#assumptions .analysis-icon { background: #eaedf3; color: var(--muted); }
#assumptions[open] { background: #fff; }
.insight { border-left-width: 2px; font-size: 14px; }
.tbl { font-size: 13px; }
.tbl th, .tbl td { padding: 13px 16px; }
.tbl thead th { font-size: 12px; }
.tbl--scen tr.is-key th, .tbl--scen tr.is-key td { font-size: 14px; font-weight: 650; }
.tbl tbody tr:hover td, .tbl tbody tr:hover th { background: #f9f7fc; }
.chart .grid { stroke: #e9ecf2; }
.chart .hit.on { fill: rgba(117, 96, 147, .05); }
.chart .bar-neg { fill: #bda47e; }
.chart__legend { font-size: 12px; }
.seg-c0 { background: #756093; } .seg-c1 { background: #9d8ab6; } .seg-c2 { background: #8196b0; }
.seg-c3 { background: #b8c5d5; } .seg-c4 { background: #b8a088; } .seg-c5 { background: #d6c5b4; }
.seg-sell { background: #c8ab77; } .seg-margin { background: #535d78; }
.costbar__track { height: 12px; }
.costbar__legend { font-size: 12px; }
.foot { margin-top: 24px; padding: 18px 0 32px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.note--cash, .tag--cash { border-color: var(--orange-line); }
.seg { border-radius: 8px; }
.seg label { border-radius: 6px; font-size: 13px; }
.delta { font-size: 12px; }
.delta__head { font-size: 11px; }
.skip:focus { position: fixed; z-index: 100; }
@media (min-width: 1750px) { .workspace { margin-right: auto; margin-left: max(var(--rail), calc((100vw - 1500px + var(--rail)) / 2)); } }
@media (min-width: 821px) and (max-height: 800px) {
  .workspace { padding-top: 22px; }
  .workspace-heading { margin-bottom: 20px; }
  .page-eyebrow { display: none; }
  .card__head { padding-top: 16px; padding-bottom: 16px; }
}
@media (max-width: 1250px) {
  :root { --rail: 174px; }
  .workspace { padding: 26px 24px 0; }
  .layout { grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; }
  .quick { padding: 0 20px; }
  .card__head { margin: 0 -20px; padding: 18px 20px; }
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset { padding: 10px 12px; gap: 3px; }
  .results__inner { padding: 18px; }
  .core__value { font-size: 25px; }
  .mini-label { display: none; }
}
@media (max-width: 1050px) {
  :root { --rail: 0px; }
  .sidebar { position: static; width: auto; padding: 10px 24px; border-right: 0; border-bottom: 1px solid var(--line); display: block; }
  .sidebar .nav-label, .sidebar__foot { display: none; }
  .side-nav { display: flex; gap: 6px; }
  .nav-item { padding: 8px 12px; font-size: 12px; gap: 7px; }
  .nav-item .ui-icon { width: 15px; height: 15px; }
  .top__inner { padding-right: 24px; }
  .top__context { display: none; }
  .workspace { padding-top: 24px; }
  .workspace-label { display: none; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .results__inner { padding: 22px; max-height: none; overflow: visible; }
  .core { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .core__item { border: 0; }
  .core__item:first-child { padding: 13px 12px; }
  .core__value { font-size: 29px; }
  .presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .secondary dt { font-size: 11px; }
  .core__label { font-size: 12px; }
  .core__desc, .core__exact { font-size: 11px; }
  .scope, .scope .btn { font-size: 12px; }
  .cond__basis { font-size: 11px; }
  .mbar:not([hidden]) { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .mbar__vals strong { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  .mbar__vals small { font-size: 10px; }
  .mbar .btn { font-size: 11px; white-space: nowrap; padding: 8px 10px; }
}
@media (max-width: 560px) {
  .top__inner { height: 62px; padding: 0 16px; }
  .brand { font-size: 17px; }
  .brand__mark { width: 32px; height: 32px; font-size: 25px; }
  .brand__sub { font-size: 7px; }
  .sidebar { padding: 9px 12px; }
  .side-nav { gap: 4px; }
  .nav-item { padding: 9px 10px; font-size: 12px; gap: 6px; }
  .workspace { padding: 22px 16px 0; }
  .workspace-heading { margin-bottom: 20px; }
  .workspace-heading h1 { font-size: 22px; line-height: 1.4; }
  .page-eyebrow { margin-bottom: 7px; font-size: 10px; }
  .top__plan { font-size: 11px; }
  .quick { padding: 0 18px; }
  .card__head { margin: 0 -18px; padding: 18px; }
  .card__head .hint { font-size: 11px; }
  .step, .step:first-of-type { padding: 20px 0; }
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset { padding: 12px; gap: 4px; }
  .preset span { font-size: 11px; }
  .applied { padding: 11px; }
  .applied__vals { font-size: 14px; }
  .sentence { gap: 5px; font-size: 13px; }
  .sentence__slot { gap: 5px; }
  .sentence .control--inline { width: 118px; }
  .sentence .control--sm { width: 82px; }
  .sentence .in { font-size: 18px; padding: 9px 10px; }
  .sentence .unit { padding-right: 8px; font-size: 11px; }
  .results__inner { padding: 18px; }
  .core__value { font-size: 26px; }
  .core__item, .core__item:first-child { padding: 13px 11px; }
  .group > summary { padding: 15px; }
  .group__sum, .ana > summary .group__sum { margin-left: 0; width: auto; }
  .group__body { padding: 18px; }
  .analysis { grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
  .ana > summary { padding: 18px; column-gap: 10px; }
  .ana > summary .group__q { font-size: 13px; }
  .ana__body { padding: 18px; }
  .secondary { gap: 13px 10px; }
  .core__item.is-unrecovered .core__value { font-size: 16px; }
  .foot { padding-bottom: 24px; }
  .toast { font-size: 12px; }
}
@media (max-width: 360px) {
  .nav-item { gap: 4px; padding: 8px; font-size: 11px; }
  .workspace { padding-left: 12px; padding-right: 12px; }
  .core__value { font-size: 23px; }
  .sentence .control--inline { width: 103px; }
  .sentence .control--sm { width: 76px; }
  .sentence .in { padding-left: 6px; padding-right: 6px; }
}
