/* 본틀 품질 고도화 관리자 (exam) · 미색 종이 + 잉크 남색 + 채점 빨강 · 모서리 6 */
.ex {
  --bg: #F3EEE2;
  --surface: #FBF8F1;
  --surface-2: #ECE5D4;
  --text: #1B2235;
  --muted: #5C574A;
  --line: #D8CEB9;
  --line-2: #BCAF96;
  --primary: #1F2F63;
  --primary-2: #2D4387;
  --primary-soft: #E2E5EF;
  --accent: #BE2F28;
  --accent-soft: #F7E0DB;
  --ok: #286247;
  --ok-soft: #DCEADF;
  --warn: #8C580A;
  --danger: #AE251E;
  --hl: #F6E39A;
  --radius: 6px;
  --f-display: "Do Hyeon", "Pretendard Variable", Pretendard, sans-serif;
  --f-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --f-mono: "DM Mono", "Nanum Gothic Coding", ui-monospace, "SFMono-Regular", Menlo, monospace;

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.ex *, .ex *::before, .ex *::after { box-sizing: border-box; }
.ex [hidden] { display: none !important; }
.ex a { color: var(--primary-2); }
.ex code { font-family: var(--f-mono); font-size: .92em; }
.ex h1, .ex h2, .ex h3 { margin: 0; font-weight: 400; }
.ex p { margin: 0; }
.ex button { font: inherit; color: inherit; }
.ex :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 안내 띠·머리 ── */
.ex-band {
  height: 28px; display: flex; align-items: center; justify-content: center;
  padding: 0 16px; background: var(--surface-2); color: var(--muted);
  font-size: 12px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ex-top {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px;
  padding: 10px 16px 0; background: var(--surface);
  border-bottom: 4px double var(--primary);
}
.ex-brand { grid-row: 1; grid-column: 1; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text) !important; min-height: 44px; }
.ex-brand__mark svg { width: 34px; height: 34px; display: block; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; }
.ex-brand__mark svg rect { fill: var(--surface); }
.ex-brand__mark svg .red { stroke: var(--accent); stroke-width: 2; }
.ex-brand__name { display: flex; flex-direction: column; line-height: 1.1; }
.ex-brand__name b { font-family: var(--f-display); font-weight: 400; font-size: 24px; color: var(--primary); letter-spacing: .02em; }
.ex-brand__name small { font-size: 11.5px; color: var(--muted); }
.ex-top__right { display: flex; align-items: center; gap: 10px; grid-row: 1; grid-column: 2; }
.ex-top__who { display: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-nav { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 4px; margin: 0 -4px; }
.ex-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.ex-nav a.is-active { color: var(--primary); border-bottom-color: var(--accent); }
@media (min-width: 760px) {
  .ex-top { grid-template-columns: auto 1fr auto; padding: 8px 32px 0; }
  .ex-nav { grid-column: 2; grid-row: 1; margin: 0 0 0 24px; align-self: end; }
  .ex-top__right { grid-column: 3; }
  .ex-top__who { display: inline; }
  .ex-top__right { padding-bottom: 6px; }
}

.ex-main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 120px; }
@media (min-width: 760px) { .ex-main { padding: 28px 32px 120px; } }

/* ── 버튼·칩·태그 ── */
.ex-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.ex-btn--primary { background: var(--primary); color: #fff !important; }
.ex-btn--primary:hover { background: var(--primary-2); }
.ex-btn--line { border-color: var(--line-2); color: var(--primary) !important; background: var(--surface); }
.ex-btn--line:hover { border-color: var(--primary); }
.ex-btn--ghost { color: var(--muted); border-color: var(--line); background: transparent; }
.ex-btn--red { background: var(--accent); color: #fff !important; }
.ex-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.ex-btn:disabled { opacity: .45; cursor: not-allowed; }
.ex-top .ex-btn--sm { min-height: 40px; }

.ex-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px;
  font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: middle;
  background: var(--surface-2); color: var(--muted);
}
.ex-chip.is-ok { background: var(--ok-soft); color: var(--ok); }
.ex-chip.is-ng { background: var(--accent-soft); color: var(--danger); }
.ex-chip.is-wait { background: var(--primary-soft); color: var(--primary); }
.ex-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 3px;
  border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--primary); background: var(--surface); white-space: nowrap;
}
.ex-tag--new { border-color: var(--accent); color: var(--accent); }

.ex-crumb { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.ex-crumb a { color: var(--muted); }

/* ── 쪽 머리 ── */
.ex-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.ex-head--tight { margin-bottom: 18px; }
.ex-eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .02em; margin-bottom: 6px !important; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-head h1 { font-family: var(--f-display); font-size: 28px; line-height: 1.25; color: var(--primary); letter-spacing: -.005em; }
.ex-lede { margin-top: 8px !important; color: var(--muted); max-width: 62ch; }
.ex-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-head__cta { align-self: flex-start; }
@media (min-width: 760px) {
  .ex-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .ex-head h1 { font-size: 36px; }
  .ex-head__cta { align-self: auto; }
}

.ex-section { margin-top: 32px; }
.ex-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ex-section__head h2 { font-family: var(--f-display); font-size: 22px; color: var(--primary); }
.ex-section__head h2 small, .ex-panel__title small, .wz-run__head h2 small, .ex-scorehead h3 small { font-family: var(--f-body); font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.ex-section__note { font-size: 13.5px; color: var(--muted); }
.ex-section__foot { margin-top: 10px !important; font-size: 13px; color: var(--muted); }
.ex-count { font-family: var(--f-mono); font-size: 15px; color: var(--accent); margin-left: 4px; }

/* ── 공통 엔진 띠 ── */
.ex-engine { background: var(--primary); color: #F3EEE2; border-radius: var(--radius); padding: 16px; }
.ex-engine__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; margin-bottom: 12px; }
.ex-engine__head h2 { font-family: var(--f-display); font-size: 20px; color: #fff; }
.ex-engine__head p { font-size: 13.5px; color: #D3D7E6; }
.ex-engine__head code { color: #fff; }
.ex-zero { font-family: var(--f-display); font-weight: 400; font-size: 18px; color: #FFB4A8; margin-left: 2px; }
.ex-engine__flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 6px; counter-reset: none; }
.ex-engine__flow li { display: grid; grid-template-columns: 28px auto 1fr; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; background: rgba(255,255,255,.07); }
.ex-engine__flow b { font-weight: 700; color: #fff; }
.ex-engine__flow small { color: #C7CCE0; font-size: 12.5px; }
.ex-engine__no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #FFB4A8; color: #FFB4A8; font-family: var(--f-mono); font-size: 13px; font-weight: 700; }
@media (min-width: 900px) {
  .ex-engine { padding: 18px 20px; }
  .ex-engine__flow { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .ex-engine__flow li { grid-template-columns: 28px 1fr; grid-template-rows: auto auto; position: relative; }
  .ex-engine__flow li small { grid-column: 2; }
  .ex-engine__no { grid-row: span 2; }
  .ex-engine__flow li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: #FFB4A8; font-size: 13px; z-index: 1; }
}
.ex-engine__flow--light li { background: var(--surface); border: 1px solid var(--line); }
.ex-engine__flow--light b { color: var(--primary); }
.ex-engine__flow--light small { color: var(--muted); }
.ex-engine__flow--light .ex-engine__no { border-color: var(--accent); color: var(--accent); }
.ex-engine__flow--light li:not(:last-child)::after { color: var(--accent); }

/* ── 묶음 카드 ── */
.ex-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .ex-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ex-cards { grid-template-columns: repeat(3, 1fr); } }
.ex-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 1px 0 var(--line);
}
.ex-card.is-new { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ex-card__head { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ex-card__ver { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.ex-card__name { font-family: var(--f-display) !important; font-size: 24px; line-height: 1.2; }
.ex-card__name a { color: var(--primary); text-decoration: none; }
.ex-card__name a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.ex-card__scope { font-size: 14px; color: var(--muted); }
.ex-card__facts { margin: 0; display: grid; gap: 4px; padding: 10px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.ex-card__facts div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 13.5px; }
.ex-card__facts dt { color: var(--muted); }
.ex-card__facts dd { margin: 0; font-weight: 600; }
.ex-card__facts small { font-weight: 500; color: var(--muted); font-size: 12px; }
.ex-card__score { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ex-card__big { font-family: var(--f-display); font-size: 40px; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.ex-card__label { font-size: 13px; color: var(--muted); margin-top: 4px !important; }
.ex-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.ex-card__path { font-size: 12px; color: var(--muted); }

.ex-status { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; padding: 8px 10px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); }
.ex-status a { margin-left: auto; font-weight: 600; font-size: 13px; min-height: 28px; display: inline-flex; align-items: center; }
.ex-status__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.ex-status.is-ok { background: var(--ok-soft); color: var(--ok); }
.ex-status.is-ng { background: var(--accent-soft); color: var(--danger); }

.ex-slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 220px; padding: 18px; border: 2px dashed var(--line-2); border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(31,47,99,.03) 10px 20px);
  text-decoration: none; color: var(--muted) !important;
}
.ex-slot:hover { border-color: var(--accent); }
.ex-slot b { font-family: var(--f-display); font-weight: 400; font-size: 24px; color: var(--primary); }
.ex-slot__no { font-family: var(--f-display); font-size: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.5px dashed var(--accent); color: var(--accent); }
.ex-slot__rule { font-size: 13.5px; color: var(--text); padding: 6px 8px; background: var(--surface); border-left: 3px solid var(--accent); margin: 6px 0 8px; }
.ex-slot.is-next { min-height: 160px; }

.ex-split { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 900px) { .ex-split { grid-template-columns: 1fr 1.3fr; } }
.ex-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.ex-panel__title { font-family: var(--f-display); font-size: 19px; color: var(--primary); margin-bottom: 10px !important; }
.ex-panel__note { font-size: 13px; color: var(--muted); margin-top: 10px !important; }
.ex-tree { margin: 0; font-family: var(--f-mono); font-size: 13px; line-height: 1.9; white-space: pre; overflow-x: auto; background: var(--bg); padding: 10px 12px; border-radius: 4px; }
.ex-tree span { display: block; }
.ex-tree b { color: var(--primary); }
.ex-tree i { font-style: normal; color: var(--muted); font-size: 12px; }
.ex-tree .is-new b, .ex-tree .is-new i { color: var(--accent); }
@media (max-width: 599px) { .ex-tree i { display: block; padding-left: 6.5ch; } .ex-tree span:first-child i, .ex-tree span:nth-child(2) i { padding-left: 2ch; } }
.ex-runs { list-style: none; margin: 0; padding: 0; }
.ex-runs li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.ex-runs li:first-child { border-top: 0; }
.ex-runs time { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.ex-runs div { display: flex; flex-direction: column; font-size: 14px; }
.ex-runs div span { color: var(--muted); font-size: 13px; }
.ex-runs li.is-new b { color: var(--accent); }
@media (min-width: 600px) { .ex-runs li { grid-template-columns: 88px 1fr auto; } .ex-runs time { grid-column: auto; } }

/* ── 채점 표시(시그니처) ── */
.ex-mark { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.ex-mark--ng { stroke-width: 2.8; }
.ex-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ex-draw .55s cubic-bezier(.5,.1,.3,1) forwards; }
@keyframes ex-draw { to { stroke-dashoffset: 0; } }
.ex-stamp { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; flex: none; transform: rotate(-9deg); color: var(--accent); }
.ex-stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.ex-stamp b { font-family: var(--f-display); font-weight: 400; font-size: 19px; letter-spacing: .04em; }
.ex-stamp.is-ng { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .ex-draw { animation: none; stroke-dashoffset: 0; } }

/* ── 알림·공고 대응표·시트 ── */
.ex-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--radius); background: var(--text); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.ex-mapbtn { position: fixed; right: 16px; bottom: 40px; z-index: 40; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary); font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 4px 14px rgba(27,34,53,.16); }
.ex-sheet { position: fixed; inset: 0; z-index: 70; }
.ex-sheet[hidden] { display: none; }
.ex-sheet__scrim { position: absolute; inset: 0; background: rgba(27,34,53,.45); }
.ex-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 10px 10px 0 0; padding: 16px 16px 28px; }
@media (min-width: 760px) { .ex-sheet__panel { left: auto; top: 0; width: 480px; max-height: none; border-radius: 0; padding: 24px; } }
.ex-sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ex-sheet__head h2 { font-family: var(--f-display); font-size: 22px; color: var(--primary); }
.ex-iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: var(--radius); }
.ex-iconbtn svg { width: 20px; height: 20px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.ex-map { list-style: none; margin: 0; padding: 0; }
.ex-map li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.ex-map__no { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-family: var(--f-mono); font-size: 13px; font-weight: 700; }
.ex-map__req { font-weight: 700; font-size: 14.5px; }
.ex-map__shown { font-size: 13.5px; color: var(--muted); margin: 2px 0 4px !important; }
.ex-map a { font-size: 13.5px; font-weight: 700; display: inline-flex; min-height: 32px; align-items: center; }
.ex-sheet__foot { margin-top: 12px !important; font-size: 12.5px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.ex .demo-notice { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 16px 24px; }

/* ── 설정 파일 줄 ── */
.wz-yaml, .ex-yaml {
  margin: 0; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.75; color: var(--text);
  background: var(--surface); overflow: auto; counter-reset: none; white-space: pre; tab-size: 2;
}
.wz-yl { display: block; padding: 0 10px 0 0; min-height: 1.75em; }
.wz-yl i { display: inline-block; width: 34px; padding-right: 10px; text-align: right; font-style: normal; color: var(--line-2); user-select: none; }
.wz-yl .k { color: var(--primary); font-weight: 700; }
.wz-yl .c { color: #8A8270; }
.wz-yl .v { color: var(--accent); }
.wz-yl.is-changed { background: var(--hl); }
.wz-yl .x { font-weight: 700; color: var(--accent); text-decoration: underline wavy var(--accent); text-underline-offset: 3px; }
.wz-yl.is-error { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.wz-yl.is-error i { color: var(--accent); font-weight: 700; }
.ex-yaml { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 0; max-height: 560px; }

/* ── 마법사 ── */
.wz-already { padding: 10px 12px; margin-bottom: 14px !important; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); font-size: 14px; }
.wz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wz-file {
  position: sticky; top: 0; z-index: 20; align-self: start;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(27,34,53,.08); min-width: 0;
}
.wz-file__bar { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 10px; align-items: center; min-height: 52px; padding: 8px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.wz-file__name { font-family: var(--f-mono); font-size: 13px; font-weight: 700; color: var(--primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-file__dir { color: var(--muted); font-weight: 400; }
.wz-file__dir b { color: var(--accent); }
.wz-file__meta { grid-row: 2; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.wz-file__zero b { color: var(--accent); }
.wz-file__changed { color: var(--text); background: var(--hl); padding: 0 6px; border-radius: 3px; font-weight: 700; }
.wz-file__toggle { grid-row: span 2; grid-column: 2; font-size: 13px; font-weight: 700; color: var(--primary); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 10px; }
.wz-file__body { display: none; border-top: 1px solid var(--line); }
.wz-file.is-open .wz-file__body { display: block; }
.wz-file .wz-yaml { max-height: 56vh; padding: 8px 0; }
.wz-zero { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.wz-zero__num { font-family: var(--f-display); font-size: 30px; line-height: 1; color: var(--accent); }
.wz-zero__label { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.wz-zero__label b { color: var(--primary); }
.wz-zero__label small { color: var(--muted); font-size: 12px; }
@media (min-width: 960px) {
  .wz-grid { grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; align-items: start; }
  .wz-file { grid-column: 2; grid-row: 1; top: 16px; }
  .wz-main { grid-column: 1; grid-row: 1; }
  .wz-file__bar { cursor: default; pointer-events: none; }
  .wz-file__toggle, .wz-file__changed, .wz-file__zero { display: none !important; }
  .wz-file__body { display: block; }
  .wz-file .wz-yaml { max-height: calc(100vh - 190px); }
}
.wz-main { min-width: 0; }
.wz-check, .wz-run, .wz-done, .tn-card, .wz-step.is-open .wz-step__body { grid-template-columns: minmax(0, 1fr); }
.wz-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wz-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 76px; }
.wz-step.is-open { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.wz-step__head { width: 100%; display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; align-items: center; min-height: 60px; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; }
.wz-step__no { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--primary); color: var(--primary); font-family: var(--f-mono); font-weight: 700; font-size: 14px; }
.wz-step.is-open .wz-step__no { background: var(--primary); color: #fff; }
.wz-step__title { font-family: var(--f-display); font-size: 19px; color: var(--primary); line-height: 1.3; }
.wz-step__sum { font-size: 13px; color: var(--muted); }
.wz-step.is-open .wz-step__sum { display: none; }
.wz-step__body { display: none; padding: 4px 14px 16px; border-top: 1px dashed var(--line-2); }
.wz-step.is-open .wz-step__body { display: grid; gap: 16px; padding-top: 14px; }
.wz-step__foot { display: flex; justify-content: flex-end; }
.wz-help { font-size: 14px; color: var(--muted); }
.wz-note { font-size: 12.5px; color: var(--muted); margin-top: 6px !important; }
.wz-field { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wz-field > legend, .wz-label { font-size: 13.5px; font-weight: 700; color: var(--text); padding: 0; margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.wz-field > legend { margin-bottom: 8px; }
.wz-label small, .wz-field > legend small { font-weight: 500; color: var(--muted); font-size: 12px; }
.wz-label output { font-family: var(--f-mono); color: var(--accent); }
.wz-row2 { display: grid; gap: 16px; }
@media (min-width: 600px) { .wz-row2 { grid-template-columns: 1fr 1fr; } }
.wz-input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; font: inherit; color: var(--text); }
.wz-input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.wz-input--sm { width: 72px; min-height: 36px; padding: 4px 8px; font-family: var(--f-mono); text-align: right; }
.wz-num { display: flex; align-items: center; gap: 8px; }
.wz-num .wz-input { width: 96px; font-family: var(--f-mono); }
.wz-static { font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 36px; }
.wz-static code { color: var(--primary); }
.wz-textarea { min-height: 130px; font-family: var(--f-mono); font-size: 13px; line-height: 1.7; resize: vertical; }

.wz-subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 600px) { .wz-subjects { grid-template-columns: repeat(4, 1fr); } }
.wz-subject { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; padding: 10px 12px; min-height: 64px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; cursor: pointer; }
.wz-subject input { position: absolute; opacity: 0; pointer-events: none; }
.wz-subject__name { font-weight: 700; }
.wz-subject code { font-size: 11.5px; color: var(--muted); align-self: center; }
.wz-subject__rows { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wz-subject.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; background: var(--primary-soft); }
.wz-subject.is-on .wz-subject__name { color: var(--primary); }
.wz-subject:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-subject.is-off { cursor: not-allowed; background: var(--surface-2); border-style: dashed; color: var(--muted); }
.wz-subject.is-added .wz-subject__rows { color: var(--accent); font-weight: 700; }

.wz-stats { padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.wz-stats__title { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.wz-stats__sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px !important; }
.ex-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-bars li { display: grid; grid-template-columns: minmax(88px, 34%) 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.ex-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-bars__track { height: 10px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.ex-bars__track span { display: block; height: 100%; background: var(--primary); }
.ex-bars__val { font-family: var(--f-mono); font-size: 12.5px; text-align: right; color: var(--muted); }

.ex-seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: #fff; width: fit-content; max-width: 100%; }
.ex-seg__opt { position: relative; flex: 1 0 auto; }
.ex-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.ex-seg__opt span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-left: 1px solid var(--line); white-space: nowrap; }
.ex-seg__opt:first-child span { border-left: 0; }
.ex-seg__opt input:checked + span { background: var(--primary); color: #fff; }
.ex-seg__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
.wz-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-tick { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; font-size: 14px; cursor: pointer; }
.wz-tick input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }

.wz-crit { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.wz-crit__row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.wz-crit__row:first-child { border-top: 0; }
.wz-crit__row.is-off .wz-crit__label, .wz-crit__row.is-off .wz-crit__rule, .wz-crit__row.is-off .wz-method { opacity: .45; }
.wz-crit__label { font-weight: 700; font-size: 14.5px; }
.wz-crit__rule { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.wz-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.wz-switch input { position: absolute; opacity: 0; pointer-events: none; }
.wz-switch__track { flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; }
.wz-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.wz-switch input:checked + .wz-switch__track { background: var(--primary); }
.wz-switch input:checked + .wz-switch__track::after { left: 19px; }
.wz-switch input:focus-visible + .wz-switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-method { justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; border: 1px solid currentColor; }
.wz-method.is-rule { color: var(--primary); }
.wz-method.is-llm { color: var(--accent); }
.wz-method.is-both { color: var(--warn); }
@media (min-width: 700px) {
  .wz-crit__row { grid-template-columns: minmax(0, 1fr) auto 170px; align-items: center; gap: 12px; }
  .wz-crit__rule { justify-content: flex-end; }
}
.wz-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -8px; }
.wz-chips__label { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.wz-chipbtn { min-height: 34px; padding: 0 10px; border: 1px dashed var(--accent); border-radius: 4px; background: #fff; color: var(--accent); font-family: var(--f-mono) !important; font-size: 13px; cursor: pointer; }
.wz-sub { display: grid; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.wz-sub__title { font-family: var(--f-display); font-size: 17px; color: var(--primary); }
.wz-range { width: 100%; accent-color: var(--primary); min-height: 36px; }
.wz-sets { display: grid; gap: 8px; }
.wz-set { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 44px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; cursor: pointer; }
.wz-set input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.wz-set:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: var(--primary-soft); }
.wz-set__name { font-weight: 700; }
.wz-set__meta { font-size: 13px; color: var(--muted); }
.wz-jsonl { margin: 0; padding: 10px 12px; font-family: var(--f-mono); font-size: 12px; line-height: 1.7; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; white-space: pre; }

/* 설정 검사 */
.wz-check { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 12px; scroll-margin-top: 76px; }
.wz-check__head h2 { font-family: var(--f-display); font-size: 21px; color: var(--primary); }
.wz-check__head p { font-size: 13.5px; color: var(--muted); }
.wz-check__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-check__actions .ex-btn { flex: 1 1 auto; }
@media (min-width: 600px) { .wz-check__actions .ex-btn { flex: none; } }
.wz-check__result:empty { display: none; }
.wz-steps.is-locked, .wz-check.is-locked { opacity: .55; }
.wz-bad { color: var(--danger); font-size: 14px; margin-bottom: 8px !important; }
.wz-errs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wz-errs li { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); border-left: 3px solid var(--accent); }
.wz-errs__loc { font-size: 12px; color: var(--danger); font-weight: 700; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wz-errs__loc code { font-weight: 400; color: var(--text); }
.wz-errs__msg { font-size: 14px; }
.wz-errs__act { display: flex; gap: 6px; flex-wrap: wrap; }
.wz-ok { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--ok-soft); }
.wz-ok .ex-mark { width: 34px; height: 34px; }
.wz-ok p { display: flex; flex-direction: column; }
.wz-ok b { color: var(--ok); }
.wz-ok span { font-size: 13px; color: var(--text); }
.wz-stale { font-size: 13.5px; color: var(--warn); font-weight: 600; }

/* 모의 실행 */
.wz-run { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--primary); display: grid; gap: 14px; scroll-margin-top: 76px; }
.wz-run__head h2 { font-family: var(--f-display); font-size: 21px; color: var(--primary); }
.wz-run__head p { font-size: 13.5px; color: var(--muted); }
.wz-phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wz-phases li { display: grid; grid-template-columns: 26px 84px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 4px; font-size: 13.5px; color: var(--muted); background: var(--bg); }
.wz-phases__no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line-2); }
.wz-phases b { color: var(--text); }
.wz-phases__d { min-width: 0; }
.wz-phases__st { font-size: 12px; font-weight: 700; }
.wz-phases li.is-run { background: var(--hl); color: var(--text); }
.wz-phases li.is-run .wz-phases__st { color: var(--warn); }
.wz-phases li.is-done { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.wz-phases li.is-done .wz-phases__no { background: var(--primary); color: #fff; border-color: var(--primary); }
.wz-phases li.is-done .wz-phases__st { color: var(--ok); }
@media (max-width: 599px) {
  .wz-phases li { grid-template-columns: 26px 1fr auto; }
  .wz-phases__d { grid-column: 2 / -1; grid-row: 2; font-size: 12.5px; }
}
.wz-grids { display: grid; gap: 12px; }
.wz-grids:empty { display: none; }
@media (min-width: 760px) { .wz-grids { grid-template-columns: 1fr 1fr; } }
.wz-grid1__t { font-weight: 700; font-size: 14px; margin-bottom: 6px !important; }
.wz-grid1__t small { font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 12.5px; }
.wz-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 760px) { .wz-cells { grid-template-columns: repeat(10, minmax(0, 1fr)); } .wz-cells .wz-cell { height: auto; aspect-ratio: 1; } }
.wz-cell { position: relative; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 3px; background: #fff; cursor: pointer; padding: 0; }
.wz-cell__n { font-family: var(--f-mono); font-size: 12px; color: var(--text); position: relative; z-index: 1; }
.wz-cell .ex-mark { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.wz-cell.is-flag { background: var(--accent-soft); }
.wz-cell.is-fixed { background: var(--hl); }
.wz-cell__tag { position: absolute; bottom: -1px; right: -1px; font-size: 9px; font-weight: 700; background: var(--accent); color: #fff; padding: 0 3px; border-radius: 2px; line-height: 1.4; z-index: 2; }
.wz-pick { font-size: 13.5px; padding: 8px 10px; border-left: 3px solid var(--primary); background: var(--bg); display: flex; flex-direction: column; }
.wz-pick span { color: var(--muted); }
.ex-scorehead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ex-scorehead h3 { font-family: var(--f-display); font-size: 19px; color: var(--primary); }
.ex-scorehead b { font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--accent); }

/* 표 → 390px 카드 */
.ex-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; border-top: 2px solid var(--primary); border-bottom: 2px solid var(--primary); }
.ex-table th, .ex-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ex-table thead th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: var(--bg); }
.ex-table tbody th { font-weight: 700; }
.ex-table tbody th small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.ex-table .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-table .num i { font-style: normal; color: var(--line-2); margin: 0 2px; }
.ex-table__verdict { white-space: nowrap; }
.ex-table__verdict span { font-size: 13px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
.ex-table tr.is-ng { background: rgba(190,47,40,.05); }
.ex-table tr.is-ng .ex-table__verdict span { color: var(--danger); }
.ex-table td.is-up { color: var(--accent); font-weight: 700; }
.ex-table__note { font-size: 12.5px !important; color: var(--warn); margin: 0 !important; }
@media (max-width: 639px) {
  .ex-table thead { display: none; }
  .ex-table, .ex-table tbody { display: block; }
  .ex-table tr { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .ex-table tbody th { flex: 1 0 100%; padding: 0 0 2px; border: 0; }
  .ex-table td { flex: 1 1 0; min-width: 0; padding: 2px 0; border: 0; display: block; font-size: 13.5px; }
  .ex-table td:first-of-type { flex-grow: 1.4; }
  .ex-table td::before { content: attr(data-l); display: block; font-family: var(--f-body); font-size: 11.5px; color: var(--muted); font-weight: 600; }
  .ex-table .num { white-space: normal; }
}

/* 추가 완료 */
.wz-done { margin-top: 16px; padding: 18px 16px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--accent); display: grid; gap: 16px; scroll-margin-top: 76px; }
.wz-done__head { display: flex; gap: 14px; align-items: flex-start; }
.wz-done__head .ex-stamp { width: 76px; height: 76px; }
.wz-done__head .ex-stamp b { font-size: 22px; }
.wz-done h2 { font-family: var(--f-display); font-size: 23px; line-height: 1.3; color: var(--primary); }
.wz-done__lede { font-size: 14px; color: var(--muted); margin-top: 6px !important; }
.wz-done__facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wz-done__facts div { padding: 10px; background: var(--bg); border-radius: 4px; }
.wz-done__facts dt { font-size: 12px; color: var(--muted); }
.wz-done__facts dd { margin: 0; font-family: var(--f-display); font-size: 22px; color: var(--primary); line-height: 1.2; }
.wz-done__facts dd small { font-family: var(--f-body); font-size: 11.5px; color: var(--muted); display: block; }
.wz-done__facts dd.is-zero { color: var(--accent); }
.wz-done__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wz-done__cols > div { min-width: 0; }
@media (min-width: 760px) { .wz-done__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.wz-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wz-files li { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.wz-files code { color: var(--primary); font-size: 12.5px; }
.wz-files span { font-size: 12.5px; color: var(--muted); }
.wz-cmd { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; background: var(--text); border-radius: var(--radius); }
.wz-cmd code { flex: 1; min-width: 0; color: #F3EEE2; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.wz-cmd .ex-btn { flex: none; }
.wz-done__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 묶음 상세 ── */
.ex-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) { .ex-summary { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.ex-summary__box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-width: 0; }
.ex-summary__k { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 4px !important; }
.ex-summary__v { font-family: var(--f-display); font-size: 21px; color: var(--primary); line-height: 1.25; }
.ex-summary__v small { font-family: var(--f-body); font-size: 11.5px; color: var(--muted); }
.ex-summary__s { font-size: 12.5px; color: var(--muted); margin-top: 2px !important; }
.ex-summary__list { margin: 0; padding: 0 0 0 16px; font-size: 13px; }
.ex-banner { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 14px !important; border-radius: var(--radius); background: var(--ok-soft); font-size: 14px; }

.ex-input { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ex-input div { display: flex; gap: 6px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); font-size: 13.5px; }
.ex-input dt { color: var(--muted); font-size: 12px; }
.ex-input dd { margin: 0; font-weight: 700; }

.ex-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ex-trace__step { position: relative; padding: 0 0 22px 40px; scroll-margin-top: 16px; }
.ex-trace__step::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line-2); }
.ex-trace__step:last-child::before { display: none; }
.ex-trace__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 30px; margin-bottom: 10px !important; }
.ex-trace__head b { font-family: var(--f-display); font-weight: 400; font-size: 21px; color: var(--primary); }
.ex-trace__head small { font-size: 13px; color: var(--muted); }
.ex-trace__no { position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-family: var(--f-mono); font-weight: 700; font-size: 14px; }
.ex-trace__body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.ex-trace__sub { font-weight: 700; font-size: 14px; margin-bottom: 10px !important; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ex-trace__hint { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.ex-notes { margin: 10px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--muted); }
.ex-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-hits li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 14px; }
.ex-hits__score { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
@media (min-width: 700px) { .ex-hits li { grid-template-columns: auto 1fr auto; } .ex-hits__score { grid-column: auto; } }

/* 시험지 종이 */
.ex-paper { background: #FFFDF8; border: 1px solid var(--line-2); box-shadow: 3px 3px 0 var(--surface-2); }
.ex-paper__label { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px !important; }
.ex-q { font-size: 15px; line-height: 1.75; }
.ex-q__stem { font-weight: 600; }
.ex-q__no { font-family: var(--f-mono); font-weight: 700; }
.ex-q__material { margin: 10px 0 12px; padding: 12px 14px; border: 1px solid var(--text); background: #fff; font-size: 14.5px; }
.ex-q__choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex-q__choices li { display: grid; grid-template-columns: 24px 1fr; font-size: 14.5px; }
.ex-q__cn { font-family: var(--f-body); }
.ex-flag { text-decoration: underline wavy var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; border-radius: 2px; }
.ex-flag--blank { display: inline-block; min-width: 120px; color: var(--accent); font-size: 13px; text-decoration: none; border: 1.5px dashed var(--accent); padding: 0 6px; }
.ex-flag.is-focus { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); text-decoration-style: solid; }
.ex-flag--fixed { background: var(--hl); text-decoration: none; padding: 0 2px; }
.ex-form__title { font-family: var(--f-display); font-size: 20px; text-align: center; letter-spacing: .3em; margin-bottom: 10px !important; }
.ex-form__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ex-form__table th, .ex-form__table td { border: 1px solid var(--text); padding: 7px 10px; text-align: left; }
.ex-form__table th { width: 34%; background: var(--surface-2); font-weight: 600; font-size: 13.5px; }
.ex-form__sign { margin-top: 10px !important; font-size: 13px; text-align: right; color: var(--muted); }

.ex-grades { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ex-grades li { border-top: 1px solid var(--line); }
.ex-grades li:first-child { border-top: 0; }
.ex-grades__row { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 12px; border: 0; background: none; text-align: left; font-size: 14px; }
button.ex-grades__row { cursor: pointer; min-height: 44px; }
button.ex-grades__row:hover, button.ex-grades__row[aria-pressed="true"] { background: var(--accent-soft); }
.ex-grades__label { font-weight: 700; }
.ex-grades__label small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.ex-grades__why { grid-column: 2 / -1; font-size: 13px; color: var(--muted); }
.ex-grades__st { grid-column: 3; grid-row: 1; font-size: 12.5px; font-weight: 700; color: var(--ok); }
.ex-grades li.is-ng .ex-grades__st { color: var(--danger); }
.ex-grades li.is-ng .ex-grades__why { color: var(--danger); }
@media (min-width: 760px) {
  .ex-grades__row { grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1.4fr) 44px; }
  .ex-grades__why { grid-column: 3; }
  .ex-grades__st { grid-column: 4; }
}

.ex-fixes { display: grid; gap: 8px; }
.ex-fixes__cols { display: none; }
.ex-fix { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ex-fix.is-focus { box-shadow: 0 0 0 2px var(--accent); }
.ex-fix__what { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ex-fix__what b { font-size: 14.5px; }
.ex-fix__what small { width: 100%; font-size: 12.5px; color: var(--muted); padding-left: 34px; }
.ex-fix__before, .ex-fix__after { font-size: 14px; padding: 8px 10px; border-radius: 4px; }
.ex-fix__before { background: var(--accent-soft); text-decoration: line-through; text-decoration-color: rgba(174,37,30,.55); }
.ex-fix__after { background: var(--hl); }
.ex-fix__tag { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.ex-fix__before .ex-fix__tag { display: inline-block; text-decoration: none; margin-right: 6px; }
@media (min-width: 900px) {
  .ex-fixes__cols { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 12px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 12px; }
  .ex-fix { grid-template-columns: 1fr 1.3fr 1.3fr; gap: 12px; align-items: start; }
  .ex-fix__what { align-items: flex-start; }
  .ex-fix__what small { padding-left: 0; }
  .ex-fix__tag { display: none !important; }
}
.ex-kept { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.ex-final { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 1000px) { .ex-final { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.ex-final .ex-paper { padding: 14px; border-radius: var(--radius); }
.ex-expl { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13.5px; }
.ex-expl__ans { font-weight: 700; margin-bottom: 4px !important; }
.ex-expl__ans b { color: var(--accent); font-size: 16px; font-weight: 500; }
.ex-expl ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.ex-regrade { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--surface); }
.ex-regrade__marks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.ex-regrade__marks li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ex-regrade__sum { font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-regrade__sum b { font-family: var(--f-display); font-weight: 400; font-size: 26px; color: var(--accent); }
.ex-empty { padding: 32px 0; display: grid; gap: 12px; justify-items: start; }
.ex-empty h1 { font-family: var(--f-display); font-size: 28px; color: var(--primary); }

/* ── 자동 고도화 ── */
.tn-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tn-tab { flex: none; display: flex; flex-direction: column; align-items: flex-start; min-height: 52px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; }
.tn-tab b { font-size: 15px; }
.tn-tab small { font-size: 12px; color: var(--muted); }
.tn-tab.is-on { border-color: var(--primary); background: var(--primary); color: #fff; }
.tn-tab.is-on small { color: #D3D7E6; }
.tn-loop { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 760px) { .tn-loop { grid-template-columns: repeat(6, 1fr); } }
.tn-loop li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.tn-loop__no { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: 12px; }
.tn-loop li.is-done { color: var(--primary); border-color: var(--primary); }
.tn-loop li.is-done .tn-loop__no { background: var(--primary); color: #fff; border-color: var(--primary); }
.tn-loop li.is-run { background: var(--hl); color: var(--text); border-color: var(--warn); }
.tn-panel { display: grid; gap: 16px; }
.tn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; scroll-margin-top: 16px; }
.tn-card[hidden] { display: none; }
.tn-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 16px; }
.tn-card__head > div { min-width: 0; flex: 1 1 260px; }
.tn-card__k { font-size: 12px; font-weight: 700; color: var(--accent); }
.tn-card__head h2 { font-family: var(--f-display); font-size: 21px; color: var(--primary); line-height: 1.3; }
.tn-card__s { font-size: 13px; color: var(--muted); margin-top: 2px !important; }
.tn-sum { display: flex; flex-direction: column; align-items: flex-end; }
.tn-sum b { font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--primary); }
.tn-sum span { font-size: 12px; color: var(--muted); }
.tn-sum--ba { flex-direction: row; align-items: baseline; gap: 8px; }
.tn-sum--ba span { font-size: 18px; }
.tn-sum__b { font-family: var(--f-display); font-size: 24px !important; color: var(--muted) !important; text-decoration: line-through; text-decoration-color: var(--accent); }
.tn-sum--ba b { color: var(--accent); }
.tn-low { font-size: 13.5px; color: var(--danger); }
.tn-low b { font-weight: 700; }
.tn-cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .tn-cands { grid-template-columns: 1fr 1fr; } }
.tn-cand { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.tn-cand.is-run { border-color: var(--warn); background: #FFFBEB; }
.tn-cand.is-adopt { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tn-cand.is-drop { background: var(--surface-2); }
.tn-cand.is-drop .tn-cand__change { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.tn-cand__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tn-cand__no { font-family: var(--f-mono); font-size: 12.5px; font-weight: 700; }
.tn-kind { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 3px; background: var(--primary-soft); color: var(--primary); }
.tn-cand__target { font-size: 12.5px; color: var(--muted); }
.tn-cand__change { display: block; font-size: 12.5px; line-height: 1.6; padding: 8px 10px; background: var(--bg); border-radius: 4px; white-space: pre-wrap; }
.tn-cand__res { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-height: 32px; }
.tn-cand__delta { font-family: var(--f-mono); font-size: 13px; font-weight: 700; }
.tn-cand__side { font-size: 12.5px; color: var(--muted); }
.tn-verdict { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.tn-verdict b { font-size: 13.5px; color: var(--accent); }
.tn-cand.is-drop .tn-verdict b { color: var(--muted); }
.tn-wait { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tn-cand.is-run .tn-wait { color: var(--warn); }
.tn-diff pre { margin: 0; padding: 8px 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--f-mono); font-size: 12.5px; line-height: 1.75; overflow-x: auto; }
.tn-diff__l { display: block; white-space: pre; padding-right: 10px; }
.tn-diff__l i { display: inline-block; width: 26px; text-align: center; font-style: normal; color: var(--muted); }
.tn-diff__l.is-add { background: var(--ok-soft); }
.tn-diff__l.is-add i { color: var(--ok); font-weight: 700; }
.tn-diff__l.is-del { background: var(--accent-soft); color: var(--danger); }
.tn-diff__l.is-del i { color: var(--danger); font-weight: 700; }
.tn-approve { padding: 14px; border-radius: var(--radius); border: 1px dashed var(--primary); background: var(--bg); display: grid; gap: 10px; }
.tn-approve__q { font-size: 14px; }
.tn-approve__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-approved { display: flex; align-items: center; gap: 14px; }
.tn-approved p { display: flex; flex-direction: column; }
.tn-approved p b { color: var(--primary); font-size: 15px; }
.tn-approved p span { font-size: 13px; color: var(--muted); }
