.ts-tool { max-width: 52rem; margin-inline: auto; }
.ts-header { margin-block-end: 1.4rem; }
.ts-header .eyebrow { margin-block: 0 .65rem; }
.ts-header h1 { font-size: clamp(2.05rem, 6vw, 3.85rem); line-height: 1.06; letter-spacing: -.035em; margin: 0 0 .55rem; text-wrap: balance; }
.ts-header > p:last-child, .ts-hint { color: var(--muted); margin: 0; }
.ts-hint { font-size: .875rem; }
.ts-panel { margin-block-end: 1rem; padding: clamp(.875rem, 3vw, 1.4rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.ts-form, .ts-unit { display: grid; gap: .45rem; }
.ts-tool label { font-weight: 710; }
.ts-tool label > span { color: var(--muted); font-size: .82rem; margin-inline-start: .3rem; font-weight: 480; }
.ts-tool textarea, .ts-tool select { width: 100%; min-width: 0; min-block-size: 2.75rem; border-radius: 10px; border: 1px solid var(--line); padding: .65rem .8rem; background: var(--surface-muted); color: var(--text); }
.ts-select-wrap { position: relative; }
.ts-tool select { appearance: none; padding-inline-end: 2.5rem; }
.ts-select-wrap svg { position: absolute; inset-inline-end: .78rem; top: 50%; transform: translateY(-50%); width: 1.05rem; color: var(--muted); pointer-events: none; }
@media (forced-colors: active) { .ts-tool select { appearance: auto; } .ts-select-wrap svg { display: none; } }
.ts-tool textarea, .ts-mono { font: .875rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.ts-tool textarea { resize: vertical; }
.ts-options { margin-block-start: .6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem 1rem; }
.ts-unit { flex: 1 1 16rem; max-width: 24rem; min-width: 0; }
.ts-actions, .ts-results-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.ts-results-heading { justify-content: space-between; margin-block-end: .35rem; }
.ts-results-heading h2 { margin: 0; font-size: 1.2rem; }
.ts-tool button { cursor: pointer; min-height: 2.75rem; border-radius: 10px; padding: .5rem .8rem; border: 1px solid var(--line); color: var(--accent); background: var(--surface); font-weight: 710; }
.ts-tool button[type=submit] { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.ts-tool button:hover:enabled { border-color: var(--accent); }
.ts-tool button[type=submit]:hover:enabled { filter: brightness(.9); }
.ts-tool button:disabled { opacity: .65; cursor: not-allowed; }
.ts-results-table { margin-block-start: .7rem; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .88rem; }
.ts-results-table :is(th, td) { border-bottom: 1px solid var(--line); padding: .48rem .32rem; vertical-align: top; text-align: start; overflow-wrap: anywhere; }
.ts-results-table th:first-child { width: 3rem; }
.ts-results-table thead th { color: var(--muted); }
.ts-error, .ts-tool [aria-invalid=true] + .ts-hint + .ts-options + .ts-hint { color: #a12a47; }
@media (prefers-color-scheme: dark) { .ts-error, .ts-tool [aria-invalid=true] + .ts-hint + .ts-options + .ts-hint { color: #ffabc0; } }
.ts-tool [data-ts-output] { margin-block-start: .65rem; }
.ts-tool [data-ts-copy-status]:empty, .ts-tool [data-ts-status]:empty { margin: 0; height: 0; }
@media (max-width: 28rem) { .ts-unit { max-width: none; } .ts-results-table th:first-child { width: 2.4rem; } }
