.text-main { padding-block: 16px 64px; max-width: 1080px; }
.text-breadcrumb { display: block; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.text-breadcrumb a { text-decoration: underline; }
.text-heading h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -1px; margin: 8px 0; }
.text-heading p { color: var(--muted); margin: 8px 0 14px; }
.text-private { display: inline-block; background: #dcece2; color: #3f6b52; border-radius: 99px; padding: 5px 13px; font-size: 12px; font-weight: 700; }
.text-tabs { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin: 22px 0; }
.text-tabs a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; padding: 8px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; }
.text-tabs [aria-current] { background: var(--ink); color: var(--white); }
.text-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 'source result' 'options result' 'actions result'; gap: 18px; align-items: start; }
.source-panel { grid-area: source; }
.result-panel { grid-area: result; }
.text-options { grid-area: options; }
.text-runbar { grid-area: actions; min-width: 0; }
.text-editor, .text-options, .text-help { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; min-width: 0; margin: 0; }
.text-options legend { padding-inline: 8px; font-weight: 750; }
.text-step { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: #fbe0cd; color: #994520; font-size: 13px; }
.text-checks { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.text-checks label, .text-auto { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; cursor: pointer; }
.text-options input[type=checkbox], .text-auto input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.text-options input:disabled + span { opacity: .6; }
.text-fields { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 8px; }
.text-fields label { display: flex; flex: 1 1 180px; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 650; min-width: 0; }
.text-options select, .text-options input[type=text] { display: block; max-width: 100%; width: 100%; min-height: 44px; border: 1px solid #c5b7a6; border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; padding: 10px; min-width: 0; }
.text-editor > label { display: block; font-weight: 750; margin-bottom: 10px; }
.text-editor textarea { display: block; width: 100%; min-height: 220px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.8; padding: 14px; background: var(--white); color: var(--ink); border: 1px solid #c5b7a6; border-radius: 12px; overflow-wrap: anywhere; }
.result-panel textarea { min-height: 350px; background: #faf7f1; }
.text-main :is(button,input,select,textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.text-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.text-actions button, .text-memory button, .text-back { min-height: 44px; font-family: inherit; cursor: pointer; }
.text-main button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.text-hint, .text-status, .text-memory, .text-result-state { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.text-hint { margin: 10px 0 0; }
.text-status { min-height: 1.8em; margin: 12px 0 0; }
.text-status.is-error, .text-error { color: #a53124; }
.text-result-state { margin: 0 0 12px; font-weight: 700; }
.text-result-state[data-state=stale] { color: #8a5319; }
.text-result-state[data-state=ready] { color: #3f6b52; }
.text-summary { background: #eaf3ed; border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #315d44; overflow-wrap: anywhere; }
.text-auto { margin-top: 10px; }
.text-back { margin-top: 16px; }
.text-memory { margin-top: 8px; }
.text-memory summary, .text-advanced summary { min-height: 44px; line-height: 24px; padding-block: 10px; cursor: pointer; font-weight: 650; }
.text-memory p { margin: 0 0 10px; }
.text-advanced { border-top: 1px solid var(--line); margin-top: 12px; }
.text-help { font-size: 14px; color: var(--muted); margin-top: 22px; }
.text-help summary { font-size: 16px; font-weight: 750; color: var(--ink); cursor: pointer; min-height: 44px; padding-block: 8px; }
.text-help ul { padding-left: 22px; }
.text-help li { margin-block: 8px; }
.text-main [hidden] { display: none !important; }
@media(max-width:720px) {
  .text-main { padding-top: 8px; }
  .text-workspace { grid-template-columns: 1fr; grid-template-areas: 'source' 'options' 'actions' 'result'; gap: 14px; }
  .text-editor, .text-options, .text-help { padding: 16px; }
  .text-editor textarea { min-height: 190px; }
  .result-panel textarea { min-height: 240px; }
  .text-options select, .text-options input[type=text] { font-size: 16px; }
  .text-tabs a { padding: 8px 11px; }
  .text-actions .button { flex: 1 1 auto; padding-inline: 12px; }
  .text-fields label { flex-basis: 100%; }
  .text-heading .eyebrow { margin-bottom: 8px; }
  .text-breadcrumb { margin-bottom: 12px; }
}
.count-main #count-state { margin-top: 18px; }
.count-main .text-memory button:disabled { opacity: .5; cursor: not-allowed; }
.count-main .text-memory button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
