/* ==========================================================================
   tx — single-tool pages: whois-lookup.html, dns-lookup.html and
   gst-calculator.html, plus the "one page per tool" band on tools.html.
   The tools themselves reuse the tl- components from domains-b.css; this file
   only adds the page furniture around them. Every class is prefixed tx-.
   ========================================================================== */

/* ---------- hero: shorter than the hub's, so the tool starts near the fold ---------- */
.tx-hero { padding-bottom: 48px; }
.tx-hero h1 { max-width: 13ch; }
.tx-hero .hero__ctas { margin-top: 28px; }

/* the console in the hero shows one annotated sample result (no cycling) */
.tx-console .tl-console__screens { min-height: 0; }
.tx-console .tl-crow span { display: inline-flex; align-items: center; }
.tx-n { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin-right: 9px; border-radius: 50%; font-family: var(--mono); font-size: 0.62rem; font-weight: 500; color: #0a1230; background: #9fb0ff; }
.tx-crow--hl { margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; background: rgba(242, 196, 109, 0.08); }
.tx-disagree { color: #f2c46d; background: rgba(242, 196, 109, 0.1); border-color: rgba(242, 196, 109, 0.28); }
.tx-console__note { margin-top: 12px; font-family: var(--font); font-size: 0.8rem; line-height: 1.5; color: rgba(255, 255, 255, 0.62); }
.tx-console__note b { font-weight: 560; color: #fff; }

/* ---------- the tool band ---------- */
.tx-nw { white-space: nowrap; }
.tx-tool { padding-top: 8px; }
.tx-deep { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.9rem; font-weight: 560; color: var(--accent); }
.tx-deep svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.tx-deep:hover svg { transform: translateX(3px); }

/* ---------- the guide: sticky contents on the left, reading column on the right ---------- */
.tx-guide-sec { padding-top: 40px; }
.tx-guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; align-items: start; }
.tx-guide__side { position: sticky; top: calc(var(--anchor-offset, 96px) + 16px); }
.tx-guide__side .toc { position: static; }
.tx-guide__card { margin-top: 28px; padding: 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.tx-guide__card strong { display: block; margin-bottom: 4px; font-size: 0.92rem; color: var(--ink); }
.tx-guide__card a { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 10px; font-weight: 560; color: var(--accent); }
.tx-guide__card a svg { width: 14px; height: 14px; }
.tx-prose { max-width: 760px; }
.tx-prose > h2:first-child { margin-top: 0; }
.tx-prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); text-wrap: balance; }
.tx-prose :is(p, li) { text-wrap: pretty; }
.tx-prose strong { font-weight: 600; color: var(--ink); }
.tx-prose .callout { margin: 1.4em 0; }
.tx-prose .callout p + p { margin-top: 0.5em; }
.tx-prose .callout p > strong:first-child { display: block; margin-bottom: 2px; }
.tx-prose pre.code { margin: 1.1em 0; }
.tx-prose ol.tx-steps { list-style: none; padding: 0; counter-reset: tx-step; display: grid; gap: 14px; }
.tx-steps > li { position: relative; padding-left: 44px; counter-increment: tx-step; }
.tx-steps > li + li { margin-top: 0; }
.tx-steps > li::before { content: counter(tx-step); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 0.76rem; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.tx-steps > li > strong:first-child { display: block; }

/* reference tables: fit the reading column; on phones every row becomes a small card */
.tx-table { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.tx-prose .tx-table table { margin: 0; font-size: 0.92rem; line-height: 1.5; }
.tx-prose .tx-table :is(th, td) { padding: 11px 16px; }
.tx-prose .tx-table thead th { background: var(--bg-2); font-family: var(--mono); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.tx-prose .tx-table tbody th { background: none; font-weight: 560; color: var(--ink); white-space: nowrap; }
.tx-prose .tx-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.tx-table td.tx-num, .tx-table th.tx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-table .tx-mono { font-family: var(--mono); font-size: 0.84rem; }
.tx-table code { white-space: nowrap; }
.tx-table tr.tx-total :is(th, td) { font-weight: 600; color: var(--ink); }

/* GST formulas */
.tx-formulas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tx-formula { padding: 18px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.tx-formula h3 { margin: 0 0 10px !important; font-size: 1rem !important; }
.tx-formula code { display: block; padding: 0; border: 0; background: none; font-size: 0.84rem; line-height: 1.7; color: var(--ink); white-space: normal; }
.tx-formula code + code { margin-top: 2px; }
.tx-formula p { margin-top: 10px; font-size: 0.86rem; line-height: 1.55; color: var(--muted); }

/* GSTIN state codes */
.tx-prose ul.tx-codes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.tx-prose .tx-codes li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 0.88rem; line-height: 1.3; color: var(--ink-2); }
.tx-codes b { flex: none; font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--accent); }

/* ---------- "the other tools" strip and the hub band on tools.html ---------- */
.tx-more-sec { padding-top: 0; }
.tx-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tx-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 6px 16px; padding: 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.3s var(--ease), box-shadow 0.3s; }
.tx-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.tx-card__icon { grid-row: span 3; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.tx-card__icon svg { width: 20px; height: 20px; }
.tx-card strong { font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink); }
.tx-card small { font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.tx-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.88rem; font-weight: 560; color: var(--accent); }
.tx-card__go svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.tx-card:hover .tx-card__go svg { transform: translateX(3px); }

.tx-hub { padding-top: 0; }
.tx-hub__head { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; max-width: none; margin-bottom: 32px; }
.tx-hub__head h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.tx-hub__head p { margin: 0 0 6px; max-width: 460px; justify-self: end; }
.tx-card ul { grid-column: 2; display: grid; gap: 6px; margin: 8px 0 2px; padding: 0; list-style: none; }
.tx-card li { display: flex; gap: 8px; font-size: 0.86rem; line-height: 1.45; color: var(--ink-2); }
.tx-card li svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--green); }
.tx-card ul + .tx-card__go { grid-column: 2; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tx-prose ul.tx-codes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tx-guide { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 980px) {
  /* one reading column: the contents list folds away, the help card moves under the text */
  .tx-guide { grid-template-columns: 1fr; gap: 0; }
  .tx-guide__side { position: static; order: 2; }
  .tx-guide__side .toc { display: none; }
  .tx-guide__card { max-width: 760px; margin-top: 36px; }
  .tx-hub__head { grid-template-columns: 1fr; gap: 14px; }
  .tx-hub__head p { justify-self: start; }
  .tx-more { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .tx-formulas { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tx-hero { padding-bottom: 24px; }
  .tx-hero h1 { max-width: none; }
  .tx-card { padding: 18px; gap: 4px 14px; }
  .tx-card__icon { width: 38px; height: 38px; }
  .tx-table thead { display: none; }
  .tx-table :is(table, tbody, tr) { display: block; }
  .tx-table tr { padding: 12px 16px 13px; }
  .tx-table tr + tr { border-top: 1px solid var(--line); }
  .tx-prose .tx-table :is(th, td) { display: block; padding: 0; border: 0; white-space: normal; text-align: left; }
  .tx-prose .tx-table tbody th { margin-bottom: 2px; white-space: normal; }
  .tx-prose .tx-table td { margin-top: 6px; overflow-wrap: anywhere; }
  .tx-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 1px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
  .tx-table code { white-space: normal; overflow-wrap: anywhere; }
  .tx-formula { padding: 16px; }
  /* figures tables: the row name on its own line, then the amounts side by side */
  .tx-table--nums tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
  .tx-prose .tx-table--nums tbody th { grid-column: 1 / -1; }
}
