:root{
  --tc-success:#3f6b47;
  --tc-warning:#8a5a24;
  --tc-editor-min:28rem;
}

.tc-hero{padding-bottom:var(--se-wide)}
.tc-hero .se-dek{max-width:52rem}
.tc-hero-aside{display:grid;gap:var(--se-group);border-top:1px solid var(--se-line);padding-top:var(--se-block)}
.tc-hero-aside div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--se-item);align-items:start}
.tc-hero-aside svg{width:var(--se-block);height:var(--se-block);color:var(--sh-accent)}
.tc-hero-aside strong{display:block;margin-bottom:var(--se-tight);font-size:.875rem}
.tc-hero-aside p{margin:0;color:var(--se-muted);font-size:.8125rem}

.tc-workspace{scroll-margin-top:var(--se-hero);border-block:1px solid var(--se-line);background:var(--sh-surface)}
.tc-workspace-inner{padding-block:var(--se-wide)}
.tc-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--se-block);padding-bottom:var(--se-block);border-bottom:1px solid var(--se-line)}
.tc-toolbar-copy{max-width:36rem}
.tc-toolbar-copy h2{margin:0 0 var(--se-inline);font-size:clamp(2rem,4vw,2.75rem)}
.tc-toolbar-copy p{margin:0;color:var(--se-muted)}
.tc-presets{display:flex;flex-wrap:wrap;gap:var(--se-inline);justify-content:flex-end}
.tc-preset{min-height:var(--se-page);border:1px solid var(--se-line);border-radius:var(--sh-r-pill);background:transparent;padding:var(--se-inline) var(--se-group);color:var(--se-muted);font-size:.8125rem;font-weight:600;cursor:pointer;transition:background var(--sh-t-fast) var(--sh-ease),color var(--sh-t-fast) var(--sh-ease),border-color var(--sh-t-fast) var(--sh-ease)}
.tc-preset[aria-pressed="true"]{border-color:var(--sh-ink);background:var(--sh-ink);color:var(--sh-paper)}
.tc-preset:not([aria-pressed="true"]):hover{border-color:var(--sh-line-firm);color:var(--sh-ink)}
.tc-deep-notice{margin:var(--se-block) 0 0;padding-top:var(--se-group);border-top:1px solid var(--se-line);color:var(--tc-warning);font-size:.8125rem}
.tc-deep-notice[hidden]{display:none}

.tc-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--se-block);padding-block:var(--se-block)}
.tc-editor{min-width:0}
.tc-editor-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--se-item);margin-bottom:var(--se-inline)}
.tc-editor-head label{font-size:.8125rem;font-weight:700}
.tc-editor-head span{color:var(--se-muted);font:400 .6875rem/1.5 var(--sh-mono)}
.tc-editor textarea{display:block;width:100%;min-height:var(--tc-editor-min);resize:vertical;border:1px solid var(--se-line);border-radius:var(--sh-r-lg);background:var(--sh-paper);padding:var(--se-block);color:var(--sh-ink);font:400 .875rem/1.7 var(--sh-mono);tab-size:2;transition:border-color var(--sh-t-fast) var(--sh-ease),background var(--sh-t-fast) var(--sh-ease)}
.tc-editor textarea::placeholder{color:var(--sh-ink-4)}
.tc-editor textarea:focus{outline:0;border-color:var(--sh-ink);background:var(--sh-surface)}
.tc-editor textarea[readonly]{background:var(--sh-sunken)}

.tc-actions{display:flex;align-items:center;justify-content:space-between;gap:var(--se-block);padding-top:var(--se-block);border-top:1px solid var(--se-line)}
.tc-action-group{display:flex;flex-wrap:wrap;gap:var(--se-inline)}
.tc-action{min-height:var(--se-page);border:1px solid var(--se-line);border-radius:var(--sh-r-pill);background:transparent;padding:var(--se-inline) var(--se-group);color:var(--sh-ink);font-size:.8125rem;font-weight:600;cursor:pointer;transition:opacity var(--sh-t-fast) var(--sh-ease),border-color var(--sh-t-fast) var(--sh-ease),transform var(--sh-t-fast) var(--sh-ease)}
.tc-action.primary{border-color:var(--sh-ink);background:var(--sh-ink);color:var(--sh-paper)}
.tc-action:hover:not(:disabled){border-color:var(--sh-ink)}
.tc-action:active:not(:disabled){transform:scale(.98)}
.tc-action:disabled{opacity:.4;cursor:not-allowed}
.tc-status{max-width:32rem;margin:0;color:var(--se-muted);font-size:.8125rem;text-align:right}
.tc-status[data-error="true"]{color:var(--tc-warning)}

.tc-report{padding-top:var(--se-wide)}
.tc-report[hidden]{display:none}
.tc-report-head{display:flex;align-items:end;justify-content:space-between;gap:var(--se-block);margin-bottom:var(--se-block)}
.tc-report-head h2{margin:0;font-size:clamp(2rem,4vw,2.75rem)}
.tc-report-total{text-align:right}
.tc-report-total strong{display:block;font:500 clamp(2.5rem,5vw,3.5rem)/1 var(--sh-sans);letter-spacing:-.04em}
.tc-report-total span{color:var(--se-muted);font-size:.75rem}
.tc-report-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--se-wide);border-top:1px solid var(--se-line);padding-top:var(--se-block)}
.tc-report-section h3{margin:0 0 var(--se-group);font:600 .75rem/1.4 var(--sh-mono);letter-spacing:.08em;text-transform:uppercase}
.tc-report-list{margin:0;padding:0;list-style:none;border-top:1px solid var(--se-line)}
.tc-report-row{display:grid;grid-template-columns:var(--se-block) var(--se-wide) minmax(0,1fr);gap:var(--se-inline);align-items:baseline;padding:var(--se-item) 0;border-bottom:1px solid var(--se-line)}
.tc-report-row strong{font-variant-numeric:tabular-nums}
.tc-report-row>span:last-child{color:var(--se-muted);font-size:.8125rem}
.tc-check{color:var(--tc-success);font-weight:700}
.tc-report-row.clean{grid-template-columns:var(--se-block) auto minmax(0,1fr)}
.tc-code-list{border-top:1px solid var(--se-line)}
.tc-code-row{display:flex;align-items:center;justify-content:space-between;gap:var(--se-item);padding:var(--se-item) 0;border-bottom:1px solid var(--se-line)}
.tc-code-row>div{display:flex;align-items:baseline;gap:var(--se-item);min-width:0}
.tc-code-row code{flex:none;color:var(--sh-ink);font:.6875rem/1.5 var(--sh-mono)}
.tc-code-row span{min-width:0;color:var(--se-muted);font-size:.8125rem;overflow-wrap:anywhere}
.tc-code-row strong{flex:none;font-size:.75rem;font-variant-numeric:tabular-nums}
.tc-empty{margin:0;padding:var(--se-item) 0;border-bottom:1px solid var(--se-line);color:var(--se-muted);font-size:.8125rem}

.tc-boundary{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:var(--se-hero);align-items:start}
.tc-boundary h2{margin-top:0}
.tc-boundary-copy{border-top:1px solid var(--se-line)}
.tc-boundary-copy>div{padding:var(--se-group) 0;border-bottom:1px solid var(--se-line)}
.tc-boundary-copy strong{display:block;margin-bottom:var(--se-inline)}
.tc-boundary-copy p{margin:0;color:var(--se-muted)}
.tc-sources a span{flex:none}

.tc-intent-hero .se-answer strong{display:block;margin-bottom:var(--se-inline)}
.tc-intent-hero .se-answer .se-button{margin-top:var(--se-item)}
.tc-outcomes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--se-block);border-top:1px solid var(--se-line)}
.tc-outcomes article{padding:var(--se-block) 0;border-bottom:1px solid var(--se-line)}
.tc-outcomes p{margin:0;color:var(--se-muted)}
.tc-boundary-note{max-width:48rem;margin:0;color:var(--se-muted);font-size:1.0625rem}
.tc-cluster-cta{display:flex;align-items:end;justify-content:space-between;gap:var(--se-wide)}
.tc-cluster-cta>div{max-width:44rem}
.tc-cluster-cta h2{margin-top:0}
.tc-cluster-cta p{margin:0;color:var(--se-muted)}
.tc-hub-list a:first-child h2{color:var(--sh-ink)}
.tc-hub-list .tc-primary-index{color:var(--tc-success)}

@media(max-width:900px){
  .tc-toolbar,.tc-actions,.tc-report-head,.tc-cluster-cta{align-items:flex-start;flex-direction:column}
  .tc-presets{justify-content:flex-start}
  .tc-editor-grid,.tc-report-grid,.tc-boundary{grid-template-columns:1fr}
  .tc-editor textarea{min-height:22rem}
  .tc-status{text-align:left}
  .tc-report-total{text-align:left}
  .tc-outcomes{grid-template-columns:1fr}
}

@media(max-width:640px){
  .tc-workspace-inner{padding-block:var(--se-section)}
  .tc-editor textarea{min-height:18rem;padding:var(--se-group)}
  .tc-action-group{width:100%}
  .tc-action{flex:1 1 auto}
  .tc-report-row{grid-template-columns:var(--se-block) var(--se-section) minmax(0,1fr)}
  .tc-code-row>div{align-items:flex-start;flex-direction:column;gap:var(--se-tight)}
}

@media(prefers-reduced-motion:reduce){
  .tc-preset,.tc-action,.tc-editor textarea{transition:none}
}

@media print{
  .tc-presets,.tc-actions,.tc-hero-aside{display:none!important}
  .tc-editor-grid{grid-template-columns:1fr}
  .tc-editor:first-child{display:none}
  .tc-editor textarea{min-height:0;border:0;padding:0;background:transparent}
}
