.text-intro { max-width: 760px; padding: 38px 0 30px }
.text-intro h1 { margin: 0 0 16px; font-size: clamp(34px, 6vw, 60px); line-height: 1.08; letter-spacing: -1.7px }
.text-intro > p { max-width: 650px }
.text-runtime { color: var(--green); font-size: 13px }
.text-runtime.error, .text-error, .text-input-status.error { color: var(--error) }
.text-workbench { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 8px; background: var(--white); overflow: hidden }
#text-form, .text-snapshot { padding: 28px; min-width: 0 }
.text-snapshot { border-left: 1px solid var(--line); background: #f8faf3 }
#text-form label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 650 }
#text-mode { width: 100%; margin: 0 0 20px; padding: 10px; border: 1px solid #bdc8bc; background: var(--white); color: var(--ink) }
#text-capture { display: block; width: 100%; min-width: 0; resize: vertical; padding: 12px; font: 17px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); border: 1px solid #bdc8bc; border-radius: 6px; background: var(--white) }
#text-capture:focus-visible, #text-preview:focus-visible { outline: 3px solid #79ae89; outline-offset: 4px }
#text-capture[aria-invalid="true"] { border-color: var(--error) }
.text-help { font-size: 12px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere }
.text-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 }
.text-presets button { padding: 7px 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 12px; text-align: left }
.text-presets button:hover { border-color: var(--green) }
.text-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px }
.text-actions .primary-button { width: auto }
.text-input-status { min-height: 1.6em; margin-bottom: 0; font-size: 13px }
.text-snapshot h2, .text-results h2, .text-method h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.4px }
#text-preview { margin: 18px 0; padding: 15px; min-height: 100px; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font: 14px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; direction: ltr; unicode-bidi: isolate }
.text-results { margin: 38px 0; min-width: 0 }
.text-results-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px }
#text-progress { margin: 0 0 10px; color: var(--muted); font-size: 13px }
#text-progress-bar { display: block; width: 100%; margin: 10px 0 20px }
.text-error { padding: 12px 15px; border: 1px solid #d9b9ae; background: #fff6ee; border-radius: 6px; overflow-wrap: anywhere }
.text-summary { padding: 15px 18px; background: var(--green-light); border-radius: 6px; font-size: 14px }
.text-download-controls { margin: 0 0 22px }
.text-download-controls .secondary-button { max-width: 100%; white-space: normal; text-align: left }
.text-download-controls .text-help { margin: 10px 0 0 }
.text-download-status { margin: 8px 0 0; font-size: 13px; overflow-wrap: anywhere }
.text-download-status.error { color: var(--error) }
.text-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--white); font-size: 12px }
.text-table caption { text-align: left; color: var(--muted); padding: 0 0 12px; font-size: 12px }
.text-table th, .text-table td { padding: 12px 9px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere }
.text-table thead th { background: #e9ede3; font-size: 11px; font-weight: 650 }
.text-table tbody th { font-weight: 600 }
.text-table code { font-size: 12px; direction: ltr; unicode-bidi: isolate }
.text-table .text-cell-detail { display: block; margin-top: 3px; font-size: 11px; color: var(--muted) }
.text-table .text-invalid { color: var(--error) }
.text-method { max-width: 850px; padding: 28px 0 14px; border-top: 1px solid var(--line) }
.text-method p { font-size: 14px; overflow-wrap: anywhere }
.text-method .text-help { font-size: 12px }
@media (max-width: 850px) {
  .text-workbench { grid-template-columns: 1fr }
  .text-snapshot { border-left: 0; border-top: 1px solid var(--line) }
}
@media (max-width: 620px) {
  .text-intro { padding-top: 20px }
  #text-form, .text-snapshot { padding: 20px }
  .text-table, .text-table tbody { display: block }
  .text-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap }
  .text-table caption { display: block }
  .text-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 5px 12px }
  .text-table tbody th, .text-table tbody td { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 9px 0; font-size: 12px }
  .text-table tbody td:last-child { border-bottom: 0 }
  .text-table [data-label]::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 400 }
  .text-table .text-cell-value { min-width: 0 }
  .text-method { padding-top: 20px }
}
