/* Shared chrome for the browser-side utility tools + /tools index.
   Mirrors the plug-types/landed design language: --accent, --card, --line. */
.st-shell { max-width: 1040px; margin: 0 auto; padding: 0 20px 60px; }
.st-hero { margin: 26px 0 22px; }
.st-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent, #b45309); font-weight: 700; margin: 0 0 8px; }
.st-hero h1 { font-size: clamp(26px, 4.4vw, 38px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.02em; }
.st-lede { font-size: 16px; color: var(--ink-soft, #4b5563); max-width: 760px; margin: 0; }

.st-console { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 840px) { .st-console { grid-template-columns: 1fr; } }
.st-panel, .st-card { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 18px; }
.st-panel h2 { font-size: 14px; margin: 0 0 12px; }
.st-field { margin-bottom: 12px; }
.st-field label, .st-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.st-input, .st-select, .st-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line, #d1d5db); border-radius: 9px; font-size: 14px; box-sizing: border-box; background: #fff; color: inherit; font-family: inherit; }
.st-textarea { min-height: 110px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
.st-input:focus, .st-select:focus, .st-textarea:focus { outline: 2px solid var(--accent, #b45309); outline-offset: 1px; }
.st-hint { font-size: 12px; color: var(--ink-soft, #9ca3af); margin: 4px 0 0; line-height: 1.5; }
.st-row { display: flex; gap: 10px; }
.st-row > * { flex: 1; min-width: 0; }
.st-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 8px 0; }
.st-check input { width: 16px; height: 16px; accent-color: var(--accent, #b45309); }

.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--accent, #b45309); background: var(--accent, #b45309); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; width: 100%; box-sizing: border-box; }
.st-btn:hover { filter: brightness(1.06); }
.st-btn:disabled { opacity: .45; cursor: not-allowed; }
.st-btn.ghost { background: #fff; color: var(--accent, #b45309); }
.st-btn.ghost:hover { background: #fafafa; filter: none; }
.st-actions { display: grid; gap: 8px; margin-top: 14px; }

.st-drop { border: 2px dashed var(--line, #d1d5db); border-radius: 14px; padding: 26px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: #fff; }
.st-drop:hover, .st-drop.over { border-color: var(--accent, #b45309); background: color-mix(in srgb, var(--accent, #b45309) 5%, #fff); }
.st-drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.st-drop span { font-size: 13px; color: var(--ink-soft, #6b7280); }
.st-drop input { display: none; }

.st-status { font-size: 13px; color: var(--ink-soft, #4b5563); margin: 10px 0 0; min-height: 18px; }
.st-status.err { color: #b91c1c; }
.st-status.ok { color: #15803d; }
.st-progress { height: 6px; background: var(--line, #e5e7eb); border-radius: 999px; overflow: hidden; margin-top: 8px; display: none; }
.st-progress i { display: block; height: 100%; background: var(--accent, #b45309); width: 0; transition: width .2s; }

.st-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.st-thumb { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px; background: #fff; text-align: center; }
.st-thumb canvas { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.st-thumb span { display: block; font-size: 11px; color: var(--ink-soft, #9ca3af); margin-top: 6px; word-break: break-all; }
.st-thumb.bad canvas { opacity: .4; }
.st-thumb.bad span { color: #b91c1c; }
.st-empty { border: 1px dashed var(--line, #d1d5db); border-radius: 10px; padding: 28px 16px; text-align: center; color: var(--ink-soft, #9ca3af); font-size: 13px; }

.st-tablewrap { overflow-x: auto; margin-top: 14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; }
.st-table th, .st-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line, #e5e7eb); }
.st-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft, #6b7280); font-weight: 700; }
.st-table td.mono, .st-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.st-table tr.bad td { background: #fef2f2; }
.st-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.st-badge.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.st-badge.bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.st-sect { margin-top: 32px; }
.st-sect h2 { font-size: 19px; margin: 0 0 10px; }
.st-sect h3 { font-size: 15px; margin: 16px 0 6px; }
.st-sect p, .st-sect li { font-size: 15px; line-height: 1.7; }
.st-note-line { font-size: 13px; color: var(--ink-soft, #6b7280); border-left: 3px solid var(--line, #e5e7eb); padding-left: 12px; }
.st-faq details { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.st-faq summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.st-faq details p { margin: 8px 0 2px; color: var(--ink-soft, #4b5563); font-size: 14px; }

.st-toolnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.st-toolnav a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line, #d1d5db); border-radius: 999px; text-decoration: none; color: inherit; font-size: 12px; }
.st-toolnav a:hover { border-color: var(--accent, #b45309); color: var(--accent, #b45309); }
.st-toolnav a.cur { border-color: var(--accent, #b45309); color: var(--accent, #b45309); font-weight: 700; }

/* /tools index cards */
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.st-toolcard { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 18px; background: var(--card, #fff); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.st-toolcard:hover { border-color: var(--accent, #b45309); transform: translateY(-1px); }
.st-toolcard b { font-size: 16px; }
.st-toolcard span { font-size: 13px; color: var(--ink-soft, #4b5563); line-height: 1.6; flex: 1; }
.st-toolcard i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent, #b45309); }

/* Barcode label preview + print */
.st-labelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.st-label { border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: #fff; padding: 10px; text-align: center; }
.st-label svg { max-width: 100%; height: auto; }
.st-label .nm { font-size: 12px; font-weight: 600; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-label .pr { font-size: 12px; color: var(--ink-soft, #6b7280); margin: 4px 0 0; }
.st-label.bad { border-color: #fecaca; background: #fef2f2; }
.st-label.bad .reason { font-size: 11px; color: #b91c1c; }
@media print {
  body * { visibility: hidden !important; }
  #st-print, #st-print * { visibility: visible !important; }
  #st-print { position: absolute; inset: 0; display: block !important; }
  #st-print .st-label { break-inside: avoid; display: inline-block; margin: 2mm; width: 48mm; vertical-align: top; }
}

/* dim option chips (sku tool) */
.st-dim { border: 1px solid var(--line, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.st-dim .st-input { margin-bottom: 8px; }
.st-dim .st-input:last-child { margin-bottom: 0; }

/* field validation + duplicate markers (image-standardizer / sku tool) */
.st-input.bad { border-color: #fecaca; background: #fef2f2; }
.st-table td.sv-dup { color: #b91c1c; font-weight: 600; }
