/* Shared widths keep the tools aligned with the global StruTools shell. */
.st-hub,
.st-app { width: min(1420px, calc(100% - 48px)); margin: 0 auto; }

/* STAAD Tools library landing page. */
.st-hero { padding: 56px 0 28px; }
.st-kicker { margin: 0; color: var(--accent-strong); font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.st-hero h1,
.st-side h1 { margin: 12px 0 16px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.08; }
main.st-app .st-side h1 { margin: 8px 0 12px; font-size: clamp(2rem, 3vw, 42px) !important; }
.st-hero p,
.st-side p,
.st-grid p { color: var(--muted); line-height: 1.65; max-width: 46rem; }
.st-hero .primary-action {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; padding: 0 16px;
  border-radius: 12px; background: linear-gradient(135deg, #0b57d0, #1a73e8); color: #fff; font-weight: 750; text-decoration: none;
}
.st-grid { display: grid; gap: 18px; padding: 20px 0 80px; }
.st-grid article {
  display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease;
}
.st-grid article:hover { transform: translateY(-2px); border-color: var(--accent); }
.st-grid .st-card-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); }
.st-grid h2 { margin: 12px 0 8px; font-size: 1.25rem; }
.st-grid a,
.st-side a { color: var(--accent-strong); font-weight: 700; }
.st-grid article > a { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; }

/* Application shell separates settings from the code and result workspace. */
.st-app { display: grid; grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); gap: 22px; align-items: start; padding: 28px 0 80px; }
.st-side,
.st-work { min-width: 0; }
.st-side {
  position: sticky; top: calc(var(--header-height) + 18px); max-height: calc(100vh - var(--header-height) - 36px); padding: 22px; overflow: auto;
  border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 16px 45px rgba(45, 78, 153, .10); scrollbar-width: thin;
}
.st-side .back-link,
.lisp-side > a { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; text-decoration: none; }
.st-side #toolLead { margin: 0 0 8px; font-size: .86rem; line-height: 1.52; }
.st-side #guideLink { font-size: .84rem; }
#toolControls { display: grid; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Reusable settings cards keep related controls together. */
.st-control-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.st-control-heading {
  display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: .78rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.st-control-heading i { color: var(--accent-strong); }
.st-control-actions,
.st-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.st-field-grid.one-column { grid-template-columns: 1fr; }
.st-limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-side label { display: grid; gap: 6px; margin: 0; color: var(--muted); font-size: .74rem; font-weight: 700; }
.st-side input:not([type="checkbox"]):not([type="file"]),
.st-side select {
  width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0;
  background: var(--paper); color: var(--text); box-sizing: border-box; transition: border-color .18s ease, box-shadow .18s ease;
}
html[data-theme="dark"] .st-side input:not([type="checkbox"]):not([type="file"]),
html[data-theme="dark"] .st-side select { background: var(--surface); }
.st-side input:not([type="file"]):focus,
.st-side select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--core-focus); }
.st-check {
  display: flex !important; grid-column: 1 / -1; min-height: 40px; padding: 0 10px; align-items: center; gap: 9px !important;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text) !important;
}
.st-check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Workspace card and editors follow the site surface tokens in both themes. */
.st-work {
  display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow);
}
.st-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.st-editor-card {
  min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--paper);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .st-editor-card { background: var(--surface-2); }
.st-editor-bar {
  display: flex; min-height: 42px; padding: 0 13px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
}
.st-editor-bar i { color: var(--accent-strong); }
.st-editor-title { font-size: .77rem; font-weight: 750; letter-spacing: .02em; }
.st-editor-meta { margin-left: auto; color: var(--muted); font-size: .65rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.st-editor-card textarea,
.st-work textarea.st-code-editor {
  display: block; width: 100%; min-height: 430px; margin: 0; padding: 18px 20px; resize: vertical; overflow: auto;
  border: 0; border-radius: 0; outline: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px) 0 0 / 4ch 100%,
    var(--paper);
  color: var(--text); caret-color: var(--accent); font-family: "Courier New", Consolas, "Liberation Mono", monospace;
  font-size: 14px; font-weight: 400; line-height: 1.55; letter-spacing: 0; tab-size: 4; box-sizing: border-box;
  scrollbar-color: var(--line) var(--surface-2);
}
html[data-theme="dark"] .st-editor-card textarea,
html[data-theme="dark"] .st-work textarea.st-code-editor {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent) 1px, transparent 1px) 0 0 / 4ch 100%,
    var(--surface-2);
}
.st-editor-card textarea::placeholder { color: var(--muted); opacity: 1; }
.st-editor-card textarea::selection { background: var(--accent-soft); color: var(--text); }
.st-editor-card.is-output textarea {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1px) 0 0 / 4ch 100%,
    color-mix(in srgb, var(--accent-soft) 42%, var(--paper));
  color: var(--text);
}
html[data-theme="dark"] .st-editor-card.is-output textarea {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent) 1px, transparent 1px) 0 0 / 4ch 100%,
    color-mix(in srgb, var(--accent-soft) 55%, var(--surface-2));
}
.st-editor-card textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }

/* Action strip keeps the primary workflow at the leading edge. */
.st-toolbar {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: center; min-height: 46px; padding: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
}
.st-toolbar input {
  min-width: 180px; min-height: 40px; margin-left: auto; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 9px; outline: 0; background: var(--paper); color: var(--text);
}
html[data-theme="dark"] .st-toolbar input { background: var(--surface); }
.st-toolbar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--core-focus); }
.st-toolbar button,
.st-side button,
.st-side .file-button,
.file-button {
  position: relative; display: inline-flex; min-height: 40px; padding: 0 14px; align-items: center; justify-content: center; gap: 8px;
  overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--accent-strong);
  font-size: .88rem; font-weight: 750; text-decoration: none; cursor: pointer; box-sizing: border-box;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}
.st-side button,
.st-side .file-button { width: 100%; }
.st-toolbar button:hover,
.st-side button:hover,
.file-button:hover { transform: translateY(-1px); background: var(--surface-2); }
.st-toolbar .primary,
.st-side .primary,
.file-button.primary {
  border-color: transparent; background: linear-gradient(135deg, #0b57d0, #1a73e8); color: #fff;
  box-shadow: 0 10px 25px rgba(26, 115, 232, .24);
}
.st-toolbar .primary:hover,
.st-side .primary:hover,
.file-button.primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, #0b57d0, #1a73e8); }
html[data-theme="dark"] .st-toolbar .primary,
html[data-theme="dark"] .st-side .primary,
html[data-theme="dark"] .file-button.primary {
  background: linear-gradient(135deg, #8ab4f8, #669df6); color: #071020; box-shadow: 0 10px 25px rgba(138, 180, 248, .22);
}
.st-toolbar button:focus-visible,
.st-side button:focus-visible,
.file-button:focus-within { outline: 3px solid var(--core-focus); outline-offset: 2px; }
.file-button input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer;
  min-height: 0 !important; border: 0 !important; background: transparent !important; font-size: 0;
}

/* Result cards, tables and summaries stay visually separate from editable source. */
.st-results { display: grid; gap: 12px; min-width: 0; }
.st-results:empty { display: none; }
.st-results h3 { margin: 8px 2px 0; color: var(--text); font-size: .92rem; letter-spacing: -.01em; }
.st-table { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.st-table:empty { display: none; }
.st-table table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.st-table th,
.st-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.st-table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-size: .71rem; letter-spacing: .05em; text-transform: uppercase;
}
.st-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.st-table tbody tr:hover { background: var(--accent-soft); }
.st-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-metrics div {
  min-width: 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 14px; background: var(--accent-soft);
}
.st-metrics span { display: block; color: var(--muted); font-size: .69rem; letter-spacing: .07em; text-transform: uppercase; }
.st-metrics b { font-size: 1.16rem; overflow-wrap: anywhere; }
.st-status {
  margin: 0; padding: 10px 11px; border-left: 3px solid var(--accent); border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent); color: var(--muted); font-size: .78rem; line-height: 1.45;
}
.st-status.error { border-left-color: #d92d4a; background: rgba(217, 45, 74, .09); color: #b4233c; }
html[data-theme="dark"] .st-status.error { color: #ff9bad; }
.weight-extractor-page #toolControls > .st-status { width: 100%; box-sizing: border-box; justify-self: stretch; }
.st-pair { display: grid; gap: 12px; }
code { font-family: "Courier New", Consolas, monospace; font-size: .86em; }

/* Responsive rules keep settings accessible without shrinking the code editor. */
@media (min-width: 900px) { .st-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 1080px) {
  .st-app { grid-template-columns: 1fr; width: min(960px, calc(100% - 32px)); }
  .st-side { position: static; max-height: none; }
  #toolControls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #toolControls > .st-status { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .st-hub,
  .st-app { width: min(100% - 24px, 720px); }
  .st-hero { padding-top: 28px; }
  .st-side,
  .st-work { padding: 14px; border-radius: 17px; }
  #toolControls,
  .st-editor-grid,
  .st-control-actions,
  .st-field-grid,
  .st-limit-grid,
  .st-metrics { grid-template-columns: 1fr; }
  .st-check { grid-column: auto; }
  .st-toolbar { align-items: stretch; }
  .st-toolbar button { flex: 1 1 auto; }
  .st-toolbar input { width: 100%; margin-left: 0; }
  .st-editor-card textarea,
  .st-work textarea.st-code-editor { min-height: 300px; padding: 15px; font-size: 13px; }
}

/* Weight Extractor follows the shared StruTools application rhythm: title, source, actions, report. */
.weight-extractor-page .st-app { display: block; width: min(1180px, calc(100% - 40px)); padding: 46px 0 80px; }
.weight-extractor-page .st-side {
  position: static; max-height: none; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.weight-extractor-page .st-side .back-link { margin-bottom: 25px; }
.weight-extractor-page .st-side h1 { max-width: 820px; margin: 12px 0 15px; font-size: clamp(2.45rem, 5vw, 50px) !important; }
.weight-extractor-page .st-side #toolLead { max-width: 760px; margin-bottom: 10px; font-size: .98rem; line-height: 1.65; }
.weight-extractor-page #toolControls { margin-top: 30px; padding: 0; border: 0; }
.weight-extractor-page .st-work { margin-top: 18px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }

.st-weight-upload-card,
.st-weight-report,
.st-weight-actions {
  min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
}
.st-weight-upload-card { padding: 24px; }
.st-step-heading { display: grid; grid-template-columns:minmax(0,1fr) auto; gap: 4px 18px; align-items: start; }
.st-step-heading > span { grid-column: 1 / -1; color: var(--accent-strong); font-size: .68rem; font-weight: 850; letter-spacing: .14em; }
.st-step-heading h2 { margin: 5px 0 4px; color: var(--text); font-size: 1.35rem; letter-spacing: -.025em; }
.st-step-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.st-step-heading > b { align-self: center; padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: .74rem; }
.st-file-drop {
  min-height: 190px; margin-top: 20px !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 5px !important;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 13px; background: var(--surface-2); text-align: center; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.st-file-drop:hover,
.st-file-drop.dragging { transform: translateY(-1px); border-color: var(--accent); background: var(--accent-soft); }
.st-file-drop-icon { width: 45px; height: 45px; margin-bottom: 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--accent-strong); font-size: 1.15rem; }
.st-file-drop strong { color: var(--text); font-size: .92rem; }
.st-file-drop > span:not(.st-file-drop-icon) { color: var(--muted); font-size: .8rem; font-weight: 500; }
.st-file-drop small { margin-top: 10px; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.st-selected-source { margin-top: 20px; padding: 12px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.st-selected-source:not([hidden]) { display: flex; }
.st-source-glyph { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: .68rem; font-weight: 850; }
.st-selected-source > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 3px; }
.st-selected-source strong { overflow: hidden; color: var(--text); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.st-selected-source small { color: var(--muted); font-size: .7rem; }
.st-selected-source button { width: auto; flex: 0 0 auto; }
.st-selected-source button:last-child { width: 38px; padding: 0; color: var(--muted); }
.st-upload-footer { margin-top: 15px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.st-upload-footer > span { min-width: min(420px, 100%); flex: 1 1 420px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.st-upload-footer > span > span { display: inline; }
.st-upload-footer > span b { color: var(--text); }
.st-upload-footer > span i { color: #1d9b62; }
.st-source-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.st-upload-footer button,
.st-source-actions button { width: auto; flex: 0 0 auto; }
.st-upload-footer button:disabled { opacity: .42; cursor: not-allowed; transform: none; filter: grayscale(.2); box-shadow: none; }
.st-source-actions .needs-attention {
  animation: st-extract-ready 1.05s ease-in-out 3;
}
@keyframes st-extract-ready {
  0%, 100% { transform: translateY(0); box-shadow: 0 8px 20px rgba(68, 92, 210, .22); }
  50% { transform: translateY(-1px) scale(1.025); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent), 0 12px 28px rgba(84, 84, 220, .38); }
}
.st-primary-gradient,
.st-side .st-primary-gradient,
.st-report-side .st-primary-gradient {
  border-color: transparent; background: linear-gradient(135deg, var(--accent), #7957ef); color: #fff;
  box-shadow: 0 8px 20px rgba(68, 92, 210, .22);
}
.st-primary-gradient:hover:not(:disabled),
.st-side .st-primary-gradient:hover:not(:disabled),
.st-report-side .st-primary-gradient:hover:not(:disabled) {
  transform: translateY(-1px); filter: brightness(1.06); background: linear-gradient(135deg, var(--accent), #7957ef);
}
.st-weight-post-file:not([hidden]) { display: grid; gap: 18px; }

.st-weight-filter-row { display: flex; justify-content: flex-end; padding-inline: 1px; }
.st-toolbar button:disabled { opacity: .46; cursor: not-allowed; transform: none; filter: none; }
.st-toolbar button.is-busy { pointer-events: none; }
.st-toolbar button.is-busy i { animation: st-button-spin .8s linear infinite; }
@keyframes st-button-spin { to { transform: rotate(360deg); } }
.st-filter-field {
  width: min(420px, 100%); min-width: 0; min-height: 48px; margin: 0; padding: 0 14px; box-sizing: border-box;
  display: flex; align-items: center; gap: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow); transition: border-color .18s ease, box-shadow .18s ease;
}
.st-filter-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--core-focus), var(--shadow); }
.st-filter-field > i { position: static; flex: 0 0 auto; color: var(--accent-strong); transform: none; }
.st-filter-field input {
  width: auto; min-width: 0; min-height: 46px; margin: 0; padding: 0; flex: 1; box-sizing: border-box;
  border: 0; outline: 0; background: transparent; color: var(--text); font: inherit;
}
.st-filter-field input:focus { border: 0; outline: 0; box-shadow: none; }
.st-report-inputs { margin-top: 16px; display: grid; grid-template-columns: minmax(150px, .72fr) minmax(220px, 1.28fr); gap: 10px; }
.st-report-inputs label { display: grid; gap: 5px; color: var(--muted); font-size: .69rem; font-weight: 750; }
.st-report-inputs input { min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--paper); color: var(--text); }
.st-report-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--core-focus); }

.st-weight-report { padding: 28px; }
.st-report-header { min-height: 62px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--text); }
.st-report-header > div > span,
.st-report-table-section header span { color: var(--accent-strong); font-size: .66rem; font-weight: 850; letter-spacing: .12em; }
.st-report-header h2 { margin: 5px 0 4px; color: var(--text); font-size: 1.55rem; letter-spacing: -.03em; }
.st-report-header p { margin: 0; color: var(--muted); font-size: .77rem; }
.st-report-header img { width: 180px; height: 44px; object-fit: contain; object-position: right center; }
.st-report-side { flex: 0 0 auto; display: grid; justify-items: end; gap: 10px; }
.st-report-side button {
  width: auto; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff;
  font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer;
}
.st-report-side button:disabled { opacity: .48; cursor: not-allowed; }
.st-report-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border: 1px solid var(--line); border-radius: 11px; margin: 18px 0; overflow: hidden; }
.st-report-meta > div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); }
.st-report-meta > div:last-child { border-right: 0; }
.st-report-meta span { display: block; color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.st-report-meta b { display: block; margin-top: 4px; overflow-wrap: anywhere; color: var(--text); font-size: .77rem; }
.st-report-table-section { margin-top: 20px; }
.st-report-table-section > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.st-report-table-section h3 { margin: 4px 0 0; font-size: 1.08rem; }
.st-report-table-section > header > b { color: var(--muted); font-size: .72rem; }
.st-profile-code { display: inline-grid; min-width: 38px; min-height: 25px; padding: 0 7px; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-strong); font-size: .72rem; font-weight: 850; }
.st-category-label { color: var(--muted); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.st-unit-weight-value,
.st-unit-weight-placeholder { color: var(--text); font-size: .74rem; font-weight: 750; white-space: nowrap; }
.st-unit-weight-input {
  width: 92px; min-height: 34px; margin: 0; padding: 0 9px; box-sizing: border-box;
  border: 1px solid color-mix(in srgb, #dc3545 35%, var(--line)); border-radius: 8px; outline: 0;
  background: var(--surface); color: var(--text); font: inherit; font-size: .74rem; font-weight: 750;
}
.st-unit-weight-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--core-focus); }
.st-unit-weight-input::placeholder { color: color-mix(in srgb, var(--muted) 78%, transparent); font-weight: 650; }
.st-table .st-unresolved-row td { color: #c43d48; background: color-mix(in srgb, #dc3545 7%, var(--surface)); }
.st-table .st-unresolved-row .st-profile-code { border: 1px solid color-mix(in srgb, #dc3545 36%, transparent); background: color-mix(in srgb, #dc3545 12%, var(--surface)); color: #c72f3d; }
.st-table .st-unresolved-row .st-category-label { color: #c43d48; }
.st-member-size { color: var(--text); font-weight: 750; }
.st-report-footer { margin-top: 18px; padding-top: 12px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .67rem; }

.st-unresolved-dialog { width: min(500px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 26px 90px rgba(18, 34, 70, .28); }
.st-unresolved-dialog::backdrop { background: rgba(9, 18, 38, .5); backdrop-filter: blur(3px); }
.st-unresolved-dialog form { position: relative; padding: 27px; }
.st-unresolved-dialog h3 { margin: 12px 0 7px; font-size: 1.25rem; }
.st-unresolved-dialog p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.st-unresolved-dialog ul { max-height: 170px; margin: 16px 0; padding: 11px 12px 11px 30px; overflow: auto; border: 1px solid color-mix(in srgb, #dc3545 24%, var(--line)); border-radius: 10px; background: color-mix(in srgb, #dc3545 6%, var(--surface-2)); color: #c43d48; font-size: .8rem; font-weight: 750; }
.st-unresolved-dialog .st-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, #dc3545 11%, var(--surface)); color: #c43d48; }
.st-unresolved-dialog .st-dialog-close { position: absolute; top: 14px; right: 14px; width: 34px; min-height: 34px; padding: 0; border: 0; background: transparent; color: var(--muted); box-shadow: none; }
.st-unresolved-dialog .st-dialog-primary {
  width: 100%; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer;
}

@media (max-width: 760px) {
  .weight-extractor-page .st-app { width: min(100% - 24px, 720px); padding-top: 28px; }
  .st-weight-upload-card, .st-weight-report { padding: 17px; border-radius: 15px; }
  .st-step-heading, .st-report-inputs { grid-template-columns: 1fr; }
  .st-step-heading > b { display: none; }
  .st-selected-source { align-items: stretch; flex-wrap: wrap; }
  .st-selected-source > span:nth-child(2) { flex-basis: calc(100% - 55px); }
  .st-upload-footer, .st-report-header, .st-report-footer { align-items: flex-start; flex-direction: column; }
  .st-source-actions { width: 100%; justify-content: stretch; }
  .st-source-actions button { flex: 1 1 0; }
  .st-weight-filter-row { justify-content: stretch; padding-inline: 0; }
  .st-filter-field { width: 100%; margin-left: 0; }
  .st-report-side { justify-items: start; }
  .st-report-header img { width: 150px; object-position: left center; }
  .st-report-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-report-meta > div { border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .st-source-actions .needs-attention { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), 0 8px 20px rgba(68, 92, 210, .22); }
}

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  html, body { width: auto !important; min-width: 0 !important; background: #fff !important; color: #111827 !important; }
  body.weight-extractor-page .global-header,
  body.weight-extractor-page .st-side,
  body.weight-extractor-page strutools-staad-viewer,
  body.weight-extractor-page .st-weight-filter-row,
  body.weight-extractor-page .st-report-side button,
  body.weight-extractor-page .issue-launcher,
  body.weight-extractor-page .issue-coach,
  body.weight-extractor-page .st-unresolved-dialog { display: none !important; }
  body.weight-extractor-page .st-app,
  body.weight-extractor-page .st-work { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: block !important; }
  body.weight-extractor-page .st-weight-report { display: block !important; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  body.weight-extractor-page .st-report-header { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4mm; }
  body.weight-extractor-page .st-report-side { display: block; justify-self: end; }
  body.weight-extractor-page .st-report-header img { width: 40mm; height: 10mm; object-position: right center; }
  body.weight-extractor-page .st-report-header h2,
  body.weight-extractor-page .st-report-meta b,
  body.weight-extractor-page .st-member-size { color: #111827 !important; }
  body.weight-extractor-page .st-report-header p,
  body.weight-extractor-page .st-report-meta span,
  body.weight-extractor-page .st-report-footer { color: #526078 !important; }
  body.weight-extractor-page .st-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.weight-extractor-page .st-metrics div { background: #eef4ff !important; border-color: #cbd9f2 !important; }
  body.weight-extractor-page .st-report-inputs { margin: 0 0 4mm; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 3mm; }
  body.weight-extractor-page .st-report-inputs.st-print-single { grid-template-columns: 1fr; }
  body.weight-extractor-page .st-report-inputs.st-print-all-empty,
  body.weight-extractor-page .st-report-inputs label.st-print-omit { display: none !important; }
  body.weight-extractor-page .st-report-inputs label { color: #333 !important; }
  body.weight-extractor-page .st-report-inputs input { min-height: 7mm; border: 1px solid #aaa; border-radius: 0; background: #fff !important; color: #111 !important; }
  body.weight-extractor-page .st-table { overflow: visible; border-radius: 0; }
  body.weight-extractor-page .st-table table { font-size: 8.5pt; }
  body.weight-extractor-page .st-table thead { display: table-header-group; }
  body.weight-extractor-page .st-table th { position: static; background: #eef2f8 !important; color: #44516a !important; }
  body.weight-extractor-page .st-table th,
  body.weight-extractor-page .st-table td { padding: 2.2mm 2.5mm; border-color: #d7deea !important; }
  body.weight-extractor-page .st-table tr { break-inside: avoid; page-break-inside: avoid; }
  body.weight-extractor-page .st-profile-code { background: #e9f1ff !important; color: #145ec7 !important; }
  body.weight-extractor-page .st-unit-weight-input { width: 18mm; min-height: 6mm; padding: 0; border: 0; background: transparent !important; color: #111827 !important; box-shadow: none; }
  body.weight-extractor-page .st-unresolved-row td,
  body.weight-extractor-page .st-unresolved-row .st-profile-code { color: #b4232f !important; }
}
