@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #0b0b0d;
  --panel: #141418;
  --panel2: #1b1b21;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --primary: #facc15;
  --primary-ink: #1a1400;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; font-size: 14px; color: var(--muted); }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--text); }
.brand { font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand b { color: var(--primary); }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--primary); text-transform: uppercase; }
h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.2; letter-spacing: -0.02em; margin: 8px 0 10px; }
h1 em { font-style: normal; color: var(--primary); }
.lead { color: var(--muted); max-width: 640px; margin: 0 0 24px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 17px; margin: 0 0 14px; letter-spacing: -0.01em; }
.card h2 small { font-weight: 500; color: var(--dim); font-size: 13px; margin-left: 6px; }
.sticky { position: sticky; top: 16px; }
@media (max-width: 860px) { .sticky { position: static; } }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label, .label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .row3 { grid-template-columns: 1fr 1fr; } }

.input { position: relative; display: flex; align-items: center; }
.input input, .input select, textarea {
  width: 100%;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input select { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input input:focus, .input select:focus, textarea:focus { border-color: var(--primary); }
.input .unit { position: absolute; right: 12px; color: var(--dim); font-size: 14px; pointer-events: none; }
.input input.has-unit { padding-right: 46px; text-align: right; }
.hint { font-size: 13px; color: var(--dim); margin-top: 6px; }
.hint b { color: var(--muted); font-weight: 600; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  flex: 1 1 auto;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: rgba(250, 204, 21, 0.14); border-color: rgba(250, 204, 21, 0.6); color: var(--primary); font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.check span small { display: block; color: var(--dim); font-size: 13px; }

.big { font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.big small { font-size: 18px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.big-label { font-size: 14px; color: var(--muted); }
.accent { color: var(--primary); }
.good { color: var(--good); }
.bad { color: var(--bad); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

table.break { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
table.break td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.break td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.break tr.sum td { border-bottom: 0; font-weight: 700; font-size: 15px; padding-top: 12px; }
table.break tr.sub td { color: var(--muted); }
table.break td small { color: var(--dim); display: block; font-size: 12px; }

.note { background: rgba(250, 204, 21, 0.07); border: 1px solid rgba(250, 204, 21, 0.25); color: #fde68a; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.note.plain { background: var(--panel2); border-color: var(--line); color: var(--muted); }
.callout { border-left: 3px solid var(--primary); padding: 4px 0 4px 12px; color: var(--muted); font-size: 14px; margin-top: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); font-weight: 600; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

pre.quote { white-space: pre-wrap; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font: inherit; font-size: 14px; color: var(--text); margin: 0; max-height: 420px; overflow: auto; }

ul.list { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
ul.list li { margin: 4px 0; }

details { margin-top: 12px; }
details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details[open] summary { margin-bottom: 8px; }

.foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot a { color: var(--muted); }

/* hub */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }
.tool { display: flex; flex-direction: column; gap: 8px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s; }
.tool:hover { border-color: rgba(250, 204, 21, 0.5); }
.tool .who { font-size: 13px; font-weight: 700; color: var(--primary); }
.tool h3 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }
.tool .go { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

/* 모바일 하단 결과 바 */
.mbar { display: none; }
@media (max-width: 860px) {
  .mbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; align-items: center; justify-content: space-between; gap: 10px; background: rgba(20, 20, 24, 0.94); backdrop-filter: blur(8px); border: 1px solid rgba(250, 204, 21, 0.45); border-radius: 14px; padding: 10px 14px; text-decoration: none; }
  .mbar .ml { font-size: 13px; color: var(--muted); line-height: 1.3; }
  .mbar .mv { font-size: 20px; font-weight: 800; color: var(--primary); white-space: nowrap; }
  body { padding-bottom: 76px; }
}
