/* notslop.studio free tools: what the tool pages add on top of the site's site.css + tokens.css (loaded first, by
   relative link). Tokens only, square corners, hairlines, colour only from the work plus the one accent. */

.tool-head { padding: 64px var(--gutter) 40px; display: grid; gap: 16px; max-width: 900px; }
.tool-head .lead { margin: 0; }

/* the two cells: the upload / text box and the limits */
.tool-cells { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.tool-cells > :nth-child(2n) { border-right: 0; }
.tool-cells .cell-body { padding: 24px; gap: 14px; }

.drop { position: relative; display: grid; place-items: center; gap: 12px; min-height: 220px; padding: 32px 24px;
  border: 1px dashed var(--line-strong); background: var(--bg-sunken); text-align: center; cursor: pointer;
  background-image: repeating-linear-gradient(0deg, var(--scanline) 0 1px, transparent 1px 3px); }
.drop:hover, .drop.is-over { border-color: var(--accent); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop.is-busy { cursor: progress; opacity: .7; }
.drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop.is-busy input[type=file] { cursor: progress; }
.drop .drop-title { font: 620 22px/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--ink-strong); }
.drop .drop-title .serif { font-size: 1.05em; }
.drop .btn { pointer-events: none; }

.bar { height: 4px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.status { color: var(--ink); min-height: 1.6em; }
.status.is-bad { color: var(--danger); }
.soon { display: grid; gap: 10px; padding: 32px 24px; border: 1px solid var(--line); background: var(--bg-sunken); }
.soon .tag { color: var(--accent-ink); }
.drop[hidden], .soon[hidden] { display: none; }   /* their display: grid above would otherwise beat the hidden attribute */

.limits { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.limits div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.limits dt { color: var(--faint); }
.limits dd { margin: 0; color: var(--ink); }
.quiet-cta { color: var(--muted); }
.quiet-cta a { color: var(--ink); text-underline-offset: 3px; }

/* script box */
.script-box { width: 100%; min-height: 280px; resize: vertical; padding: 16px; border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--bg-sunken); color: var(--ink); font: 400 16px/1.6 var(--font-sans); }
.script-box:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.btn[disabled] { opacity: .5; cursor: progress; }

/* the result */
.result[hidden] { display: none; }
.result { border-top: 1px solid var(--line); }
.res-head { padding: 40px var(--gutter) 28px; display: grid; gap: 12px; }
.res-head h2 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -0.03em; }
.res-head h2:focus { outline: none; }
.stats { border-top: 1px solid var(--line); }
.stats .cell-body { padding: 18px 16px 20px; gap: 4px; }
.stats .big, .tnum.big { font: 620 clamp(24px, 2.4vw, 32px)/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--ink-strong); }
.stats .small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }

.timeline-wrap { padding: 28px var(--gutter) 20px; border-bottom: 1px solid var(--line); }
.timeline { display: block; width: 100%; height: 44px; outline: 1px solid var(--line); }
.timeline .t-a { fill: var(--bg-sunken); }
.timeline .t-b { fill: var(--line); }
.timeline .t-cut { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.timeline-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--faint); }

.table-wrap { overflow-x: auto; }
.res-table { width: 100%; border-collapse: collapse; }
.res-table caption { text-align: left; padding: 14px var(--gutter); color: var(--faint); border-bottom: 1px solid var(--line); }
.res-table th, .res-table td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.res-table th { color: var(--faint); font-weight: 500; }
.res-table th:first-child, .res-table td:first-child { padding-left: var(--gutter); width: 56px; }
.res-table td { color: var(--ink); }
.res-table .line-text { width: 60%; overflow-wrap: anywhere; }
.res-table .line-text span + .flag { margin-left: 10px; }
.res-table tr.is-over td { background: var(--bg-raised); }
.res-table tr.split-row td { color: var(--muted); font-size: 15px; }
.res-table tr.split-row td.line-text { padding-left: 32px; }
.flag { display: inline-block; padding: 1px 6px; color: var(--danger); outline: 1px solid currentColor; outline-offset: -1px; white-space: nowrap; }

.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 24px var(--gutter) 32px; }
.media-cells { border-top: 1px solid var(--line); }
.well-video { background: var(--bg-sunken); display: grid; place-items: center; padding: 16px; }
.well-video video { max-height: 70vh; width: auto; max-width: 100%; outline: 1px solid var(--line); }
.media-cells img { width: 100%; height: auto; }

/* the index */
.tool-list .rows h3 a { text-decoration: none; }
.tool-list .rows h3 a:hover { color: var(--accent-ink); }
.tool-list .rows li { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr) 140px; }
.tool-list .tag { color: var(--accent-ink); text-align: right; }
.tool-list .tag::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.tool-list .tag.is-soon { color: var(--faint); }
.tool-list .tag.is-soon::before { background: transparent; outline: 1px solid var(--faint); outline-offset: -1px; }

@media (max-width: 900px) {
  .tool-cells { grid-template-columns: 1fr; }
  .tool-cells > * { border-right: 0; }
  .tool-list .rows li { grid-template-columns: 40px 1fr; }
  .tool-list .rows li p, .tool-list .rows li .tag { grid-column: 2; text-align: left; }
}
@media (max-width: 600px) {
  .tool-head { padding: 44px var(--gutter) 28px; }
  .drop { min-height: 180px; }
  .limits div { grid-template-columns: 92px minmax(0, 1fr); }
  .res-table th, .res-table td { padding: 8px 10px; }
  .res-table th:first-child, .res-table td:first-child { width: 36px; }
  .res-table tr.split-row td.line-text { padding-left: 18px; }
  .res-actions .btn { width: 100%; justify-content: center; }
  /* phone: the four numbers two by two, and the script table keeps the line, its characters and creator time */
  .cells.stats { grid-template-columns: repeat(2, 1fr); }
  .cells.stats > * { border-right: 1px solid var(--line) !important; }
  .cells.stats > :nth-child(2n) { border-right: 0 !important; }
  .stats .cell-strip .idx { display: none; }
  .script-table th:nth-child(4), .script-table td:nth-child(4), .script-table th:nth-child(6),
  .script-table tr:not(.split-row) td:nth-child(6) { display: none; }
  .res-table .line-text { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .bar > span { transition: none; } }
