/* tools.css — zyentora.in/tools/ and /guides/ (Batch 4). Built on
   redesign-tokens.css + redesign-components.css + redesign-pages.css, like the
   other public pages; only what the tools and guides add. */
.tool-hero { padding-block: var(--space-l) var(--space-m); max-width: 760px; }
.tool-hero h1 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(32px, 6vw, 44px); line-height: var(--leading-display); letter-spacing: var(--tracking-hero); }
.tool-hero .lede { margin: 0; color: var(--color-text-secondary); font-size: 18px; line-height: var(--leading-body); }
.tool-layout { display: grid; gap: var(--space-m); padding-bottom: var(--space-l); }
@media (min-width: 900px) { .tool-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.tool-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-1); padding: var(--space-m); display: grid; gap: var(--space-s); min-width: 0;
}
.tool-card h2 { margin: 0; font-family: var(--font-display); font-size: 24px; }
.tool-form { display: grid; gap: 14px; }
.tool-form .tool-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
.tool-form label { display: grid; gap: 6px; font-weight: var(--weight-medium); font-size: var(--type-small); }
.tool-form label small { font-weight: var(--weight-regular); color: var(--color-text-secondary); }
.tool-form input, .tool-form select {
  min-height: 48px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-input);
  background: var(--color-surface); color: var(--color-text-primary); font: inherit; font-size: 16px; width: 100%; box-sizing: border-box;
}
.tool-form input:focus-visible, .tool-form select:focus-visible { outline: 2px solid var(--color-accent-dark); outline-offset: 1px; }
.tool-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-button); background: var(--color-background); border: 0; margin: 0; }
.tool-seg legend { padding: 0 0 6px; font-weight: var(--weight-medium); font-size: var(--type-small); }
.tool-seg label { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; cursor: pointer; font-weight: var(--weight-medium); }
.tool-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tool-seg label:has(input:checked) { background: var(--color-surface); box-shadow: var(--shadow-1); }
.tool-seg label:has(input:focus-visible) { outline: 2px solid var(--color-accent-dark); }
.tool-out { display: grid; gap: var(--space-s); min-width: 0; }
.tool-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tool-stat { padding: 14px; border-radius: var(--radius-input); background: var(--color-background); min-width: 0; }
.tool-stat-label { margin: 0; font-size: var(--type-label); color: var(--color-text-secondary); }
/* Numbers never break in the middle (₹2,68,62,716 on one line). */
.tool-stat-value { margin: 4px 0 0; font-size: 22px; font-weight: var(--weight-semibold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool-stat-note { margin: 2px 0 0; font-size: var(--type-label); color: var(--color-text-secondary); }
.tool-errors, .tool-warn { padding: 12px 14px; border-radius: var(--radius-input); font-size: var(--type-small); }
.tool-errors { background: rgba(184, 74, 58, 0.08); color: var(--color-error); }
.tool-warn { background: rgba(197, 139, 27, 0.12); color: var(--color-warning-text); }
.tool-errors p, .tool-warn p { margin: 0; }
.tool-errors p + p, .tool-warn p + p { margin-top: 6px; }
.tool-small { margin: 0; font-size: var(--type-small); color: var(--color-text-secondary); line-height: var(--leading-body); }
.tool-table-wrap { overflow-x: auto; }
.tool-table { width: 100%; border-collapse: collapse; font-size: var(--type-small); font-variant-numeric: tabular-nums; }
.tool-table caption { text-align: left; font-weight: var(--weight-semibold); padding-bottom: 6px; }
.tool-table th, .tool-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.tool-table th:first-child, .tool-table td:first-child { text-align: left; }
.tool-hooks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: hook; }
.tool-hooks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-input); background: var(--color-background); }
.tool-hook-type { grid-column: 1 / -1; font-size: var(--type-label); color: var(--color-accent-dark); font-weight: var(--weight-semibold); }
.tool-hook-text { font-size: 16px; line-height: 1.45; }
.tool-copy { min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text-primary); font: inherit; font-size: var(--type-small); cursor: pointer; }
.tool-copy:focus-visible, .tool-more:focus-visible { outline: 2px solid var(--color-accent-dark); outline-offset: 2px; }
.tool-more { justify-self: start; }
.tool-cta { display: grid; gap: 10px; padding: var(--space-m); border-radius: var(--radius-card); background: var(--color-dark-band); color: #fff; }
.tool-cta h2 { margin: 0; font-family: var(--font-display); font-size: 26px; }
.tool-cta p, .tool-prose .tool-cta p { margin: 0; color: rgba(255, 255, 255, 0.86); line-height: var(--leading-body); }
.tool-prose .tool-cta { margin-bottom: var(--space-m); }
.tool-prose .tool-cta h2 { margin: 0; color: #fff; }
.tool-cta .btn-primary { justify-self: start; background: #fff; color: #111; }
.tool-cta .btn-primary:hover { background: #f1ede6; }
.tool-prose { max-width: 760px; padding-bottom: var(--space-l); line-height: var(--leading-body); }
.tool-prose h2 { font-family: var(--font-display); font-size: 28px; margin: var(--space-l) 0 var(--space-xs); }
.tool-prose h3 { font-size: 18px; margin: var(--space-m) 0 6px; }
.tool-prose p, .tool-prose li { color: var(--color-text-primary); }
.tool-prose .formula { padding: 12px 14px; border-radius: var(--radius-input); background: var(--color-surface); border: 1px solid var(--color-border); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; overflow-x: auto; white-space: pre-wrap; }
.tool-disclaimer { font-size: var(--type-small); color: var(--color-text-secondary); }
.tool-grid { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0 0 var(--space-l); padding: 0; list-style: none; }
.tool-grid a { display: grid; gap: 6px; height: 100%; box-sizing: border-box; padding: var(--space-s); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-text-primary); text-decoration: none; }
.tool-grid a:hover { box-shadow: var(--shadow-2); }
.tool-grid a:focus-visible { outline: 2px solid var(--color-accent-dark); outline-offset: 2px; }
.tool-grid strong { font-size: 18px; }
.tool-grid span { color: var(--color-text-secondary); font-size: var(--type-small); line-height: var(--leading-body); }
/* Guides: comparison tables. */
.guide-table-wrap { overflow-x: auto; margin: var(--space-s) 0; }
.guide-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--type-small); background: var(--color-surface); }
.guide-table th, .guide-table td { padding: 10px 12px; border: 1px solid var(--color-border); text-align: left; vertical-align: top; line-height: 1.45; }
.guide-table thead th { background: var(--color-background); }
.guide-sources { font-size: var(--type-small); color: var(--color-text-secondary); }
.guide-sources a { color: inherit; overflow-wrap: anywhere; }
.guide-updated { font-size: var(--type-small); color: var(--color-text-secondary); }
