/* -PTF- Tools platform: established PTF section grammar + public utilities. */
.tools-page h1 .tools-hero-name{
  color:var(--text-strong);
  text-shadow:none;
}
.tools-platform{
  padding-bottom:8px;
}
.tool-selector{
  margin-bottom:11px;
}
.tool-selector-kicker{
  margin-bottom:7px;
}
.tool-selector-line{
  min-width:0;
  display:grid;
  grid-template-columns:230px minmax(0,1fr) auto;
  align-items:end;
  column-gap:0;
  border-bottom:3px solid var(--surface-command);
}
.tool-selector-title{
  min-width:230px;
  width:230px;
  align-self:stretch;
  text-decoration:none;
  cursor:pointer;
  transition:filter .09s linear;
}
.tool-selector-title:hover,
.tool-selector-title:focus-visible{
  filter:brightness(1.08);
}
.tools-switcher{
  min-width:0;
  display:flex;
  align-items:flex-end;
  gap:3px;
  padding-left:7px;
  overflow-x:auto;
  scrollbar-width:none;
}
.tools-switcher::-webkit-scrollbar{display:none}
.tools-switch-link{
  flex:0 0 auto;
  min-width:108px;
  width:max-content;
  min-height:34px;
  height:34px;
  padding:6px 11px 7px;
  font-size:10px;
}
.tool-selector-fill{display:none}
.tools-home-panel{
  max-width:760px;
  padding:15px 2px 7px;
}
.tools-home-panel p{
  margin:0;
  color:var(--text-secondary);
  font-size:15px;
  line-height:1.55;
}
.tools-home-panel strong{
  color:var(--text-strong);
  font-weight:900;
}
.tools-workspace{
  padding-top:0;
}
.tool-section[hidden],
.tools-home-panel[hidden],
.tool-local-note[hidden]{display:none!important}
.tool-local-note{
  align-self:center;
  margin-left:16px;
}
.tool-output-head{
  margin-bottom:11px;
}
.tool-output-head .section-heading{
  min-width:320px;
}
.tool-output-head .section-title{
  min-width:300px;
}
.tool-local-note{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:31px;
  padding:7px 10px;
  border:1px solid rgba(91,166,210,.20);
  background:rgba(4,18,27,.58);
  color:var(--text-muted);
  font-size:10px;
  font-weight:850;
  letter-spacing:.05em;
  white-space:nowrap;
}
.tool-local-note::before{
  content:"";
  width:7px;
  height:7px;
  flex:0 0 auto;
  transform:rotate(45deg);
  background:var(--green);
  box-shadow:0 0 7px rgba(66,225,105,.18);
}
.tool-upload-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.file-slot{
  position:relative;
  min-height:92px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(190px,.52fr);
  align-items:center;
  gap:14px;
  padding:10px 17px 9px;
  border:1px solid var(--border-panel);
  border-top:3px solid var(--steel);
  background:linear-gradient(180deg,rgba(9,26,39,.98),rgba(4,14,21,.99));
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  clip-path:polygon(0 0,calc(100% - 11px) 0,100% 11px,100% 100%,11px 100%,0 calc(100% - 11px));
  cursor:pointer;
  transition:border-color .10s linear,background .10s linear,box-shadow .10s linear;
}
.file-slot::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg,var(--border-section),transparent 72%);
}
.file-slot[data-file-ready="true"]{
  border-top-color:var(--gold);
}
.file-slot:hover,
.file-slot:focus-within{
  border-color:var(--steel2);
  border-top-color:var(--gold);
  background:linear-gradient(180deg,rgba(13,36,51,.99),rgba(4,14,21,.99));
  box-shadow:0 12px 28px rgba(0,0,0,.22),inset 0 0 0 1px rgba(112,194,236,.08);
}
.file-slot input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.file-slot-copy,
.file-slot-footer{
  position:relative;
  z-index:1;
  min-width:0;
}
.file-slot-copy{display:block}
.file-slot-footer{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:5px;
}
.file-slot-kicker{
  color:var(--steel2);
  font-size:10px;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.file-slot-title{
  display:block;
  margin:3px 0 3px;
  color:var(--text-strong);
  font-size:var(--type-subhead);
  font-weight:950;
  line-height:1.18;
}
.file-slot-description{
  display:block;
  margin:0;
  color:var(--text-secondary);
  font-size:13.5px;
  line-height:1.38;
}
.file-slot-action{
  width:max-content;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 12px;
  border:1px solid var(--border-control);
  background:linear-gradient(180deg,var(--sto-pressed-top),var(--sto-pressed-mid) 48%,var(--sto-pressed-break) 52%,var(--sto-pressed-low));
  color:var(--text-inverse-authority);
  font-size:10px;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
  clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%);
}
.file-slot:hover .file-slot-action,
.file-slot:focus-within .file-slot-action{filter:none}
.file-slot-name{
  min-width:0;
  display:block;
  width:100%;
  max-width:240px;
  margin-top:0;
  overflow:hidden;
  color:var(--text-muted);
  font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono",monospace;
  font-size:10.5px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tool-controls{
  position:relative;
  display:grid;
  grid-template-columns:minmax(270px,.7fr) minmax(170px,.38fr) minmax(280px,.88fr) minmax(260px,.88fr);
  grid-template-areas:"rank count status period";
  align-items:center;
  gap:14px 18px;
  margin-top:10px;
  padding:11px 14px 11px 17px;
  border:1px solid var(--border-panel);
  border-left:7px solid var(--gold);
  background:linear-gradient(100deg,rgba(71,60,12,.13),rgba(6,20,29,.97) 28%,rgba(3,12,19,.99));
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  clip-path:polygon(0 0,calc(100% - 11px) 0,100% 11px,100% 100%,11px 100%,0 calc(100% - 11px));
}
.tool-control-group{min-width:0}
.tool-rank-group{grid-area:rank}
.tool-count-control{grid-area:count}
.tool-control-label{
  display:block;
  margin-bottom:5px;
  color:var(--steel2);
  font-size:9.5px;
  font-weight:950;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.tool-segmented{
  display:flex;
  width:max-content;
  max-width:100%;
  border-bottom:2px solid var(--surface-command);
}
.tool-segment{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 15px 8px;
  border:1px solid var(--border-control);
  border-bottom:0;
  background:linear-gradient(180deg,var(--sto-idle-top),var(--sto-idle-mid) 48%,var(--sto-idle-low) 52%,var(--sto-idle-tail));
  color:var(--text-inverse);
  font-size:10.5px;
  font-weight:950;
  cursor:pointer;
}
.tool-segment + .tool-segment{margin-left:3px}
.tool-segment[aria-pressed="true"]{
  color:var(--text-inverse-authority);
  background:linear-gradient(180deg,var(--sto-pressed-top),var(--sto-pressed-mid) 48%,var(--sto-pressed-break) 52%,var(--sto-pressed-low));
}
.tool-number-line{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--text-secondary);
  font-size:12px;
  font-weight:750;
  white-space:nowrap;
}
.tool-number{
  width:86px;
  min-height:34px;
  padding:7px 10px;
  border:1px solid var(--border-strong);
  background:#06131e;
  color:var(--text-strong);
  font:900 14px/1.1 ui-monospace,"Cascadia Mono","Segoe UI Mono",monospace;
  outline:0;
}
.tool-number:focus{border-color:var(--gold);box-shadow:0 0 0 1px rgba(240,212,79,.18)}
.tool-status{
  grid-area:status;
  min-width:0;
  display:none;
  align-items:flex-start;
  gap:9px;
  color:var(--text-secondary);
  font-size:12.5px;
  line-height:1.42;
}
.tool-status.is-visible{display:flex}
.tool-status.is-visible::before{
  content:"";
  width:8px;
  height:8px;
  margin-top:4px;
  flex:0 0 auto;
  background:var(--steel);
  transform:rotate(45deg);
  box-shadow:0 0 0 1px rgba(91,166,210,.22);
}
.tool-status.is-error{color:#f2c1bd}
.tool-status.is-error::before{background:var(--red);box-shadow:0 0 0 1px rgba(215,71,63,.22)}
.tool-status.is-ready{color:#d7f1df}
.tool-status.is-ready::before{background:var(--green);box-shadow:0 0 0 1px rgba(46,204,113,.22)}
.tool-period{
  grid-area:period;
  min-width:0;
  justify-self:end;
  text-align:right;
}
.tool-period strong{
  display:block;
  color:var(--text-strong);
  font-size:13px;
  font-weight:900;
  line-height:1.25;
}
.tool-period span{
  display:block;
  margin-top:3px;
  color:var(--text-muted);
  font-size:10.5px;
  line-height:1.3;
}
.tool-output-section{
  padding-top:28px;
}
.tool-output-intro{
  min-width:0;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
}
.tool-output-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.tool-output-copy strong{
  overflow-wrap:anywhere;
  color:var(--text-strong);
  font-size:15px;
  font-weight:950;
  line-height:1.25;
}
.tool-preview-meta{
  color:var(--text-muted);
  font-size:11px;
  line-height:1.35;
}
.tool-export-btn{
  flex:0 0 auto;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 16px 9px;
  border:1px solid var(--border-control);
  background:linear-gradient(180deg,var(--sto-pressed-top),var(--sto-pressed-mid) 48%,var(--sto-pressed-break) 52%,var(--sto-pressed-low));
  color:var(--text-inverse-authority);
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.045em;
  text-transform:uppercase;
  cursor:pointer;
  clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%);
}
.tool-export-btn:hover:not(:disabled){filter:brightness(1.08)}
.tool-export-btn:disabled{opacity:.48;cursor:not-allowed;filter:saturate(.5)}
.tool-preview{
  overflow:hidden;
  border:1px solid var(--border-strong);
  border-top:3px solid var(--steel);
  background:linear-gradient(180deg,rgba(7,25,38,.40),rgba(3,12,19,.48));
  box-shadow:0 14px 32px rgba(0,0,0,.24);
  clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));
}
.tool-table-wrap{
  width:100%;
  overflow-x:auto;
}
.tool-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.tool-table th,
.tool-table td{
  padding:10px 13px;
  border-bottom:1px solid var(--line-soft);
  text-align:left;
  vertical-align:middle;
}
.tool-table th{
  background:var(--surface-command);
  color:var(--steel2);
  font-size:10.5px;
  font-weight:950;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.tool-table tbody tr:nth-child(even){background:rgba(13,39,56,.12)}
.tool-table tbody tr:last-child td{border-bottom:0}
.tool-table .rank-col{width:66px;color:var(--gold);font-weight:950}
.tool-table .member-col-head{width:auto}
.tool-table .gain-col{
  width:190px;
  border-left:0;
  text-align:right;
  font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono",monospace;
  font-weight:900;
  color:var(--steel2);
}
.tool-table td.gain-col{background:rgba(10,31,45,.07)}
.tool-table .member-col{overflow-wrap:anywhere;color:var(--text-primary);font-weight:850}
.tool-empty{
  padding:22px 18px!important;
  color:var(--text-muted)!important;
  text-align:center!important;
  font-weight:650!important;
}
.tool-footnote{
  margin:10px 2px 0;
  color:var(--text-muted);
  font-size:11px;
  line-height:1.42;
}
@media (max-width:1080px){
  .tool-output-intro{align-items:flex-start;flex-direction:column;gap:9px}
  .tool-controls{grid-template-columns:1fr 180px;grid-template-areas:"rank count" "status period";align-items:start}
  .tool-status{justify-self:start}
  .tool-period{justify-self:end;text-align:right}
}
@media (max-width:760px){
  .tool-selector-line{grid-template-columns:1fr}
  .tool-selector-title{min-width:0;width:100%}
  .tools-switcher{
    padding:0 0 0 9px;
    border-left:1px solid var(--border-panel);
    border-right:1px solid var(--border-panel);
    background:rgba(4,18,27,.72);
  }
  .tools-switch-link{min-width:108px;padding-inline:11px}
  .tool-local-note{
    justify-self:start;
    margin:9px 0 0 2px;
  }
  .tools-home-panel{padding-top:13px}
  .tools-workspace{padding-top:0}
  .tool-output-head .section-heading,
  .tool-output-head .section-title{min-width:0}
  .tool-upload-grid{grid-template-columns:1fr}
  .file-slot{min-height:92px;padding:10px 16px 9px}
  .tool-output-section{padding-top:26px}
  .tool-export-btn{align-self:flex-start}
}
@media (max-width:520px){
  .tools-switcher{padding-left:7px}
  .tools-switch-link{min-width:104px;font-size:9.5px}
  .file-slot{grid-template-columns:1fr;min-height:0;gap:9px;padding:13px 15px 12px}
  .file-slot-footer{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;width:100%}
  .file-slot-name{max-width:none}
  .tool-controls{grid-template-columns:1fr;grid-template-areas:"rank" "count" "status" "period"}
  .tool-status{justify-self:start}
  .tool-period{justify-self:start;text-align:left}
  .tool-segmented{width:100%}
  .tool-segment{flex:1 1 50%;padding-inline:10px}
  .tool-number-line{white-space:normal}
  .tool-table th,.tool-table td{padding:9px 8px}
  .tool-table .rank-col{width:48px}
  .tool-table .gain-col{width:128px;font-size:10.5px}
  .tool-table .member-col{font-size:12px}
}
