/* The app frame on the product kit. One column, the tool first; the what/who/price strip sits in the header and
   shortens to the price alone on phones. Motion only on the "Done" line (200 ms), none under "reduce motion". */
body { margin: 0; }
.as-header { flex-wrap: wrap; row-gap: 6px; }
.as-brand { font-weight: 650; text-decoration: none; color: var(--sk-text); white-space: nowrap; }
.as-brand::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 3px; background: var(--sk-accent); vertical-align: 1px; }
.as-strip { display: flex; gap: 6px 14px; flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--sk-text-muted); text-decoration: none; overflow: hidden; }
.as-strip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-strip__price { color: var(--sk-accent); flex: none; }
.as-strip--pro .as-strip__price { visibility: hidden; } /* Pro: no price, same space, so the header never jumps (gate.js paintStrip) */
.as-strip:hover .as-strip__what { color: var(--sk-text); text-decoration: underline; }
.as-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.as-main { max-width: 760px; width: 100%; margin: 0 auto; padding: 24px; box-sizing: border-box; }
.as-tool { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.as-input { width: 100%; box-sizing: border-box; min-height: 160px; resize: vertical; font-family: var(--sk-mono); font-size: 14px; }
.as-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.as-row--fill .sk-input { flex: 1 1 200px; min-width: 0; }
.as-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sk-text-muted); }
.as-msg { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--sk-text-muted); }
.as-msg[data-kind="done"] { color: var(--sk-success); font-weight: 600; }
.as-msg[data-kind="error"] { color: var(--sk-danger); }
.as-land { animation: as-land 200ms var(--sk-ease) both; }
.as-out { margin: 0; padding: 12px; max-height: 320px; overflow: auto; border: 1px solid var(--sk-line); border-radius: 8px; background: var(--sk-bg); font-family: var(--sk-mono); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.as-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.as-h1 { margin: 0; font-size: 22px; letter-spacing: -0.015em; }
.as-h3 { margin: 16px 0 8px; font-size: 15px; }
.as-card { margin-bottom: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.as-card p { margin: 0; line-height: 1.45; }
.as-compare { margin: 0; padding-left: 18px; line-height: 1.5; }
.as-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 16px 24px; border-top: 1px solid var(--sk-line); font-size: 13px; color: var(--sk-text-muted); }
.as-foot a { color: var(--sk-text-muted); }
@keyframes as-land { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .as-strip__what, .as-strip__who { display: none; } .as-main { padding: 16px; } }
@media (max-width: 360px) { .as-header { padding: 8px 12px; } .as-end .sk-btn { padding-left: 10px; padding-right: 10px; } }
@media (prefers-reduced-motion: reduce) { .as-land { animation: none; } }

/* Tagsheet: the drop zone first, then table on the left and settings, first labels and export on the right. */
.ts-start { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.ts-drop.ts-over { border-color: var(--sk-accent); }
.ts-work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.ts-main { display: grid; gap: 10px; min-width: 0; }
.ts-side { display: grid; gap: 14px; }
.ts-settings, .ts-fields { display: grid; gap: 10px; }
.ts-problems { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.ts-problems:empty { display: none; }
.ts-table { max-height: 70vh; overflow: auto; }
.ts-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ts-label { margin: 0; padding: 8px; border-radius: 8px; background: #fff; color: #121215; display: grid; justify-items: center; gap: 4px; text-align: center; animation: ts-drop 200ms var(--sk-ease) both; }
.ts-label img { width: 100%; height: auto; max-width: 112px; }
.ts-label figcaption { display: grid; font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.ts-label figcaption span:first-child { font-weight: 600; }
.ts-export .sk-progress__track { margin-top: 10px; }
@keyframes ts-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .ts-work { grid-template-columns: 1fr; } }
/* Two columns: the row table stays in view while the long settings column scrolls beside it (task 2835). */
@media (min-width: 901px) { .ts-main { position: sticky; top: 16px; } .ts-table { max-height: calc(100vh - 120px); } }
.as-main:has(.ts-work:not([hidden])) { max-width: 1240px; } /* the row table gets the room once a list is in */
@media (prefers-reduced-motion: reduce) { .ts-label { animation: none; } }

/* Step 2: code style, label sheet and the sheet preview. Signature moment: labels drop onto the sheet one row at a
   time (about 200 ms a row) when the PDF is made; none under "reduce motion". */
.ts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.ts-grid[hidden] { display: none; }
.ts-colour { width: 100%; min-width: 64px; height: 36px; padding: 2px; border: 1px solid var(--sk-line); border-radius: 8px; background: transparent; cursor: pointer; }
.ts-numbers summary { cursor: pointer; font-size: 14px; }
.ts-numbers .as-row { margin-top: 10px; align-items: end; flex-wrap: wrap; }
/* The sheet preview is paper, so it uses the light-theme kit values (sunken sheet, white labels, dark edges) inside the dark app. */
.ts-sheet { position: relative; width: 100%; max-width: 300px; margin: 0 auto; background: #f5f5f6; border-radius: var(--sk-radius-sm); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.45); overflow: hidden; }
.ts-cell { position: absolute; box-sizing: border-box; border: 1px solid rgba(5, 5, 6, 0.10); border-radius: var(--sk-radius-sm); }
.ts-sheet { container-type: inline-size; }
.ts-cell--on { background: #fff; border-color: rgba(5, 5, 6, 0.18); }
.ts-cell__code { position: absolute; display: block; image-rendering: pixelated; }
.ts-cell__text { position: absolute; display: flex; flex-direction: column; justify-content: center; overflow: hidden; line-height: 1.2; font-family: var(--sk-font); }
.ts-cell__text--centre { text-align: center; justify-content: flex-start; }
.ts-cell__text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-cell__text span:first-child { font-weight: 600; }
.ts-layout-hint { margin: -4px 0 0; }
.ts-layout-hint:empty { display: none; }
#ts-layout { width: 100%; min-width: 0; box-sizing: border-box; }
.ts-jobs { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ts-job { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--sk-line); border-radius: 8px; }
.ts-job__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ts-job__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-job__btns .sk-btn, .ts-undo { padding: 4px 10px; min-height: 0; }
.ts-cell--drop { animation: ts-drop 200ms var(--sk-ease) both; }
@media (prefers-reduced-motion: reduce) { .ts-cell--drop { animation: none; } }
