/* Book Reading Tracker — The New multi-locale workspace. 20260903d
 *
 * One vertical axis for the whole workspace: the field bar, the preset row, the metric
 * row and the chart all sit on `repeat(8, minmax(0,1fr))` with the same 10px gap, so the
 * column boundaries line up at every breakpoint (ledger #42, 추가 필수 확인 #22).
 *
 * `.tn-related-links` and `.tn-source-links` are intentionally absent: the shared
 * fixed-partials CSS owns those for every data-tn-fixed-partials page.
 *
 * The element reset below never touches `p` padding — several components in this file are
 * paragraphs that own border, background and padding (추가 필수 확인 #3).
 */
.tn-brt-page,
.tn-brt-page * { box-sizing: border-box; }

.tn-brt-page {
  --brt-paper: #faf6ee;
  --brt-wash: #f5efdf;
  --brt-panel: #fffaf0;
  --brt-ink: #1a1208;
  --brt-muted: #5a4a30;
  --brt-line: #b8a888;
  --brt-soft-line: #ddd4be;
  --brt-accent: #c44a00;
  --brt-primary-bg: #1a1208;
  --brt-primary-ink: #fff7e8;
  --brt-secondary-bg: #ede6d4;
  --brt-secondary-ink: #1a1208;
  --brt-error-bg: #f7e3da;
  --brt-error-ink: #7e2816;
  --brt-error-line: #c7836e;
  --brt-good-bg: #e3efe6;
  --brt-good-ink: #235c3d;
  --brt-good-line: #8fb79f;
  --brt-track: #e7ddc7;
  --brt-plot: #c44a00;
  --brt-plot-soft: rgba(196, 74, 0, .16);
  width: min(1180px, calc(100vw - 10px));
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.tn-brt-page :where(ul, ol) { list-style: none; padding-left: 0; margin: 0; }
.tn-brt-page .tn-brt-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-brt-tool {
  margin: 0 0 18px;
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-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(--brt-paper);
  border: 1px solid var(--brt-line);
  padding: 12px;
  overflow: hidden;
}

.tn-brt-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }

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

.tn-brt-kicker {
  margin: 0;
  color: var(--brt-muted);
  -webkit-text-fill-color: var(--brt-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 */

.tn-brt-fieldbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.tn-brt-field--total,
.tn-brt-field--current,
.tn-brt-field--start,
.tn-brt-field--pace,
.tn-brt-field--target { grid-column: span 2; }
.tn-brt-field--mode,
.tn-brt-field--days { grid-column: span 3; }

.tn-brt-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(--brt-muted);
  -webkit-text-fill-color: var(--brt-muted);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 800;
}

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

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

.tn-brt-control input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-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;
  outline: 0;
}

/* Numeric fields are right-aligned so the value sits next to its unit instead of being
   stranded at the opposite edge of a 274px control. The date field keeps its native
   left alignment because it has no unit suffix. */
.tn-brt-control input[inputmode] { text-align: right; }

.tn-brt-control input::-webkit-outer-spin-button,
.tn-brt-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tn-brt-control input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.tn-brt-control input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.tn-brt-control input::placeholder,
.tn-brt-control input::-webkit-input-placeholder { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-weight: 400; opacity: .35; }
.tn-brt-control:has(input:focus-visible) { outline: 2px solid var(--brt-accent); outline-offset: -1px; }

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

/* 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-brt-page .tn-brt-tool .tn-brt-control { display: flex !important; align-items: center !important; min-width: 0 !important; }
.tn-brt-page .tn-brt-tool .tn-brt-control input { flex: 1 1 auto; width: auto; }
.tn-brt-page .tn-brt-tool .tn-brt-control b { flex: 0 0 auto; }

.tn-brt-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  height: 40px;
  border: 1px solid var(--brt-line);
  overflow: hidden;
}

.tn-brt-seg button {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-right: 1px solid var(--brt-line);
  background: var(--brt-panel);
  color: var(--brt-muted);
  -webkit-text-fill-color: var(--brt-muted);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tn-brt-seg button:last-child { border-right: 0; }
.tn-brt-seg button[aria-pressed="true"] { background: var(--brt-primary-bg); color: var(--brt-primary-ink); -webkit-text-fill-color: var(--brt-primary-ink); }

/* Weekday toggles. Seven equal cells inside one 40px control row so the field keeps the
   same rhythm as every other control in the bar. */
.tn-brt-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  height: 40px;
  border: 1px solid var(--brt-line);
  overflow: hidden;
}

.tn-brt-days button {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-right: 1px solid var(--brt-soft-line);
  background: var(--brt-panel);
  color: var(--brt-muted);
  -webkit-text-fill-color: var(--brt-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tn-brt-days button:last-child { border-right: 0; }
.tn-brt-days button[aria-pressed="true"] { background: var(--brt-primary-bg); color: var(--brt-primary-ink); -webkit-text-fill-color: var(--brt-primary-ink); }

.tn-brt-button {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--brt-line);
  background: var(--brt-secondary-bg);
  color: var(--brt-secondary-ink);
  -webkit-text-fill-color: var(--brt-secondary-ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  outline: none;
}

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

.tn-brt-quick { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tn-brt-chip { grid-column: span 2; }
.tn-brt-quick .tn-brt-button { grid-column: span 2; }

.tn-brt-chip {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--brt-soft-line);
  background: var(--brt-wash);
  color: var(--brt-muted);
  -webkit-text-fill-color: var(--brt-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tn-brt-chip[aria-pressed="true"] { background: var(--brt-primary-bg); color: var(--brt-primary-ink); -webkit-text-fill-color: var(--brt-primary-ink); border-color: var(--brt-primary-bg); }

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

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

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

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

.tn-brt-mini {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--brt-soft-line);
  background: var(--brt-wash);
  color: var(--brt-muted);
  -webkit-text-fill-color: var(--brt-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-brt-mini:disabled { opacity: .5; cursor: not-allowed; }

.tn-brt-metrics { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; align-items: stretch; min-width: 0; }
.tn-brt-metric { grid-column: span 2; }
.tn-brt-metric {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--brt-soft-line);
  background: var(--brt-panel);
}
.tn-brt-metric dt { margin: 0; color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .04em; }
.tn-brt-metric dd {
  margin: 0;
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-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-brt-metric small { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 11.5px; line-height: 1.4; font-weight: 600; }

/* Progress strip. */
.tn-brt-progress { display: grid; gap: 6px; min-width: 0; }
.tn-brt-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tn-brt-progress-title { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.tn-brt-progress-value {
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
}
.tn-brt-progress-track { position: relative; height: 12px; background: var(--brt-track); border: 1px solid var(--brt-soft-line); overflow: hidden; }
.tn-brt-progress-fill { display: block; height: 100%; width: 0; background: var(--brt-accent); }

/* Cumulative plan chart. The frame renders on the empty first paint; only the plot line
   and the markers wait for input (추가 필수 확인 #10/#15). */
.tn-brt-chart { display: grid; gap: 6px; min-width: 0; }
.tn-brt-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tn-brt-chart-title { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.tn-brt-chart-note { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 11.5px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.tn-brt-chart-frame { width: 100%; min-width: 0; height: 170px; border: 1px solid var(--brt-soft-line); background: var(--brt-panel); }
.tn-brt-chart-frame svg { display: block; width: 100%; height: 100%; }
.tn-brt-chart-frame .brt-grid { stroke: var(--brt-soft-line); stroke-width: 1; }
.tn-brt-chart-frame .brt-axis { stroke: var(--brt-line); stroke-width: 1; }
.tn-brt-chart-frame .brt-area { fill: var(--brt-plot-soft); }
.tn-brt-chart-frame .brt-line { fill: none; stroke: var(--brt-plot); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tn-brt-chart-frame .brt-dot { fill: var(--brt-plot); }
.tn-brt-chart-frame .brt-label { fill: var(--brt-muted); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 10px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }

/* Checkpoint table. */
.tn-brt-schedule { display: grid; gap: 6px; min-width: 0; }
.tn-brt-schedule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tn-brt-schedule-title { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.tn-brt-schedule-note { color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 11.5px; font-weight: 700; }
.tn-brt-table-wrap { width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--brt-soft-line); background: var(--brt-panel); }
.tn-brt-schedule-table { width: 100%; border-collapse: collapse; color: var(--brt-ink); -webkit-text-fill-color: var(--brt-ink); font-size: 12.5px; line-height: 1.4; }
.tn-brt-schedule-table th,
.tn-brt-schedule-table td { padding: 7px 9px; border-right: 1px solid var(--brt-soft-line); border-bottom: 1px solid var(--brt-soft-line); text-align: left; vertical-align: top; }
.tn-brt-schedule-table tr > :last-child { border-right: 0; }
.tn-brt-schedule-table tbody tr:last-child > * { border-bottom: 0; }
.tn-brt-schedule-table thead th { background: var(--brt-primary-bg); color: var(--brt-primary-ink); -webkit-text-fill-color: var(--brt-primary-ink); font-weight: 800; white-space: nowrap; }
.tn-brt-schedule-table tbody th { background: var(--brt-wash); color: var(--brt-ink); -webkit-text-fill-color: var(--brt-ink); font-weight: 800; white-space: nowrap; }
.tn-brt-schedule-table td { background: var(--brt-panel); color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.tn-brt-schedule-table tbody tr[data-final="true"] td,
.tn-brt-schedule-table tbody tr[data-final="true"] th { background: var(--brt-wash); color: var(--brt-ink); -webkit-text-fill-color: var(--brt-ink); }
.tn-brt-schedule-empty { grid-column: 1 / -1; margin: 0; padding: 12px; color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-size: 12.5px; font-weight: 700; text-align: center; }

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

/* Article-side worked-example table. */
.tn-brt-page .tn-brt-example-wrap { width: 100%; max-width: 100%; margin-top: 12px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--brt-line); background: var(--brt-panel); }
.tn-brt-page .tn-brt-example-wrap:focus-visible { outline: 2px solid var(--brt-accent); outline-offset: 2px; }
.tn-brt-page .tn-brt-example-table { width: 100%; min-width: 460px; border-collapse: collapse; color: var(--brt-ink); -webkit-text-fill-color: var(--brt-ink); font-size: 13px; line-height: 1.45; }
.tn-brt-page .tn-brt-example-table th,
.tn-brt-page .tn-brt-example-table td { padding: 9px 10px; border-right: 1px solid var(--brt-soft-line); border-bottom: 1px solid var(--brt-soft-line); text-align: left; vertical-align: top; }
.tn-brt-page .tn-brt-example-table tr > :last-child { border-right: 0; }
.tn-brt-page .tn-brt-example-table tbody tr:last-child > * { border-bottom: 0; }
.tn-brt-page .tn-brt-example-table thead th { background: var(--brt-primary-bg); color: var(--brt-primary-ink); -webkit-text-fill-color: var(--brt-primary-ink); font-weight: 800; }
.tn-brt-page .tn-brt-example-table tbody th { background: var(--brt-wash); color: var(--brt-ink); -webkit-text-fill-color: var(--brt-ink); font-weight: 800; }
.tn-brt-page .tn-brt-example-table td { background: var(--brt-panel); color: var(--brt-muted); -webkit-text-fill-color: var(--brt-muted); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }

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

@media (max-width: 980px) {
  .tn-brt-fieldbar,
  .tn-brt-quick,
  .tn-brt-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tn-brt-field--total,
  .tn-brt-field--current,
  .tn-brt-field--start,
  .tn-brt-field--pace,
  .tn-brt-field--mode,
  .tn-brt-field--target { grid-column: span 2; }
  .tn-brt-field--days { grid-column: span 4; }
  .tn-brt-chip,
  .tn-brt-quick .tn-brt-button,
  .tn-brt-metric { grid-column: span 2; }
}

@media (max-width: 640px) {
  .tn-brt-tool { padding: 8px; }
  .tn-brt-pane { padding: 10px; }
  .tn-brt-verdict { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tn-brt-verdict-value { font-size: 26px; white-space: normal; }
  .tn-brt-mini { width: 100%; }
  .tn-brt-chart-frame { height: 150px; }
  .tn-brt-schedule-table { font-size: 12px; }
  .tn-brt-schedule-table th,
  .tn-brt-schedule-table td { padding: 6px 7px; }
}

/* The field bar, preset row and metric row keep the same track count at every breakpoint
   so the vertical column axis stays aligned (ledger #42). */
@media (max-width: 560px) {
  .tn-brt-fieldbar,
  .tn-brt-quick,
  .tn-brt-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-brt-field--total,
  .tn-brt-field--current,
  .tn-brt-field--start,
  .tn-brt-field--pace { grid-column: span 1; }
  .tn-brt-field--target,
  .tn-brt-field--mode,
  .tn-brt-field--days { grid-column: span 2; }
  .tn-brt-chip,
  .tn-brt-quick .tn-brt-button,
  .tn-brt-metric { grid-column: span 1; }
  .tn-brt-days button { font-size: 11px; padding: 0 1px; }

  /* The checkpoint table becomes a 2x2 card per row rather than a horizontally
     scrolling grid, so long locale column names (Indonesian is the widest) keep their
     meaning without a sideways swipe (ledger #36). */
  .tn-brt-schedule-table,
  .tn-brt-schedule-table tbody { display: block; }
  .tn-brt-schedule-table thead { display: none; }
  .tn-brt-schedule-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--brt-soft-line);
  }
  .tn-brt-schedule-table tbody tr:last-child { border-bottom: 0; }
  .tn-brt-schedule-table tbody th,
  .tn-brt-schedule-table tbody td {
    display: block;
    min-width: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 6px 8px;
    background: none;
    overflow-wrap: anywhere;
  }
  .tn-brt-schedule-table tbody :is(th, td)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--brt-muted);
    -webkit-text-fill-color: var(--brt-muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
  }
  .tn-brt-schedule-table tbody .tn-brt-schedule-empty::before { content: none; }
  .tn-brt-schedule-table tbody tr:has(.tn-brt-schedule-empty) { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .tn-brt-seg button { font-size: 11.5px; }
  .tn-brt-metric dd { font-size: 15px; }
  .tn-brt-control input { 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-brt-page,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-brt-page {
  --brt-paper: #201811;
  --brt-wash: #2b2119;
  --brt-panel: #241c15;
  --brt-ink: #f7ecd8;
  --brt-muted: #d3c2a4;
  --brt-line: #6f5d40;
  --brt-soft-line: #4c3f2c;
  --brt-accent: #ff8a3d;
  --brt-primary-bg: #3d2f1e;
  --brt-primary-ink: #ffe9c6;
  --brt-secondary-bg: #33281c;
  --brt-secondary-ink: #f7ecd8;
  --brt-error-bg: #3a211c;
  --brt-error-ink: #ffc2b3;
  --brt-error-line: #854d40;
  --brt-good-bg: #22301f;
  --brt-good-ink: #b9e0c2;
  --brt-good-line: #4e6b52;
  --brt-track: #3a2f21;
  --brt-plot: #ff9f5e;
  --brt-plot-soft: rgba(255, 159, 94, .18);
  color: var(--brt-ink);
  -webkit-text-fill-color: var(--brt-ink);
}

@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-brt-page {
    --brt-paper: #201811;
    --brt-wash: #2b2119;
    --brt-panel: #241c15;
    --brt-ink: #f7ecd8;
    --brt-muted: #d3c2a4;
    --brt-line: #6f5d40;
    --brt-soft-line: #4c3f2c;
    --brt-accent: #ff8a3d;
    --brt-primary-bg: #3d2f1e;
    --brt-primary-ink: #ffe9c6;
    --brt-secondary-bg: #33281c;
    --brt-secondary-ink: #f7ecd8;
    --brt-error-bg: #3a211c;
    --brt-error-ink: #ffc2b3;
    --brt-error-line: #854d40;
    --brt-good-bg: #22301f;
    --brt-good-ink: #b9e0c2;
    --brt-good-line: #4e6b52;
    --brt-track: #3a2f21;
    --brt-plot: #ff9f5e;
    --brt-plot-soft: rgba(255, 159, 94, .18);
    color: var(--brt-ink);
    -webkit-text-fill-color: var(--brt-ink);
  }
}

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

/* The sitewide dark rule paints every `tn-`-prefixed node cream with !important. The
   pressed states below own a dark surface, 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-brt-page .tn-brt-tool :is(.tn-brt-seg button[aria-pressed="true"], .tn-brt-days button[aria-pressed="true"], .tn-brt-chip[aria-pressed="true"]),
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-brt-page .tn-brt-tool :is(.tn-brt-seg button[aria-pressed="true"], .tn-brt-days button[aria-pressed="true"], .tn-brt-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-brt-page :is(.tn-brt-schedule-table thead th, .tn-brt-example-table thead th),
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-brt-page :is(.tn-brt-schedule-table thead th, .tn-brt-example-table thead th) {
  color: var(--brt-primary-ink) !important;
  -webkit-text-fill-color: var(--brt-primary-ink) !important;
}

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