/* TRB Studio — one-page layout (layout layer for the TRB calculator pages) */
.trb-studio-on .trb-v3{--st-bg:#f4f7f6;--st-ink:#0c2630;--st-ink2:#17353d;--st-mute:#5a6f75;--st-faint:#8aa0a4;--st-line:#e4ecea;--st-line2:#eef3f1;--st-seg:#eaf0ee;--st-teal:#148d7c;--st-teal2:#0f7466;--st-tealbg:#e9f5f2;--st-red:#c2412f;--st-redbg:#fbe7e4;--st-amber:#e0821c;
  --st-card:0 1px 2px rgba(12,38,48,.05),0 12px 32px rgba(12,38,48,.05);background:var(--st-bg)}
.trb-studio-on .trb-v3 .trb-hero{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}   /* kept for search engines and screen readers */
.trb-studio-on .trb-v3 .trb-hero .trb-model-switch,.trb-studio-on .trb-v3 .trb-hero .eyebrow,.trb-studio-on .trb-v3 .trb-hero .trb-lead,.trb-studio-on .trb-v3 .trb-hero .trb-version{display:none}
.trb-studio-on .trb-v3 .trb-hero h1{font-size:clamp(22px,2.2vw,30px);margin:0;letter-spacing:-.03em}
.trb-studio-on .trb-v3 .trb-hero .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px}
.trb-studio-on .trb-v3 .trb-hero-actions{margin-top:0}
.trb-studio-on .trb-v3 .trb-hero-actions>span{display:none}
.trb-studio-on .trb-v3 .trb-layout{padding-top:22px;display:block;width:min(100% - 48px,1440px)}
.trb-studio-on .trb-v3 .trb-layout>.trb-sum,.trb-studio-on .trb-sumbar{display:none!important}
.trb-studio-on .trb-v3 .trb-actions{display:none}

.trb-studio{font-feature-settings:'tnum' 1;color:var(--st-ink)}
.trb-studio button{font:inherit}
.trb-studio :focus-visible,.trb-st-sheet :focus-visible{outline:2px solid var(--st-teal);outline-offset:2px}

/* top bar */
.trb-st-top{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;padding:2px 0 14px}
.trb-st-title{display:flex;flex-direction:column;gap:1px;flex:1 1 260px;min-width:0}
.trb-st-title strong{font-size:17px;font-weight:800;letter-spacing:-.01em}
.trb-st-title span{font-size:12.5px;color:var(--st-mute)}
.trb-st-actions{display:flex;gap:8px;align-items:center}

/* the one switch */
.trb-st-seg{display:inline-flex;gap:2px;padding:4px;border-radius:12px;background:var(--st-seg)}
.trb-st-seg button{min-height:36px;padding:0 14px;border:0;border-radius:9px;background:transparent;color:var(--st-mute);font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s,box-shadow .15s}
.trb-st-seg button:hover{color:var(--st-ink)}
.trb-st-seg button.is-on{background:#fff;color:var(--st-ink);font-weight:700;box-shadow:0 1px 3px rgba(12,38,48,.14)}
.trb-st-lang button{min-width:44px;padding:0 10px}

.trb-st-ghost,.trb-st-primary,.trb-st-next,.trb-st-detail{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:12px;font-size:14px;font-weight:700;cursor:pointer}
.trb-st-ghost{border:0;background:transparent;color:var(--st-mute);font-weight:600}
.trb-st-ghost:hover{background:var(--st-line2);color:var(--st-ink)}
.trb-st-ghost:disabled{opacity:.4;cursor:default;background:transparent}
.trb-st-primary{border:0;background:var(--st-ink);color:#fff}
.trb-st-primary:hover{background:#17404a}
.trb-st-next{border:0;background:var(--st-teal);color:#fff;white-space:nowrap}
.trb-st-next:hover{background:var(--st-teal2)}
.trb-st-detail{border:0;background:var(--st-tealbg);color:var(--st-teal2);margin-left:auto}
.trb-st-detail:hover{background:#d9efe9}
.trb-st-link{border:0;padding:0;background:none;color:var(--st-teal2);font-size:13px;font-weight:600;cursor:pointer;text-align:left;text-decoration:underline;text-underline-offset:2px}
.trb-st-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:12px;background:var(--st-bg);color:var(--st-ink2);cursor:pointer}

/* result band */
.trb-st-band{position:sticky;top:0;z-index:30;padding:0 0 16px;background:var(--st-bg)}
.admin-bar .trb-st-band{top:32px}
.trb-st-bandin{display:flex;flex-wrap:wrap;align-items:center;gap:8px 0;padding:12px 14px;border-radius:20px;background:#fff;box-shadow:var(--st-card)}
.trb-st-status{display:flex;align-items:center;gap:12px;padding:2px 22px 2px 8px;border-right:1px solid var(--st-line);min-width:200px;max-width:360px}
.trb-st-status>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.trb-st-status strong{font-size:15px;font-weight:800}
.trb-st-sub{font-size:12.5px;color:var(--st-mute);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.trb-st-dot{flex:0 0 auto;width:12px;height:12px;border-radius:50%;background:var(--st-faint);box-shadow:0 0 0 5px var(--st-line2)}
.trb-st-status.is-ok .trb-st-dot{background:var(--st-teal);box-shadow:0 0 0 5px var(--st-tealbg)}
.trb-st-status.is-ok strong{color:var(--st-teal2)}
.trb-st-status.is-fail .trb-st-dot{background:var(--st-red);box-shadow:0 0 0 5px var(--st-redbg)}
.trb-st-status.is-fail strong{color:#8e2a1e}
.trb-st-kpis{display:flex;flex-wrap:wrap;flex:1 1 400px;min-width:0}
.trb-st-kpi{display:flex;flex-direction:column;gap:1px;padding:2px 20px;border-right:1px solid var(--st-line2);min-width:0}
.trb-st-kpi:last-child{border-right:0}
.trb-st-kpi>span{font-size:12px;font-weight:600;color:var(--st-mute);white-space:nowrap}
.trb-st-kpi strong{font-size:22px;font-weight:700;letter-spacing:-.02em;white-space:nowrap}
.trb-st-kpi strong small{font-size:12.5px;font-weight:600;color:var(--st-mute);margin-left:4px;letter-spacing:0}
.trb-st-kpi em{font-style:normal;font-size:12px;color:var(--st-faint);white-space:nowrap}
.trb-st-kpi.is-warn strong{color:#a3312a}

/* grid */
.trb-st-grid{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.trb-st-main{flex:999 1 620px;min-width:0;display:flex;flex-direction:column;gap:24px}
.trb-st-card{background:#fff;border-radius:24px;box-shadow:var(--st-card)}
.trb-st-panel{flex:1 1 360px;max-width:460px;min-width:0;position:sticky;top:112px;max-height:calc(100vh - 128px);display:flex;flex-direction:column;padding:16px 16px 12px}

/* drawing card — the construction editor shown in place */
.trb-st-asm{padding:18px 20px 16px}
.trb-st-cardhead{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 4px}
.trb-st-cardhead h2{margin:0 auto 0 0;font-size:21px;font-weight:800;letter-spacing:-.02em}
.trb-st-asmhost dialog.trb-asm-modal.is-inline{position:static;display:block;width:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;box-shadow:none;background:transparent;overflow:visible;color:inherit;inset:auto}
.trb-st-asmhost .trb-asm-modal.is-inline .trb-asm-inner{padding:0;max-height:none;overflow:visible}
.trb-st-asmhost .trb-asm-modal.is-inline .trb-help-close,.trb-st-asmhost .trb-asm-modal.is-inline .trb-step-eyebrow,.trb-st-asmhost .trb-asm-modal.is-inline #trb-asm-title,.trb-st-asmhost .trb-asm-modal.is-inline .trb-asm-arr{display:none}
.trb-st-asmhost .trb-asm-help{font-size:13px;color:var(--st-mute)}
.trb-st-asmhost .trb-asm-toolbar{margin-bottom:10px}
.trb-st-asmhost .trb-asm-tool{border-radius:10px;border:0;background:var(--st-bg);min-height:40px}
.trb-st-asmhost .trb-asm-drawing{border:0;background:#fbfdfc;border-radius:14px}
.trb-st-asmhost .trb-asm-card{border-radius:16px}

.trb-st-results{padding:20px 22px}
.trb-st-results .trb-output{margin:0}
.trb-st-results .trb-output>h2{font-size:21px;letter-spacing:-.02em;margin:0 0 14px}
.trb-st-viewer{padding:0}
.trb-v3 .trb-st-viewer .trb-viewer{margin:0;border:0;background:#fff;padding:20px;border-radius:24px}
.trb-v3 .trb-viewer-head{align-items:center;gap:12px;margin-bottom:18px}
.trb-v3 .trb-viewer-head h2{font-size:21px;font-weight:800;letter-spacing:-.02em}
.trb-v3 #trb-viewer-mode{padding:7px 10px;border-radius:9px;background:#edf3f2;color:#35615e;font-size:11px}
.trb-v3 .trb-assembly{border:0;background:#fbfdfc;border-radius:14px;padding:12px 0}
.trb-v3 .trb-assembly .shaft{fill:url(#trb-live-hatch);stroke:#71868a}
.trb-v3 .trb-assembly .inner-ring,.trb-v3 .trb-assembly .outer-ring{fill:url(#trb-live-steel);stroke:#596b75;stroke-width:1}
.trb-v3 .trb-assembly .roller{fill:url(#trb-live-roller);stroke:#53666e;stroke-width:1}
.trb-v3 .trb-assembly .pressure{stroke:#b99b65;stroke-width:1.1;stroke-dasharray:5 4}
.trb-v3 .trb-assembly .pressure-point{fill:#71868a}
.trb-v3 .trb-assembly .datum{stroke:#b8c9ca}
.trb-v3 .trb-assembly .trb-technical-svg{max-width:100%;min-width:0}
.trb-v3 .trb-assembly.is-enlarged .trb-technical-svg{min-width:870px}
.trb-v3 .trb-live-values{gap:10px;margin:18px 0}
.trb-v3 .trb-live-values>div{border:0;background:#f2f6f5;border-radius:12px;padding:14px}
.trb-v3 .trb-live-values dt{font-size:12px;color:#627579}
.trb-v3 .trb-live-values dd{font-size:23px;letter-spacing:-.02em;color:#163b3d}
.trb-v3 .trb-viewer-footer{flex-wrap:wrap;font-size:12px;padding:16px 0 10px}
.trb-v3 #trb-animate{background:#287c70;color:#fff;border:0;border-radius:10px;min-height:42px;padding:9px 15px}
.trb-v3 #trb-animate:hover{background:#1e6259;color:#fff}
.trb-v3 .trb-viewer-note{font-size:12px;line-height:1.65;color:#617679}
@media(max-width:760px){.trb-v3 .trb-st-viewer .trb-viewer{padding:16px}.trb-v3 .trb-viewer-head h2{font-size:18px}.trb-v3 .trb-viewer-head{flex-wrap:wrap}.trb-v3 #trb-viewer-mode{margin-left:0}.trb-v3 .trb-live-values{grid-template-columns:1fr 1fr}.trb-v3 .trb-live-values dd{font-size:20px}}

/* input panel */
.trb-st-tabs{display:flex;gap:2px;padding:4px;border-radius:14px;background:var(--st-seg);flex:0 0 auto}
.trb-st-tabs button{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 4px;border:0;border-radius:10px;background:transparent;color:var(--st-mute);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;min-width:0}
.trb-st-tabs button.is-on{background:#fff;color:var(--st-ink);font-weight:700;box-shadow:0 1px 3px rgba(12,38,48,.14)}
.trb-st-tabdot{width:6px;height:6px;border-radius:50%;background:var(--st-teal);flex:0 0 auto}
.trb-st-tabdot.is-bad{background:var(--st-amber)}
.trb-st-panelhead{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:18px 6px 6px;flex:0 0 auto}
.trb-st-panelhead h2{margin:0;font-size:19px;font-weight:800;letter-spacing:-.02em}
.trb-st-panelhead p{margin:3px 0 0;font-size:12.5px;color:var(--st-mute)}
.trb-st-panelhead>span{font-size:12.5px;font-weight:600;color:var(--st-faint);white-space:nowrap}
.trb-st-panelbody{flex:1 1 auto;min-height:0;overflow:auto;padding:0 6px;overscroll-behavior:contain}
.trb-st-panelfoot{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 4px 2px;border-top:1px solid var(--st-line2);flex:0 0 auto}

.trb-st-panel .trb-st-section{display:none;margin:0;border:0;border-radius:0;background:transparent;overflow:visible}
.trb-st-panel .trb-st-section.is-active{display:block}
.trb-st-panel .trb-thermal-and-checks{display:none}
.trb-st-panel .trb-thermal-and-checks.is-active{display:block}
.trb-st-panel .trb-st-section>summary{display:none}
.trb-st-panel .trb-details-body{padding:4px 0 8px}
.trb-st-panel .trb-fields,.trb-st-panel .trb-fields-two,.trb-st-panel .trb-fields-four,.trb-st-panel .trb-bearing-groups{display:block}
.trb-st-panel .trb-bearing-group{margin:0 0 14px;padding:10px 12px;border:1px solid var(--st-line2);border-radius:14px}
.trb-st-panel .trb-bearing-group legend{font-weight:800;font-size:14px;padding:0 6px}
.trb-st-panel .trb-field-shell{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:9px 0;border-bottom:1px solid var(--st-line2)}
.trb-st-panel .trb-field-shell>.trb-info{position:static;order:2}
.trb-st-panel .trb-field-shell>label.trb-field{flex:1 1 0;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.trb-st-panel .trb-field-label{flex:1 1 auto;margin:0;padding:0;min-height:0;font-size:13.5px;font-weight:600;color:var(--st-ink2);justify-content:flex-start;gap:6px;flex-wrap:wrap}
.trb-st-panel .trb-field-label small{font-size:11px;color:var(--st-faint)}
.trb-st-panel .trb-field input,.trb-st-panel .trb-field select{flex:0 0 auto;width:136px;max-width:136px;min-height:42px;border:0;border-radius:10px;background:var(--st-bg);font-size:14.5px;font-weight:700;color:var(--st-ink);text-align:right}
.trb-st-panel .trb-field select{text-align:left;padding-right:28px;width:172px;max-width:172px}
.trb-st-panel .trb-field input[type=search]{width:100%;max-width:none;text-align:left}
.trb-st-panel .trb-field-shell:has(input[type=search])>label.trb-field{flex-direction:column;align-items:stretch}
.trb-st-panel .trb-field input[type=range]{width:100%;max-width:none;background:transparent;min-height:24px}
.trb-st-panel .trb-field input[aria-invalid=true],.trb-st-panel .trb-field input:invalid{box-shadow:inset 0 0 0 1.5px #e7a08f;background:#fff7f5}
.trb-st-panel .trb-field-shell>:not(label):not(.trb-info){flex:1 1 100%;order:3}
.trb-st-panel .trb-field-shell>.trb-step-trigger{flex:0 0 auto}
.trb-st-panel .trb-data-note{font-size:12.5px;line-height:1.5;color:var(--st-mute)}
.trb-st-panel .trb-stiffness-derived .trb-field{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--st-line2)}

/* phone */
.trb-st-sheet{width:100%;max-width:640px;max-height:88dvh;margin:auto auto 0;padding:0;border:0;border-radius:24px 24px 0 0;background:#fff;color:var(--st-ink,#0c2630);box-shadow:0 -12px 40px rgba(12,38,48,.25)}
.trb-st-sheet::backdrop{background:rgba(12,38,48,.45)}
.trb-st-sheethead{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 16px 8px;background:#fff}
.trb-st-sheethead h2{margin:0;font-size:19px;font-weight:800}
.trb-st-grab{position:absolute;left:50%;top:6px;width:44px;height:5px;margin-left:-22px;border-radius:3px;background:#d3e0dd}
.trb-st-sheetbody{max-height:calc(88dvh - 70px);overflow:auto;padding:0 16px 24px}
.trb-st-sheet .trb-output{margin:0}
.trb-st-sheet .trb-output>h2{display:none}

@media (max-width:1100px){
  .trb-st-panel{position:static;max-height:none;max-width:none;flex-basis:100%}
  .trb-st-panelbody{overflow:visible}
}
@media (max-width:760px){
  .trb-studio-on .trb-v3 .trb-layout{width:calc(100% - 20px)}
  .trb-st-top{gap:10px}
  .trb-st-title{flex-basis:100%}
  .trb-st-model{flex:1 1 auto}.trb-st-model button{flex:1 1 0;padding:0 8px}
  .trb-st-actions{width:100%;justify-content:space-between}
  .trb-st-band{position:fixed;left:10px;right:10px;bottom:12px;top:auto;padding:0;background:transparent;z-index:60}
  .trb-st-bandin{background:var(--st-ink);color:#fff;border-radius:18px;padding:10px 12px;box-shadow:0 10px 30px rgba(12,38,48,.3);flex-wrap:nowrap}
  .trb-st-status{border:0;padding:0 8px 0 4px;min-width:0;flex:1 1 auto;max-width:none}
  .trb-st-status strong{color:#fff!important;font-size:14px}
  .trb-st-status .trb-st-link{color:#9fe0d2}
  .trb-st-sub{color:#b8d0ca}
  .trb-st-kpis{display:none}
  .trb-st-detail{background:var(--st-teal);color:#fff;min-height:40px;padding:0 12px;flex:0 0 auto}
  .trb-st-grid{gap:14px}
  .trb-st-main{gap:14px}
  .trb-st-card{border-radius:20px}
  .trb-st-asm{padding:14px 12px 12px}
  .trb-st-arr button{padding:0 10px}
  .trb-st-results{display:none}
  .trb-st-panel{padding:12px 12px 8px}
  .trb-st-tabs button{font-size:12.5px}
  .trb-st-panel .trb-field input,.trb-st-panel .trb-field select{width:120px;max-width:120px;font-size:16px;min-height:46px}
  .trb-studio-on .trb-v3 .trb-layout{padding-bottom:96px}
}

/* editor shown in place: inputs that the page already has stay in the panel */
.trb-st-asmhost .trb-asm-loadscard,.trb-st-asmhost .trb-asm-thermalcard,.trb-st-asmhost .trb-asm-ana{display:none}
.trb-st-asmhost:not(.is-full) .trb-asm-out .trb-asm-apply,.trb-st-asmhost:not(.is-full) .trb-asm-out h4,.trb-st-asmhost:not(.is-full) .trb-asm-out .trb-step-note,.trb-st-asmhost:not(.is-full) .trb-asm-out details,.trb-st-asmhost:not(.is-full) .trb-asm-out table{display:none}
.trb-st-asmhost.is-full .trb-asm-ana{display:block}
.trb-st-more{margin-left:auto;font-size:13.5px}
.trb-st-cardhead h2{margin-right:0}
.trb-st-asm.has-pending .trb-step-apply{box-shadow:0 0 0 4px #fde6c8}
.trb-st-asm .trb-step-apply[data-pending]:not([data-pending=""])::after{content:attr(data-pending);display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin-left:8px;border-radius:11px;background:#fff;color:var(--st-teal2);font-size:12px;font-weight:800}
@media (max-width:760px){
  .trb-st-grid{display:flex;flex-direction:column}
  .trb-st-main{display:contents}
  .trb-st-asm{order:1}.trb-st-panel{order:2}.trb-st-viewer{order:3}
}
.trb-st-card{box-sizing:border-box;max-width:100%;min-width:0}
@media (max-width:760px){.trb-st-grid>.trb-st-panel,.trb-st-main>.trb-st-card{width:100%;max-width:100%;flex:none}.trb-st-tabs button{padding:0 2px;gap:4px}}
@media (max-width:760px){.trb-st-asmhost:not(.is-full) .trb-asm-grid{display:none}.trb-st-asmhost .trb-asm-help{display:none}}
/* the editor is an open (non-modal) dialog in the studio; the page's scroll lock is only for real modal windows */
html.trb-studio-on:not(:has(.trb-v3 dialog:modal)){overflow:visible}

/* How it works */
.trb-st-guide{width:min(760px,100% - 32px)}
.trb-st-guidein{padding:30px 32px 26px}
.trb-st-eyebrow{margin:0 0 6px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#148d7c}
.trb-st-guide h2{margin:0 0 18px;font-size:24px;letter-spacing:-.02em;color:#0c2630}
.trb-st-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.trb-st-steps li{display:flex;gap:14px;align-items:flex-start}
.trb-st-stepno{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;background:#e9f5f2;color:#0f7466;font-weight:800;font-size:15px}
.trb-st-steps h3{margin:4px 0 3px;font-size:15.5px;font-weight:800;color:#0c2630}
.trb-st-steps p{margin:0;font-size:14px;line-height:1.55;color:#26434b}
.trb-st-guidenote{margin:18px 0 0;padding:12px 14px;border-radius:12px;background:#f4f7f6;font-size:13px;line-height:1.5;color:#5a6f75}
.trb-st-guideact{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:16px}
@media (max-width:760px){.trb-st-guidein{padding:22px 18px 18px}.trb-st-guide h2{font-size:20px}}
.trb-v3 .trb-st-guide .trb-st-steps h3{margin:4px 0 2px!important;line-height:1.3}
.trb-v3 .trb-st-guide .trb-st-steps p{margin:0!important}
.trb-v3 .trb-st-guide .trb-st-steps{gap:16px}
.trb-v3 .trb-st-guide .trb-st-guidein{overflow:auto;max-height:calc(100dvh - 60px)}

/* nothing scrolls sideways inside a card: tables shrink and wrap instead */
.trb-st-asmhost .trb-asm-side{grid-template-columns:minmax(0,1fr)}
.trb-st-asmhost .trb-sec-tablewrap{overflow:visible}
.trb-st-asmhost .trb-sec-table{min-width:0;width:100%;table-layout:fixed}
.trb-st-asmhost .trb-sec-table thead th:first-child,.trb-st-asmhost .trb-sec-table tbody th{width:22px}
.trb-st-asmhost .trb-sec-table td:last-child,.trb-st-asmhost .trb-sec-table thead th:last-child{width:34px}
.trb-st-asmhost .trb-sec-table td input{min-width:0;padding:6px 6px}
.trb-st-asmhost .trb-sec-table th,.trb-st-asmhost .trb-sec-table td{padding-left:3px;padding-right:3px}
.trb-studio .trb-table-wrap,.trb-st-sheet .trb-table-wrap{overflow:visible}
.trb-studio .trb-table,.trb-st-sheet .trb-table,.trb-studio .trb-manufacturing .trb-table,.trb-st-sheet .trb-manufacturing .trb-table{min-width:0!important;width:100%}
.trb-studio .trb-table th,.trb-studio .trb-table td,.trb-st-sheet .trb-table th,.trb-st-sheet .trb-table td{white-space:normal;overflow-wrap:anywhere}
.trb-st-panel .trb-table{font-size:11.5px}
/* a long label keeps its line; the input moves below it instead of squeezing the label into a narrow column */
.trb-st-panel .trb-field-shell>label.trb-field{flex-wrap:wrap;row-gap:6px}
.trb-st-panel .trb-field-label{flex:1 1 150px;min-width:0}
.trb-st-panel .trb-field>input:not([type=search]):not([type=range]),.trb-st-panel .trb-field>select{margin-left:auto}
.trb-st-panel .trb-field textarea{flex:1 1 100%;width:100%;min-height:110px;border:0;border-radius:10px;background:var(--st-bg);padding:8px 10px;font:inherit;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--st-ink);resize:vertical}
.trb-st-panel .trb-curve-plot svg{width:100%;height:auto}
.trb-st-panel .trb-field-shell:has(input[type=search]) .trb-field-label{flex:0 0 auto}
.trb-st-panel .trb-field-label{flex-basis:110px}
.trb-st-panel .trb-field>select{width:auto;min-width:112px;max-width:172px}
.trb-st-panel .trb-field>input[type=text]:not([readonly]){flex:1 1 100%;width:100%;max-width:none;text-align:left}
/* 0.6: phones in portrait are asked to turn sideways */
.trb-st-rotate{display:none}
@media (max-width:600px) and (orientation:portrait) and (pointer:coarse){
  .trb-st-rotate{display:flex;position:fixed;inset:0;z-index:2000;align-items:center;justify-content:center;padding:24px;background:rgba(12,38,48,.86);backdrop-filter:blur(3px)}
  .trb-st-rotate-card{max-width:320px;text-align:center;background:#fff;border-radius:18px;padding:24px 22px 18px;color:#0c2630;box-shadow:0 20px 50px rgba(0,0,0,.3)}
  .trb-st-rotate-card b{display:block;font-size:18px;margin:6px 0 8px}
  .trb-st-rotate-card p{margin:0 0 16px;font-size:14px;line-height:1.5;color:#3e5359}
  .trb-st-rotate-icon{width:72px;height:72px;transform-origin:50% 50%;animation:trbRotate 2.4s ease-in-out infinite}
  .trb-st-rotate-icon rect{fill:#e9f5f2;stroke:#148d7c;stroke-width:3}
  .trb-st-rotate-icon line{stroke:#148d7c;stroke-width:3;stroke-linecap:round}
  .trb-st-rotate-icon .is-arrow{fill:none;stroke:#e0821c;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
  .trb-st-rotate-skip{border:0;background:none;color:#148d7c;font:inherit;font-size:13.5px;font-weight:600;text-decoration:underline;cursor:pointer;padding:6px}
}
@keyframes trbRotate{0%,25%{transform:rotate(0)}55%,80%{transform:rotate(-90deg)}100%{transform:rotate(0)}}
@media (prefers-reduced-motion:reduce){.trb-st-rotate-icon{animation:none}}
/* 0.6: the band scrolls with the page; results shortcut = small round button at the bottom right */
.trb-st-band{position:static}
.trb-st-panel{top:16px;max-height:calc(100vh - 32px)}
.admin-bar .trb-st-panel{top:48px;max-height:calc(100vh - 64px)}
.trb-st-fab{position:fixed;right:16px;bottom:16px;z-index:70;width:54px;height:54px;border-radius:50%;border:0;display:none;align-items:center;justify-content:center;background:#0c2630;color:#fff;box-shadow:0 10px 26px rgba(12,38,48,.35);cursor:pointer;transition:transform .15s}
.trb-st-fab:hover{transform:scale(1.06)}
.trb-st-fab:focus-visible{outline:3px solid #5fd3bd;outline-offset:3px}
.trb-st-fab svg{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round}
.trb-st-fabdot{position:absolute;top:6px;right:6px;width:13px;height:13px;border-radius:50%;border:2px solid #0c2630;background:#8aa0a4}
.trb-st-fab[data-state="ok"] .trb-st-fabdot{background:#2bb39b}
.trb-st-fab[data-state="fail"] .trb-st-fabdot{background:#e0573f}
@media (max-width:1100px){.trb-studio-on .trb-st-fab{display:flex}}
@media (max-width:760px){
  .trb-st-band{position:static;left:auto;right:auto;bottom:auto;padding:0 0 12px;background:transparent;z-index:auto}
  .trb-st-bandin{background:#fff;color:var(--st-ink);box-shadow:var(--st-card);flex-wrap:wrap}
  .trb-st-status strong{color:var(--st-ink)!important}
  .trb-st-status .trb-st-link{color:var(--st-teal2)}
  .trb-st-sub{color:var(--st-mute)}
}
dialog[open] ~ .trb-st-fab,.trb-st-fab.is-hidden{display:none!important}
.trb-studio-on .site-header{transition:transform .25s ease}
.trb-studio-on.trb-st-hdr-hide .site-header{transform:translateY(-110%)}
.trb-studio-on:not(.trb-st-hdr-hide) .trb-st-panel{top:99px;max-height:calc(100vh - 115px)}
.trb-studio-on:not(.trb-st-hdr-hide) .admin-bar .trb-st-panel{top:131px;max-height:calc(100vh - 147px)}
.trb-st-panel{transition:top .25s ease}
/* 0.6: install as an app */
.trb-st-appbtn svg{flex:none}
.trb-pwa{width:min(640px,100% - 32px)}
.trb-pwa-head{display:flex;align-items:center;gap:16px;margin:0 0 14px}
.trb-pwa-head img{width:64px;height:64px;border-radius:15px;box-shadow:0 6px 16px rgba(7,25,35,.25);flex:none}
.trb-pwa-head h2{margin:0!important}
.trb-pwa-why{margin:0 0 16px;padding:0;list-style:none;display:grid;gap:6px}
.trb-pwa-why li{position:relative;padding-left:26px;font-size:14px;line-height:1.5;color:#17353d}
.trb-pwa-why li::before{content:"";position:absolute;left:4px;top:5px;width:11px;height:6px;border-left:2.5px solid #148d7c;border-bottom:2.5px solid #148d7c;transform:rotate(-45deg)}
.trb-pwa-one{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:0 0 14px;padding:14px;border-radius:14px;background:#e9f5f2}
.trb-pwa-one span{font-size:13px;color:#5a6f75}
.trb-pwa-sub{margin:14px 0 8px;font-size:14px;font-weight:800;color:#5a6f75}
.trb-pwa-steps{margin-top:0}
.trb-pwa-key{display:inline-block;min-width:1.6em;padding:0 5px;border:1px solid #cfdcd9;border-radius:6px;background:#fff;text-align:center;font-weight:800;line-height:1.5}
.trb-pwa-glyph{display:inline-block;padding:0 4px;border:1px solid #cfdcd9;border-radius:6px;background:#fff;font-weight:800;color:#0a6cff}
.trb-pwa-more{margin-top:10px;border-top:1px solid #e4ecea;padding-top:8px}
.trb-pwa-more summary{cursor:pointer;font-weight:700;font-size:14px;color:#0f7466;padding:6px 0}
.trb-pwa-toast{position:fixed;left:16px;bottom:16px;z-index:69;display:flex;align-items:center;gap:10px;max-width:min(420px,calc(100% - 104px));padding:8px 8px 8px 10px;border-radius:16px;background:#071923;color:#f5f4ef;box-shadow:0 12px 30px rgba(7,25,35,.35);font-size:14px;line-height:1.3;animation:trbPwaIn .3s ease}
.trb-pwa-toast img{width:36px;height:36px;border-radius:9px;flex:none}
.trb-pwa-toast span{flex:1;min-width:0}
.trb-pwa-how{border:0;border-radius:10px;background:#58d4c7;color:#071923;font-weight:800;font-size:14px;min-height:38px;padding:0 12px;cursor:pointer}
.trb-pwa-x{border:0;background:transparent;color:#a3b8bc;font-size:22px;line-height:1;width:34px;height:38px;cursor:pointer}
@keyframes trbPwaIn{from{transform:translateY(20px);opacity:0}to{transform:none;opacity:1}}
@media (max-width:760px){.trb-st-appbtn{padding:0 10px}}
@media print{.trb-pwa-toast,.trb-st-fab{display:none!important}}
@media (max-width:600px){.trb-st-actions{flex-wrap:wrap;gap:4px;justify-content:flex-start}.trb-st-actions .trb-st-ghost,.trb-st-actions .trb-st-primary{white-space:nowrap;padding:0 10px}.trb-st-actions .trb-st-primary{margin-left:auto}}

/* 1.12: labelled tabs, Okabe–Ito-inspired accents; meaning never relies on colour alone. */
.trb-st-tabs button{--tab:#0072b2;border-bottom:3px solid var(--tab);color:#172d3b}
.trb-st-tabs button[data-tab-index="1"]{--tab:#a65d00}
.trb-st-tabs button[data-tab-index="2"]{--tab:#78518b}
.trb-st-tabs button[data-tab-index="3"]{--tab:#007d62}
.trb-st-tabs button[data-tab-index="4"]{--tab:#a84200}
.trb-st-tabs button.is-on{outline:2px solid var(--tab);outline-offset:-2px;background:#fff}
.trb-st-tabdot,.trb-st-tabdot.is-bad{width:18px;height:18px;border-radius:4px;background:var(--tab);color:white;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
.trb-st-tabdot.is-bad{background:#fff;color:#132c3a;outline:2px solid #132c3a}
.trb-st-tabs button:focus-visible{outline:3px solid #111;outline-offset:2px}
.trb-commit-status{position:fixed;right:20px;bottom:82px;z-index:2100;max-width:calc(100vw - 40px);padding:12px 18px;border-radius:12px;background:#132c3a;color:#fff;font-size:14px;box-shadow:0 5px 22px #10283b33;display:flex;gap:10px;align-items:center}
.trb-commit-status[hidden]{display:none}
.trb-commit-status.is-busy:before{content:"";width:18px;height:18px;border:3px solid #ffffff55;border-top-color:#fff;border-radius:50%;animation:trbCommitSpin .8s linear infinite}
@keyframes trbCommitSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.trb-commit-status.is-busy:before{animation:none;border-style:dotted}}
