:root{
    --max: 1100px;
    --text: #1f2328;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --topbar: #2b2f34;
    --primary: #2563eb;
}

*{ box-sizing:border-box; }
body{
    margin:0;
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color:var(--text);
    background:var(--bg);
}

.topbar{
    background: var(--topbar);
    color:#fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar__inner{
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.brand{
    color:#fff;
    text-decoration:none;
    font-weight:700;
    letter-spacing:0.3px;
}

.nav{ display:flex; gap:16px; }
.nav__link{
    color: rgba(255,255,255,0.75);
    text-decoration:none;
    font-weight:600;
}
.nav__link:hover{ color:#fff; }

main{
    max-width: var(--max);
    margin: 0 auto;
    padding: 42px 18px 60px;
}

.hero{
    text-align:center;
    margin-top: 10px;
}

.hero__logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin-top: 10px;
}

.logoText{
    font-size: 54px;
    font-weight: 300;
    letter-spacing: 1px;
}

.logoIcon{
    width: 64px;
    height: 64px;
    color: var(--primary);
}

.hero__subtitle{
    margin: 12px 0 10px;
    color: var(--muted);
    font-size: 18px;
}

.hero__count{
    margin: 12px 0 28px;
    color: #374151;
    font-size: 16px;
}

.badge{
    display:inline-block;
    margin: 0 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--primary);
    color:#fff;
    font-weight:700;
    font-size: 13px;
    vertical-align: middle;
}

.search{
    max-width: 720px;
    margin: 0 auto;
    display:flex;
    align-items:center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow:hidden;
    background:#fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.search__icon{
    width: 56px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#6b7280;
    font-size: 22px;
    border-right: 1px solid var(--border);
}

.search__input{
    flex:1;
    border:0;
    outline:none;
    padding: 18px 16px;
    font-size: 18px;
}

.search__btn{
    border:0;
    background: var(--primary);
    color:#fff;
    font-size: 18px;
    padding: 18px 28px;
    cursor:pointer;
}
.search__btn:hover{ filter: brightness(0.95); }

.hint{
    margin-top: 10px;
    color:#b00020;
}

.page { max-width: var(--max); margin: 0 auto; }
.page__title { margin: 10px 0 14px; font-size: 26px; }

.searchInline{
    display:flex;
    gap:8px;
    align-items:center;
    margin: 12px 0 14px;
}
.searchInline__input{
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}
.searchInline__btn{
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color:#fff;
    font-weight: 700;
    cursor:pointer;
}

.tableWrap{
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.table{
    width:100%;
    border-collapse: collapse;
}
.table th, .table td{
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    text-align:left;
    font-size: 14px;
}
.table thead th{
    background: #f9fafb;
    font-weight: 800;
}
.link{
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
}
.link:hover{ text-decoration: underline; }

.empty{
    margin-top: 18px;
    color: var(--muted);
}

.pager{
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 12px;
    margin-top: 16px;
}
.pager__btn{
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration:none;
    color: var(--text);
}
.pager__btn:hover{ background: #f3f4f6; }
.pager__info{ color: var(--muted); font-weight: 700; }

.pager__num{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration:none;
    color: var(--text);
    font-weight: 700;
}

.pager__num:hover{ background:#f3f4f6; }

.pager__num.is-active{
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pager__btn--disabled{
    opacity: 0.5;
    pointer-events: none;
}

.meta{
    margin: 12px auto 18px;
    max-width: 920px;
    display:flex;
    gap: 12px;
    justify-content:center;
    flex-wrap: wrap;
}

.meta__item{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 180px;
    background:#fff;
}

.meta__label{ display:block; color: var(--muted); font-size: 12px; font-weight: 700; }
.meta__value{ display:block; margin-top: 4px; font-size: 16px; font-weight: 800; }

.backLink{
    display:inline-block;
    margin-top: 8px;
    color: var(--primary);
    text-decoration:none;
    font-weight: 800;
}
.backLink:hover{ text-decoration: underline; }

.divider{
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.detailHead{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap: 16px;
    padding: 14px 0 10px;
}

.detailHead__meta{
    display:flex;
    gap: 10px;
    align-items:center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.code{ font-weight: 800; color: #db2777; } /* 기존 핑크 느낌 */

.btnOutline{
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration:none;
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}
.btnOutline:hover{ background:#f3f4f6; }

.tabs{
    display:flex;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-top: 12px;
}

.tab{
    border: 1px solid var(--border);
    border-bottom: none;
    background: #fff;
    padding: 10px 14px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    cursor:pointer;
    font-weight: 800;
}
.tab.is-active{
    border-color: var(--primary);
    color: var(--primary);
}

.tabPanels{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.srimGrid{
    display:grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.srimCard{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.srimTitle{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom: 10px;
}
.srimTitle h3{ margin:0; font-size: 16px; }
.srimHint{ color: var(--muted); font-size: 13px; }
.srimChips{
    display:flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip{
    display:inline-flex;
    align-items:center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    background: #f6f7fb;
    color: #394150;
}
.chip--accent{
    background: #eef6ff;
    border-color: #d7e8ff;
    color: #1c4aa0;
}
.chip--neutral{
    background: #f2f4f8;
    border-color: #e3e7ee;
    color: #2d3640;
}
.chip--muted{
    background: #f7f7fb;
    border-color: #ececf3;
    color: #5d6674;
}
.chip--dark{
    background: #111827;
    border-color: #111827;
    color: #f9fafb;
}

.srimList{ margin:0; padding-left: 18px; }
.srimList li{ margin: 6px 0; }
.srimList--tight{ padding-left: 14px; }

.srimScenarioLayout{
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1fr;
    gap: 14px;
    align-items: center;
}
@media (max-width: 900px){
    .srimScenarioLayout{
        grid-template-columns: 1fr;
    }
}

.srimTableWrap{
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.srimTableWrap--flush{
    margin-top: 0;
}
.srimTable{
    width: 100%;
    border-collapse: collapse;
}
.srimTable__head,
.srimTable__rowHead,
.srimTable__cell{
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 13px;
}
.srimTable__head:last-child,
.srimTable__rowHead:last-child,
.srimTable__cell:last-child{
    border-right: none;
}
.srimTable__head{
    text-align: left;
    color: var(--muted);
    background: #f7f7fb;
    font-weight: 600;
}
.srimTable__rowHead{
    text-align: left;
    width: 44%;
    background: #fbfbff;
    font-weight: 600;
    color: #2d3640;
}
.srimTable__cell{
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #1f2933;
}
.srimTable--center .srimTable__head,
.srimTable--center .srimTable__cell{
    text-align: center;
}
.srimTable--rowLabels .srimTable__rowHead{
    text-align: left;
    width: 26%;
}
.srimSubTitle{
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
}

.srimSummaryGrid{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
}
@media (max-width: 860px){
    .srimSummaryGrid{
        grid-template-columns: 1fr;
    }
}

.srimTable__cell--em{
    font-weight: 700;
    color: #0f172a;
    background: #f6f8ff;
}
.srimTable__cell--muted{
    color: var(--muted);
    background: #fbfbff;
}

.srimTable--compact{
    width: fit-content;
    min-width: 0;
    table-layout: auto;
}
.srimTable--compact .srimTable__rowHead{
    width: auto;
    white-space: nowrap;
}
.srimTable--scenario .srimTable__head{
    text-align: left;
}
.srimTable--scenario .srimTable__cell{
    text-align: right;
}
.srimTable--calc .srimTable__rowHead{
    width: 70%;
}
.srimCalcNote{
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.srimChart{
    position: relative;
    height: 180px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfbff;
}
.srimBars{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    height: 100%;
    align-items: end;
}
.srimBarWrap{
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: 6px;
    height: 100%;
    text-align: center;
}
.srimBar{
    width: 100%;
    max-width: 56px;
    justify-self: center;
    background: linear-gradient(180deg, #7c9cff, #3c62ff);
    border-radius: 10px 10px 6px 6px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.srimBarLabel{
    font-size: 11px;
    color: var(--muted);
}
.srimBarValue{
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.srimLine{
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    background: #111;
    z-index: 1;
}
.srimLine span{
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 11px;
    background: #111;
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
}

.alert{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #f9fafb;
}
.alert--error{ background:#fff1f2; border-color:#fecdd3; }

.card{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.finHeader{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.finSection{
    margin-top: 18px;
}
.finSection:first-of-type{
    margin-top: 0;
}
.finSection__title{
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
}

.finTableWrap{
    overflow:auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.finTable{
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: #fff;
}

.finTable__head,
.finTable__rowHead,
.finTable__cell{
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.finTable__head{
    background: #f9fafb;
    font-weight: 800;
    text-align: right;
    color: var(--text);
}

.finTable__head--sticky{
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #f9fafb;
}

.finTable__rowHead{
    text-align: left;
    font-weight: 800;
    background: #fafafa;
    color: var(--text);
    white-space: nowrap;

    position: sticky;
    left: 0;
    z-index: 2;
}

.finTable__cell{
    text-align: right;
    color: var(--text);
}

.finTable__unit{
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}

.chartCard{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}
.chartHead{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.chartTitle{
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}
.chartMeta{
    font-size: 12px;
    color: var(--muted);
}
.chartControls{
    display:flex;
    gap: 6px;
    flex-wrap: wrap;
}
.chartToggle{
    display:flex;
    align-items:center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}
.chartToggle input{
    margin: 0;
    accent-color: var(--primary);
}
.chartRangeBtn{
    border: 1px solid var(--border);
    background: #fff;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
}
.chartRangeBtn.is-active{
    border-color: var(--primary);
    color: var(--primary);
    background: #eef2ff;
}
.chartCanvasWrap{
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfbff;
    padding: 10px;
}
.chartCanvas{
    width: 100%;
    height: 320px;
    display: block;
}
.chartTooltip{
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -100%);
    background: #111827;
    color: #fff;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}
.chartError{
    margin-top: 10px;
}
.chartNote{
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.metricChartCard{
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    margin-top: 12px;
}
.metricChartTitle{
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
}
.metricChartCanvas{
    width: 100%;
    height: 180px;
    display: block;
}

/* 반응형 */
@media (max-width: 640px){
    .logoText{ font-size: 44px; }
    .search__input{ font-size: 16px; padding: 14px 12px; }
    .search__btn{ font-size: 16px; padding: 14px 18px; }
    .hideSm{ display:none; }
}
