:root {
  color: #182033;
  background: #f4f6fa;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-synthesis: none;
  --ink: #111a2e;
  --navy: #17233d;
  --blue: #2457e6;
  --blue-dark: #1744c5;
  --mint: #0eaa91;
  --line: #dce2ec;
  --muted: #6e778a;
  --surface: #fff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f4f6fa; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  height: 70px; padding: 0 clamp(24px, 5vw, 78px); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e5e8ef; background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: Inter, Arial, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .08em; color: var(--ink); }
.brand b { color: var(--blue); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: white; background: var(--blue); font-size: 11px; letter-spacing: -.03em; box-shadow: 0 5px 16px rgba(36,87,230,.25); }
.topbar nav { display: flex; gap: 34px; font-size: 13px; font-weight: 600; color: #667084; }
.topbar nav a:hover { color: var(--blue); }
.top-status { display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: #667084; text-transform: uppercase; }
.top-status span { width: 8px; height: 8px; background: #12b981; border-radius: 50%; box-shadow: 0 0 0 4px #dcf8ed; }

.hero {
  min-height: 390px; padding: 64px clamp(24px, 7vw, 108px) 70px; color: white; background-color: #17233d;
  background-image: radial-gradient(circle at 88% 20%, rgba(43,95,229,.36), transparent 32%), linear-gradient(118deg, transparent 47%, rgba(255,255,255,.035) 47% 47.2%, transparent 47.2%);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); gap: clamp(44px, 8vw, 130px); align-items: center;
}
.hero-copy { max-width: 690px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 10px var(--mono); letter-spacing: .11em; color: #aeb9d1; text-transform: uppercase; }
.eyebrow span { color: #7fa1ff; }
.eyebrow i { display: block; width: 22px; height: 1px; background: #52617d; }
.hero h1 { margin: 20px 0 18px; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.16; letter-spacing: -.055em; font-weight: 800; }
.hero h1 em { color: #7ba0ff; font-style: normal; }
.hero-copy > p { margin: 0; max-width: 610px; color: #b7c0d2; line-height: 1.85; font-size: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-chips span { display: flex; gap: 7px; align-items: center; padding: 8px 12px; border: 1px solid #3c4a65; border-radius: 7px; background: rgba(255,255,255,.035); color: #cbd3e4; font-size: 11px; }
.hero-chips .icon { width: 15px; height: 15px; color: #759aff; }

.scope-card { align-self: stretch; max-height: 266px; margin: auto 0; border: 1px solid rgba(143,161,198,.25); border-radius: 15px; background: rgba(9,17,34,.38); box-shadow: 0 28px 70px rgba(0,0,0,.16); overflow: hidden; }
.scope-head { padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(143,161,198,.2); font-size: 12px; }
.scope-head b { color: #90adff; font: 500 9px var(--mono); letter-spacing: .08em; }
.scope-flow { padding: 30px 22px 24px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 9px; }
.scope-flow > .icon { width: 14px; color: #667794; }
.scope-flow div { min-width: 0; }
.scope-flow small { display: block; margin-bottom: 7px; font: 500 8px var(--mono); letter-spacing: .1em; color: #6f83a8; }
.scope-flow strong { display: block; font-size: 11px; white-space: nowrap; }
.scope-card > p { margin: 0; padding: 14px 20px; border-top: 1px solid rgba(143,161,198,.2); background: rgba(255,191,73,.045); display: flex; gap: 9px; color: #aeb8ca; line-height: 1.55; font-size: 10px; }
.scope-card > p .icon { flex: 0 0 auto; width: 14px; color: #eab754; }

.workbench, .evidence-section { max-width: 1440px; margin: 0 auto; padding: 68px clamp(22px, 4vw, 58px) 82px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.kicker { display: block; margin-bottom: 10px; color: var(--blue); font: 600 10px var(--mono); letter-spacing: .12em; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: clamp(24px, 2.2vw, 34px); letter-spacing: -.04em; }
.section-heading p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.stepper { display: flex; align-items: center; color: #8b93a3; font-size: 11px; }
.stepper span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.stepper b { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #cdd3df; border-radius: 50%; color: #7c8495; font: 600 9px var(--mono); }
.stepper .active { color: var(--blue); }
.stepper .active b { color: white; border-color: var(--blue); background: var(--blue); }
.stepper i { width: 32px; height: 1px; margin: 0 10px; background: #dce1ea; }

.workspace-grid { display: grid; grid-template-columns: minmax(470px, .92fr) minmax(570px, 1.08fr); background: white; border: 1px solid #dfe4ed; border-radius: 17px; box-shadow: 0 18px 55px rgba(34,48,79,.08); overflow: hidden; }
.input-panel, .output-panel { min-width: 0; padding: 28px 30px; }
.output-panel { background: #f7f9fc; border-left: 1px solid #e0e5ee; }
.panel-title, .panel-title > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title { padding-bottom: 22px; border-bottom: 1px solid #e3e7ef; }
.panel-title h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.02em; }
.panel-title p { margin: 0; color: var(--muted); font-size: 10px; }
.number { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #e9efff; color: var(--blue); font: 600 10px var(--mono); }
.number.dark { background: #e8edf6; color: #59657c; }
.required-note { color: #9ca3b2; font-size: 9px; }
.result-pill { padding: 7px 10px; border-radius: 20px; font-size: 9px; font-weight: 700; }
.result-pill.waiting { color: #778196; background: #e9edf4; }
.result-pill.running { color: #9a6b0a; background: #fff2cf; }
.result-pill.success { display: flex; align-items: center; gap: 4px; color: #078467; background: #dff7ef; }
.result-pill.success .icon { width: 12px; }
.result-pill.failed { color: #bf3c45; background: #ffe5e6; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 22px 0; }
.input-panel label { display: block; position: relative; color: #4c566a; font-size: 10px; font-weight: 600; }
.input-panel input, .input-panel select { width: 100%; height: 41px; margin-top: 7px; padding: 0 11px; color: #1a2337; border: 1px solid #d8dee9; border-radius: 7px; outline: none; background: #fbfcfe; font: 500 11px var(--mono); }
.input-panel input:focus, .input-panel select:focus { border-color: #7899f2; box-shadow: 0 0 0 3px rgba(36,87,230,.09); background: white; }
.input-panel label small { display: block; margin-top: 5px; color: #a0a6b2; font-size: 8px; font-weight: 400; }
.input-panel fieldset { margin: 0 0 15px; padding: 15px; border: 1px solid #e0e5ed; border-radius: 9px; background: #fafbfd; }
.input-panel legend { padding: 0 6px; color: #374156; font-size: 10px; font-weight: 700; }
.income-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 2px; background: #4773ee; }
.income-dot.freelance { background: #17aa95; }
.income-dot.tax { background: #f29b51; }
.money-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money-row.two { grid-template-columns: 1fr 1fr; }
.money-row label { color: #7b8494; font-size: 8px; }
.money-row label span { position: absolute; right: 9px; top: 34px; color: #929bab; font: 500 8px var(--mono); }
.money-row input { height: 37px; padding-right: 25px; background: white; }
.tax-box { background: #fffaf5 !important; border-color: #f0dfce !important; }
.primary-action { width: 100%; height: 49px; border: 0; border-radius: 8px; color: white; background: var(--blue); display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 700; box-shadow: 0 9px 20px rgba(36,87,230,.2); transition: .2s ease; }
.primary-action:hover { background: var(--blue-dark); transform: translateY(-1px); }
.primary-action span { margin-left: 6px; font-size: 18px; font-weight: 400; }
.primary-action .icon { width: 16px; }
.form-footnote { margin: 11px 0 0; text-align: center; color: #9aa2b1; font-size: 8px; }

.result-placeholder { min-height: 510px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #8790a1; }
.result-placeholder .radar { width: 72px; height: 72px; margin-bottom: 18px; display: grid; place-items: center; color: #8da7ed; background: #e9effe; border: 7px solid #f1f4fb; border-radius: 50%; }
.result-placeholder strong { color: #59647a; font-size: 13px; }
.result-placeholder p { max-width: 330px; line-height: 1.7; font-size: 10px; }
.result-ready { padding-top: 18px; }
.success-banner { min-height: 59px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; color: #087b67; border: 1px solid #c7ebdf; border-radius: 9px; background: #ecfaf6; }
.success-banner > div { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: #15aa8d; }
.success-banner > div .icon { width: 17px; }
.success-banner p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.success-banner strong { color: #136b5d; font-size: 11px; }
.success-banner span { color: #6c928a; font-size: 8px; }
.success-banner > b { margin-left: auto; padding: 5px 8px; border-radius: 5px; background: white; font: 600 8px var(--mono); }
.file-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.file-card { min-width: 0; padding: 14px; border: 1px solid #dce3ee; border-top: 3px solid var(--blue); border-radius: 9px; background: white; box-shadow: 0 5px 18px rgba(28,44,73,.045); }
.file-card.mint { border-top-color: var(--mint); }
.file-card-head { display: flex; align-items: center; gap: 8px; }
.file-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: #eaf0ff; }
.mint .file-icon { color: var(--mint); background: #e4f7f3; }
.file-icon .icon { width: 16px; }
.file-card-head small { display: block; color: #8a93a5; font-size: 7px; }
.file-card-head strong { display: block; margin-top: 2px; font: 500 9px var(--mono); color: #283247; }
.verified { margin-left: auto; display: flex; align-items: center; gap: 3px; color: #0b967b; font: 600 7px var(--mono); }
.verified .icon { width: 11px; }
.file-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.file-metrics div { min-width: 0; padding: 7px; background: #f7f8fb; border-radius: 5px; }
.file-metrics dt { color: #949baa; font-size: 6px; }
.file-metrics dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444e62; font: 500 7px var(--mono); }
.hash-row { display: flex; align-items: center; gap: 6px; padding: 7px; border: 1px solid #e4e8ef; border-radius: 5px; }
.hash-row span { color: #8f97a7; font-size: 6px; }
.hash-row code { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #576174; font: 400 6px var(--mono); white-space: nowrap; }
.icon-button { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 4px; color: #7d879a; background: #f2f4f8; }
.icon-button .icon { width: 11px; }
.icon-button.copied { color: white; background: var(--mint); }
.file-card details { margin-top: 9px; }
.file-card summary { color: #70798c; cursor: pointer; font-size: 7px; list-style: none; }
.file-card summary span { float: right; color: var(--blue); }
.file-card details pre { max-height: 90px; margin: 7px 0 0; padding: 8px; overflow: auto; border-radius: 5px; color: #afb9c9; background: #182238; font: 400 5.5px/1.7 var(--mono); }
.file-actions { min-height: 27px; margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 5px; border-top: 1px solid #edf0f4; padding-top: 8px; }
.file-actions span { display: flex; align-items: center; gap: 3px; color: #768095; font-size: 6px; }
.file-actions span .icon { width: 9px; color: var(--mint); }
.file-actions button { padding: 4px 6px; display: flex; align-items: center; gap: 3px; border: 0; border-radius: 4px; color: #536178; background: #edf1f7; font-size: 6px; }
.file-actions button .icon { width: 9px; }
.determinism { margin-top: 8px; padding: 6px; border-radius: 4px; color: #778297; background: #f3f6fb; font-size: 6px; }
.determinism span { width: 5px; height: 5px; display: inline-block; margin-right: 4px; border-radius: 50%; background: var(--mint); }
.determinism b { color: #4d596e; }
.roundtrip { margin-top: 13px; padding: 13px; display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 8px; border: 1px solid #e0e5ed; border-radius: 8px; background: white; }
.roundtrip div { min-width: 0; padding-right: 8px; border-right: 1px solid #e8ebf0; }
.roundtrip div:last-child { border: 0; }
.roundtrip span { display: block; color: #969dac; font-size: 6px; }
.roundtrip strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; color: #445066; font-size: 7px; white-space: nowrap; }
.error-state { min-height: 510px; display: flex; justify-content: center; align-items: center; gap: 20px; }
.error-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #cf4952; background: #ffe9ea; }
.error-state span { color: #ce454d; font: 600 10px var(--mono); }
.error-state h3 { margin: 7px 0; font-size: 14px; }
.error-state p, .error-state small { color: #778196; font-size: 9px; }
.error-state code { font: 500 9px var(--mono); }

.evidence-section { padding-top: 22px; }
.section-heading.compact { align-items: flex-start; }
.tabs { display: flex; gap: 3px; padding: 4px; width: fit-content; border: 1px solid #dde2eb; border-radius: 9px; background: white; }
.tab { padding: 9px 17px; border: 0; border-radius: 6px; color: #7c8495; background: transparent; font-size: 10px; font-weight: 600; }
.tab.active { color: white; background: var(--navy); box-shadow: 0 4px 11px rgba(23,35,61,.18); }
.tab span { margin-left: 4px; color: #61d2bc; font: 600 8px var(--mono); }
#tab-content { margin-top: 17px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.profile-card { min-width: 0; overflow: hidden; border: 1px solid #dde3ec; border-radius: 12px; background: white; }
.profile-card > header { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6eaf0; }
.profile-card header span { color: var(--blue); font-size: 8px; font-weight: 700; }
.profile-card header h3 { margin: 4px 0 0; color: #283247; font: 500 11px var(--mono); }
.profile-card header > b { padding: 5px 7px; color: #59657b; background: #eff2f7; border-radius: 4px; font: 500 8px var(--mono); }
.profile-meta { padding: 11px 19px; display: flex; flex-wrap: wrap; gap: 14px; background: #fafbfd; color: #8b93a2; font-size: 7px; }
.profile-meta b { margin-left: 4px; color: #536075; font: 500 7px var(--mono); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 8px; text-align: left; }
th { padding: 9px 11px; color: #858d9d; background: #f5f7fa; font-weight: 600; white-space: nowrap; }
td { padding: 8px 11px; color: #687286; border-top: 1px solid #edf0f4; white-space: nowrap; }
td b { color: #4b566b; font-size: 7px; }
td code, .rule-list code { color: #3c5fae; font: 500 7px var(--mono); }
.rule-list { margin: 0; padding: 12px 19px; border-top: 1px solid #e7eaf0; background: #fafbfd; list-style: none; }
.rule-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; color: #778196; font-size: 7px; }
.rule-list code { min-width: 78px; }
.negative-summary { padding: 17px 20px; display: flex; align-items: center; gap: 20px; border: 1px solid #cce9e2; border-radius: 10px 10px 0 0; background: #effaf7; }
.negative-summary > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.negative-summary strong { color: #078a70; font: 600 22px var(--mono); }
.negative-summary span, .negative-summary p { color: #56847c; font-size: 9px; }
.negative-summary p { margin: 0; }
.fault-controls { margin-left: auto; display: flex; gap: 6px; }
.fault-controls select, .fault-controls button { height: 31px; border: 1px solid #cadfd9; border-radius: 5px; color: #3d615b; background: white; font-size: 8px; }
.fault-controls button { padding: 0 10px; color: white; border-color: #118c75; background: #118c75; }
.test-table { background: white; border: 1px solid #e0e4eb; }
.test-table th, .test-table td { font-size: 9px; }
.reject { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; color: #078a70; border-radius: 4px; background: #e3f7f2; font-size: 8px; }
.reject .icon { width: 10px; }
.violation-detail { margin-top: 12px; padding: 18px; display: flex; gap: 14px; border: 1px solid #f2d1d2; border-left: 4px solid #d14c55; border-radius: 8px; background: white; }
.violation-detail > div:first-child { color: #d14c55; }
.violation-detail span { color: #cc4650; font: 600 8px var(--mono); }
.violation-detail h3 { margin: 5px 0 11px; font-size: 12px; }
.violation-detail dl { display: grid; grid-template-columns: repeat(4, auto); gap: 20px; margin: 0; }
.violation-detail dt { color: #999fad; font-size: 7px; }
.violation-detail dd { margin: 3px 0 0; color: #526077; font: 500 8px var(--mono); }
.empty-tab { padding: 60px; text-align: center; color: #8791a3; border: 1px dashed #ccd3df; border-radius: 10px; background: white; }
.empty-tab .icon { color: #7899f2; }
.empty-tab h3 { color: #4d586d; font-size: 14px; }
.empty-tab p { font-size: 10px; }
.contract-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.contract-grid article { min-height: 190px; padding: 19px; border: 1px solid #dfe4ec; border-radius: 10px; background: white; }
.contract-grid article > span { color: var(--blue); font: 600 8px var(--mono); }
.contract-grid h3 { margin: 7px 0 11px; color: #303b50; font: 600 13px var(--mono); }
.contract-grid p { color: #7c8596; font-size: 9px; line-height: 1.7; }
.contract-grid article > code { color: #4f638f; font: 400 8px/1.8 var(--mono); }
.contract-grid ul { padding: 0; list-style: none; color: #697487; font-size: 8px; line-height: 2; }
.contract-grid li code { color: #a6464c; font: 500 7px var(--mono); }

.contract-strip { padding: 48px max(7vw, 28px); display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; color: white; background: #1b2946; }
.kicker.light { color: #769bff; }
.contract-strip h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.04em; }
.contract-strip p { max-width: 690px; color: #aeb8cc; font-size: 11px; line-height: 1.8; }
.contract-strip p code { color: #8cacf9; font: 500 9px var(--mono); }
.contract-strip pre { margin: 0; padding: 19px 22px; overflow: auto; border: 1px solid #3d4b68; border-radius: 10px; color: #acc0f0; background: #111b31; font: 400 10px/1.8 var(--mono); }
footer { padding: 22px max(7vw, 28px); display: flex; justify-content: space-between; color: #8992a4; background: #10192c; font: 400 8px var(--mono); }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 35px; }
  .scope-card { width: 100%; max-width: 650px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .output-panel { border-left: 0; border-top: 1px solid #e0e5ee; }
  .profile-grid, .contract-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar { height: 60px; }
  .topbar nav { display: none; }
  .top-status { font-size: 8px; }
  .hero { padding-top: 45px; }
  .hero h1 { font-size: 37px; }
  .scope-flow { overflow-x: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .stepper { width: 100%; }
  .workspace-grid { border-radius: 12px; }
  .input-panel, .output-panel { padding: 22px 16px; }
  .form-grid, .money-row, .money-row.two, .file-stack, .profile-grid, .contract-grid, .contract-strip { grid-template-columns: 1fr; }
  .money-row { gap: 8px; }
  .file-stack { display: grid; }
  .roundtrip { grid-template-columns: 1fr; }
  .roundtrip div { padding: 0 0 7px; border: 0; border-bottom: 1px solid #e8ebf0; }
  .tabs { width: 100%; overflow-x: auto; }
  .tab { flex: 1; white-space: nowrap; padding-inline: 11px; }
  .negative-summary { align-items: flex-start; flex-direction: column; }
  .fault-controls { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .violation-detail dl { grid-template-columns: 1fr 1fr; }
  .contract-strip { gap: 25px; }
  footer { gap: 12px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
