:root {
  color-scheme: light;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #171b20;
  --muted: #64707b;
  --line: #d9dfe4;
  --soft: #f4f6f7;
  --paper: #ffffff;
  --blue: #145fc1;
  --blue-dark: #0d4592;
  --green: #13795b;
  --amber: #a45c00;
  --red: #b42318;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #eef1f3; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 10; }
.topbar__inner, .main, .footer__inner { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.topbar__inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand__mark { width: 26px; height: 26px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.brand__mark span:nth-child(1) { background: var(--blue); }
.brand__mark span:nth-child(2) { background: #f1b72c; }
.brand__mark span:nth-child(3) { background: #2aa37c; }
.brand__mark span:nth-child(4) { background: var(--ink); }
.nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

.main { flex: 1; padding: 42px 0 64px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 36px; align-items: start; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
h3 { margin: 0; font-size: 16px; letter-spacing: 0; }
.lead { max-width: 690px; margin: 18px 0 0; color: #3f4a54; font-size: 17px; line-height: 1.7; }
.service-note { margin: 26px 0 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.service-note strong { color: var(--ink); }

.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.panel__head, .panel__body, .panel__section { padding: 22px; }
.panel__head { border-bottom: 1px solid var(--line); }
.panel__body, .panel__section { display: grid; gap: 16px; }
.panel__section + .panel__section { border-top: 1px solid var(--line); }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid #bfc8d0; border-radius: 6px; background: #fff; padding: 12px 13px; color: var(--ink); }
.field textarea { min-height: 124px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid #8db8ed; outline-offset: 1px; border-color: var(--blue); }
.help, .status-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.status-text[data-tone="error"] { color: var(--red); }
.status-text[data-tone="success"] { color: var(--green); }
.button { min-height: 44px; border: 1px solid var(--blue); border-radius: 6px; background: var(--blue); color: #fff; padding: 11px 16px; font-weight: 750; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button:hover { background: var(--blue-dark); }
.button:disabled { opacity: .58; cursor: wait; }
.button--quiet { border-color: var(--line); background: #fff; color: var(--ink); }
.button--quiet:hover { background: var(--soft); }
.button--danger { border-color: #d7a39d; background: #fff; color: var(--red); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button-row .button { flex: 1 1 160px; }

.flow { margin-top: 38px; }
.flow__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flow__item { min-height: 142px; padding: 20px; border-right: 1px solid var(--line); }
.flow__item:last-child { border-right: 0; }
.flow__number { color: var(--blue); font-size: 12px; font-weight: 800; }
.flow__item h3 { margin-top: 30px; }
.flow__item p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.page-head { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 18px; align-items: start; }
.stage { display: grid; gap: 18px; }
.stage__top { display: flex; align-items: center; gap: 12px; }
.stage__icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #e8f1fd; color: var(--blue); font-weight: 850; }
.stage[data-stage="active"] .stage__icon { background: #e2f4ed; color: var(--green); }
.stage[data-stage="delayed"] .stage__icon { background: #fff0dc; color: var(--amber); }
.stage[data-stage="ended"] .stage__icon { background: #f2e8e7; color: var(--red); }
.stage__title { font-size: 22px; font-weight: 800; }
.stage__description { color: #46515b; line-height: 1.65; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fact { min-height: 94px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact span { color: var(--muted); font-size: 12px; }
.fact strong { display: block; margin-top: 8px; font-size: 15px; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 0; }
.timeline__item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 10px 0; }
.timeline__dot { width: 10px; height: 10px; margin-top: 5px; border: 2px solid #aeb8c1; border-radius: 50%; }
.timeline__item[data-done="true"] .timeline__dot { border-color: var(--green); background: var(--green); }
.timeline__item strong { display: block; font-size: 14px; }
.timeline__item p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.request-list { display: grid; gap: 8px; }
.request { padding: 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.request strong { display: flex; justify-content: space-between; gap: 10px; }
.request span { color: var(--muted); }
.empty { padding: 18px; border: 1px dashed #bfc8d0; border-radius: 6px; color: var(--muted); font-size: 13px; }

.legal { width: min(820px, 100%); }
.legal h1 { font-size: 42px; }
.legal section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.legal p, .legal li { color: #3f4a54; line-height: 1.75; }
.legal dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }

.footer { border-top: 1px solid var(--line); background: #20252b; color: #eef1f3; }
.footer__inner { padding: 28px 0 34px; display: grid; gap: 18px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.footer__business { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 24px; color: #c3cbd2; font-size: 12px; line-height: 1.5; }
.footer__business .wide { grid-column: 1 / -1; }

@media (max-width: 820px) {
  .workspace, .dashboard { grid-template-columns: 1fr; }
  .flow__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow__item:nth-child(2) { border-right: 0; }
  .flow__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nav a:not(.button) { display: none; }
}

@media (max-width: 520px) {
  .topbar__inner, .main, .footer__inner { width: min(100% - 24px, 1120px); }
  .main { padding-top: 28px; }
  h1 { font-size: 36px; }
  .flow__grid, .facts, .footer__business { grid-template-columns: 1fr; }
  .flow__item { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line); }
  .flow__item:last-child { border-bottom: 0; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .fact:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .legal dl { grid-template-columns: 1fr; gap: 4px; }
}
