/* Free tools and quick estimates: /tools, /tools/<slug>, /estimates,
   /estimates/<slug>. Loaded last, after growth.css, site.css and pages.css,
   so it refines them. Prefixes: th- the tools hub, tb- the tool workbench,
   te- the estimates. Every colour is a token, except inside the always-dark
   video stages. Ids and classes that static/growth.js uses are untouched. */

/* ================================================================ shared */
/* A take with cuts in it (orange), and the same take after the cuts. */
.tcut { display: flex; gap: 3px; height: 1rem; }
.tcut i { flex: 2 1 0; border-radius: 3px; background: var(--border-strong); }
.tcut i.x { flex: 1 1 0; background: var(--cut); }
.tcut--one { width: 74%; }
.tcut--one i { background: var(--accent); }
.tcut--lg { height: 1.375rem; }
.th-more { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; font-weight: var(--font-medium); }

/* ============================================================ hub: hero */
.th-hero .phero__inner { max-width: 50rem; }
.th-search { max-width: 42rem; margin-top: var(--space-2); text-align: left; }
.th-search__box { position: relative; display: block; }
.th-search__box svg { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.th-search .s-input { padding-left: 2.75rem; }
.th-search .s-input, .th-search .s-select { height: 3.25rem; border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
@media (max-width: 559px) { .th-search .s-field--sm { flex: 1 1 100%; } }
.th-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-6); }
.th-meta .ticks { justify-content: center; }

/* While a search or a category is active, only the matching cards show. */
.th:has(#tool-search:not(:placeholder-shown)) :is(.th-pop, .th-mid),
.th:has(#tool-category option[value=""]:not(:checked)) :is(.th-pop, .th-mid) { display: none; }

/* ========================================================= hub: start here */
.th-pop__head { max-width: none; margin-bottom: var(--space-8); }
.th-jump { margin-top: var(--space-2); }
.th-jump .gchips a svg { flex: none; color: var(--accent-text); }
@media (max-width: 767px) {
  .th-jump { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); }
  .th-jump .gchips { flex-wrap: nowrap; overflow-x: auto; padding: 2px var(--gutter) var(--space-2); scrollbar-width: none; }
  .th-jump .gchips::-webkit-scrollbar { display: none; }
  .th-jump .gchips li { flex: none; }
  .th-jump .gchips a { white-space: nowrap; }
}
.th-feat { list-style: none; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .th-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .th-feat { gap: var(--space-3); } }
.th-fcard { display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--text);
  background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-xl);
  transition: border-color var(--duration-fast) var(--ease-default), transform var(--duration-base) var(--ease-default), box-shadow var(--duration-base) var(--ease-default); }
.th-fcard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.th-fcard:focus-visible { outline: var(--border-w-thick) solid var(--accent); outline-offset: 3px; border-radius: var(--radius-xl); }
.th-fcard__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); }
.th-fcard__title { display: flex; align-items: center; gap: var(--space-2); }
.th-fcard__icon { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-sm); background: var(--accent-subtle); color: var(--accent-text); }
.th-fcard h3 { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; }
.th-fcard__sub { font-size: var(--text-sm); line-height: 1.5; color: var(--text-muted); }
@media (max-width: 559px) {
  .th-fcard__body { padding: var(--space-3) var(--space-4) var(--space-4); }
  .th-fcard__icon { display: none; }
  .th-fcard h3 { font-size: var(--text-base); }
  .th-fcard__sub { display: none; }
}

/* The drawings: what each everyday tool gives back. */
.th-art { display: flex; align-items: center; justify-content: center; gap: var(--space-3); height: 7.5rem; padding: var(--space-4);
  background: var(--bg-subtle); border-bottom: var(--border-w) solid var(--border); overflow: hidden; color: var(--text-subtle); }
@media (max-width: 559px) { .th-art { height: 5.75rem; padding: var(--space-3); } }
.th-trim { position: relative; width: min(100%, 11rem); height: 2.5rem; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 13px, transparent 13px 16px); }
.th-trim__win { position: absolute; top: -5px; bottom: -5px; left: 30%; right: 24%; border: 2px solid var(--accent); border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); }
.th-trim__win::before, .th-trim__win::after { content: ""; position: absolute; top: 50%; width: 6px; height: 1.25rem; margin-top: -0.625rem; border-radius: 3px; background: var(--accent); }
.th-trim__win::before { left: -4px; }
.th-trim__win::after { right: -4px; }
.th-tx { display: flex; flex-direction: column; gap: 0.55rem; width: min(100%, 11.5rem); }
.th-tx > span { display: flex; align-items: center; gap: 0.5rem; }
.th-tx em { flex: none; font-style: normal; font-family: var(--font-mono); font-size: 0.625rem; color: var(--cut-text); }
.th-tx i { height: 0.5rem; width: 78%; border-radius: 3px; background: var(--border-strong); }
.th-tx > span:nth-child(2) i { width: 56%; }
.th-tx > span:nth-child(3) i { width: 68%; }
.th-cap { position: relative; display: flex; align-items: flex-end; justify-content: center; width: min(100%, 10rem); aspect-ratio: 16 / 9; padding-bottom: 0.45rem;
  border-radius: var(--radius-md); background: #1A232A; overflow: hidden; }
.th-cap::before { content: ""; position: absolute; left: 50%; top: 16%; width: 1.35rem; height: 1.35rem; margin-left: -0.675rem; border-radius: 50%; background: #34434D; }
.th-cap::after { content: ""; position: absolute; left: 50%; bottom: -1.4rem; width: 3.6rem; height: 3.2rem; margin-left: -1.8rem; border-radius: 48% 48% 0 0; background: #2A363F; }
.th-cap span { position: relative; z-index: 1; padding: 0.15em 0.5em; border-radius: 4px; background: rgba(10, 14, 17, 0.88); color: #fff; font-size: 0.6875rem; font-weight: var(--font-bold); white-space: nowrap; }
.th-cap em { font-style: normal; color: #9BB3FF; }
.th-sq { display: flex; flex-direction: column; gap: 0.6rem; width: min(100%, 11rem); }
.th-sq > span { display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: center; gap: 0.5rem; }
.th-sq small { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle); }
.th-sq i { display: block; height: 0.75rem; border-radius: 4px; background: var(--border-strong); }
.th-sq > span:last-child i { width: 38%; background: var(--accent); }
.th-fr { display: flex; align-items: center; gap: 0.75rem; }
.th-fr i { display: block; border: 2px solid var(--text-subtle); border-radius: 5px; }
.th-fr .w { width: 3.5rem; height: 2rem; }
.th-fr .s { width: 2.4rem; height: 2.4rem; }
.th-fr .t { width: 1.8rem; height: 3.15rem; border-color: var(--accent); background: var(--accent-subtle); }
.th-cv { display: flex; align-items: center; gap: 0.6rem; }
.th-cv b { padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); border: var(--border-w) solid var(--border-strong); background: var(--surface);
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--font-semibold); color: var(--text-muted); }
.th-cv b.on { background: var(--accent); border-color: transparent; color: var(--text-on-accent); }
.th-lv { display: flex; align-items: center; gap: 0.6rem; }
.th-lv > span { display: flex; align-items: center; gap: 3px; height: 2.75rem; }
.th-lv i { width: 3px; height: 50%; border-radius: 2px; background: var(--border-strong); }
.th-lv__in i:nth-child(3n) { height: 92%; }
.th-lv__in i:nth-child(3n+1) { height: 22%; }
.th-lv__in i:nth-child(4n) { height: 70%; }
.th-lv__out i { height: 56%; background: var(--accent); }
.th-lv__out i:nth-child(odd) { height: 48%; }
.th-pr { display: flex; flex-direction: column; gap: 0.5rem; width: min(100%, 11rem); padding: 0.75rem 0.8rem; border-radius: var(--radius-md); background: #0C1114; }
.th-pr i { display: block; height: 0.4rem; border-radius: 3px; background: rgba(255, 255, 255, 0.22); }
.th-pr i:nth-child(1) { width: 82%; }
.th-pr i:nth-child(3) { width: 90%; }
.th-pr i:nth-child(4) { width: 58%; }
.th-pr i.on { height: 0.55rem; background: #fff; box-shadow: -0.55rem 0 0 -0.12rem var(--tape-400); }

/* ============================================================ hub: bridge */
.th-bridge { flex-wrap: nowrap; gap: var(--space-8); }
.th-bridge__art { flex: none; display: flex; flex-direction: column; gap: 0.5rem; width: 9rem; }
.th-bridge__text { flex: 1 1 auto; min-width: 0; }
.th-bridge .s-btn { flex: none; }
@media (max-width: 1023px) { .th-bridge { gap: var(--space-6); } .th-bridge__art { display: none; } }
@media (max-width: 767px) {
  .th-bridge { flex-wrap: wrap; gap: var(--space-5); }
  .th-bridge .s-btn { width: 100%; }
}

/* ========================================================= hub: all tools */
.th-all__head { margin-bottom: var(--space-10); }
.th-all .growth-callout { margin-bottom: var(--space-8); }
.th-list { display: flex; flex-direction: column; gap: var(--space-12); }
.th-group { scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
.th-group:not(:has(.tool-card:not([hidden]))) { display: none; }
.th-group__head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: var(--border-w) solid var(--border); }
.th-group__icon { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md);
  background: var(--surface); border: var(--border-w) solid var(--border); color: var(--accent-text); }
.th-group h3 { display: flex; align-items: baseline; gap: 0.6rem; font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.15; }
.th-group h3 span { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--font-medium); letter-spacing: 0; color: var(--text-subtle); }
.th-group__head p { margin-top: 2px; font-size: var(--text-sm); color: var(--text-muted); }
.th-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .th-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } }
.th-grid .tool-card { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-content: start; gap: 2px var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); }
.th-grid .tool-card .growth-card__top { display: contents; }
.th-grid .tool-card .growth-card__icon { grid-row: span 2; }
.th-grid .tool-card h4 { align-self: center; font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--font-bold); line-height: 1.3; letter-spacing: -0.01em; color: var(--text-strong); }
.th-grid .tool-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--text-sm); line-height: 1.45; }
@media (max-width: 559px) { .th-grid .tool-card { padding: var(--space-3) var(--space-4); } .th-grid .tool-card p { -webkit-line-clamp: 1; } }
.th-none { padding: var(--space-10) var(--space-6); text-align: center; color: var(--text-muted); background: var(--surface);
  border: var(--border-w) dashed var(--border-strong); border-radius: var(--radius-xl); }

/* ===================================================== hub: estimates, templates */
.th-est__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 899px) { .th-est__grid { grid-template-columns: minmax(0, 1fr); } }
.th-est .growth-card__top h3, .tb-next .growth-card__top h3 { font-size: var(--text-base); line-height: 1.3; }
.th-res { flex-direction: row; align-items: flex-start; gap: var(--space-4); padding: var(--space-4); }
.th-res__cover { flex: none; width: 5.5rem; height: auto; aspect-ratio: 600 / 776; object-fit: cover; object-position: top;
  border-radius: var(--radius-sm); border: var(--border-w) solid var(--border); background: var(--bg-subtle); }
.th-res__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; align-self: stretch; }
.th-final__b { color: var(--ink-400); }
.th-final__p { color: var(--ink-300); }

/* ======================================================= tool: hero */
.tb-hero .phero__inner { max-width: 46rem; gap: var(--space-4); }
.tb-hero .ticks { margin-top: var(--space-1); }
.tb-sx { padding-top: 0; }

/* ======================================================= tool: workbench */
@media (min-width: 1024px) {
  .growth-workbench.tb { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: var(--space-6); }
  .tb .growth-results { position: static; align-self: stretch; }
  .tb-art { flex: 1 1 auto; max-height: 24rem; }
}
.tb-step, .growth-panel label.tb-step { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-3);
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--font-bold); letter-spacing: -0.01em; line-height: 1.25; color: var(--text-strong); }
.tb-step__n { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--accent); color: var(--text-on-accent); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--font-semibold); }
.tb-in fieldset > * + .tb-step, .tb-in fieldset > .growth-file-list + .tb-step { margin-top: var(--space-6); }
.tb-in .growth-fields { margin: 0; }
.tb-in .growth-actions { margin-top: var(--space-6); }
.tb-in .growth-actions .s-btn--primary { min-width: 11rem; }
/* Once there is a result, Download is the one solid button: the action
   button steps back to an outline until the next run. */
.tb:has(#tool-download:not([hidden])) #tool-submit { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  border-color: var(--border-strong); box-shadow: none; color: var(--text); }
.tb:has(#tool-download:not([hidden])) #tool-submit:hover { --btn-bg: var(--accent-subtle); --btn-fg: var(--text-strong); border-color: var(--accent); color: var(--text-strong); }
/* Selects get the same chevron as .s-select everywhere else. */
.tb select { appearance: none; -webkit-appearance: none; padding-right: var(--space-8); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b7c86' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-3) center; }
/* Caption files: the picker reads as a drop row, not a bare browser control. */
.tb #caption-file { min-height: 3.75rem; padding: var(--space-2); cursor: pointer; background: var(--bg-subtle); border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  font-size: var(--text-sm); color: var(--text-muted); }
.tb #caption-file:hover { border-color: var(--accent); }
.tb #caption-file::file-selector-button { min-height: 2.75rem; margin-right: var(--space-3); padding: 0 var(--space-4); border-radius: var(--radius-md);
  background: var(--surface); border: var(--border-w) solid var(--border-strong); color: var(--text); font-weight: var(--font-semibold); cursor: pointer; }
.tb-drop { justify-content: center; min-height: 12.5rem; gap: var(--space-2); }
.tb-drop__icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: var(--space-1); border-radius: 50%;
  background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.tb-drop .s-btn { margin-block: var(--space-1); }
.tb-drop .growth-note { max-width: 28rem; }
.tb-drop__limit { display: block; margin-top: 2px; font-weight: var(--font-medium); color: var(--text); }
.tb-files { list-style: none; padding: 0; counter-reset: f; display: flex; flex-direction: column; gap: var(--space-2); }
.tb-files li { counter-increment: f; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); background: var(--bg-subtle); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); }
.tb-files li + li { margin-top: 0; }
.tb-files:has(li + li) li::before { content: counter(f); flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--surface); border: var(--border-w) solid var(--border); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-muted); }
.tb-files li span { flex: 1 1 0; min-width: 9rem; margin: 0; font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--text-strong); }
.tb-files .s-btn { height: 2.75rem; min-height: 2.75rem; margin: 0; }
.tb-rec { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-lg);
  background: var(--bg-subtle); border: var(--border-w) dashed var(--border-strong); color: var(--text-muted); font-size: var(--text-sm); line-height: 1.5; }
.tb-rec__dot { flex: none; }
.tb-rec__dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--error); box-shadow: 0 0 0 6px var(--error-subtle); }
.tb-in:has(#record-preview:not([hidden])) .tb-rec { display: none; }
#record-preview { aspect-ratio: 16 / 9; object-fit: contain; background: #0C1114; border-radius: var(--radius-md); }
.tb-in #tool-upload-progress { appearance: none; -webkit-appearance: none; height: 0.5rem; border: 0; border-radius: var(--radius-full); overflow: hidden; background: var(--border); }
.tb-in #tool-upload-progress::-webkit-progress-bar { background: var(--border); }
.tb-in #tool-upload-progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-full); }
.tb-in #tool-upload-progress::-moz-progress-bar { background: var(--accent); }
.tb-in__foot { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--border-w) solid var(--border); }
.tb-in__foot .growth-note, .tb-in__foot .growth-private { margin: 0; padding: 0; border: 0; }

/* The result panel: a drawing of what comes back, then the real result. */
.tb-out { display: flex; flex-direction: column; gap: var(--space-4); }
.tb-out > *, .tb-out .growth-note { margin-top: 0; margin-bottom: 0; }
.tb-out__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.tb-out__head h2 { margin: 0; }
.tb-out #result-detail:empty, .tb-out #tool-output:empty { display: none; }
.tb-out #tool-another { align-self: flex-start; }
.tb-out #tool-download svg { width: 1.1rem; height: 1.1rem; }
.tb-out #tool-video-result { aspect-ratio: 16 / 9; object-fit: contain; background: #0C1114; }
.tb-out #tool-image-result { width: 100%; max-height: 30rem; object-fit: contain; background: var(--bg-subtle); border: var(--border-w) solid var(--border); }
.tb-out .growth-table-wrap { margin: 0; border: var(--border-w) solid var(--border); border-radius: var(--radius-lg); }
/* A check with nothing to flag returns a table with no rows: the status line says so. */
.tb-out .growth-table-wrap:has(tbody:empty) { display: none; }
.tb-out .growth-table tbody tr:last-child td { border-bottom: 0; }
.tb-out .growth-table td:last-child { font-weight: var(--font-semibold); color: var(--text-strong); }
.tb[data-engine="calculator"] .growth-table tbody tr:last-child td { font-weight: var(--font-normal); color: var(--text-muted); }
.tb-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); min-height: 13rem; padding: var(--space-6);
  border-radius: var(--radius-lg); background: var(--bg-subtle); border: var(--border-w) dashed var(--border-strong); }
.tb:has(#tool-download:not([hidden]), #tool-output:not(:empty), #caption-editor:not([hidden]), #tool-cancel:not([hidden]), #tool-text-result:not([hidden])) .tb-art { display: none; }
.tb-art__stage { position: relative; display: grid; place-items: center; width: min(100%, 18rem); aspect-ratio: 16 / 9; border-radius: var(--radius-md); background: #1A232A; }
.tb-art__play { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #0C1114; }
.tb-art__pr { width: min(100%, 16rem); gap: 0.7rem; padding: 1.1rem 1.2rem; }
.tb-art__tl { display: flex; gap: 3px; width: min(100%, 18rem); height: 0.9rem; }
.tb-art__tl i { flex: 1 1 0; border-radius: 3px; background: var(--border-strong); }
.tb-art__tl i.on { flex-grow: 1.7; background: var(--accent); }
.tb-art__wave { display: flex; align-items: center; gap: 3px; width: min(100%, 18rem); height: 4.5rem; }
.tb-art__wave i { flex: 1 1 0; height: 38%; border-radius: 2px; background: var(--border-strong); }
.tb-art__wave i:nth-child(3n) { height: 72%; }
.tb-art__wave i:nth-child(4n+1) { height: 22%; }
.tb-art__wave i:nth-child(5n) { height: 92%; }
.tb-art__wave i:nth-child(n+10):nth-child(-n+19) { background: var(--accent); }
.tb-art__lines { display: flex; flex-direction: column; gap: 0.7rem; width: min(100%, 18rem); }
.tb-art__lines > span { display: flex; align-items: center; gap: 0.7rem; }
.tb-art__lines em { flex: none; font-style: normal; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--cut-text); }
.tb-art__lines i { height: 0.55rem; width: 82%; border-radius: 3px; background: var(--border-strong); }
.tb-art__lines > span:nth-child(2) i { width: 64%; }
.tb-art__lines > span:nth-child(3) i { width: 74%; }
.tb-art__lines > span:nth-child(4) i { width: 48%; }
.tb-art__lines--draft { gap: 0.8rem; }
.tb-art__lines--draft > span:first-child i { width: 52%; height: 0.75rem; background: var(--text-subtle); }
.tb-art__lines--draft > span:nth-child(5) i { width: 70%; }
.tb-art__lines--cues em { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-xs); background: var(--surface); border: var(--border-w) solid var(--border); color: var(--text-subtle); }
.tb-art__img { position: relative; width: min(100%, 14rem); aspect-ratio: 4 / 3; border-radius: var(--radius-md); background: var(--surface); border: var(--border-w) solid var(--border); overflow: hidden; }
.tb-art__img::before { content: ""; position: absolute; top: 16%; right: 18%; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--cut-subtle); }
.tb-art__img i { position: absolute; inset: 32% 0 0 0; background: var(--accent-subtle); clip-path: polygon(0 100%, 32% 28%, 52% 62%, 70% 38%, 100% 100%); }
.tb-art__rows { display: flex; flex-direction: column; width: min(100%, 20rem); }
.tb-art__rows > span { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0.75rem 0; border-bottom: var(--border-w) solid var(--border); }
.tb-art__rows > span:last-child { border-bottom: 0; }
.tb-art__rows i { width: 46%; height: 0.5rem; border-radius: 3px; background: var(--border-strong); }
.tb-art__rows b { width: 24%; height: 0.75rem; border-radius: 3px; background: var(--accent); opacity: 0.85; }
.tb-art__rows > span:nth-child(2) i { width: 38%; }
.tb-art__rows > span:nth-child(3) b { width: 16%; }

/* The next step, shown once there is a result (or an error, for media). */
.tb-bridge { display: none; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3) var(--space-4); align-items: center;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--accent-subtle); border: var(--border-w) solid var(--accent-border); }
.tb:has(#tool-download:not([hidden])) .tb-bridge:not(.tb-bridge--limit) { display: grid; }
.tb:has(#tool-status.growth-error) .tb-bridge--limit { display: grid; }
/* "Compare sound" has nothing to compare until there is a result. */
.tb:not(:has(#tool-download:not([hidden]))) :is(label[for="audio-compare"], #audio-compare) { display: none; }
.tb-bridge__art { display: flex; flex-direction: column; gap: 0.4rem; width: 4.5rem; }
.tb-bridge__art .tcut { height: 0.7rem; }
.tb-bridge__text h3 { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; }
.tb-bridge__text p { margin-top: 2px; font-size: var(--text-sm); line-height: 1.5; color: var(--text-muted); }
.tb-bridge .s-btn { grid-column: 1 / -1; justify-self: start; }
.tb-bridge--limit { grid-template-columns: minmax(0, 1fr); background: var(--cut-subtle); border-color: color-mix(in srgb, var(--cut) 35%, transparent); }
@media (max-width: 479px) { .tb-bridge { grid-template-columns: minmax(0, 1fr); } .tb-bridge__art { display: none; } .tb-bridge .s-btn { justify-self: stretch; } }

/* ==================================================== tool: how and questions */
.tb-learn { display: grid; gap: var(--space-12); }
@media (min-width: 1024px) { .tb-learn { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: var(--space-16); align-items: start; } }
.tb-learn > div { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.tb-learn h2 { margin-bottom: var(--space-3); font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); }
.tb-how { gap: var(--space-3); }
.tb-how > li { align-items: center; padding: var(--space-4); background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-lg); }
.tb-how > li > span { display: flex; flex-direction: column; gap: 2px; }
.tb-how > li span span { font-size: var(--text-sm); }
.tb-learn .faq2 summary { font-size: var(--text-base); padding-block: var(--space-4); }
.tb-learn .faq2 details p { padding-bottom: var(--space-4); }

/* ============================================================ tool: next */
.tb-page .growth-group__head .s-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.tb-next .growth-card { gap: var(--space-2); }
/* Always four related tools: 4 across, 2 x 2 on small laptops and tablets. */
.tb-next { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1199px) { .tb-next { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) {
  .tb-next { gap: var(--space-2); grid-template-columns: minmax(0, 1fr); }
  .tb-next .growth-card { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 2px var(--space-3); padding: var(--space-3) var(--space-4); }
  .tb-next .growth-card__top { display: contents; }
  .tb-next .growth-card__icon { grid-row: span 2; }
  .tb-next .growth-card p { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .tb-art { min-height: 10rem; padding: var(--space-4); }
}

/* ============================================================ tool: band */
.tb-band { display: grid; gap: var(--space-6); align-items: center; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius-2xl); }
@media (min-width: 900px) { .tb-band { grid-template-columns: 11rem minmax(0, 1fr) auto; gap: var(--space-8); } }
.tb-band__art { display: flex; flex-direction: column; gap: 0.5rem; width: 11rem; max-width: 100%; }
.tb-band__art svg { align-self: center; transform: rotate(90deg); color: var(--text-subtle); }
.tb-band h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; }
.tb-band p { margin-top: var(--space-2); max-width: 40rem; color: var(--text-muted); line-height: 1.55; }
@media (max-width: 899px) { .tb-band__art { display: none; } }
@media (max-width: 479px) { .tb-band .s-btn { width: 100%; } }

/* ============================================================ estimates */
.te-hero .phero__inner { max-width: 46rem; gap: var(--space-4); }
.te-group .sx__head { margin-bottom: var(--space-8); }
.te-group .sx__head .s-h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.te-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Four across only where the answers fit on one line; 2 x 2 on small laptops and tablets. */
@media (max-width: 1199px) { .te-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .te-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); } }
.te-card { gap: var(--space-3); padding: var(--space-5); color: var(--text); }
.te-card:hover { color: var(--text); }
.te-card__top { display: flex; align-items: center; gap: var(--space-3); }
.te-card__top .card2__icon { width: 2.5rem; height: 2.5rem; }
.te-card h3 { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; }
.te-card p { font-size: var(--text-sm); line-height: 1.5; }
.te-ex { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--bg-subtle); border: var(--border-w) solid var(--border); }
.sx--alt .te-ex { background: var(--bg); }
.te-ex__in { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.04em; color: var(--text-subtle); }
.te-ex b { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; color: var(--text-strong); }
.te-card .card2__go { margin-top: 0; padding-top: 0; }
.te-card--plan .te-ex { border-style: dashed; }
@media (max-width: 559px) { .te-card p { display: none; } }

/* One estimate: the form and its answer side by side. */
.te-bench { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 900px) { .te-bench { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-6); } }
.te-form .tb-step { margin: 0; }
.te-form .tb-step__n svg { width: 0.875rem; height: 0.875rem; }
.te-private { display: flex; gap: var(--space-2); align-items: flex-start; margin: 0; padding-top: var(--space-4); border-top: var(--border-w) solid var(--border);
  font-size: var(--text-sm); line-height: 1.5; color: var(--text-muted); }
.te-private svg { flex: none; margin-top: 0.15rem; color: var(--success); }
.te-out { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; scroll-margin-top: calc(var(--header-h) + var(--space-6)); }
.te-answer { display: flex; flex-direction: column; gap: var(--space-4); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius-2xl); box-shadow: var(--shadow-md); clip-path: var(--cut-corner); }
.te-answer h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.05; }
.te-answer--error { border-color: var(--error); clip-path: none; box-shadow: none; background: var(--error-subtle); }
.te-answer--error h2 { font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem); }
.te-bar { height: 2rem; }
.te-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
.te-list li:last-child { border-bottom: 0; }
.te-list li > span { display: inline-flex; align-items: center; gap: var(--space-2); }
.te-list li > span::before { content: ""; flex: none; width: 0.625rem; height: 0.625rem; border-radius: 2px; background: var(--accent-subtle); box-shadow: inset 0 0 0 1px var(--accent-border); }
.te-list li:nth-child(even) > span::before { background: color-mix(in srgb, var(--accent-subtle) 60%, var(--accent) 22%); }
.te-lines { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); color: var(--text); }
.te-lines li { display: flex; gap: var(--space-3); line-height: 1.5; }
.te-lines svg { flex: none; margin-top: 0.2rem; color: var(--accent-text); }
.te-note { padding-top: var(--space-4); border-top: var(--border-w) solid var(--border); font-size: var(--text-sm); line-height: 1.55; color: var(--text-muted); }
.te-others__head { margin-bottom: var(--space-6); }
.te-others__head .s-h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.te-others a svg { color: var(--accent-text); }
