/* Carbon Footprint Visualizer — The New multi-locale workspace. 20260907a
 *
 * One vertical axis for the whole workspace. The input field bar and the preset row sit on
 * `repeat(4, minmax(0,1fr))` with a 10px gap; the metric row and the equivalents row use
 * the same four tracks with `span 2`, so every column boundary lines up inside each pane
 * at each breakpoint (ledger #42, 추가 필수 확인 #22).
 *
 * `.tn-related-links` and `.tn-source-links` are deliberately absent: the shared
 * fixed-partials CSS owns those for every `data-tn-fixed-partials` page.
 *
 * The element reset never touches `p` padding. The status row, the grade rule line and the
 * notice are paragraphs that own border, background and padding (추가 필수 확인 #3).
 */
.tn-cfv-page,
.tn-cfv-page * { box-sizing: border-box; }

.tn-cfv-page {
  --cfv-paper: #faf6ee;
  --cfv-wash: #f5efdf;
  --cfv-panel: #fffaf0;
  --cfv-ink: #1a1208;
  --cfv-muted: #5a4a30;
  --cfv-line: #b8a888;
  --cfv-soft-line: #ddd4be;
  --cfv-accent: #c44a00;
  --cfv-primary-bg: #1a1208;
  --cfv-primary-ink: #fff7e8;
  --cfv-secondary-bg: #ede6d4;
  --cfv-secondary-ink: #1a1208;
  --cfv-error-bg: #f7e3da;
  --cfv-error-ink: #7e2816;
  --cfv-error-line: #c7836e;
  --cfv-good-bg: #e3efe6;
  --cfv-good-ink: #235c3d;
  --cfv-good-line: #8fb79f;
  --cfv-warn-bg: #f6ecd8;
  --cfv-warn-ink: #7a5312;
  --cfv-warn-line: #c6a668;
  --cfv-track: #e7ddc7;
  --cfv-you: #c44a00;
  --cfv-ref: #8a7433;
  --cfv-target: #2f7d54;
  --cfv-tree: #4f6f3f;
  --cfv-tree-soft: #d9e2cf;
  --cfv-seg-1: #7a3b0c;
  --cfv-seg-2: #c44a00;
  --cfv-seg-3: #5d7a4a;
  --cfv-seg-4: #9a6a55;
  width: min(1180px, calc(100vw - 10px));
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.tn-cfv-page :where(ul, ol) { list-style: none; padding-left: 0; margin: 0; }
/* Kill list #1. `:where()` carries no specificity and does not match `li`, so a list added
   to the workspace later would still take the global `.entry-content` marker and padding.
   This rule is the one that actually holds. */
/* Measured, not assumed: with a probe list appended to the workspace the global
   `.entry-content` rule still resolved the `ul` to `square` with 32px of padding, so the
   reset has to carry `!important`. Scoped to `.tn-cfv-tool`, so the Article lists that the
   shared fixed-partials CSS owns are untouched. */
.tn-cfv-page .tn-cfv-tool :is(ul, ol, li) { list-style: none !important; list-style-type: none !important; padding-left: 0 !important; margin: 0 !important; }
.tn-cfv-page .tn-cfv-tool :is(code, pre, kbd, samp) { padding: 0; border: 0; border-radius: 0; background: none; background-color: transparent; color: inherit; -webkit-text-fill-color: inherit; font-family: inherit; }

.tn-cfv-tool {
  margin: 0 0 18px;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  background:
    linear-gradient(90deg, rgba(184, 168, 136, .13) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(0deg, rgba(184, 168, 136, .10) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--cfv-paper);
  border: 1px solid var(--cfv-line);
  padding: 12px;
  overflow: hidden;
  display: grid;
  row-gap: 10px;
  min-width: 0;
}

.tn-cfv-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.tn-cfv-pane {
  min-width: 0;
  display: grid;
  grid-template-rows: auto;
  align-content: start;
  row-gap: 12px;
  background: color-mix(in srgb, var(--cfv-panel) 92%, transparent);
  border: 1px solid var(--cfv-line);
  padding: 12px;
}

.tn-cfv-kicker {
  margin: 0;
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- input band */

/* Twelve tracks with every field spanning four: three fields per row. Four tracks per
   field is what the widest content actually needs — the grid-factor value beside its
   `kgCO2e/kWh` chip, a three-digit transit distance, `Híbrido enchufable` in the select —
   and three rows of four were measured clipping `110` in the transit fields. The field bar
   and the preset row keep the same twelve boundaries, so they share one vertical axis
   (ledger #42, 추가 필수 확인 #22/#43). */
.tn-cfv-fieldbar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.tn-cfv-field,
.tn-cfv-field--s4 { grid-column: span 4; }
/* The grid factor carries the longest unit chip on the page (`kgCO2e/kWh`), so at narrow
   viewports it takes the full row rather than half of it — at 360 a half row left the
   input 38px wide and clipped `0.417` (추가 필수 확인 #43). */
.tn-cfv-field--wide { grid-column: span 4; }

.tn-cfv-field {
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-content: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 800;
}

/* Label reset only. `:not(.tn-cfv-control)` matters: the control is also a direct span
   child, and at specificity (0,1,1) this rule would otherwise beat `.tn-cfv-control`
   (0,1,0) and strip its inner padding (추가 필수 확인 #3, ledger #48). */
.tn-cfv-field > span:not(.tn-cfv-control):not(.tn-cfv-select) { display: block; margin: 0; padding: 0; min-height: 30px; }

.tn-cfv-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  background: var(--cfv-panel);
  border: 1px solid var(--cfv-line);
}

.tn-cfv-control input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
  text-align: right;
  outline: 0;
}

.tn-cfv-control input::-webkit-outer-spin-button,
.tn-cfv-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tn-cfv-control input::placeholder,
.tn-cfv-control input::-webkit-input-placeholder { color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-weight: 400; opacity: .35; }
.tn-cfv-control:has(input:focus-visible) { outline: 2px solid var(--cfv-accent); outline-offset: -1px; }

.tn-cfv-control b {
  flex: 0 0 auto;
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  border-left: 1px solid var(--cfv-soft-line);
  border-bottom: 0;
  padding-left: 8px;
  white-space: nowrap;
}

/* The global shell resets span display; force the flex row so the unit suffix stays
   inside the control box instead of wrapping under the input (kill list #12/#13). */
.tn-cfv-page .tn-cfv-tool .tn-cfv-control { display: flex !important; align-items: center !important; min-width: 0 !important; }
.tn-cfv-page .tn-cfv-tool .tn-cfv-control input { flex: 1 1 auto; width: auto; }
.tn-cfv-page .tn-cfv-tool .tn-cfv-control b { flex: 0 0 auto; }

/* Native select keeps its accessibility and keyboard behaviour, but gets a visible
   chevron and the flat paper surface instead of the OS widget (ledger #33). */
.tn-cfv-select {
  position: relative;
  display: block;
  min-width: 0;
  height: 40px;
  background: var(--cfv-panel);
  border: 1px solid var(--cfv-line);
}

.tn-cfv-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 30px 0 10px;
  border: 0;
  background: transparent;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  outline: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tn-cfv-select::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--cfv-muted);
  border-bottom: 2px solid var(--cfv-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.tn-cfv-select:has(select:focus-visible) { outline: 2px solid var(--cfv-accent); outline-offset: -1px; }

.tn-cfv-quick { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tn-cfv-quick > * { grid-column: span 3; }

/* Preset labels are locale copy, so they are allowed to take a second line rather than
   being clipped mid-word. All four cells stretch together, so the row stays on one axis
   (추가 필수 확인 #24: no clipped-hidden node in the workspace). */
.tn-cfv-chip,
.tn-cfv-button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  height: auto;
  margin: 0;
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: center;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.tn-cfv-chip {
  border: 1px solid var(--cfv-soft-line);
  background: var(--cfv-wash);
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
}
.tn-cfv-chip[aria-pressed="true"] { background: var(--cfv-primary-bg); color: var(--cfv-primary-ink); -webkit-text-fill-color: var(--cfv-primary-ink); border-color: var(--cfv-primary-bg); }

.tn-cfv-button {
  border: 1px solid var(--cfv-line);
  background: var(--cfv-secondary-bg);
  color: var(--cfv-secondary-ink);
  -webkit-text-fill-color: var(--cfv-secondary-ink);
}

.tn-cfv-chip:focus-visible,
.tn-cfv-button:focus-visible,
.tn-cfv-mini:focus-visible { outline: 2px solid var(--cfv-accent); outline-offset: 2px; }

.tn-cfv-status {
  margin: 0;
  padding: 9px 11px;
  background: var(--cfv-wash);
  border: 1px solid var(--cfv-soft-line);
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 700;
}
.tn-cfv-status[data-tone="error"] { background: var(--cfv-error-bg); border-color: var(--cfv-error-line); color: var(--cfv-error-ink); -webkit-text-fill-color: var(--cfv-error-ink); }
.tn-cfv-status[data-tone="done"] { background: var(--cfv-good-bg); border-color: var(--cfv-good-line); color: var(--cfv-good-ink); -webkit-text-fill-color: var(--cfv-good-ink); }

/* ---------------------------------------------------------------- result */

.tn-cfv-verdict {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--cfv-line);
  background: var(--cfv-panel);
}

.tn-cfv-verdict-value {
  min-width: 0;
  margin: 0;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
  white-space: nowrap;
}

.tn-cfv-verdict-label {
  min-width: 0;
  margin: 0;
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

/* Grade badge. Four flat washes, all scheme tokens; no gradient, no emoji. */
.tn-cfv-grade {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--cfv-soft-line);
  background: var(--cfv-wash);
}
.tn-cfv-grade b {
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
}
.tn-cfv-grade i {
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 800;
  font-style: normal;
  letter-spacing: normal;
  white-space: nowrap;
}
.tn-cfv-grade[data-grade="A"] { background: var(--cfv-good-bg); border-color: var(--cfv-good-line); }
.tn-cfv-grade[data-grade="A"] :is(b, i) { color: var(--cfv-good-ink); -webkit-text-fill-color: var(--cfv-good-ink); }
.tn-cfv-grade[data-grade="B"] { background: var(--cfv-wash); border-color: var(--cfv-line); }
.tn-cfv-grade[data-grade="B"] :is(b, i) { color: var(--cfv-ink); -webkit-text-fill-color: var(--cfv-ink); }
.tn-cfv-grade[data-grade="C"] { background: var(--cfv-warn-bg); border-color: var(--cfv-warn-line); }
.tn-cfv-grade[data-grade="C"] :is(b, i) { color: var(--cfv-warn-ink); -webkit-text-fill-color: var(--cfv-warn-ink); }
.tn-cfv-grade[data-grade="D"] { background: var(--cfv-error-bg); border-color: var(--cfv-error-line); }
.tn-cfv-grade[data-grade="D"] :is(b, i) { color: var(--cfv-error-ink); -webkit-text-fill-color: var(--cfv-error-ink); }

.tn-cfv-rule {
  margin: 0;
  padding: 8px 11px;
  background: var(--cfv-wash);
  border: 1px solid var(--cfv-soft-line);
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 700;
}

.tn-cfv-mini {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--cfv-soft-line);
  background: var(--cfv-wash);
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
}
.tn-cfv-mini:disabled { opacity: .5; cursor: not-allowed; }

.tn-cfv-metrics,
.tn-cfv-equiv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; min-width: 0; margin: 0; }
.tn-cfv-metric,
.tn-cfv-equiv-card { grid-column: span 2; }

.tn-cfv-metric,
.tn-cfv-equiv-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--cfv-soft-line);
  background: var(--cfv-panel);
}
.tn-cfv-metric dt,
.tn-cfv-equiv-card dt { margin: 0; color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .04em; }
.tn-cfv-metric dd,
.tn-cfv-equiv-card dd {
  margin: 0;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}
.tn-cfv-metric small,
.tn-cfv-equiv-card small { color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-size: 11.5px; line-height: 1.4; font-weight: 600; }

.tn-cfv-equiv { display: grid; gap: 6px; min-width: 0; }

/* Breakdown: one stacked bar plus the same four items as rows. */
.tn-cfv-breakdown { display: grid; gap: 6px; min-width: 0; }
.tn-cfv-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tn-cfv-block-title { color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.tn-cfv-block-note { color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-size: 11.5px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }

.tn-cfv-bar { display: flex; width: 100%; height: 14px; border: 1px solid var(--cfv-soft-line); background: var(--cfv-track); overflow: hidden; }
.tn-cfv-bar span { display: block; height: 100%; width: 0; }
.tn-cfv-bar span[data-seg="transport"] { background: var(--cfv-seg-1); }
.tn-cfv-bar span[data-seg="home"] { background: var(--cfv-seg-2); }
.tn-cfv-bar span[data-seg="food"] { background: var(--cfv-seg-3); }
.tn-cfv-bar span[data-seg="delivery"] { background: var(--cfv-seg-4); }

.tn-cfv-rows { display: grid; gap: 0; border: 1px solid var(--cfv-soft-line); background: var(--cfv-panel); }
.tn-cfv-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) max-content 46px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--cfv-soft-line);
  min-width: 0;
}
.tn-cfv-row:last-child { border-bottom: 0; }
.tn-cfv-row i { display: block; width: 12px; height: 12px; border: 1px solid rgba(0, 0, 0, .18); }
.tn-cfv-row i[data-seg="transport"] { background: var(--cfv-seg-1); }
.tn-cfv-row i[data-seg="home"] { background: var(--cfv-seg-2); }
.tn-cfv-row i[data-seg="food"] { background: var(--cfv-seg-3); }
.tn-cfv-row i[data-seg="delivery"] { background: var(--cfv-seg-4); }
.tn-cfv-row span { min-width: 0; color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-cfv-row b,
.tn-cfv-row em {
  margin: 0;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
  font-style: normal;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
  white-space: nowrap;
}
.tn-cfv-row em { color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); text-align: right; }

/* ---------------------------------------------------------------- scale + forest */

.tn-cfv-scale,
.tn-cfv-forest { display: grid; gap: 6px; min-width: 0; }

.tn-cfv-scale-frame { width: 100%; min-width: 0; height: 104px; border: 1px solid var(--cfv-soft-line); background: var(--cfv-panel); }
.tn-cfv-forest-frame { width: 100%; min-width: 0; height: 168px; border: 1px solid var(--cfv-soft-line); background: var(--cfv-panel); }
.tn-cfv-scale-frame svg,
.tn-cfv-forest-frame svg { display: block; width: 100%; height: 100%; }

.tn-cfv-scale-frame .cfv-zone-a { fill: var(--cfv-good-bg); }
.tn-cfv-scale-frame .cfv-zone-b { fill: var(--cfv-wash); }
.tn-cfv-scale-frame .cfv-zone-c { fill: var(--cfv-warn-bg); }
.tn-cfv-scale-frame .cfv-zone-d { fill: var(--cfv-error-bg); }
.tn-cfv-scale-frame .cfv-axis { stroke: var(--cfv-line); stroke-width: 1; }
.tn-cfv-scale-frame .cfv-tick { stroke: var(--cfv-soft-line); stroke-width: 1; }
.tn-cfv-scale-frame .cfv-target { stroke: var(--cfv-target); stroke-width: 2; }
.tn-cfv-scale-frame .cfv-national { stroke: var(--cfv-ref); stroke-width: 2; stroke-dasharray: 4 3; }
.tn-cfv-scale-frame .cfv-you-mark { fill: var(--cfv-you); }
.tn-cfv-scale-frame .cfv-label { fill: var(--cfv-muted); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11px; font-weight: 700; }
.tn-cfv-scale-frame .cfv-value { fill: var(--cfv-ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.tn-cfv-scale-frame .cfv-grade-label { fill: var(--cfv-muted); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 10.5px; font-weight: 800; }

.tn-cfv-forest-frame .cfv-tree { fill: var(--cfv-tree); }
.tn-cfv-forest-frame .cfv-tree-ghost { fill: var(--cfv-tree-soft); }
.tn-cfv-forest-frame .cfv-ground { stroke: var(--cfv-soft-line); stroke-width: 1; }
.tn-cfv-forest-frame .cfv-more { fill: var(--cfv-ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.tn-cfv-forest-frame .cfv-empty { fill: var(--cfv-muted); font-family: "Noto Sans KR", system-ui, sans-serif; font-size: 12.5px; font-weight: 700; }

.tn-cfv-notice {
  margin: 0;
  padding: 10px 12px;
  background: var(--cfv-wash);
  border: 1px solid var(--cfv-soft-line);
  color: var(--cfv-muted);
  -webkit-text-fill-color: var(--cfv-muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

/* Article-side worked-example table. Mobile releases the width lock so the table folds
   instead of clipping at the card edge (ledger #50, 추가 필수 확인 #24). */
.tn-cfv-page .tn-cfv-example-wrap { width: 100%; max-width: 100%; margin-top: 12px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--cfv-line); background: var(--cfv-panel); }
.tn-cfv-page .tn-cfv-example-wrap:focus-visible { outline: 2px solid var(--cfv-accent); outline-offset: 2px; }
.tn-cfv-page .tn-cfv-example-table { width: 100%; min-width: 420px; border-collapse: collapse; color: var(--cfv-ink); -webkit-text-fill-color: var(--cfv-ink); font-size: 13px; line-height: 1.45; }
.tn-cfv-page .tn-cfv-example-table th,
.tn-cfv-page .tn-cfv-example-table td { padding: 9px 10px; border-right: 1px solid var(--cfv-soft-line); border-bottom: 1px solid var(--cfv-soft-line); text-align: left; vertical-align: top; }
.tn-cfv-page .tn-cfv-example-table tr > :last-child { border-right: 0; }
.tn-cfv-page .tn-cfv-example-table tbody tr:last-child > * { border-bottom: 0; }
.tn-cfv-page .tn-cfv-example-table thead th { background: var(--cfv-primary-bg); color: var(--cfv-primary-ink); -webkit-text-fill-color: var(--cfv-primary-ink); font-weight: 800; }
.tn-cfv-page .tn-cfv-example-table tbody th { background: var(--cfv-wash); color: var(--cfv-ink); -webkit-text-fill-color: var(--cfv-ink); font-weight: 800; }
.tn-cfv-page .tn-cfv-example-table td { background: var(--cfv-panel); color: var(--cfv-muted); -webkit-text-fill-color: var(--cfv-muted); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }

/* ---------------------------------------------------------------- breakpoints */

@media (max-width: 980px) {
  .tn-cfv-workspace { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .tn-cfv-tool { padding: 8px; }
  .tn-cfv-pane { padding: 10px; }
  .tn-cfv-verdict { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tn-cfv-verdict-value { font-size: 25px; white-space: normal; }
  .tn-cfv-grade { grid-template-columns: auto minmax(0, 1fr); justify-content: start; }
  .tn-cfv-grade i { white-space: normal; }
  .tn-cfv-mini { width: 100%; }
  .tn-cfv-block-head .tn-cfv-mini { width: auto; }
  .tn-cfv-scale-frame { height: 118px; }
  .tn-cfv-forest-frame { height: 150px; }
}

/* The field bar, the preset row, the metric row and the equivalents row keep the same
   track count at every breakpoint so the vertical column axis stays aligned (ledger #42). */
@media (max-width: 560px) {
  .tn-cfv-metrics,
  .tn-cfv-equiv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-cfv-field,
  .tn-cfv-field--s4 { grid-column: span 6; }
  .tn-cfv-field--wide { grid-column: span 12; }
  .tn-cfv-quick > * { grid-column: span 6; }
  .tn-cfv-metric,
  .tn-cfv-equiv-card { grid-column: span 1; }
  .tn-cfv-row { grid-template-columns: 12px minmax(0, 1fr) max-content 42px; gap: 6px; }
  .tn-cfv-field > span:not(.tn-cfv-control):not(.tn-cfv-select) { min-height: 45px; }
  .tn-cfv-page .tn-cfv-example-table { min-width: 0; }
  .tn-cfv-page .tn-cfv-example-table :is(th, td) { white-space: normal; overflow-wrap: anywhere; word-break: keep-all; }
}

@media (max-width: 420px) {
  .tn-cfv-control input { font-size: 15px; }
  .tn-cfv-select select { font-size: 12.5px; }
  .tn-cfv-metric dd,
  .tn-cfv-equiv-card dd { font-size: 15px; }
}

/* ---------------------------------------------------------------- schemes */

body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-cfv-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-cfv-page {
  --cfv-paper: #201811;
  --cfv-wash: #2b2119;
  --cfv-panel: #241c15;
  --cfv-ink: #f7ecd8;
  --cfv-muted: #d3c2a4;
  --cfv-line: #6f5d40;
  --cfv-soft-line: #4c3f2c;
  --cfv-accent: #ff8a3d;
  --cfv-primary-bg: #3d2f1e;
  --cfv-primary-ink: #ffe9c6;
  --cfv-secondary-bg: #33281c;
  --cfv-secondary-ink: #f7ecd8;
  --cfv-error-bg: #3a211c;
  --cfv-error-ink: #ffc2b3;
  --cfv-error-line: #854d40;
  --cfv-good-bg: #22301f;
  --cfv-good-ink: #b9e0c2;
  --cfv-good-line: #4e6b52;
  --cfv-warn-bg: #33281a;
  --cfv-warn-ink: #efd09a;
  --cfv-warn-line: #7a6238;
  --cfv-track: #3a2f21;
  --cfv-you: #ff9f5e;
  --cfv-ref: #c9ae63;
  --cfv-target: #7fc9a0;
  --cfv-tree: #8fb279;
  --cfv-tree-soft: #3a4531;
  --cfv-seg-1: #b8641f;
  --cfv-seg-2: #ff8a3d;
  --cfv-seg-3: #9dbb82;
  --cfv-seg-4: #d6a08a;
  color: var(--cfv-ink);
  -webkit-text-fill-color: var(--cfv-ink);
}

@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-cfv-page {
    --cfv-paper: #201811;
    --cfv-wash: #2b2119;
    --cfv-panel: #241c15;
    --cfv-ink: #f7ecd8;
    --cfv-muted: #d3c2a4;
    --cfv-line: #6f5d40;
    --cfv-soft-line: #4c3f2c;
    --cfv-accent: #ff8a3d;
    --cfv-primary-bg: #3d2f1e;
    --cfv-primary-ink: #ffe9c6;
    --cfv-secondary-bg: #33281c;
    --cfv-secondary-ink: #f7ecd8;
    --cfv-error-bg: #3a211c;
    --cfv-error-ink: #ffc2b3;
    --cfv-error-line: #854d40;
    --cfv-good-bg: #22301f;
    --cfv-good-ink: #b9e0c2;
    --cfv-good-line: #4e6b52;
    --cfv-warn-bg: #33281a;
    --cfv-warn-ink: #efd09a;
    --cfv-warn-line: #7a6238;
    --cfv-track: #3a2f21;
    --cfv-you: #ff9f5e;
    --cfv-ref: #c9ae63;
    --cfv-target: #7fc9a0;
    --cfv-tree: #8fb279;
    --cfv-tree-soft: #3a4531;
    --cfv-seg-1: #b8641f;
    --cfv-seg-2: #ff8a3d;
    --cfv-seg-3: #9dbb82;
    --cfv-seg-4: #d6a08a;
    color: var(--cfv-ink);
    -webkit-text-fill-color: var(--cfv-ink);
  }
}

body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-cfv-page :is(.tn-cfv-control input, .tn-cfv-select select),
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-cfv-page :is(.tn-cfv-control input, .tn-cfv-select select) { color: var(--cfv-ink); -webkit-text-fill-color: var(--cfv-ink); color-scheme: dark; }
@media (prefers-color-scheme: dark) { body[data-scheme="auto"] .tn-cfv-page :is(.tn-cfv-control input, .tn-cfv-select select) { color: var(--cfv-ink); -webkit-text-fill-color: var(--cfv-ink); color-scheme: dark; } }

/* The sitewide dark rule paints every `tn-`-prefixed node cream with !important. The
   surfaces below own a dark background, so the text token has to win back explicitly
   (kill list #15). */
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-cfv-page .tn-cfv-tool .tn-cfv-chip[aria-pressed="true"],
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-cfv-page .tn-cfv-tool .tn-cfv-chip[aria-pressed="true"],
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-l="dark"], [data-scheme="auto"][data-d="dark"]) .tn-cfv-page .tn-cfv-example-table thead th,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-cfv-page .tn-cfv-example-table thead th {
  color: var(--cfv-primary-ink) !important;
  -webkit-text-fill-color: var(--cfv-primary-ink) !important;
}

@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-cfv-page .tn-cfv-tool .tn-cfv-chip[aria-pressed="true"],
  body[data-scheme="auto"] .tn-cfv-page .tn-cfv-example-table thead th {
    color: var(--cfv-primary-ink) !important;
    -webkit-text-fill-color: var(--cfv-primary-ink) !important;
  }
}
