/* LedgerPilot demo site: Tax tools (Agent B). Uses site.css tokens; works in every html[data-part]. */
.xt-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#xt-root { position: relative; }
.xt-mono, .xt-tape .xt-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---- tab index strip (ledger index tabs) */
.xt-tabs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line2); border-radius: var(--r); background: color-mix(in srgb, var(--card) 80%, transparent); overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.xt-tab { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: baseline; text-align: left; padding: 16px 18px 18px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; font: inherit; transition: background .25s, color .25s; min-width: 0; }
.xt-tab:last-of-type { border-right: 0; }
.xt-tab:hover { background: var(--brass-soft); }
.xt-tab-no { grid-row: span 2; font: 600 12px/1 var(--mono); color: var(--brass-ink); letter-spacing: .1em; padding-top: 3px; }
.xt-tab-t { font: 600 15px/1.2 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-tab-s { font-size: 12.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt-tab[aria-selected="true"] { background: var(--card); }
.xt-tab[aria-selected="true"] .xt-tab-t { color: var(--ink); }
.xt-tab-ink { position: absolute; left: 0; top: 0; height: 3px; width: var(--w, 0); transform: translate(var(--x, 0), var(--y, 0)); background: linear-gradient(90deg, var(--brass), color-mix(in srgb, var(--brass) 40%, var(--teal))); border-radius: 3px; transition: transform .45s var(--ease), width .45s var(--ease); pointer-events: none; }

/* ---- panels */
.xt-panel { outline: none; }
.xt-panel.in { animation: xt-in .5s var(--ease) both; }
@keyframes xt-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.xt-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 24px; align-items: start; }
.xt-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 26px 24px; box-shadow: var(--shadow-sm); min-width: 0; }
.xt-form { background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px); background-position: 0 66px; }
.xt-out { position: sticky; top: calc(var(--hdr-h) + 18px); overflow: hidden; }
.xt-out::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.xt-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 3px double var(--line2); }
.xt-card-h h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 0; }
.xt-folio, .xt-yr { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); text-align: right; }
.xt-yr { color: var(--brass-ink); }

/* ---- fields */
.xt-field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.xt-lab { font: 600 13px/1.25 var(--sans); color: var(--ink-2); }
.xt-hint { font-size: 12.5px; color: var(--mut); line-height: 1.45; }
.xt-hint a, .xt-note a { color: var(--brass-ink); }
.xt-inp { position: relative; display: flex; align-items: center; }
.xt-cur { position: absolute; left: 13px; font: 500 15px/1 var(--mono); color: var(--mut); pointer-events: none; }
.xt-inp input, .xt-field select { width: 100%; font: 500 16px/1.3 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--field); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px 12px 32px; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.xt-field select { font: 500 15px/1.3 var(--sans); padding-left: 14px; appearance: auto; }
.xt-inp input:focus, .xt-field select:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
.xt-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.xt-check, .xt-inline { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; margin-bottom: 14px; }
.xt-inline { display: inline-flex; margin: 0; font-size: 12.5px; color: var(--mut); align-items: center; }
.xt-check input, .xt-inline input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.xt-inline input { margin: 0; width: 15px; height: 15px; }
.xt-more { border: 1px dashed var(--line2); border-radius: 14px; padding: 4px 14px 2px; margin: 4px 0 16px; background: color-mix(in srgb, var(--card2) 70%, transparent); }
.xt-more > summary { cursor: pointer; padding: 10px 0; font: 600 13.5px/1.2 var(--sans); color: var(--brass-ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.xt-more > summary::-webkit-details-marker { display: none; }
.xt-more > summary::before { content: '+'; font: 600 15px/1 var(--mono); width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 5px; transition: transform .3s var(--ease); }
.xt-more[open] > summary::before { content: '\2212'; }

/* segmented + chips */
.xt-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); max-width: 100%; }
.xt-seg > button { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; font: 500 13px/1.15 var(--sans); color: var(--mut); cursor: pointer; text-align: center; }
.xt-seg > button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.xt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.xt-legacy { display: contents; }
.xt-legacy[hidden] { display: none; }
.xt-chip { min-width: 54px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); font: 600 14px/1 var(--mono); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.xt-chip:hover { border-color: var(--brass); transform: translateY(-1px); }
.xt-chip.old { border-style: dashed; }
.xt-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* buttons */
.xt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.xt-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 600 13.5px/1.1 var(--sans); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; text-decoration: none; }
.xt-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px var(--brass-soft); color: var(--bg); }
.xt-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.xt-btn.ghost:hover { border-color: var(--brass); color: var(--ink); }

/* ---- regime duel */
.xt-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 4px 0; position: relative; }
.xt-duel::before { content: ''; position: absolute; left: 0; right: 0; top: 34px; height: 150px; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 30px); pointer-events: none; }
.xt-col { position: relative; display: grid; justify-items: center; text-align: center; gap: 6px; }
.xt-col-n { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.xt-bar { position: relative; width: min(120px, 70%); height: 150px; display: flex; align-items: flex-end; border-bottom: 2px solid var(--ink-2); }
.xt-bar i { display: block; width: 100%; height: var(--h, 2%); border-radius: 10px 10px 2px 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--teal) 70%, #fff), var(--teal)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 60%, transparent); transition: height .8s var(--ease), background .4s; position: relative; overflow: hidden; }
.xt-bar i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0 9px, rgba(255, 255, 255, .22) 9px 10px); }
.xt-col[data-r="old"] .xt-bar i { background: linear-gradient(180deg, color-mix(in srgb, var(--plum) 60%, #fff), var(--plum)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plum) 60%, transparent); }
.xt-col.lower .xt-bar i { background: linear-gradient(180deg, color-mix(in srgb, var(--brass) 55%, #fff), var(--brass)); box-shadow: inset 0 0 0 1px var(--brass), 0 10px 30px -12px var(--brass); }
.xt-col.lower .xt-col-n::after { content: ' \00b7 lower'; color: var(--brass-ink); }
.xt-col-v { font: 600 clamp(24px, 3vw, 34px)/1.05 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.02em; }
.xt-col-s { font-size: 12.5px; color: var(--mut); min-height: 2.6em; }
.xt-verdict { margin: 16px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--brass-soft); color: var(--ink); font-size: 15px; }
.xt-verdict b { color: var(--brass-ink); }
.xt-be { font-size: 13.5px; color: var(--ink-2); margin: 8px 0 14px; }

/* calculator tape */
.xt-tape-wrap { margin-top: 6px; }
.xt-tape-wrap > .xt-seg { margin-bottom: 10px; }
.xt-tape { position: relative; background: var(--tape); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 18px; font-size: 13.5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.xt-tape::before, .xt-tape::after { content: ''; position: absolute; left: 0; right: 0; height: 8px; background: radial-gradient(circle at 5px 0, var(--card) 4px, transparent 4.5px) 0 0 / 12px 8px repeat-x; }
.xt-tape::before { top: -1px; }
.xt-tape::after { bottom: -1px; transform: scaleY(-1); }
.xt-tape-h { display: flex; justify-content: space-between; gap: 10px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); padding: 6px 0; border-bottom: 1px dashed var(--line2); margin-bottom: 4px; }
.xt-tape-h.sub { margin-top: 10px; }
.xt-tl { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--line); }
.xt-tl > span:first-child { color: var(--ink-2); }
.xt-tl.tot { border-bottom: 1px solid var(--line2); font-weight: 600; }
.xt-tl.grand { border-top: 1px solid var(--ink-2); border-bottom: 3px double var(--ink-2); font-weight: 700; font-size: 15px; padding: 8px 0; margin-top: 6px; }
.xt-sl { position: relative; display: grid; grid-template-columns: 1fr auto minmax(84px, auto); gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); color: var(--mut); align-items: baseline; }
.xt-sl.hit { color: var(--ink); }
.xt-sl-r { font-family: var(--mono); font-size: 12.5px; }
.xt-sl-p { font: 600 12px/1 var(--mono); padding: 3px 7px; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); }
.xt-sl .xt-mono { text-align: right; }
.xt-sl i { position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--f, 0) * 100%); background: var(--teal); transform-origin: left; animation: xt-fill .7s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes xt-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- HRA least-of-three */
.xt-three { display: grid; gap: 12px; }
.xt-t3 { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'l v' 'b b'; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); transition: border-color .3s, background .3s; }
.xt-t3 .l { grid-area: l; font-size: 14px; color: var(--ink-2); }
.xt-t3 .l em { font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 5px; margin-left: 6px; font-style: normal; display: inline-block; transform: rotate(-3deg); }
.xt-t3 .xt-mono { grid-area: v; font-weight: 600; }
.xt-t3 .b { grid-area: b; height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; }
.xt-t3 .b i { display: block; height: 100%; width: var(--w, 0); background: var(--ink-2); border-radius: 5px; transition: width .7s var(--ease); }
.xt-t3.least { border-color: var(--brass); background: var(--brass-soft); }
.xt-t3.least .b i { background: var(--brass); }
.xt-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 6px; }
.xt-sum > div { padding: 14px; border-radius: 12px; border: 1px solid var(--line2); display: grid; gap: 4px; }
.xt-sum span { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.xt-sum b { font: 600 clamp(20px, 2.4vw, 26px)/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.xt-sum > div:first-child b { color: var(--teal); }
.xt-note { font-size: 13px; color: var(--mut); line-height: 1.5; margin: 10px 0 0; }
.xt-big { font-size: 16px; margin: 0 0 14px; }

/* ---- advance-tax rail */
.xt-rail { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; display: grid; gap: 12px; }
.xt-rail::before { content: ''; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--line2), var(--line2)); border-radius: 2px; }
.xt-node { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'd a' 'c k'; gap: 3px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.xt-node::after { content: ''; position: absolute; left: -1px; bottom: -1px; height: 3px; width: calc(var(--p) * 1%); background: var(--teal); border-radius: 0 3px 3px 3px; opacity: .55; }
.xt-dot { position: absolute; left: -26px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink-2); }
.xt-nd { grid-area: d; font: 600 15px/1.2 var(--sans); }
.xt-nc { grid-area: c; font-size: 12.5px; color: var(--mut); }
.xt-na { grid-area: a; font-weight: 600; text-align: right; }
.xt-nk { grid-area: k; font: 600 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); text-align: right; }
.xt-node.past { opacity: .62; }
.xt-node.past .xt-dot { background: var(--ink-2); }
.xt-node.next { border-color: var(--brass); background: var(--brass-soft); }
.xt-node.next .xt-dot { border-color: var(--brass); background: var(--brass); box-shadow: 0 0 0 5px var(--brass-soft); }
.xt-node.next .xt-nk { color: var(--brass-ink); }

/* ---- GST */
.xt-stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); margin-bottom: 16px; background: var(--card2); }
.xt-stack i { display: block; flex: 1 1 0; min-width: 0; transition: flex-grow .7s var(--ease); }
.xt-stack .b { background: var(--ink-2); flex-grow: 1; }
.xt-stack .c { background: var(--teal); }
.xt-stack .s { background: var(--brass); }
.xt-stack.inter .c { background: var(--plum); }
.xt-dl { margin: 0; display: grid; }
.xt-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--line2); }
.xt-dl dt { color: var(--ink-2); }
.xt-dl dd { margin: 0; font-weight: 600; }
.xt-dl > div.grand { border-top: 1px solid var(--ink-2); border-bottom: 3px double var(--ink-2); font-size: 17px; margin-top: 4px; }

/* ---- TDS lookup */
.xt-tdsbar { margin-bottom: 18px; }
.xt-tds-ctl { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.xt-search { flex: 1 1 280px; position: relative; display: block; }
.xt-search input { width: 100%; font: 500 16px/1.3 var(--sans); color: var(--ink); background: var(--field); border: 1px solid var(--line2); border-radius: 12px; padding: 13px 14px 13px 40px; }
.xt-search::before { content: ''; position: absolute; left: 15px; top: 50%; width: 13px; height: 13px; border: 2px solid var(--mut); border-radius: 50%; transform: translateY(-62%); }
.xt-search::after { content: ''; position: absolute; left: 27px; top: 58%; width: 6px; height: 2px; background: var(--mut); transform: rotate(45deg); }
.xt-search input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft); }
.xt-tdsbar .xt-hint { margin: 10px 0 0; }
.xt-tds-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 14px; margin-bottom: 22px; }
.xt-tdsc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; display: grid; gap: 12px; box-shadow: var(--shadow-sm); animation: xt-in .4s var(--ease) both; min-width: 0; }
.xt-tdsc header { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'k r' 'h h'; gap: 6px 10px; align-items: center; }
.xt-kind { grid-area: k; font: 700 10px/1 var(--mono); letter-spacing: .14em; padding: 4px 7px; border-radius: 5px; background: var(--brass-soft); color: var(--brass-ink); }
.xt-tdsc[data-kind="TCS"] .xt-kind { background: color-mix(in srgb, var(--plum) 14%, transparent); color: var(--plum); }
.xt-tdsc h3 { grid-area: h; font: 600 15.5px/1.3 var(--sans); margin: 0; }
.xt-rate { grid-area: r; justify-self: end; font-weight: 700; font-size: 13.5px; color: var(--teal); text-align: right; }
.xt-x { display: grid; grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); align-items: stretch; gap: 6px; }
.xt-old, .xt-new { display: grid; gap: 2px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); min-width: 0; }
.xt-new { border-color: color-mix(in srgb, var(--teal) 40%, transparent); background: color-mix(in srgb, var(--teal) 7%, var(--card)); }
.xt-old .t, .xt-new .t { font: 600 9.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.xt-old b, .xt-new b { font: 600 14px/1.3 var(--mono); overflow-wrap: anywhere; }
.xt-old > span:last-child, .xt-new > span:last-child { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.xt-old b { color: var(--mut); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 60%, transparent); text-decoration-thickness: 1.5px; }
.xt-arrow { position: relative; align-self: center; height: 2px; background: var(--line2); }
.xt-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--line2); border-right: 0; }
.xt-tdsc footer { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); border-top: 1px dashed var(--line2); padding-top: 10px; }
.xt-tdsc footer em { font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); font-style: normal; margin-right: 6px; }
.xt-tdsc mark, .xt-tdsc mark { background: color-mix(in srgb, var(--brass) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.xt-empty { padding: 24px; text-align: center; color: var(--mut); border: 1px dashed var(--line2); border-radius: 14px; grid-column: 1 / -1; }
.xt-forms { margin-bottom: 8px; }
.xt-formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 0 26px; }
.xt-fm { display: grid; grid-template-columns: minmax(0, 1fr) 18px auto; grid-template-areas: 'o a n' 'w w w'; gap: 2px 8px; padding: 10px 0; border-bottom: 1px dotted var(--line2); align-items: baseline; }
.xt-fm .o { grid-area: o; font: 500 13px/1.3 var(--mono); color: var(--mut); }
.xt-fm .ar { grid-area: a; color: var(--brass-ink); }
.xt-fm .n { grid-area: n; font: 700 14px/1.3 var(--mono); color: var(--teal); }
.xt-fm .w { grid-area: w; font-size: 12.5px; color: var(--ink-2); }
.xt-notes { margin: 16px 0 8px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.xt-notes li { margin-bottom: 4px; }

/* disclaimer strip */
.xt-disc { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 12px; font-size: 13px; color: var(--mut); background: color-mix(in srgb, var(--card) 60%, transparent); }
.xt-disc a { color: var(--brass-ink); white-space: nowrap; }
.xt-disc-seal { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--brass); color: var(--brass-ink); display: grid; place-items: center; font: 700 11px/1 var(--serif); font-style: italic; }

/* ---- responsive */
@media (max-width: 1080px) {
  .xt-tabs { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scrollbar-width: thin; }
  .xt-tab-s { display: none; }
}
@media (max-width: 900px) {
  .xt-grid { grid-template-columns: minmax(0, 1fr); }
  .xt-out { position: relative; top: 0; }
}
@media (max-width: 640px) {
  .xt-tabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .xt-tab { flex: 0 0 auto; scroll-snap-align: start; padding: 13px 14px 15px; }
  .xt-card { padding: 20px 16px 18px; border-radius: var(--r); }
  .xt-row2 { grid-template-columns: minmax(0, 1fr); }
  .xt-duel { gap: 10px; }
  .xt-bar { height: 120px; }
  .xt-duel::before { height: 120px; }
  .xt-sl { grid-template-columns: 1fr auto; }
  .xt-sl .xt-mono { grid-column: 1 / -1; }
  .xt-seg > button { padding: 8px 10px; }
  .xt-x { grid-template-columns: minmax(0, 1fr); }
  .xt-arrow { width: 2px; height: 14px; justify-self: center; }
  .xt-arrow::after { right: -4px; top: auto; bottom: -3px; border: 5px solid transparent; border-top: 7px solid var(--line2); border-bottom: 0; }
  .xt-sum { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .xt-panel.in, .xt-tdsc, .xt-sl i { animation: none !important; }
  .xt-bar i, .xt-t3 .b i, .xt-stack i, .xt-tab-ink { transition: none !important; }
}

/* ---- print: only the active tool */
@media print {
  .xt-tabs, .xt-actions, .xt-tape-wrap > .xt-seg, .xt-more > summary::before { display: none !important; }
  .xt-panel[hidden] { display: none !important; }
  .xt-grid { grid-template-columns: 1fr 1fr; }
  .xt-card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .xt-out { position: static; }
  .xt-form { background: none; }
  .xt-disc { border-color: #999; }
  .phero ~ * .xt-panel, .xt-panel { animation: none !important; }
}

/* tighter join between the page hero and the module */
.sec.tight.x-tools-sec { padding-top: 6px; }

/* mobile live summary at the top of the regime form */
.xt-mini { display: none; }
@media (max-width: 900px) {
  .xt-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: -6px 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--brass-soft); color: var(--ink); text-decoration: none; font-size: 13px; }
  .xt-mini b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .xt-mini em { margin-left: auto; font-style: normal; color: var(--brass-ink); font-weight: 600; }
  .xt-out { scroll-margin-top: calc(var(--hdr-h) + 16px); }
}
@media print { .xt-mini { display: none !important; } }

/* print always on white paper, whatever the office-hours theme */
@media print {
  html[data-part] { color-scheme: light; --bg: #fff; --bg2: #f4f4f4; --card: #fff; --card2: #f7f7f7; --field: #fff; --tape: #fff; --ink: #000; --ink-2: #222; --mut: #555; --line: rgba(0, 0, 0, .14); --line2: rgba(0, 0, 0, .3); --rule: rgba(0, 0, 0, .06); --brass-ink: #6b4a10; --brass-soft: rgba(168, 121, 43, .12); --teal: #24676a; --shadow: none; --shadow-sm: none; }
}
