/*
 * TCW visual v2 continuation layer.
 *
 * This file is intentionally opt-in. Nothing changes unless the page root has
 * data-tcw-visual="v2". It does not overwrite the live site's core brand
 * variables, remove every shadow, or mechanically rewrite component radii.
 */

html[data-tcw-visual="v2"] {
  color-scheme: light;

  /*
   * Chrome carries TCW's forest cast rather than a neutral black. The
   * first pass flattened it to #101312, which read as clinical and threw
   * away brand recognition for no gain. Green is still not decoration:
   * it is the ground, and it is the moment. It is not every border.
   */
  --tcw-v2-carbon: #0c1512;
  --tcw-v2-carbon-raised: #16241f;
  --tcw-v2-carbon-line: #24352e;

  /* Brand green, for structural moments: the mark, the active step,
     the path spine. Distinct from the data green below. */
  --tcw-v2-brand: #2a6348;
  /* Lifted from #3a8a62 to clear 4.5:1 against the rail ground,
     since it carries small mono labels and code chips. */
  --tcw-v2-brand-lift: #46a074;

  /* Warmed very slightly. Deliberately not #f4f1ea, which is the tell. */
  --tcw-v2-paper: #fbfaf7;
  --tcw-v2-inset: #f1f2ee;
  --tcw-v2-rule: #dcdfd9;
  --tcw-v2-rule-strong: #c7ccc5;
  --tcw-v2-text: #0f1a16;
  --tcw-v2-muted: #67716c;

  /* Data colours. Reserved for figures and deltas, nothing else. */
  --tcw-v2-verified: #1e7a4c;
  --tcw-v2-deduct: #a93b2c;
  --tcw-v2-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --tcw-v2-sans: "Public Sans", system-ui, -apple-system, sans-serif;
  --tcw-v2-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  --tcw-v2-panel-radius: 4px;
  background: var(--tcw-v2-paper);
}

html[data-tcw-visual="v2"][data-theme="dark"] {
  color-scheme: dark;
  --tcw-v2-carbon: #060d0b;
  --tcw-v2-carbon-raised: #11201b;
  --tcw-v2-carbon-line: #21332c;
  --tcw-v2-brand: #3a8a62;
  --tcw-v2-brand-lift: #4eb87e;
  --tcw-v2-paper: #0f1613;
  --tcw-v2-inset: #16211d;
  --tcw-v2-rule: #253630;
  --tcw-v2-rule-strong: #33473f;
  --tcw-v2-text: #e6ebe8;
  --tcw-v2-muted: #93a099;
  --tcw-v2-verified: #54c98a;
  --tcw-v2-deduct: #e4705c;
}

html[data-tcw-visual="v2"] :where(.tcw-v2-component, .tcw-v2-component *) {
  box-sizing: border-box;
}

html[data-tcw-visual="v2"] :where(
  .tcw-readout-mount,
  #tcw-project-record
) {
  font-family: var(--tcw-v2-sans);
  color: var(--tcw-v2-text);
  font-variant-numeric: tabular-nums slashed-zero;
}

html[data-tcw-visual="v2"] :where(
  .tcw-readout-mount,
  #tcw-project-record
) :focus-visible {
  outline: 2px solid var(--tcw-v2-verified);
  outline-offset: 2px;
}

/* Readout */
html[data-tcw-visual="v2"] .tcw-readout-mount {
  margin: 22px 0 8px;
}

html[data-tcw-visual="v2"] .tcw-readout-mount:empty,
html[data-tcw-visual="v2"] #tcw-project-record:empty {
  display: none;
  margin: 0;
}

html[data-tcw-visual="v2"] .tcw-sheet-out {
  overflow: hidden;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  background: var(--tcw-v2-inset);
}

html[data-tcw-visual="v2"] .tcw-readout {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--tcw-v2-rule);
  background: var(--tcw-v2-paper);
}

html[data-tcw-visual="v2"] .tcw-readout__key,
html[data-tcw-visual="v2"] .tcw-ledger__h,
html[data-tcw-visual="v2"] .tcw-working__h,
html[data-tcw-visual="v2"] .tcw-record__m,
html[data-tcw-visual="v2"] .tcw-fig__k,
html[data-tcw-visual="v2"] .tcw-next__k,
html[data-tcw-visual="v2"] .tcw-act__h {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

html[data-tcw-visual="v2"] .tcw-readout__key,
html[data-tcw-visual="v2"] .tcw-ledger__h,
html[data-tcw-visual="v2"] .tcw-record__m,
html[data-tcw-visual="v2"] .tcw-fig__k,
html[data-tcw-visual="v2"] .tcw-act__h {
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-figure {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}

html[data-tcw-visual="v2"] .tcw-figure__v {
  overflow-wrap: anywhere;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--tcw-v2-verified);
}

html[data-tcw-visual="v2"] .tcw-figure__u {
  font-family: var(--tcw-v2-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-figure__note {
  max-width: 64ch;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-ledger {
  padding: 14px 24px 16px;
  background: var(--tcw-v2-inset);
}

html[data-tcw-visual="v2"] .tcw-ledger__h {
  margin-bottom: 8px;
}

html[data-tcw-visual="v2"] .tcw-led {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 5px 0;
  font-size: 13px;
}

html[data-tcw-visual="v2"] .tcw-led > :last-child {
  font-family: var(--tcw-v2-mono);
}

html[data-tcw-visual="v2"] .tcw-led--neg > :last-child {
  color: var(--tcw-v2-deduct);
}

html[data-tcw-visual="v2"] .tcw-led__why {
  margin: -2px 0 3px;
  font-size: 11px;
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-led--total {
  margin-top: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--tcw-v2-rule);
  font-weight: 600;
}

html[data-tcw-visual="v2"] .tcw-led--total > :last-child {
  color: var(--tcw-v2-verified);
}

html[data-tcw-visual="v2"] .tcw-working {
  margin-top: 16px;
  padding: 16px 20px 18px;
  border: 1px solid var(--tcw-v2-carbon);
  border-radius: var(--tcw-v2-panel-radius);
  background: var(--tcw-v2-carbon);
  color: #fcfcfa;
}

html[data-tcw-visual="v2"][data-theme="dark"] .tcw-working {
  border-color: var(--tcw-v2-rule);
  background: var(--tcw-v2-carbon-raised);
}

html[data-tcw-visual="v2"] .tcw-working__h {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #8b948f;
}

html[data-tcw-visual="v2"] .tcw-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-family: var(--tcw-v2-mono);
  font-size: 13px;
  line-height: 1.7;
}

html[data-tcw-visual="v2"] .tcw-chain__op,
html[data-tcw-visual="v2"] .tcw-chain__f,
html[data-tcw-visual="v2"] .tcw-chain u {
  color: #9ba5a1;
}

html[data-tcw-visual="v2"] .tcw-chain__out {
  color: #54c98a;
  font-weight: 600;
}

html[data-tcw-visual="v2"] .tcw-chain u {
  margin-left: 3px;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-decoration: none;
}

html[data-tcw-visual="v2"] .tcw-working__src {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #2a302d;
  font-size: 11.5px;
  line-height: 1.55;
  color: #9ba5a1;
}

/* Project record */
html[data-tcw-visual="v2"] #tcw-project-record {
  margin-bottom: 26px;
}

html[data-tcw-visual="v2"] .tcw-record,
html[data-tcw-visual="v2"] .tcw-act {
  overflow: hidden;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  background: var(--tcw-v2-paper);
}

html[data-tcw-visual="v2"] .tcw-record {
  margin-bottom: 20px;
}

html[data-tcw-visual="v2"] .tcw-record__h {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--tcw-v2-rule);
}

html[data-tcw-visual="v2"] .tcw-record__t {
  font-family: var(--tcw-v2-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
}

html[data-tcw-visual="v2"] .tcw-record__m {
  margin-top: 5px;
}

html[data-tcw-visual="v2"] .tcw-figs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-tcw-visual="v2"] .tcw-fig {
  min-width: 0;
  padding: 15px 22px;
  border-right: 1px solid var(--tcw-v2-rule);
}

html[data-tcw-visual="v2"] .tcw-fig:last-child {
  border-right: 0;
}

html[data-tcw-visual="v2"] .tcw-fig__v {
  overflow-wrap: anywhere;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.08;
}

html[data-tcw-visual="v2"] .tcw-fig__v--ok {
  color: var(--tcw-v2-verified);
}

html[data-tcw-visual="v2"] .tcw-fig__v--none {
  font-size: 16px;
  font-weight: 500;
  color: var(--tcw-v2-rule-strong);
}

html[data-tcw-visual="v2"] .tcw-fig__u {
  margin-top: 5px;
  font-family: var(--tcw-v2-mono);
  font-size: 10px;
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 22px;
  background: var(--tcw-v2-carbon);
  color: #fcfcfa;
}

html[data-tcw-visual="v2"] .tcw-next__k {
  color: #8b948f;
}

html[data-tcw-visual="v2"] .tcw-next__n {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 600;
}

html[data-tcw-visual="v2"] .tcw-btn {
  padding: 8px 15px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  font-family: var(--tcw-v2-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

html[data-tcw-visual="v2"] .tcw-btn:hover {
  border-color: var(--tcw-v2-carbon);
}

html[data-tcw-visual="v2"] .tcw-btn--invert {
  border-color: #fcfcfa;
  background: #fcfcfa;
  color: #101312;
}

html[data-tcw-visual="v2"] .tcw-act__h {
  padding: 11px 20px;
  border-bottom: 1px solid var(--tcw-v2-rule);
  background: var(--tcw-v2-inset);
}

html[data-tcw-visual="v2"] .tcw-act__r {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  width: 100%;
  padding: 11px 20px;
  border: 0;
  border-bottom: 1px solid var(--tcw-v2-rule);
  background: none;
  color: var(--tcw-v2-text);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

html[data-tcw-visual="v2"] .tcw-act__r:last-child {
  border-bottom: 0;
}

html[data-tcw-visual="v2"] .tcw-act__r:hover {
  background: var(--tcw-v2-inset);
}

html[data-tcw-visual="v2"] .tcw-code {
  display: inline-block;
  min-width: 24px;
  padding: 2px 0;
  border: 1px solid var(--tcw-v2-rule-strong);
  border-radius: 2px;
  font-family: var(--tcw-v2-mono);
  font-size: 9px;
  text-align: center;
  color: var(--tcw-v2-muted);
}

html[data-tcw-visual="v2"] .tcw-act__l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-tcw-visual="v2"] .tcw-act__d {
  font-family: var(--tcw-v2-mono);
  font-size: 11px;
  color: var(--tcw-v2-muted);
}

@media (max-width: 760px) {
  html[data-tcw-visual="v2"] .tcw-figs {
    grid-template-columns: 1fr 1fr;
  }

  html[data-tcw-visual="v2"] .tcw-fig {
    border-bottom: 1px solid var(--tcw-v2-rule);
  }

  html[data-tcw-visual="v2"] .tcw-fig:nth-child(2n) {
    border-right: 0;
  }

  html[data-tcw-visual="v2"] .tcw-fig:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  html[data-tcw-visual="v2"] .tcw-readout,
  html[data-tcw-visual="v2"] .tcw-ledger {
    padding-right: 16px;
    padding-left: 16px;
  }

  html[data-tcw-visual="v2"] .tcw-working {
    padding: 14px 15px 16px;
  }

  html[data-tcw-visual="v2"] .tcw-chain {
    font-size: 12px;
  }

  html[data-tcw-visual="v2"] .tcw-act__r {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  html[data-tcw-visual="v2"] .tcw-act__d {
    grid-column: 2;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Shell: rail, topbar, report screen.
   Scoped like everything else. Nothing here applies unless the page has
   data-tcw-visual="v2", so the live app is unaffected.
   ══════════════════════════════════════════════════════════════════════ */

html[data-tcw-visual="v2"] .tcw-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  font-family: var(--tcw-v2-sans);
}

/* ── rail ───────────────────────────────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-rail {
  background: var(--tcw-v2-carbon);
  color: #c8cfcc;
  padding: 18px 0 40px;
  border-right: 1px solid transparent;
}
html[data-tcw-visual="v2"][data-theme="dark"] .tcw-rail {
  border-right-color: var(--tcw-v2-rule);
}
html[data-tcw-visual="v2"] .tcw-rail__mark {
  font-family: var(--tcw-v2-serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fcfcfa;
  padding: 0 18px 18px;
}
html[data-tcw-visual="v2"] .tcw-rail__mark span {
  display: block;
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6e7975;
  margin-top: 5px;
}

html[data-tcw-visual="v2"] .tcw-proj {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 20px;
  padding: 9px 11px;
  text-align: left;
  background: var(--tcw-v2-carbon-raised);
  border: 1px solid #2a302d;
  border-radius: var(--tcw-v2-panel-radius);
  cursor: pointer;
  font-family: inherit;
}
html[data-tcw-visual="v2"] .tcw-proj:hover { border-color: #3c443f; }
html[data-tcw-visual="v2"] .tcw-proj__k {
  display: block;
  font-family: var(--tcw-v2-mono);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6e7975;
}
html[data-tcw-visual="v2"] .tcw-proj__n {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fcfcfa;
  margin-top: 2px;
}

html[data-tcw-visual="v2"] .tcw-rail__h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 18px 7px;
  font-family: var(--tcw-v2-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5e6864;
}
html[data-tcw-visual="v2"] .tcw-rail__h em { font-style: normal; color: #8b948f; }

html[data-tcw-visual="v2"] .tcw-step,
html[data-tcw-visual="v2"] .tcw-tool {
  display: grid;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 18px;
  text-align: left;
  font-size: 13px;
  font-family: inherit;
  color: #a9b2ae;
  background: none;
  border: 0;
  cursor: pointer;
}
html[data-tcw-visual="v2"] .tcw-step { grid-template-columns: 20px minmax(0,1fr) 16px; }
html[data-tcw-visual="v2"] .tcw-tool { grid-template-columns: 26px minmax(0,1fr); }
html[data-tcw-visual="v2"] .tcw-step:hover,
html[data-tcw-visual="v2"] .tcw-tool:hover {
  background: var(--tcw-v2-carbon-raised);
  color: #fcfcfa;
}
html[data-tcw-visual="v2"] .tcw-step__n {
  font-family: var(--tcw-v2-mono);
  font-size: 10px;
  color: #5e6864;
}
html[data-tcw-visual="v2"] .tcw-step__m {
  font-family: var(--tcw-v2-mono);
  font-size: 11px;
  text-align: right;
}
html[data-tcw-visual="v2"] .tcw-step[data-state="done"] { color: #c8cfcc; }
html[data-tcw-visual="v2"] .tcw-step[data-state="done"] .tcw-step__m { color: var(--tcw-v2-verified); }
html[data-tcw-visual="v2"] .tcw-step[data-state="todo"] { color: #6e7975; }
html[data-tcw-visual="v2"] .tcw-step[data-state="todo"] .tcw-step__m { color: #333b37; }
html[data-tcw-visual="v2"] .tcw-step[aria-current="step"] {
  background: var(--tcw-v2-carbon-raised);
  color: #fcfcfa;
  font-weight: 600;
}
html[data-tcw-visual="v2"] .tcw-step[aria-current="step"] .tcw-step__n { color: #fcfcfa; }

/* Two letters instead of a pictogram: scans faster and holds at 14px. */
html[data-tcw-visual="v2"] .tcw-code {
  font-family: var(--tcw-v2-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #7e8884;
  border: 1px solid #2a302d;
  border-radius: 2px;
  padding: 2px 0;
  text-align: center;
}
html[data-tcw-visual="v2"] .tcw-tool:hover .tcw-code { border-color: #4a524e; color: #fcfcfa; }

/* ── topbar ─────────────────────────────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--tcw-v2-rule);
  flex-wrap: wrap;
}
html[data-tcw-visual="v2"] .tcw-crumb {
  font-family: var(--tcw-v2-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-crumb b { color: var(--tcw-v2-text); font-weight: 500; }
html[data-tcw-visual="v2"] .tcw-topbar__actions { display: flex; gap: 8px; align-items: center; }

html[data-tcw-visual="v2"] .tcw-main { min-width: 0; }
html[data-tcw-visual="v2"] .tcw-view { padding: 26px 30px 60px; max-width: 1140px; }

html[data-tcw-visual="v2"] .tcw-head { margin-bottom: 24px; }
html[data-tcw-visual="v2"] .tcw-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tcw-v2-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
  margin-bottom: 7px;
}
html[data-tcw-visual="v2"] .tcw-eyebrow i {
  flex: 1;
  height: 1px;
  background: var(--tcw-v2-rule);
}
html[data-tcw-visual="v2"] .tcw-h1 {
  font-family: var(--tcw-v2-serif);
  font-size: clamp(1.7rem, 3.4vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}
html[data-tcw-visual="v2"] .tcw-sub {
  color: var(--tcw-v2-muted);
  font-size: 14px;
  margin-top: 6px;
  max-width: 62ch;
}

/* ── input rail beside a readout ────────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-sheet {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  overflow: hidden;
}
html[data-tcw-visual="v2"] .tcw-inputs {
  border-right: 1px solid var(--tcw-v2-rule);
  padding: 16px 18px 20px;
}
html[data-tcw-visual="v2"] .tcw-inputs__h {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--tcw-v2-rule);
}
html[data-tcw-visual="v2"] .tcw-f { margin-bottom: 11px; }
html[data-tcw-visual="v2"] .tcw-f label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--tcw-v2-muted);
  margin-bottom: 3px;
}
html[data-tcw-visual="v2"] .tcw-f__row { display: flex; align-items: baseline; gap: 7px; }
html[data-tcw-visual="v2"] .tcw-f input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  font-family: var(--tcw-v2-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums slashed-zero;
}
html[data-tcw-visual="v2"] .tcw-f input:focus { outline: none; border-color: var(--tcw-v2-text); }
html[data-tcw-visual="v2"] .tcw-f__u {
  flex: none;
  width: 44px;
  font-family: var(--tcw-v2-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-f__src {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  color: var(--tcw-v2-muted);
  margin-top: 3px;
}

/* ── report screen ──────────────────────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}
html[data-tcw-visual="v2"] .tcw-contents {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  overflow: hidden;
}
html[data-tcw-visual="v2"] .tcw-contents__h {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
  padding: 11px 18px;
  background: var(--tcw-v2-inset);
  border-bottom: 1px solid var(--tcw-v2-rule);
}
html[data-tcw-visual="v2"] .tcw-contents__r {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 18px;
  border-bottom: 1px solid var(--tcw-v2-rule);
  font-size: 13.5px;
}
html[data-tcw-visual="v2"] .tcw-contents__r:last-child { border-bottom: 0; }
html[data-tcw-visual="v2"] .tcw-contents__n {
  font-family: var(--tcw-v2-mono);
  font-size: 10.5px;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-contents__s {
  font-family: var(--tcw-v2-mono);
  font-size: 11px;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-contents__r[data-state="ready"] .tcw-contents__s { color: var(--tcw-v2-verified); }
html[data-tcw-visual="v2"] .tcw-contents__r[data-state="pending"] { color: var(--tcw-v2-muted); }

/* The page preview: a real page shape, watermarked, not a hidden product. */
html[data-tcw-visual="v2"] .tcw-preview {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  background: var(--tcw-v2-inset);
  padding: 18px;
}
html[data-tcw-visual="v2"] .tcw-page {
  position: relative;
  aspect-ratio: 1 / 1.414;
  background: #fff;
  border: 1px solid var(--tcw-v2-rule);
  overflow: hidden;
  padding: 16px 15px;
}
html[data-tcw-visual="v2"] .tcw-page__band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62px;
  background: var(--tcw-v2-carbon);
}
html[data-tcw-visual="v2"] .tcw-page__title {
  position: relative;
  color: #fff;
  font-family: var(--tcw-v2-serif);
  font-size: 15px;
  margin-top: 22px;
}
html[data-tcw-visual="v2"] .tcw-page__kicker {
  position: relative;
  font-family: var(--tcw-v2-mono);
  font-size: 6.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #54c98a;
}
html[data-tcw-visual="v2"] .tcw-page__rule {
  height: 1px;
  background: var(--tcw-v2-rule);
  margin: 12px 0 9px;
}
html[data-tcw-visual="v2"] .tcw-page__line {
  height: 5px;
  background: var(--tcw-v2-inset);
  border-radius: 1px;
  margin-bottom: 6px;
}
html[data-tcw-visual="v2"] .tcw-page__mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--tcw-v2-sans);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 0.08em;
  color: rgba(16, 19, 18, 0.09);
  transform: rotate(-32deg);
  pointer-events: none;
}
html[data-tcw-visual="v2"] .tcw-unlock { margin-top: 14px; display: grid; gap: 8px; }
html[data-tcw-visual="v2"] .tcw-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  cursor: pointer;
  font-family: inherit;
  color: var(--tcw-v2-text);
  text-align: left;
}
html[data-tcw-visual="v2"] .tcw-price:hover { border-color: var(--tcw-v2-text); }
html[data-tcw-visual="v2"] .tcw-price b { font-size: 13px; font-weight: 500; }
html[data-tcw-visual="v2"] .tcw-price span {
  font-family: var(--tcw-v2-serif);
  font-size: 18px;
  color: var(--tcw-v2-verified);
}

@media (max-width: 900px) {
  html[data-tcw-visual="v2"] .tcw-shell { grid-template-columns: minmax(0, 1fr); }
  html[data-tcw-visual="v2"] .tcw-rail { display: none; }
  html[data-tcw-visual="v2"] .tcw-sheet { grid-template-columns: minmax(0, 1fr); }
  html[data-tcw-visual="v2"] .tcw-inputs { border-right: 0; border-bottom: 1px solid var(--tcw-v2-rule); }
  html[data-tcw-visual="v2"] .tcw-report { grid-template-columns: minmax(0, 1fr); }
  html[data-tcw-visual="v2"] .tcw-view { padding: 20px 18px 50px; }
  html[data-tcw-visual="v2"] .tcw-topbar { padding: 11px 18px; }
}

/* ══════════════════════════════════════════════════════════════════════
   Character.

   The first pass was disciplined to the point of being cold. These are
   the details that make it feel made rather than generated: a spine
   threading the path, the brand mark, an italic for the project's own
   name, and green returning as a moment. None of them add noise, and
   none of them make green mean something it does not.
   ══════════════════════════════════════════════════════════════════════ */

/* ── rail: depth, and a brand mark ──────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-rail {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tcw-v2-brand) 9%, var(--tcw-v2-carbon)) 0%,
      var(--tcw-v2-carbon) 42%);
  position: relative;
}
/* A hairline of brand green down the join, the width of a pencil line. */
html[data-tcw-visual="v2"] .tcw-rail::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: linear-gradient(180deg,
    var(--tcw-v2-brand) 0%,
    color-mix(in srgb, var(--tcw-v2-brand) 25%, transparent) 38%,
    transparent 100%);
}

html[data-tcw-visual="v2"] .tcw-rail__mark {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* ── the path, as a spine ───────────────────────────────────────────── */
/*
 * A continuous rule threading the numbered steps. It reads as one
 * sequence rather than eight separate buttons, and it is the piece that
 * makes the rail look designed rather than listed.
 */
html[data-tcw-visual="v2"] .tcw-path { position: relative; }
html[data-tcw-visual="v2"] .tcw-path::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--tcw-v2-carbon-line);
}
/* Filled as far as the work has got. */
html[data-tcw-visual="v2"] .tcw-path::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 12px;
  height: var(--tcw-path-done, 0%);
  width: 1px;
  background: var(--tcw-v2-brand-lift);
  transition: height .4s cubic-bezier(.2,.7,.3,1);
}
html[data-tcw-visual="v2"] .tcw-step { position: relative; }
html[data-tcw-visual="v2"] .tcw-step__n {
  position: relative;
  z-index: 1;
}
/* The step marker sits on the spine and covers it. */
html[data-tcw-visual="v2"] .tcw-step__n::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--tcw-v2-carbon);
  border: 1px solid var(--tcw-v2-carbon-line);
}
html[data-tcw-visual="v2"] .tcw-step[data-state="done"] .tcw-step__n::before {
  background: var(--tcw-v2-brand-lift);
  border-color: var(--tcw-v2-brand-lift);
}
html[data-tcw-visual="v2"] .tcw-step[aria-current="step"] .tcw-step__n::before {
  background: var(--tcw-v2-carbon);
  border-color: var(--tcw-v2-brand-lift);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tcw-v2-brand-lift) 22%, transparent);
}
html[data-tcw-visual="v2"] .tcw-step[aria-current="step"] {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--tcw-v2-brand) 22%, transparent) 0%,
    transparent 100%);
}
/* The number itself is hidden behind the marker; keep it for screen readers. */
html[data-tcw-visual="v2"] .tcw-step__n { color: transparent; }

/* ── project switcher: a little more presence ───────────────────────── */

html[data-tcw-visual="v2"] .tcw-proj {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tcw-v2-brand) 14%, var(--tcw-v2-carbon-raised)) 0%,
      var(--tcw-v2-carbon-raised) 100%);
  border-color: var(--tcw-v2-carbon-line);
}
html[data-tcw-visual="v2"] .tcw-proj:hover {
  border-color: color-mix(in srgb, var(--tcw-v2-brand-lift) 55%, transparent);
}

/* ── the project's own name, set in italic ──────────────────────────── */
/*
 * One editorial note in an otherwise technical interface. It is the only
 * thing on screen the user named themselves, so it is the one thing that
 * should not look machine-set.
 */
html[data-tcw-visual="v2"] .tcw-record__t {
  font-style: italic;
  letter-spacing: -0.005em;
}
html[data-tcw-visual="v2"] .tcw-h1 em {
  font-style: italic;
  color: var(--tcw-v2-brand);
}
html[data-tcw-visual="v2"][data-theme="dark"] .tcw-h1 em { color: var(--tcw-v2-brand-lift); }

/* ── record header: a brand hairline ────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-record {
  border-top: 2px solid var(--tcw-v2-brand);
}
html[data-tcw-visual="v2"] .tcw-record__h {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tcw-v2-brand) 5%, transparent) 0%,
      transparent 100%);
}

/* ── the working: give the signature some weight ────────────────────── */

html[data-tcw-visual="v2"] .tcw-working {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tcw-v2-brand) 12%, var(--tcw-v2-carbon)) 0%,
      var(--tcw-v2-carbon) 55%);
  border-color: var(--tcw-v2-carbon-line);
  position: relative;
}
html[data-tcw-visual="v2"] .tcw-working::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--tcw-v2-brand-lift) 0%,
    color-mix(in srgb, var(--tcw-v2-brand-lift) 30%, transparent) 55%,
    transparent 100%);
}
/* The final value earns a little glow. Nothing else on the page does. */
html[data-tcw-visual="v2"] .tcw-chain__out {
  color: #6fd89b;
  text-shadow: 0 0 18px color-mix(in srgb, #4eb87e 45%, transparent);
}

/* ── the readout figure: the one place green means "verified" ───────── */

html[data-tcw-visual="v2"] .tcw-readout {
  position: relative;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--tcw-v2-verified) 4%, var(--tcw-v2-paper)) 0%,
      var(--tcw-v2-paper) 70%);
}
html[data-tcw-visual="v2"] .tcw-figure__v {
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* ── eyebrow: a small brand tick ────────────────────────────────────── */

html[data-tcw-visual="v2"] .tcw-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 1px;
  background: var(--tcw-v2-brand);
  transform: rotate(45deg);
}
html[data-tcw-visual="v2"][data-theme="dark"] .tcw-eyebrow::before {
  background: var(--tcw-v2-brand-lift);
}

/* ── rail section headings get the same tick ────────────────────────── */

html[data-tcw-visual="v2"] .tcw-rail__h { position: relative; }
html[data-tcw-visual="v2"] .tcw-rail__h::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--tcw-v2-brand-lift) 70%, transparent);
  transform: rotate(45deg);
}

/* ── code chips pick up the brand on hover ──────────────────────────── */

html[data-tcw-visual="v2"] .tcw-tool:hover .tcw-code {
  border-color: var(--tcw-v2-brand-lift);
  color: var(--tcw-v2-brand-lift);
}

@media (prefers-reduced-motion: reduce) {
  html[data-tcw-visual="v2"] .tcw-path::after { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   Site chrome: a real top navigation, and a rail that stays put.
   ══════════════════════════════════════════════════════════════════════ */

html[data-tcw-visual="v2"] { --tcw-v2-topbar-h: 52px; }

/* ── site bar, spanning the full width above the shell ──────────────── */

html[data-tcw-visual="v2"] .tcw-sitebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--tcw-v2-topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--tcw-v2-carbon);
  border-bottom: 1px solid var(--tcw-v2-carbon-line);
  font-family: var(--tcw-v2-sans);
}
html[data-tcw-visual="v2"] .tcw-sitebar::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--tcw-v2-brand) 0%,
    color-mix(in srgb, var(--tcw-v2-brand) 20%, transparent) 46%,
    transparent 100%);
}

html[data-tcw-visual="v2"] .tcw-sitebar__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--tcw-v2-serif);
  font-size: 15.5px;
  font-weight: 500;
  color: #fcfcfa;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
html[data-tcw-visual="v2"] .tcw-sitebar__brand svg,
html[data-tcw-visual="v2"] .tcw-sitebar__brand img {
  flex: none;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

html[data-tcw-visual="v2"] .tcw-sitenav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
html[data-tcw-visual="v2"] .tcw-sitenav::-webkit-scrollbar { display: none; }
html[data-tcw-visual="v2"] .tcw-sitenav a {
  font-size: 13px;
  color: #a9b2ae;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
html[data-tcw-visual="v2"] .tcw-sitenav a:hover { color: #fcfcfa; background: var(--tcw-v2-carbon-raised); }
html[data-tcw-visual="v2"] .tcw-sitenav a[aria-current="page"] {
  color: #fcfcfa;
  background: var(--tcw-v2-carbon-raised);
  box-shadow: inset 0 -2px 0 var(--tcw-v2-brand-lift);
}

html[data-tcw-visual="v2"] .tcw-sitebar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
html[data-tcw-visual="v2"] .tcw-ghost {
  font-family: inherit;
  font-size: 12.5px;
  color: #c8cfcc;
  background: none;
  border: 1px solid var(--tcw-v2-carbon-line);
  border-radius: 2px;
  padding: 6px 11px;
  cursor: pointer;
  white-space: nowrap;
}
html[data-tcw-visual="v2"] .tcw-ghost:hover { border-color: var(--tcw-v2-brand-lift); color: #fcfcfa; }

html[data-tcw-visual="v2"] .tcw-mobile-menu {
  display: none;
  position: relative;
  font-family: var(--tcw-v2-sans);
}
html[data-tcw-visual="v2"] .tcw-mobile-menu summary {
  list-style: none;
  cursor: pointer;
  color: #fcfcfa;
  border: 1px solid var(--tcw-v2-carbon-line);
  padding: 7px 10px;
  font-size: 12px;
}
html[data-tcw-visual="v2"] .tcw-mobile-menu summary::-webkit-details-marker { display: none; }
html[data-tcw-visual="v2"] .tcw-mobile-menu nav {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(240px, calc(100vw - 28px));
  border: 1px solid var(--tcw-v2-carbon-line);
  background: var(--tcw-v2-carbon);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}
html[data-tcw-visual="v2"] .tcw-mobile-menu nav a {
  padding: 11px 13px;
  color: #c8cfcc;
  text-decoration: none;
  border-bottom: 1px solid var(--tcw-v2-carbon-line);
}
html[data-tcw-visual="v2"] .tcw-mobile-menu nav a:last-child { border-bottom: 0; }
html[data-tcw-visual="v2"] .tcw-mobile-menu nav a:hover { color: #fcfcfa; }

html[data-tcw-visual="v2"] .tcw-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--tcw-v2-carbon-line);
  border-radius: 2px;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
html[data-tcw-visual="v2"] .tcw-account:hover { border-color: var(--tcw-v2-brand-lift); }
html[data-tcw-visual="v2"] .tcw-account__i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--tcw-v2-brand);
  color: #fcfcfa;
  font-size: 11px;
  font-weight: 600;
}
html[data-tcw-visual="v2"] .tcw-account__n {
  font-size: 12.5px;
  color: #c8cfcc;
  line-height: 1.15;
  text-align: left;
}
html[data-tcw-visual="v2"] .tcw-account__p {
  display: block;
  font-family: var(--tcw-v2-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tcw-v2-brand-lift);
}

/* ── sticky rail ────────────────────────────────────────────────────── */
/*
 * The rail carries the path, which is the thing a user is navigating by.
 * Scrolling a long calculator should not scroll it out of reach. It sticks
 * below the site bar and scrolls internally only when its own content
 * overflows.
 */
html[data-tcw-visual="v2"] .tcw-shell { align-items: start; }

html[data-tcw-visual="v2"] .tcw-rail {
  position: sticky;
  top: var(--tcw-v2-topbar-h);
  height: calc(100vh - var(--tcw-v2-topbar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--tcw-v2-carbon-line) transparent;
}
html[data-tcw-visual="v2"] .tcw-rail::-webkit-scrollbar { width: 8px; }
html[data-tcw-visual="v2"] .tcw-rail::-webkit-scrollbar-thumb {
  background: var(--tcw-v2-carbon-line);
  border-radius: 4px;
}
html[data-tcw-visual="v2"] .tcw-rail::-webkit-scrollbar-track { background: transparent; }

/* The switcher stays visible while the tool list scrolls beneath it. */
html[data-tcw-visual="v2"] .tcw-proj {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* The contextual bar sits under the site bar, inside the main column. */
html[data-tcw-visual="v2"] .tcw-topbar {
  position: sticky;
  top: var(--tcw-v2-topbar-h);
  z-index: 30;
  background: var(--tcw-v2-paper);
}

@media (max-width: 900px) {
  html[data-tcw-visual="v2"] .tcw-rail { position: static; height: auto; }
  html[data-tcw-visual="v2"] .tcw-sitenav { display: none; }
  html[data-tcw-visual="v2"] .tcw-mobile-menu { display: block; }
  html[data-tcw-visual="v2"] .tcw-account__n { display: none; }
}

@media (max-width: 640px) {
  html[data-tcw-visual="v2"] .tcw-sitebar {
    gap: 10px;
    padding-inline: 14px;
  }
  html[data-tcw-visual="v2"] .tcw-sitebar__right { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   Account and settings page.
   ══════════════════════════════════════════════════════════════════════ */

html[data-tcw-visual="v2"] .tcw-set-wrap { max-width: 780px; }

html[data-tcw-visual="v2"] .tcw-set {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  margin-bottom: 20px;
  background: var(--tcw-v2-paper);
  overflow: hidden;
}
html[data-tcw-visual="v2"] .tcw-set__h {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--tcw-v2-rule);
  background: var(--tcw-v2-inset);
}
html[data-tcw-visual="v2"] .tcw-set__t {
  font-family: var(--tcw-v2-serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0;
}
html[data-tcw-visual="v2"] .tcw-set__d {
  font-size: 13px;
  line-height: 1.55;
  color: var(--tcw-v2-muted);
  margin: 5px 0 0;
  max-width: 62ch;
}
html[data-tcw-visual="v2"] .tcw-set__body { padding: 18px 20px 20px; }
html[data-tcw-visual="v2"] .tcw-set__body--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 26px;
  align-items: start;
}
html[data-tcw-visual="v2"] .tcw-set__label {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
  margin-bottom: 8px;
}
html[data-tcw-visual="v2"] .tcw-set__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

html[data-tcw-visual="v2"] .tcw-field { display: block; margin-bottom: 13px; }
html[data-tcw-visual="v2"] .tcw-field > span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--tcw-v2-muted);
  margin-bottom: 4px;
}
html[data-tcw-visual="v2"] .tcw-field input[type="text"],
html[data-tcw-visual="v2"] .tcw-field input[type="email"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  font-family: var(--tcw-v2-sans);
  font-size: 14.5px;
}
html[data-tcw-visual="v2"] .tcw-field input:focus { outline: none; border-color: var(--tcw-v2-brand); }
html[data-tcw-visual="v2"] .tcw-field input[type="file"] {
  font-family: var(--tcw-v2-sans);
  font-size: 13px;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-field__note {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--tcw-v2-muted);
  margin: -6px 0 12px;
  max-width: 62ch;
}
html[data-tcw-visual="v2"] .tcw-field__note.is-ok { color: var(--tcw-v2-verified); }
html[data-tcw-visual="v2"] .tcw-field__note.is-bad { color: var(--tcw-v2-deduct); }

/* Identity that belongs to the auth provider is shown, not edited. */
html[data-tcw-visual="v2"] .tcw-readonly {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 11px 13px;
  background: var(--tcw-v2-inset);
  border-radius: 2px;
  margin: 4px 0 2px;
  flex-wrap: wrap;
}
html[data-tcw-visual="v2"] .tcw-readonly__k {
  font-family: var(--tcw-v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-readonly__v { font-size: 14px; }

html[data-tcw-visual="v2"] .tcw-choice { display: flex; gap: 6px; }
html[data-tcw-visual="v2"] .tcw-choice__o {
  font-family: var(--tcw-v2-sans);
  font-size: 13px;
  padding: 9px 18px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  cursor: pointer;
}
html[data-tcw-visual="v2"] .tcw-choice__o[aria-pressed="true"] {
  background: var(--tcw-v2-carbon);
  color: #fcfcfa;
  border-color: var(--tcw-v2-carbon);
}

/* Cover preview: the only place branding is visible before an export. */
html[data-tcw-visual="v2"] .tcw-brandcard {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
  aspect-ratio: 1 / 1.414;
  padding: 0 0 14px;
}
html[data-tcw-visual="v2"] .tcw-brandcard__band {
  height: 74px;
  background: var(--tcw-v2-carbon);
  display: grid;
  place-items: center;
  padding: 10px 14px;
  margin-bottom: 14px;
}
html[data-tcw-visual="v2"] .tcw-brandcard__logo {
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
}
html[data-tcw-visual="v2"] .tcw-brandcard__ph {
  font-family: var(--tcw-v2-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5e6864;
}
html[data-tcw-visual="v2"] .tcw-brandcard__k {
  font-family: var(--tcw-v2-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tcw-v2-brand);
  padding: 0 14px;
}
html[data-tcw-visual="v2"] .tcw-brandcard__t {
  font-family: var(--tcw-v2-serif);
  font-size: 17px;
  color: #0f1a16;
  padding: 4px 14px 0;
}
html[data-tcw-visual="v2"] .tcw-brandcard__m {
  font-size: 10.5px;
  color: #67716c;
  padding: 6px 14px 0;
}

@media (max-width: 720px) {
  html[data-tcw-visual="v2"] .tcw-set__body--split { grid-template-columns: minmax(0, 1fr); }
  html[data-tcw-visual="v2"] .tcw-set__actions .tcw-btn { flex: 1 1 auto; }
}

/* ══ report builder ═════════════════════════════════════════════════════ */

html[data-tcw-visual="v2"] .tcw-rb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 26px;
  align-items: start;
}
html[data-tcw-visual="v2"] .tcw-rb__main { display: grid; gap: 20px; }
html[data-tcw-visual="v2"] .tcw-rb__controls,
html[data-tcw-visual="v2"] .tcw-rb__evidence {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  padding: 16px 18px 18px;
  background: var(--tcw-v2-paper);
}
html[data-tcw-visual="v2"] .tcw-rb__controlgrid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 90px minmax(145px, 1fr);
  gap: 12px;
  margin-top: 14px;
}
html[data-tcw-visual="v2"] .tcw-rb__controlgrid .tcw-field:nth-child(5),
html[data-tcw-visual="v2"] .tcw-rb__controlgrid .tcw-field:nth-child(6) {
  grid-column: span 2;
}
html[data-tcw-visual="v2"] .tcw-rb__brand-override {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html[data-tcw-visual="v2"] .tcw-rb__section {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}
html[data-tcw-visual="v2"] .tcw-rb__section input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--tcw-v2-brand);
}
html[data-tcw-visual="v2"] .tcw-rb__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
html[data-tcw-visual="v2"] .tcw-rb__check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--tcw-v2-rule);
  font-size: 12px;
  color: var(--tcw-v2-text);
}
html[data-tcw-visual="v2"] .tcw-rb__check > span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--tcw-v2-inset);
  font-family: var(--tcw-v2-mono);
  font-size: 9px;
}
html[data-tcw-visual="v2"] .tcw-rb__check[data-state="ready"] > span {
  background: #e0f0e8;
  color: var(--tcw-v2-verified);
}
html[data-tcw-visual="v2"] .tcw-rb__check[data-state="missing"] > span {
  background: #fff2df;
  color: #8d5b11;
}
html[data-tcw-visual="v2"] .tcw-rb__conflicts {
  margin-top: 12px;
  padding: 11px 12px;
  border-left: 3px solid #b36a20;
  background: #fff8ec;
  color: #684414;
  font-size: 12px;
  line-height: 1.5;
}
html[data-tcw-visual="v2"] .tcw-rb__conflicts p { margin: 3px 0 0; }
html[data-tcw-visual="v2"] .tcw-rb__deliver {
  border: 1px solid var(--tcw-v2-rule);
  border-radius: var(--tcw-v2-panel-radius);
  padding: 16px 18px 18px;
  background: var(--tcw-v2-paper);
}
html[data-tcw-visual="v2"] .tcw-contents__h {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
html[data-tcw-visual="v2"] .tcw-contents__h span { color: var(--tcw-v2-muted); }
html[data-tcw-visual="v2"] .tcw-rb__history {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
html[data-tcw-visual="v2"] .tcw-rb__history-item {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid var(--tcw-v2-rule);
  border-radius: 2px;
  background: var(--tcw-v2-paper);
  color: var(--tcw-v2-text);
  text-align: left;
  cursor: pointer;
}
html[data-tcw-visual="v2"] .tcw-rb__history-item strong { font-size: 12px; }
html[data-tcw-visual="v2"] .tcw-rb__history-item span {
  font-family: var(--tcw-v2-mono);
  font-size: 9px;
  color: var(--tcw-v2-muted);
}
html[data-tcw-visual="v2"] .tcw-rb__history-item.is-active {
  border-color: var(--tcw-v2-brand);
  box-shadow: inset 3px 0 0 var(--tcw-v2-brand);
}

@media (max-width: 860px) {
  html[data-tcw-visual="v2"] .tcw-rb { grid-template-columns: minmax(0, 1fr); }
  html[data-tcw-visual="v2"] .tcw-rb__controlgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-tcw-visual="v2"] .tcw-rb__controlgrid .tcw-field { grid-column: auto; }
}

@media (max-width: 560px) {
  html[data-tcw-visual="v2"] .tcw-rb__controlgrid,
  html[data-tcw-visual="v2"] .tcw-rb__brand-override,
  html[data-tcw-visual="v2"] .tcw-rb__checks {
    grid-template-columns: minmax(0, 1fr);
  }
}
