:root {
  --canvas: #f3f0e6;
  --surface: #fbfaf5;
  --ink: #13271e;
  --muted: #59675f;
  --rule: #d6d2c5;
  --signal: #c8f54a;
  --signal-dark: #20330d;
  --success: #18764b;
  --error: #b43a32;
  --font-ui: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-ui); line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.mono-label, .eyebrow { margin: 0 0 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--muted); }
.site-header { height: 76px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--surface); border-radius: 3px; font-family: var(--font-mono); font-size: 13px; }
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { text-decoration: none; font-weight: 650; font-size: 14px; }
.site-header .nav-cta { padding: 10px 16px; border: 1px solid var(--ink); border-radius: 6px; }

.hero { min-height: calc(100vh - 76px); max-width: 1400px; margin: 0 auto; padding: 88px 60px 72px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(560px, 1.1fr); align-items: center; gap: 6vw; }
.hero h1, .auth-statement h1 { margin: 0; font-size: clamp(52px, 6.2vw, 88px); line-height: 1.08; letter-spacing: -.045em; }
.hero h1 em { position: relative; font-style: normal; z-index: 0; }
.hero h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: 7%; height: 22%; background: var(--signal); z-index: -1; transform: rotate(-1deg); }
.hero-lead { max-width: 620px; margin: 28px 0 34px; color: var(--muted); font-size: 18px; line-height: 1.75; word-break: keep-all; }
.hero-actions { display: flex; align-items: center; gap: 24px; }
.button { min-height: 48px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 6px; cursor: pointer; font-weight: 750; text-decoration: none; transition: transform 160ms ease-out, background-color 160ms ease-out; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button:disabled { cursor: wait; opacity: .55; }
.button.primary { background: var(--ink); color: var(--surface); }
.button.primary:hover { background: var(--signal); color: var(--signal-dark); }
.button.secondary { background: transparent; color: var(--ink); }
.button.full { width: 100%; margin-top: 12px; }
.text-link { font-weight: 700; text-underline-offset: 5px; }

.proof-sheet { position: relative; padding: 28px; background: var(--surface); border: 1px solid var(--ink); border-radius: 4px; box-shadow: 14px 14px 0 #ded8c8; transform: rotate(.7deg); }
.proof-sheet::before { content: "SAMPLE"; position: absolute; top: -14px; right: 30px; padding: 4px 10px; background: var(--signal); border: 1px solid var(--ink); font: 700 11px var(--font-mono); letter-spacing: .1em; }
.sheet-head, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sheet-head h2, .panel-head h2 { margin: 0; letter-spacing: -.03em; }
.status-seal { padding: 8px 10px; background: var(--signal); border: 1px solid var(--ink); border-radius: 3px; font: 700 12px var(--font-mono); white-space: nowrap; }
.sheet-total { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0 20px; background: var(--rule); border: 1px solid var(--rule); }
.sheet-total div { padding: 18px; background: var(--surface); }
.sheet-total dt { color: var(--muted); font-size: 12px; }
.sheet-total dd { margin: 4px 0 0; font: 700 19px var(--font-mono); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--rule); text-align: right; font: 500 13px var(--font-mono); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; font-family: var(--font-ui); }
th { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.sample-note, .notice { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

.proof-section { max-width: 1280px; margin: 0 auto; padding: 120px 40px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; border-top: 1px solid var(--rule); }
.section-intro h2, .cta-band h2 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.15; letter-spacing: -.04em; }
.process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.process-list li { display: grid; grid-template-columns: 54px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.process-list li > span { font: 700 12px var(--font-mono); }
.process-list h3, .process-list p { margin: 0; }
.process-list p { margin-top: 6px; color: var(--muted); }
.cta-band { padding: 76px max(40px, calc((100vw - 1200px) / 2)); display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; background: var(--ink); color: var(--surface); }
.cta-band .eyebrow { color: #aebbb4; }
.cta-band .button { border-color: var(--signal); background: var(--signal); color: var(--signal-dark); }

.auth-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 5fr 7fr; }
.auth-statement { padding: 9vw 7vw; display: flex; flex-direction: column; justify-content: center; background: var(--ink); color: var(--surface); }
.auth-statement h1 { font-size: clamp(48px, 5vw, 76px); }
.auth-statement > p:not(.eyebrow) { max-width: 480px; color: #b9c2bd; font-size: 18px; }
.auth-statement > a { margin-top: 44px; text-underline-offset: 5px; }
.login-panel { display: grid; place-items: center; padding: 48px; }
.login-panel form { width: min(420px, 100%); }
.login-panel h2 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.form-help { margin: 8px 0 30px; color: var(--muted); }
label { display: block; margin: 18px 0 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 48px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.message { min-height: 22px; color: var(--error); font-size: 13px; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 224px 1fr; background: var(--surface); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; display: flex; flex-direction: column; background: var(--ink); color: var(--surface); }
.brand.inverse .brand-mark { background: var(--signal); color: var(--signal-dark); }
.side-period { margin: 56px 0 34px; padding: 16px 0; border-top: 1px solid #405149; border-bottom: 1px solid #405149; }
.side-period span, .side-period small { display: block; color: #a9b6af; font-size: 11px; }
.side-period strong { display: block; margin: 5px 0; font: 700 26px var(--font-mono); }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { padding: 11px 12px; border-radius: 4px; color: #c9d2cd; font-size: 13px; text-decoration: none; }
.sidebar nav a.active { background: var(--signal); color: var(--signal-dark); font-weight: 800; }
.logout { margin-top: auto; padding: 10px; background: transparent; border: 1px solid #53645c; border-radius: 4px; color: #c9d2cd; cursor: pointer; }
.workspace-main { min-width: 0; padding: 42px clamp(24px, 4vw, 64px) 80px; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.workspace-header h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; letter-spacing: -.045em; }
.workspace-actions { display: flex; align-items: flex-end; gap: 10px; }
.workspace-actions label { margin: 0; }
.workspace-actions select { width: 150px; margin-top: 5px; }
.notice { padding: 10px 12px; border-left: 3px solid var(--signal); background: #f0f2e7; }
.summary-strip { margin: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); background: var(--rule); gap: 1px; }
.summary-strip div { min-width: 0; padding: 20px; background: var(--surface); }
.summary-strip span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.summary-strip strong { font: 700 clamp(17px, 1.7vw, 24px) var(--font-mono); }
.summary-strip .delta-proof { background: var(--signal); color: var(--signal-dark); }
.summary-strip .delta-proof span { color: var(--signal-dark); }
.summary-strip .delta-proof.mismatch { background: var(--error); color: var(--surface); }
.summary-strip .delta-proof.mismatch span { color: var(--surface); }
.ledger-panel, .history-panel { margin-top: 22px; padding: 24px; border: 1px solid var(--rule); background: #fffefa; }
.panel-head { align-items: center; margin-bottom: 18px; }
.panel-head .message { margin: 0; color: var(--success); }
.table-scroll { overflow-x: auto; }
.ledger-table th, .ledger-table td { padding: 16px 12px; }
.ledger-table .match { color: var(--success); font-weight: 800; }
.ledger-table .mismatch { color: var(--error); font-weight: 800; }
.status-dot { color: var(--success); font: 700 12px var(--font-mono); }
.status-dot::before { content: ""; width: 7px; height: 7px; margin-right: 7px; display: inline-block; background: var(--success); border-radius: 50%; }
.status-dot.mismatch { color: var(--error); }
.status-dot.mismatch::before { background: var(--error); }
.batch-list { margin: 0; padding: 0; list-style: none; }
.batch-list li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--rule); }
.batch-check { width: 20px; height: 20px; display: grid; place-items: center; background: #e4efe9; border-radius: 50%; color: var(--success); font-size: 11px; }
.batch-list strong, .batch-list small { display: block; }
.batch-list small, .batch-list time { color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 64px 28px; }
  .proof-sheet { transform: none; }
  .proof-section { grid-template-columns: 1fr; gap: 48px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px 24px; flex-direction: row; align-items: center; gap: 20px; }
  .sidebar .side-period, .sidebar nav { display: none; }
  .logout { margin: 0 0 0 auto; }
}

@media (max-width: 680px) {
  .site-header { height: 64px; padding: 0 18px; }
  .site-header nav > a:first-child { display: none; }
  .hero { min-height: auto; padding: 54px 20px 70px; }
  .hero h1 { font-size: 46px; }
  .hero-actions, .cta-band, .workspace-header { align-items: stretch; flex-direction: column; }
  .proof-sheet { margin-top: 28px; padding: 18px; box-shadow: 8px 8px 0 #ded8c8; overflow: hidden; }
  .proof-sheet::before { top: 0; right: 18px; }
  .sheet-head { flex-direction: column; }
  .sheet-total { grid-template-columns: 1fr; }
  .proof-sheet table { min-width: 480px; }
  .proof-sheet { overflow-x: auto; }
  .proof-section { padding: 82px 20px; }
  .cta-band { padding: 58px 22px; }
  .auth-layout { min-height: calc(100vh - 64px); grid-template-columns: 1fr; }
  .auth-statement { padding: 54px 24px; }
  .auth-statement h1 { font-size: 44px; }
  .login-panel { padding: 52px 24px; }
  .sidebar .brand > span:last-child { display: none; }
  .workspace-main { padding: 30px 16px 60px; }
  .workspace-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .workspace-actions select { width: 100%; }
  .summary-strip { grid-template-columns: 1fr; }
  .ledger-panel, .history-panel { padding: 18px 14px; }
  .batch-list li { grid-template-columns: 22px 1fr; }
  .batch-list time { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
