.textstats-shell { color: #111; }
.textstats-setup { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; }
.textstats-settings { align-self: start; background: #fff; }
.textstats-input { width: 100%; font: 0.9rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.textstats-option { display: flex; min-height: 5rem; align-items: flex-start; gap: .75rem; box-sizing: border-box; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .875rem; cursor: pointer; }
.textstats-option:has(input:checked) { box-shadow: inset 0 0 0 1px rgba(255, 215, 0, .78), 0 1px 2px rgba(0, 0, 0, .05); }
.textstats-option input { margin-top: .15rem; }
.textstats-option strong, .textstats-option small { display: block; }
.textstats-option small { margin-top: .25rem; color: #6b7280; line-height: 1.4; }
.textstats-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.textstats-stat-card, .textstats-time-card { border: 1px solid #e5e7eb; border-radius: .75rem; background: #f8f9fa; padding: 1rem; }
.textstats-stat-card span, .textstats-time-card span { display: block; min-height: 2.1em; color: #6b7280; font-size: .72rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.textstats-stat-card strong { display: block; margin-top: .45rem; font: 900 1.8rem/1.1 var(--font-headline, Inter, sans-serif); overflow-wrap: anywhere; }
.textstats-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.textstats-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.textstats-detail-list div { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; border-radius: .55rem; background: #f8f9fa; padding: .75rem; }
.textstats-detail-list dt { color: #4b5563; font-size: .78rem; }
.textstats-detail-list dd { max-width: 58%; text-align: end; font-size: .8rem; font-weight: 900; overflow-wrap: anywhere; }
.textstats-time-card strong { display: block; margin-top: .55rem; font: 900 1.35rem/1.2 var(--font-headline, Inter, sans-serif); }
.textstats-time-card small { display: block; margin-top: .45rem; color: #6b7280; }
.textstats-preview-card { min-width: 0; border: 1px solid #e5e7eb; border-radius: .7rem; padding: 1rem; }
.textstats-preview-card > div { display: flex; justify-content: space-between; gap: 1rem; }
.textstats-preview-card span { color: #6b7280; font-size: .75rem; }
.textstats-preview-card p { max-height: 8rem; margin-top: .75rem; overflow: auto; border-radius: .5rem; background: #f8f9fa; padding: .75rem; color: #4b5563; font-size: .8rem; line-height: 1.55; overflow-wrap: anywhere; }
.textstats-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.textstats-table th, .textstats-table td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.textstats-table th { background: #f8f9fa; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.textstats-table th:nth-child(n+2), .textstats-table td:nth-child(n+2) { text-align: right; }
.textstats-table tbody tr:last-child td { border-bottom: 0; }
.textstats-table td:first-child { max-width: 28rem; font-weight: 800; overflow-wrap: anywhere; }
.textstats-shell button:focus-visible, .textstats-shell input:focus-visible, .textstats-shell select:focus-visible, .textstats-shell textarea:focus-visible, .textstats-shell summary:focus-visible { outline: 3px solid rgba(255, 215, 0, .5); outline-offset: 2px; }
@media (max-width: 1023px) { .textstats-setup, .textstats-results-grid { grid-template-columns: 1fr; } .textstats-settings { position: static; } .textstats-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .textstats-card-grid, .textstats-detail-list { grid-template-columns: 1fr; } .textstats-stat-card span { min-height: 0; } }
