:root {
  color-scheme: light;
  --bg: #e9edf2;
  --panel: #ffffff;
  --panel-2: #f7f9fb;
  --ink: #18202a;
  --muted: #66727f;
  --line: #cfd6df;
  --line-strong: #9aa7b5;
  --accent: #126b5b;
  --accent-soft: #e6f3ef;
  --blue: #245e9f;
  --amber: #8a5a00;
  --warn-soft: #fff4d8;
  --error: #9b2c2c;
  --error-soft: #fff1f1;
  --success: #17633f;
  --success-soft: #edf8f1;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow: auto;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}

html.workspace-page-root {
  height: 100%;
  overflow: hidden;
}

body.workspace-page {
  height: 100vh;
  overflow: hidden;
}

body.density-comfortable .panel,
body.density-comfortable .management-view,
body.density-comfortable .support {
  padding: 13px;
}

body.density-comfortable .data-row {
  min-height: 66px;
}

body.density-comfortable .section-nav a {
  min-height: 42px;
}

.auth-page { min-height: 100vh; background: var(--cf-paper, #f4f6f1); }
.auth-layout { display: grid; grid-template-columns: minmax(420px, 1.08fr) minmax(390px, .92fr); min-height: 100vh; }
.auth-story { display: grid; grid-template-rows: auto 1fr auto; gap: 42px; background: var(--cf-green, #163d35); padding: clamp(28px, 5vw, 72px); color: white; }
.auth-story::after { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 32px 32px; content: ""; }
.auth-story > * { position: relative; z-index: 1; }
.auth-story-brand { display: block; width: 190px; }
.auth-story-logo { display: block; width: 100%; height: auto; }
.auth-story h1 { max-width: 760px; margin: 18px 0; font-size: clamp(42px, 6vw, 76px); letter-spacing: -.05em; line-height: .98; }
.auth-story p { max-width: 660px; margin: 0; color: #c9d9d2; font-size: 18px; }
.auth-benefits { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.auth-benefits li { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; min-height: 52px; border-top: 1px solid #547168; }
.auth-benefits span { color: #d89464; font-family: var(--cf-mono, monospace); }
.auth-panel { display: grid; align-content: center; gap: 22px; width: min(100% - 44px, 500px); margin: auto; padding: 56px 0; }
.auth-panel-head { display: grid; gap: 9px; }
.auth-panel-head h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); letter-spacing: -.04em; }
.auth-panel-head p, .auth-legal { margin: 0; color: var(--muted); }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.auth-switch a { display: flex; min-height: 46px; align-items: center; justify-content: center; border-bottom: 3px solid transparent; font-weight: 750; text-decoration: none; }
.auth-switch a[aria-selected="true"] { border-color: var(--cf-copper, #c8753d); color: var(--cf-green, #163d35); }
.auth-form { display: grid; gap: 8px; }
.auth-form label { margin-top: 8px; color: var(--ink); font-size: 13px; font-weight: 750; }
.auth-form input { min-height: 48px; border-radius: 6px; padding: 10px 12px; font-size: 16px; }
.auth-form .button { width: 100%; margin-top: 14px; }
.auth-form small { color: var(--muted); }
.auth-consents { display: grid; gap: 10px; margin-top: 12px; }
.auth-form .auth-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 9px; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.auth-form .auth-consent input { width: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--cf-green, #163d35); }
.auth-consent a { color: var(--cf-green, #163d35); text-underline-offset: 2px; }
.auth-consent:has(input:focus-visible) { outline: 3px solid #236f60; outline-offset: 3px; }
@media (max-width: 860px) { .auth-layout { grid-template-columns: 1fr; } .auth-story { min-height: 470px; } }
@media (max-width: 520px) { .auth-story { min-height: 390px; padding: 28px 20px; } .auth-story h1 { font-size: 39px; } .auth-benefits { display: none; } .auth-panel { width: min(100% - 28px, 500px); padding: 36px 0; } }

.shell {
  min-height: 100vh;
  padding: 10px;
}

.shell-compact {
  height: 100vh;
  overflow: hidden;
}

.workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  height: calc(100vh - 20px);
  max-width: 1680px;
  margin: 0 auto;
}

.workflow-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin: 0;
  padding: 0;
  list-style: none;
}
.workflow-progress > li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-height: 46px; gap: 8px; border-right: 1px solid var(--line); padding: 6px 12px; color: var(--muted); text-align: left; }
.workflow-progress > li:last-child { border-right: 0; }
.workflow-progress > li span { color: var(--cf-copper-dark, #8c4726); font-family: var(--cf-mono, monospace); font-size: 10px; }
.workflow-progress > li strong { font-size: 11px; }
.workflow-progress > li.is-complete { background: #edf4ef; color: var(--cf-green, #163d35); }
.workflow-progress > li.is-current { box-shadow: inset 0 -3px var(--cf-copper, #c8753d); background: #fffaf5; color: var(--ink); }
.inline-icon, .viewer-actions button svg, .manual-toolbar button svg, .icon-close svg { width: 16px; height: 16px; pointer-events: none; }

.device-change-button { width: 100%; min-height: 34px; border-color: #aac1b5; background: #eef5f0; color: var(--cf-green, #163d35); font-weight: 750; }
.device-dialog { width: min(920px, calc(100vw - 36px)); }
.device-dialog form { width: 100%; }
.dialog-kicker { color: var(--cf-copper-dark, #8c4726); font-family: var(--cf-mono, monospace); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.editor-head > div { display: grid; gap: 3px; }
.editor-head p { margin: 0; color: var(--muted); }
.device-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.device-category-grid button { display: grid; min-height: 78px; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 9px; border-color: var(--line); background: var(--panel); padding: 8px 10px; text-align: left; }
.device-category-grid button > .device-kind-art { aspect-ratio: 1; width: 58px; height: 58px; object-fit: contain; }
.device-category-grid button > strong { min-width: 0; font-size: 14px; line-height: 1.2; }
.device-category-grid button.active { border-color: var(--cf-copper, #c8753d); box-shadow: inset 0 0 0 1px var(--cf-copper, #c8753d); background: #fff8f1; }
.device-profile-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.device-profile-picker h3 { margin: 4px 0 0; font-size: 16px; }
.device-profile-list { display: grid; grid-template-columns: minmax(0, 1fr); max-height: 280px; gap: 4px; overflow: auto; }
.device-profile-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 46px; gap: 12px; border-color: var(--line); background: var(--panel); padding: 6px 10px; text-align: left; }
.device-profile-list button > div { min-width: 0; }
.device-profile-list button strong, .device-profile-list button small { display: block; }
.device-profile-list button small { color: var(--muted); }
.device-profile-list button span { color: var(--cf-green, #163d35); font-size: 11px; font-weight: 750; }
.device-profile-list button.is-selected {
  border-color: var(--cf-copper, #c8753d);
  box-shadow: inset 3px 0 var(--cf-copper, #c8753d);
  background: #fff8f1;
}
.device-profile-list button.is-selected span { color: var(--cf-copper-dark, #8c4726); }
.dialog-link { align-self: center; color: var(--cf-green, #163d35); font-size: 12px; font-weight: 750; }

.summary-label { color: var(--cf-copper-dark, #8c4726); font-family: var(--cf-mono, monospace); font-size: 9px; font-weight: 750; text-transform: uppercase; }

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(300px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 5px 7px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 158px;
  color: var(--ink);
  text-decoration: none;
}

.site-brand-logo {
  display: block;
  width: 154px;
  height: 34px;
}

.site-brand > span:last-child {
  display: grid;
  gap: 1px;
}

.site-brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.site-brand small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 620;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #17242c;
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 5px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background: #eef2f5;
  color: var(--ink);
}

.site-nav a.active {
  box-shadow: inset 0 -2px var(--accent);
}

.site-nav-dropdown {
  position: relative;
}

.site-nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 5px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  list-style: none;
  cursor: pointer;
}

.site-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.site-nav-dropdown summary::after {
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.site-nav-dropdown[open] summary,
.site-nav-dropdown summary:hover {
  background: #eef2f5;
  color: var(--ink);
}

.site-nav-dropdown[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.site-nav-dropdown-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  width: 250px;
  gap: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  padding: 6px;
  box-shadow: 0 14px 35px rgba(24, 32, 42, 0.16);
}

.site-nav-dropdown:not([open]) .site-nav-dropdown-menu {
  display: none;
}

.site-nav-dropdown-menu a {
  min-height: 34px;
  justify-content: flex-start;
}

.site-nav-dropdown-menu a:first-child {
  margin-bottom: 3px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header-printer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding-left: 8px;
}

.header-printer-label span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.header-printer-label select {
  width: 220px;
  min-height: 32px;
  border: 0;
  background: transparent;
  padding-left: 0;
  font-weight: 680;
}

.user-menu-wrap {
  position: relative;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  min-height: 34px;
  border: 0;
  background: white;
  box-shadow: none;
}

.user-menu-button > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.menu-caret {
  color: var(--muted);
  font-size: 12px;
}

.user-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 224px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  padding: 5px;
  box-shadow: 0 14px 35px rgba(24, 32, 42, 0.16);
}

.user-menu[hidden] {
  display: none;
}

.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: white;
  padding: 0 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  text-align: left;
  text-decoration: none;
}

.user-menu a:hover,
.user-menu button:hover {
  background: var(--panel-2);
}

.user-menu button {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  color: var(--error);
}

.user-menu-head {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  padding: 7px 9px 9px;
}

.user-menu-head strong,
.user-menu-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-head span {
  color: var(--muted);
  font-size: 10px;
}

.toolbar,
.viewer-head,
.panel-title-row,
.support-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.app-bar {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 6px 8px 6px 12px;
}

.brand-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand-block strong,
h1,
h2,
h3,
p {
  margin: 0;
}

.brand-block strong {
  font-size: 17px;
  font-weight: 780;
}

.brand-block span,
p,
.muted,
.panel-meta {
  color: var(--muted);
}

h1 {
  font-size: 22px;
  font-weight: 760;
}

h2 {
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h3 {
  font-size: 14px;
}

button,
.support a,
.top-nav a,
.top-nav span {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.support a:hover,
.top-nav a:hover {
  border-color: var(--line-strong);
  background: #eef2f5;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.top-nav a,
.top-nav span {
  display: inline-flex;
  align-items: center;
}

.top-nav a.active,
.segmented button.active,
.layer-chip.active,
.project-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.app-layout {
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.empty-workspace {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.empty-upload {
  display: grid;
  place-items: center;
  gap: 10px;
  width: min(760px, 100%);
  min-height: 520px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fafcfd;
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.empty-upload:hover,
.empty-upload:focus,
.empty-upload.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.empty-upload-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.empty-upload h1 {
  font-size: 22px;
}

.empty-upload p {
  max-width: 430px;
  font-size: 13px;
  line-height: 1.5;
}

.empty-upload small {
  color: var(--muted);
  font-size: 10px;
}

.empty-upload .status {
  width: min(420px, 100%);
  margin-top: 2px;
}

.archive-requirements {
  display: grid;
  width: 100%;
  gap: 9px;
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 15px;
  text-align: left;
}

.archive-requirements > strong {
  font-size: 12px;
  text-transform: uppercase;
}

.archive-requirements ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-requirements li {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-left: 3px solid var(--line-strong);
  background: white;
  padding: 7px 9px;
}

.archive-requirements li b {
  font-size: 11px;
}

.archive-requirements li span,
.archive-requirements p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.archive-requirements p {
  max-width: none;
  margin: 0;
}

.archive-requirements a {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.control-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.control-scroll {
  display: grid;
  min-height: 0;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.panel,
.viewer-panel,
.support,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 9px;
}

.panel-title-row {
  min-height: 24px;
  margin-bottom: 7px;
}

.project-title-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 24px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.project-title-button:hover {
  border: 0;
  background: transparent;
  color: var(--accent);
}

.project-title-button > span:first-child {
  overflow: hidden;
  max-width: 205px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title-button > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.panel-meta {
  overflow: hidden;
  max-width: 140px;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 60px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fbfcfd;
  padding: 9px 10px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop:hover,
.drop:focus,
.drop.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.drop.has-file {
  border-style: solid;
  border-color: var(--accent);
}

.drop-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 740;
}

.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.secondary-action,
.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.primary-action {
  width: 100%;
  min-height: 34px;
}

.status {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  margin-top: 7px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status.ready {
  border-color: #b8d6cd;
  background: var(--accent-soft);
  color: var(--accent);
}

.status.success {
  border-color: #bdddc8;
  background: var(--success-soft);
  color: var(--success);
}

.status.warn {
  border-color: #efdca5;
  background: var(--warn-soft);
  color: var(--amber);
}

.status.error {
  border-color: #efbaba;
  background: var(--error-soft);
  color: var(--error);
}

.status.loading {
  background: #f0f4f8;
  color: var(--ink);
}

.summary-grid,
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.project-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  margin-bottom: 7px;
}

.project-overview-grid .project-facts {
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 4px;
}

.selected-device-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 46px;
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  padding-left: 7px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.selected-device-summary:hover {
  background: var(--panel-2);
}

.selected-device-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.selected-device-summary img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.selected-device-summary > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.selected-device-summary span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.selected-device-summary strong {
  overflow: hidden;
  display: -webkit-box;
  font-size: 10px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.project-import-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-color: var(--line);
  background: var(--panel-2);
  padding: 3px 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.project-import-button svg {
  width: 14px;
  height: 14px;
}

.project-facts > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.project-facts strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 6px 7px;
}

.summary-grid span,
.field-title {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.summary-grid strong {
  overflow: hidden;
  display: block;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-summary {
  display: block;
  margin-top: 7px;
}

.layer-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.layer-side-column {
  min-width: 0;
}

.layer-side-title {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.layer-side-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.layer-side-empty {
  display: flex;
  min-height: 30px;
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 4px 6px;
  font-size: 10px;
}

.layer-shared-group {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.layer-shared-group .layer-side-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.layer-chip,
.project-item {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 6px 7px;
  text-align: left;
}

.layer-chip {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 6px;
}

.layer-chip strong,
.project-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-chip span,
.project-item span,
.layer-chip em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-chip[data-renderable="false"] {
  border-style: dashed;
  opacity: 0.72;
}

.field-group {
  margin-bottom: 7px;
}

.dense-group {
  display: grid;
  gap: 4px;
}

.target-controls {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 6px;
}

.job-panel > .fields-dense {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.job-section {
  border-top: 1px solid var(--line);
  padding: 7px 0 1px;
}

.job-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.job-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 10px;
  text-transform: uppercase;
}

.job-section-title > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #e8edf1;
  color: var(--accent);
  font-size: 12px;
}

.layout-size-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-field {
  align-content: start;
}

.toggle-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.toggle-control input {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 0;
  width: 30px;
  height: 24px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
}

.toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 17px;
  border: 1px solid #aeb8c1;
  border-radius: 9px;
  background: #dce2e7;
  transition: background 120ms ease, border-color 120ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(19, 31, 42, 0.25);
  content: "";
  transition: transform 120ms ease;
}

.toggle-control input:checked + .toggle-track {
  border-color: var(--accent);
  background: var(--accent);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(13px);
}

.toggle-control input:focus-visible + .toggle-track {
  outline: 2px solid rgba(18, 107, 91, 0.24);
  outline-offset: 2px;
}

.placement-fields {
  align-items: end;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.layout-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 6px;
}

.layout-toggle-row .toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.layout-toggle-row .toggle-control {
  min-height: 24px;
}

.mirror-control-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(112px, .72fr);
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin-bottom: 7px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 7px;
}

.mirror-control-row > label {
  min-width: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

.mirror-control-row select {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 22px 0 6px;
  font-size: 10px;
}

.mirror-control-row > span {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.mirror-control-row > span[data-state="bottom"] {
  color: #116353;
}

.mirror-control-row > span[data-state="warning"] {
  color: #8a5700;
}

.fields.exposure-fields {
  grid-template-columns: minmax(0, 1fr) 70px;
}

.exposure-time-field input {
  padding-right: 4px;
  padding-left: 6px;
  text-align: right;
}

.device-note {
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--accent);
  background: #eef3f1;
  padding: 7px 9px;
}

.device-note strong {
  font-size: 10px;
}

.device-note span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.laser-mask-settings {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 9px;
}

.laser-mask-heading {
  display: grid;
  gap: 2px;
}

.laser-mask-heading strong {
  color: var(--ink);
  font-size: 10px;
}

.laser-mask-heading span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.laser-mask-heading .laser-polarity-note {
  border-left: 2px solid var(--accent);
  margin-top: 3px;
  padding-left: 7px;
  color: var(--ink);
}

.fields.laser-mask-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.laser-crosshatch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-size: 9px;
}

.output-format-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  padding: 4px 7px;
  font-size: 9px;
}

.output-format-line > span {
  color: var(--muted);
}

.output-format-line > strong {
  color: var(--accent);
  font-size: 10px;
}

.output-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--ink);
  font-size: 9px;
  font-weight: 720;
  cursor: pointer;
}

.output-toggle .toggle-control {
  min-height: 24px;
}

.compact-check {
  min-height: 30px;
  margin: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

#panelModeControl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#panelModeControl button {
  padding: 0 2px;
  font-size: 8px;
}

.segmented-jobs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-jobs button {
  padding: 0 4px;
  font-size: 9px;
}

.segmented button {
  width: 100%;
  min-height: 28px;
  padding: 0 6px;
}

.is-hidden {
  display: none !important;
}

.disclosure-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  margin: 9px 0 7px;
  border-color: #b9c8c3;
  background: #edf3f1;
  padding: 0 9px;
  color: var(--accent);
  font-weight: 780;
  text-align: left;
}

.disclosure-marker {
  font-size: 19px;
  line-height: 1;
  transition: transform 160ms ease;
}

.disclosure-button[aria-expanded="true"] .disclosure-marker {
  transform: rotate(90deg);
}

.advanced-settings {
  border-top: 0;
  margin-bottom: 7px;
  padding-top: 0;
}

.advanced-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.advanced-inline-field label {
  color: var(--ink);
  font-size: 11px;
}

.advanced-settings > button {
  width: 100%;
  margin-top: 6px;
}

.validation-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

#validationState {
  color: var(--muted);
  font-weight: 720;
}

#validationState[data-tone="ready"] {
  color: var(--success);
}

#validationState[data-tone="warning"] {
  color: var(--amber);
}

#validationState[data-tone="error"] {
  color: var(--error);
}

.validation-metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.validation-issues {
  display: grid;
  gap: 3px;
  min-height: 18px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.validation-line.warning {
  color: var(--amber);
}

.validation-line.error {
  color: var(--error);
}

.validation-line.ok {
  color: var(--success);
}

.fields-dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

input,
select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 0 7px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #67737d 50%),
    linear-gradient(135deg, #67737d 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 50%,
    calc(100% - 8px) 50%;
  background-repeat: no-repeat;
  background-size: 4px 4px, 4px 4px;
  padding-right: 24px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(18, 107, 91, 0.22);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(18, 107, 91, 0.12);
}

.header-printer-label select:focus-visible,
.user-menu-button:focus-visible {
  outline: 0;
  box-shadow: inset 0 -2px var(--accent);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.check-row input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
}

.viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.viewer-generation-overlay {
  position: absolute;
  z-index: 4;
  inset: 50% auto auto 50%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 9px;
  width: min(310px, calc(100% - 28px));
  border: 1px solid #b8d6cd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(24, 32, 42, 0.18);
  padding: 11px 13px;
  transform: translate(-50%, -50%);
  color: var(--ink);
}

.viewer-generation-overlay[hidden] {
  display: none;
}

.viewer-generation-overlay strong,
.viewer-generation-overlay span:last-child {
  grid-column: 2;
}

.viewer-generation-overlay strong {
  font-size: 12px;
}

.viewer-generation-overlay span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.generation-spinner {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  border: 2px solid #b8d6cd;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: generation-spin 700ms linear infinite;
}

@keyframes generation-spin {
  to { transform: rotate(360deg); }
}

.result-action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 8px;
}

.result-action-bar button,
.result-action-bar .download-package {
  min-height: 36px;
  margin: 0;
  padding-inline: 10px;
  font-size: 10px;
  white-space: nowrap;
}

#qualityDialogTrigger {
  display: grid;
  grid-template-columns: 22px minmax(74px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 5px 8px;
  color: var(--ink);
  text-align: left;
  width: 100%;
}

#qualityDialogTrigger > svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

#qualityDialogTrigger > span {
  display: grid;
  gap: 1px;
}

#qualityDialogTrigger small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
  text-transform: uppercase;
}

#qualityDialogTrigger #issueSummary {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

#qualityDialogTrigger[data-tone="error"] {
  border-color: #d5aaa4;
  background: #fff4f2;
}

#qualityDialogTrigger[data-tone="warning"] {
  border-color: #dbc69f;
  background: #fff9ed;
}

.result-primary-actions,
.result-package-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.result-package-actions {
  flex: 0 1 auto;
}

.result-package-actions > * {
  width: auto;
  white-space: nowrap;
}

.result-download-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: 0;
  grid-column: 2;
}

.generation-feedback {
  grid-column: 2 / -1;
  overflow: hidden;
  min-width: 0;
  min-height: 24px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#qualityDialogTrigger > .generation-feedback {
  display: block;
}

#qualityDialogTrigger > .generation-feedback[hidden] {
  display: none;
}

.generation-feedback[data-state="loading"] {
  border-color: #b8d6cd;
  background: transparent;
  color: var(--accent);
}

.generation-feedback[data-state="success"] {
  border-color: #bdddc8;
  background: transparent;
  color: var(--success);
}

.generation-feedback[data-state="error"] {
  border-color: #efbaba;
  background: transparent;
  color: var(--error);
}

.result-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: hidden;
  padding: 12px;
}

.result-dialog-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 54px);
}

.result-dialog-body {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 3px 2px 0;
  scrollbar-gutter: stable;
}

.result-dialog .issue-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.files-dialog {
  width: min(680px, calc(100vw - 28px));
}

.files-dialog .print-file-list {
  width: 100%;
  min-height: 160px;
  max-height: min(520px, calc(100vh - 180px));
  border-top: 1px solid var(--line);
}

.files-dialog .result-dialog-body {
  scrollbar-gutter: auto;
  padding-right: 0;
}

.viewer-head {
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  padding: 7px 9px;
}

.viewer-head h2 {
  margin-bottom: 2px;
}

.viewer-head p {
  overflow: hidden;
  max-width: 680px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.viewer-readouts,
.viewer-tool-buttons {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.viewer-tool-buttons {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.viewer-tool-buttons button {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.viewer-tool-buttons button:last-child {
  border-right: 0;
}

.viewer-actions button {
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
}

.viewer-actions .viewer-import {
  min-width: 92px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.zoom-readout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.cursor-readout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  white-space: nowrap;
}

.viewer-actions button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(45deg, #121820 25%, transparent 25%),
    linear-gradient(-45deg, #121820 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #121820 75%),
    linear-gradient(-45deg, transparent 75%, #121820 75%);
  background-color: #0b1016;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  touch-action: none;
}

.viewer-empty {
  display: grid;
  gap: 6px;
  max-width: 340px;
  text-align: center;
  color: #c8d2dc;
}

.viewer-empty strong {
  color: white;
  font-size: 14px;
}

.viewer img {
  display: none;
  max-width: 96%;
  max-height: 96%;
  transform-origin: center;
  image-rendering: auto;
  user-select: none;
  cursor: grab;
}

.viewer.pixel-mode img {
  image-rendering: pixelated;
}

.viewer.vector-mode img {
  filter: invert(1);
}

.viewer img:active {
  cursor: grabbing;
}

.panel-editor {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: center;
  padding: 10px;
  background: #0b1016;
}

.panel-editor[hidden] {
  display: none;
}

.panel-editor-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  overflow-x: auto;
  min-height: 34px;
  border: 1px solid #485560;
  border-radius: 6px;
  background: #172029;
  padding: 3px;
  color: #d8e0e7;
}

.panel-editor-tools button {
  min-width: 30px;
  min-height: 28px;
  border-color: #52616e;
  background: #222e38;
  color: white;
  padding: 0;
  font-size: 16px;
}

.viewer-tool-buttons,
.panel-editor-tools {
  --tool-button-size: 32px;
}

.viewer-tool-buttons button,
.panel-editor-tools button {
  display: grid;
  place-items: center;
  width: var(--tool-button-size);
  height: var(--tool-button-size);
  min-width: var(--tool-button-size);
  min-height: var(--tool-button-size);
  padding: 0;
}

.viewer-tool-buttons button svg,
.panel-editor-tools button svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

@media (max-width: 720px), (pointer: coarse) {
  .viewer-tool-buttons,
  .panel-editor-tools {
    --tool-button-size: 40px;
    max-width: 100%;
    overflow-x: auto;
  }
}

.panel-editor-tools span {
  overflow: hidden;
  min-width: 170px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-editor-tools #manualPosition {
  min-width: 146px;
}

.manual-workpiece {
  position: relative;
  align-self: center;
  max-width: 92%;
  max-height: 92%;
  overflow: hidden;
  border: 2px solid #d8e0e7;
  background-color: #25313b;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: var(--grid-step, 12px) var(--grid-step, 12px);
  box-shadow: 0 0 0 1px #0b1016, 0 0 0 2px #596773;
  touch-action: none;
}

.manual-workpiece::after {
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: #9cacb9;
  font-size: 9px;
  content: "0,0";
  pointer-events: none;
}

.manual-board {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d5a94b;
  border-radius: 2px;
  background: #d9b35f;
  color: #172029;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  touch-action: none;
  user-select: none;
}

.manual-board:hover,
.manual-board.selected {
  border-color: white;
  background: #ebc979;
  box-shadow: inset 0 0 0 2px #126b5b;
}

.manual-board.collision {
  border-color: #ff7272;
  background: #a93939;
  color: white;
  box-shadow: inset 0 0 0 2px #ffb0b0;
}

.package-action {
  width: 100%;
  margin: 0;
}

.print-file-row,
.print-file-actions {
  display: flex;
  align-items: center;
}

.print-file-row {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
}

.print-file-list {
  min-height: 26px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.print-file-row {
  min-height: 34px;
  border-bottom: 1px solid #e5e9ee;
  padding: 4px 0;
}

.print-file-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 7px;
  flex: 1 1 auto;
}

.print-file-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.artifact-format-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 26px;
  border: 1px solid #b9c8c3;
  border-radius: 5px;
  background: var(--accent-soft);
  padding: 0 5px;
  color: var(--accent) !important;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.print-file-row strong,
.print-file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-file-row strong {
  font-size: 10px;
}

.print-file-row span {
  color: var(--muted);
  font-size: 9px;
}

.print-file-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.print-file-actions a,
.download-package {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  padding: 0 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.print-file-actions .file-icon-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.file-icon-action svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.download-package {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.print-file-actions .native-download {
  border-color: #d4a23d;
  background: var(--warn-soft);
  color: #6e4700;
}

.support-workspace {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.support-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 8px 4px 12px;
}

.support-title > div {
  display: grid;
  gap: 3px;
}

.support-title p {
  font-size: 12px;
}

.support-index {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 5px;
}

.support-index a {
  flex: 0 0 auto;
  border-radius: 5px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
}

.support-index a:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.support-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.support-check,
.support-terms,
.support-guide {
  scroll-margin-top: 58px;
  padding: 24px clamp(18px, 4vw, 54px);
}

.support-compatibility {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.support-compatibility h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.compatibility-table {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.compatibility-table > div {
  display: grid;
  grid-template-columns: 1.1fr 1.35fr 1.6fr 1.15fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 6px;
  font-size: 10px;
}

.compatibility-table .compatibility-head {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-terms {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr);
  gap: 36px;
  border-top: 1px solid var(--line);
}

.support-terms p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.support-guide {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr);
  gap: 18px 36px;
  border-top: 1px solid var(--line);
}

.support-check > div,
.guide-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.guide-heading {
  grid-row: 1 / span 3;
}

.guide-heading > div {
  display: grid;
  gap: 3px;
}

.guide-heading p {
  font-size: 11px;
}

.guide-number {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.support-page h2 {
  font-size: 15px;
  text-transform: none;
}

.support-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.support-guide li strong {
  color: var(--ink);
}

.file-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.file-checklist li {
  display: grid;
  gap: 3px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  padding: 12px 12px 12px 0;
}

.file-checklist li:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.file-checklist span,
.expected-files span {
  color: var(--muted);
  font-size: 11px;
}

.expected-files {
  display: grid;
  gap: 4px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 9px 11px;
  font-size: 11px;
}

.expected-files code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
}

.source-link {
  justify-self: start;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.auth-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  overflow: auto;
  padding: 22px;
}

.auth-card {
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 44px));
  max-width: 420px;
  padding: 16px;
}

.auth-brand {
  display: inline-flex;
  width: min(210px, 75%);
  color: inherit;
}

.auth-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.fabrication-shell { width: 100%; min-width: 0; }
.fabrication-workspace { grid-template-rows: auto auto minmax(0, 1fr); gap: 0; min-height: calc(100vh - 12px); overflow: hidden; }
.fabrication-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px 12px;
}
.fabrication-heading > div:first-child { display: grid; gap: 2px; }
.fabrication-heading span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.fabrication-heading h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.mode-switch { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); min-width: 300px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; }
.mode-switch button { min-height: 32px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.mode-switch button.active { background: var(--ink); color: white; }
.fabrication-layout { display: grid; grid-template-columns: minmax(320px, 370px) minmax(0, 1fr); min-height: 0; height: 100%; overflow: hidden; }
.fabrication-controls { display: grid; align-content: start; gap: 0; min-height: 0; height: 100%; overflow-y: auto; border-right: 1px solid var(--line); background: #f7f9f8; padding: 0 13px 18px; }
.fabrication-controls fieldset { display: grid; gap: 9px; min-width: 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0; }
.fabrication-controls legend { padding: 0; color: var(--ink); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.fabrication-controls label,
.machine-dialog label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 750; }
.fabrication-controls input,
.fabrication-controls select,
.machine-dialog input,
.machine-dialog select,
.machine-dialog textarea { width: 100%; min-width: 0; min-height: 34px; border: 1px solid var(--line); border-radius: 5px; background: white; padding: 6px 8px; color: var(--ink); font: inherit; font-size: 11px; }
.fabrication-controls .fields { gap: 7px; }
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fabrication-layer-fields[hidden],
.fabrication-controls fieldset[hidden] { display: none; }
.toggle-line { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; font-size: 10px !important; }
.toggle-line input { width: 30px; min-height: 17px; margin: 0; }
.machine-select-line { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 32px); gap: 5px; }
.icon-action { display: grid; place-items: center; width: 32px; height: 34px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); font-size: 15px; }
.icon-action:disabled { opacity: .35; cursor: default; }
.machine-summary { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 5px; background: white; }
.machine-summary span { display: grid; gap: 1px; min-width: 0; padding: 7px; }
.machine-summary span:nth-child(even) { border-left: 1px solid var(--line); }
.machine-summary span:nth-child(n+3) { border-top: 1px solid var(--line); }
.machine-summary b { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.machine-summary em { overflow: hidden; color: var(--ink); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.format-output { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.format-output span { display: grid; place-items: center; min-height: 30px; border: 1px solid #9db5ad; border-radius: 5px; background: #edf3f0; color: var(--accent); font-size: 9px; font-weight: 850; }
.format-output span.is-disabled { border-color: var(--line); background: #f2f3f3; color: #9ba4a1; }
.safety-note { margin: 0; border-left: 3px solid #d68445; background: #f3e8de; padding: 7px 9px; color: #624a3c; font-size: 9px; line-height: 1.45; }
.fabrication-generate { min-height: 40px; margin-top: 13px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: white; font-size: 11px; font-weight: 850; }
.fabrication-generate:disabled { opacity: .45; cursor: default; }
.fabrication-controls > .status { margin-top: 7px; }
.fabrication-viewer { display: grid; grid-template-rows: auto minmax(420px, 1fr) auto; min-width: 0; min-height: 0; height: 100%; background: #e8ecea; padding: 14px; }
.fabrication-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: white; padding: 9px 11px; }
.fabrication-viewer-head > div { display: grid; gap: 1px; min-width: 0; }
.fabrication-viewer-head span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.fabrication-viewer-head strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fabrication-canvas { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; border: 1px solid var(--line); background-color: #16201e; background-image: linear-gradient(#26332f 1px, transparent 1px), linear-gradient(90deg, #26332f 1px, transparent 1px); background-size: 20px 20px; }
.fabrication-canvas img { display: block; width: min(90%, 980px); height: min(80%, 650px); object-fit: contain; filter: drop-shadow(0 15px 24px rgba(0,0,0,.28)); }
.fabrication-empty { display: grid; place-items: center; gap: 4px; color: #dce5e1; text-align: center; }
.fabrication-empty strong { font-size: 16px; }
.fabrication-empty span { color: #9eaca7; font-size: 11px; }
.fabrication-result { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(260px, 1.3fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: white; padding: 10px; }
.result-title { display: grid; gap: 2px; }
.result-title span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.result-title strong { font-size: 11px; }
.result-files { display: flex; flex-wrap: wrap; gap: 5px; }
.result-files a { display: grid; min-width: 92px; border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; color: var(--ink); text-decoration: none; }
.result-files strong { color: var(--accent); font-size: 9px; }
.result-files span { overflow: hidden; max-width: 150px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.download-package { display: inline-flex; align-items: center; min-height: 34px; border-radius: 5px; background: var(--ink); padding: 0 11px; color: white; font-size: 10px; font-weight: 800; text-decoration: none; }
.machine-dialog form { width: min(720px, calc(100vw - 40px)); }
.machine-dialog textarea { resize: vertical; }

@media (max-width: 900px) {
  .fabrication-workspace { height: auto; overflow: visible; }
  .fabrication-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .fabrication-controls { height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .fabrication-viewer { min-height: 620px; }
}

@media (max-width: 620px) {
  .fabrication-heading { align-items: stretch; flex-direction: column; }
  .mode-switch { width: 100%; min-width: 0; }
  .fabrication-controls { padding-right: 9px; padding-left: 9px; }
  .fields-3 { grid-template-columns: 1fr 1fr; }
  .fabrication-viewer { grid-template-rows: auto minmax(360px, 55vh) auto; padding: 8px; }
  .fabrication-canvas { min-height: 360px; }
  .fabrication-result { grid-template-columns: 1fr; }
  .download-package { justify-content: center; }
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.auth-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.auth-form {
  display: none;
  gap: 9px;
}

.auth-form.active {
  display: grid;
}

.auth-form button {
  width: 100%;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.management-shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(31, 45, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 45, 51, .035) 1px, transparent 1px),
    #f4f1eb;
  background-size: 28px 28px;
}

.management-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 1680px;
  min-height: calc(100vh - 20px);
  margin: 0 auto;
}

.management-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.section-nav,
.management-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.section-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 7px;
}

.section-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  border-radius: 5px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}

.section-nav-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  padding: 0 !important;
  font-size: inherit !important;
}

.section-nav-main svg {
  width: 15px;
  height: 15px;
}

.section-nav a:hover,
.section-nav a.active {
  background: #eef2f5;
  color: var(--ink);
}

.section-nav a.active {
  box-shadow: inset 3px 0 var(--accent);
}

.section-nav span {
  min-width: 22px;
  border-radius: 4px;
  background: #e3e8ed;
  padding: 2px 5px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.management-content {
  min-width: 0;
  overflow: auto;
}

.management-view {
  display: none;
  min-width: 0;
  padding: 14px;
}

.management-view.active {
  display: block;
}

.account-workbench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: #17342e;
}

.account-workbench > *,
.workbench-project > * {
  min-width: 0;
}

.account-workbench img {
  max-width: 100%;
}

.account-workbench h1,
.account-workbench h2,
.account-workbench p,
.account-workbench dl {
  margin-top: 0;
}

.account-workbench h1 {
  margin-bottom: 7px;
  font-family: var(--cf-font-display, Georgia, serif);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 540;
  letter-spacing: -.04em;
  line-height: 1;
}

.account-workbench h2 {
  margin-bottom: 8px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.account-workbench p {
  color: #61706b;
  line-height: 1.5;
}

.account-workbench a:not(.workbench-continue-button) {
  color: #784321;
  font-size: 12px;
  font-weight: 750;
  text-underline-offset: 3px;
}

.workbench-project {
  position: relative;
  display: grid;
  grid-column: 1 / span 2;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, .65fr);
  grid-template-rows: auto minmax(184px, 1fr);
  grid-template-areas:
    "project-head project-stage"
    "board-preview project-stage";
  overflow: hidden;
  border: 1px solid #bfc9c3;
  border-radius: 7px;
  background: #fbfaf5;
}

.workbench-project > header {
  grid-area: project-head;
  padding: 20px 22px 14px;
}

.workbench-project[data-state] > header {
  padding-top: 48px;
}

.workbench-project > header p {
  margin-bottom: 4px;
}

#overviewLastProject {
  overflow: hidden;
  color: #17342e;
  font-size: 15px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#overviewLastProjectMeta {
  margin-bottom: 0;
  font-family: var(--cf-mono, ui-monospace, monospace);
  font-size: 10px;
}

.workbench-project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.workbench-project-facts > div {
  min-width: 0;
  border-top: 1px solid #d8ddd8;
  padding-top: 7px;
}

.workbench-project-facts dt {
  color: #6a7772;
  font-family: var(--cf-mono, ui-monospace, monospace);
  font-size: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workbench-project-facts dd {
  margin: 3px 0 0;
  color: #17342e;
  font-size: 10px;
  font-weight: 760;
}

#overviewBoardPreview {
  position: relative;
  display: grid;
  grid-area: board-preview;
  min-height: 184px;
  place-items: center;
  overflow: hidden;
  border-top: 1px solid #44645a;
  background:
    linear-gradient(rgba(205, 220, 211, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 220, 211, .07) 1px, transparent 1px),
    #173f35;
  background-size: 24px 24px;
  padding: 20px 30px;
}

#overviewBoardPreview::before,
#overviewBoardPreview::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

#overviewBoardPreview::before {
  inset: 13px;
  border: solid rgba(213, 225, 217, .32);
  border-width: 1px 0 0 1px;
}

#overviewBoardPreview::after {
  right: 13px;
  bottom: 13px;
  width: 38px;
  height: 18px;
  border-right: 1px solid #c8753d;
  border-bottom: 1px solid #c8753d;
}

#overviewBoardPreview img {
  position: relative;
  z-index: 1;
  width: auto;
  max-height: 210px;
  object-fit: contain;
}

#overviewBoardPreview p {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin-bottom: 0;
  color: #d5e1da;
  text-align: center;
}

.workbench-stage {
  display: flex;
  grid-area: project-stage;
  align-items: flex-start;
  flex-direction: column;
  min-height: 100%;
  border-left: 1px solid #d3d8d2;
  background:
    linear-gradient(135deg, rgba(200, 117, 61, .09), transparent 52%),
    #f1f0e9;
  padding: 20px 20px 24px;
}

.workbench-stage h2 {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.08;
}

.workbench-stage p {
  margin-bottom: 22px;
}

.workbench-continue-button {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-right: 92px;
  border: 1px solid #9a542b;
  border-radius: 50%;
  background: #c8753d;
  color: #fffaf3;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.workbench-continue-button svg {
  width: 21px;
  height: 21px;
}

.workbench-continue-button span {
  position: absolute;
  left: calc(100% + 10px);
  width: max-content;
  max-width: 112px;
  color: #17342e;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
}

.workbench-continue-button:hover {
  border-color: #713a1e;
  background: #aa5d30;
  transform: translateY(-2px);
}

.workbench-continue-button:active {
  background: #8d4926;
  transform: translateY(0) scale(.96);
}

.workbench-continue-button:focus-visible {
  outline: 3px solid #236f60;
  outline-offset: 4px;
}

.workbench-continue-button[aria-disabled="true"],
.workbench-continue-button:disabled {
  border-color: #9ca6a2;
  background: #aeb7b3;
  cursor: not-allowed;
  transform: none;
}

.workbench-workshop,
.workbench-card {
  position: relative;
  min-height: 176px;
  overflow: hidden;
  border: 1px solid #cbd2cd;
  border-radius: 6px;
  background: #f8f8f3;
  padding: 18px;
}

.workbench-workshop {
  grid-row: 1;
  grid-column: 3;
  min-height: 100%;
  border-top: 3px solid #264f45;
  padding-bottom: 72px;
}

.workbench-workshop-art {
  display: grid;
  width: 100%;
  height: 78px;
  justify-items: end;
  margin: -8px 0 2px;
}

.workbench-workshop-art img {
  aspect-ratio: 1;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.workbench-new-project {
  z-index: 2;
  display: inline-flex;
  grid-row: 1;
  grid-column: 3;
  align-self: end;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 18px 18px;
  border: 1px solid #a85e31;
  border-radius: 5px;
  background: #fff8f1;
  padding: 8px 10px;
  color: #784321;
  font-size: 11px;
  font-weight: 780;
  text-decoration: none;
}

.workbench-new-project svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.workbench-new-project:hover {
  border-color: #7f4223;
  background: #f7e8d9;
}

.workbench-new-project:focus-visible {
  outline: 3px solid #236f60;
  outline-offset: 3px;
}

.workbench-workshop header,
.workbench-card header {
  padding-right: 66px;
}

.workbench-workshop dl {
  display: grid;
  margin-top: 0;
  margin-bottom: 15px;
}

.workbench-workshop dl > div {
  display: grid;
  grid-template-columns: minmax(76px, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  border-top: 1px solid #d8ddd8;
  padding: 9px 0;
}

.workbench-workshop dt {
  color: #6a7772;
  font-family: var(--cf-mono, ui-monospace, monospace);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workbench-workshop dd {
  overflow: hidden;
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-blockers {
  margin-bottom: 10px;
  color: #79500d;
  font-size: 11px;
}

.workbench-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.workbench-load-error {
  position: relative;
  z-index: 3;
  border-top: 1px solid #c78982;
  margin-top: 10px;
  padding-top: 10px;
}

.workbench-load-error p {
  margin-bottom: 8px;
  color: #8e302b;
}

.workbench-load-error button {
  min-height: 32px;
}

.workbench-card {
  border-width: 1px 0 0;
  border-radius: 0 0 6px 6px;
  background: rgba(255, 255, 255, .72);
}

.workbench-card .data-list {
  gap: 0;
  margin: 10px 0 14px;
  border-top: 1px solid #d8ddd8;
}

.workbench-card .data-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 52px;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 8px 0;
}

.workbench-card .data-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-card .metric {
  min-width: 68px;
}

.workbench-card .icon-action {
  align-self: center;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state]::after {
  display: none;
  position: absolute;
  top: 17px;
  right: 17px;
  border: 1px solid #9ca7a2;
  border-radius: 3px;
  background: #eef0ed;
  padding: 3px 5px;
  color: #56635e;
  font-family: var(--cf-mono, ui-monospace, monospace);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  content: attr(data-state);
}

.workbench-state-label {
  position: absolute;
  z-index: 4;
  top: 17px;
  right: 17px;
  border: 1px solid #9ca7a2;
  border-radius: 3px;
  background: #eef0ed;
  padding: 3px 5px;
  color: #56635e;
  font-family: var(--cf-mono, ui-monospace, monospace);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  opacity: 1 !important;
  text-transform: uppercase;
}

.workbench-project > .workbench-state-label {
  right: auto;
  left: 22px;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="loading"]::after { content: "Загрузка"; }
:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="empty"]::after { content: "Нет данных"; }
:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="error"]::after { content: "Ошибка"; }
:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="partial"]::after { content: "Частично"; }
:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="ready"]::after { content: "Готово"; }

.workbench-project[data-state]::after {
  right: auto;
  left: 22px;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="ready"] {
  border-top-color: #27705a;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="ready"]::after {
  border-color: #6d9a88;
  background: #e8f2ec;
  color: #1e664d;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="ready"] > .workbench-state-label {
  border-color: #6d9a88;
  background: #e8f2ec;
  color: #1e664d;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="partial"] {
  border-top-color: #b67b22;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="partial"]::after {
  border-color: #c9a263;
  background: #fff3d8;
  color: #79500d;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="partial"] > .workbench-state-label {
  border-color: #c9a263;
  background: #fff3d8;
  color: #79500d;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="error"] {
  border-top-color: #a6423a;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="error"]::after {
  border-color: #c78982;
  background: #fae9e7;
  color: #8e302b;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="error"] > .workbench-state-label {
  border-color: #c78982;
  background: #fae9e7;
  color: #8e302b;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="loading"] {
  background-image: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .72) 42%, transparent 60%);
  background-size: 220% 100%;
  animation: workbench-loading 1.2s linear infinite;
}

:where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="loading"] > * {
  opacity: .42;
}

@keyframes workbench-loading {
  to { background-position: -220% 0; }
}

.account-overview-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid #314a43;
  border-radius: 10px;
  background:
    linear-gradient(125deg, rgba(192, 115, 51, .16), transparent 44%),
    linear-gradient(145deg, #132821, #233f35);
  padding: clamp(24px, 5vw, 56px);
  color: #f8f4ec;
}

.account-overview-hero h1 {
  max-width: 720px;
  margin: 8px 0;
  font-family: var(--cf-font-display, Georgia, serif);
  font-size: clamp(30px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}

.account-overview-hero p {
  max-width: 620px;
  color: rgba(248, 244, 236, .7);
  font-size: 14px;
}

.account-overview-hero .primary-link {
  flex: 0 0 auto;
  min-height: 44px;
  background: #c07333;
  color: white;
  font-size: 12px;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.overview-metrics a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 10px;
  min-height: 92px;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
}

.overview-metrics a + a { border-left: 1px solid var(--line); }
.overview-metrics svg { grid-row: 1 / 3; width: 24px; height: 24px; color: #a85e27; }
.overview-metrics span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.overview-metrics strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 12px;
}

.overview-grid > section {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 24px;
}

.overview-grid h2 { margin: 8px 0; font-size: 22px; }
.overview-continue p { max-width: 650px; min-height: 42px; }
.overview-continue > a,
.overview-help-link { display: inline-flex; margin-top: 24px; color: #8e4d20; font-weight: 750; }
.overview-route > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 18px; }
.overview-route > div a { border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; color: var(--ink); font-size: 11px; font-weight: 700; text-decoration: none; }
.overview-route > div a:hover { border-color: #b6672d; background: #fbf3ea; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.section-title h1 {
  font-size: 18px;
}

.section-title p {
  margin-top: 2px;
  font-size: 11px;
}

.primary-link,
.primary-action-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  padding: 0 11px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.primary-link:hover,
.primary-link:focus-visible,
.primary-action-inline:hover,
.primary-action-inline:focus-visible {
  border-color: #0d5146;
  background: #0d5146;
  color: #fff;
}

.data-list {
  display: grid;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.data-table {
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.data-table > .data-list {
  border-top: 0;
}

.project-data-table {
  --project-columns: minmax(170px, 2fr) minmax(110px, 1fr) 60px 70px minmax(120px, 1fr) 104px;
}

.job-data-table {
  --job-columns: minmax(180px, 1.5fr) minmax(140px, 1fr) minmax(140px, 1fr) 90px 104px;
}

.data-table-head {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  padding: 6px 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.data-table-head span:last-child {
  text-align: right;
}

.data-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 7px 5px;
}

.project-table-head,
.project-data-row {
  grid-template-columns: var(--project-columns);
  min-width: 760px;
}

.profile-data-row {
  grid-template-columns: minmax(180px, 2fr) minmax(120px, 1fr) minmax(120px, 1fr) minmax(105px, 1fr) minmax(85px, 0.7fr) auto;
}

.device-card-main {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.device-management-split #printersTable {
  width: 100%;
}

.device-table-row {
  grid-template-columns: minmax(210px, 2.4fr) repeat(4, minmax(86px, 1fr)) auto;
  min-height: 46px;
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.device-table-row .data-row-main strong,
.device-table-row .data-metric strong {
  font-size: 10px;
}

.device-table-row .row-actions {
  gap: 3px;
}

.device-table-row .row-actions .icon-action,
.device-table-row .icon-active {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
}

.profile-data-row[data-origin="copy"] {
  box-shadow: inset 3px 0 #126b5b;
  background: #f5faf8;
}

.profile-data-row[data-origin="custom"] {
  box-shadow: inset 3px 0 #3f6f97;
  background: #f6f9fc;
}

.job-table-head,
.job-data-row {
  grid-template-columns: var(--job-columns);
  min-width: 720px;
}

.list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 230px) auto;
  align-items: end;
  gap: 7px;
  margin-bottom: 10px;
}

.device-catalog-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
}

.material-catalog-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px) minmax(150px, 210px);
}

.device-category-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.device-category-tabs button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  background: transparent;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.device-category-tabs button > .equipment-category-art {
  aspect-ratio: 1;
  width: 30px;
  height: 30px;
  margin-right: 4px;
  object-fit: contain;
}

.device-category-tabs button:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.device-category-tabs button.active {
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.device-category-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9px;
}

.device-category-tabs button.active span {
  background: var(--panel);
  color: var(--accent);
}

.material-category-tabs button {
  min-height: 36px;
}

.catalog-toolbar > span {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.list-filters label {
  width: min(240px, 100%);
}

.data-row-main,
.data-metric {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.data-row-main strong,
.data-row-main span,
.data-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-row-main strong,
.data-metric strong {
  font-size: 11px;
}

.data-row-main span,
.data-metric span {
  color: var(--muted);
  font-size: 9px;
}

.project-data-row .data-metric strong,
.job-data-row .data-metric strong {
  font-variant-numeric: tabular-nums;
}

.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.row-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 0 9px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
  text-decoration: none;
}

.row-actions .icon-action,
.icon-active {
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.row-actions .icon-action:hover {
  border-color: var(--line-strong);
  background: #eef2f5;
}

.row-actions .icon-action.danger-action {
  color: var(--error);
}

.icon-active {
  border-color: #b8d6cd;
  background: var(--accent-soft);
  color: var(--accent);
}

.danger-action {
  color: var(--error);
}

.active-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 5px;
  background: var(--accent-soft);
  padding: 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 720;
}

.empty-data-row {
  min-height: 80px;
  padding: 24px 5px;
  color: var(--muted);
  font-size: 12px;
}

.management-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
}

.management-split.device-management-split {
  grid-template-columns: minmax(0, 1fr);
}

.management-split.material-management-split {
  grid-template-columns: minmax(0, 1fr);
}

.material-management-split #materialsTable {
  width: 100%;
}

.material-table-row {
  grid-template-columns: minmax(210px, 2.2fr) repeat(4, minmax(90px, 1fr)) auto;
  min-height: 48px;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.management-split > .data-list:only-child {
  grid-column: 1 / -1;
}

.editor-panel,
.settings-form {
  display: grid;
  align-content: start;
  gap: 9px;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.editor-dialog {
  width: min(940px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: auto;
}

.editor-dialog .editor-panel {
  border: 0;
  padding: 0;
}

.ui-action-icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.icon-active {
  display: grid;
  place-items: center;
}

.icon-active .ui-action-icon {
  width: 15px;
  height: 15px;
}

.confirmation-dialog {
  width: min(440px, calc(100vw - 32px));
}

.confirmation-dialog form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
}

.confirmation-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f8e9e5;
  color: #a03428;
}

.confirmation-mark svg { width: 20px; height: 20px; }
.confirmation-dialog h2 { margin: 5px 0; font-size: 20px; }
.confirmation-dialog p { font-size: 12px; }
.confirmation-dialog .form-actions { grid-column: 1 / -1; }
.danger-confirm { border-color: #a03428; background: #a03428; color: white; }

.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.icon-close {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
}

textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.calibration-howto {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calibration-howto > div {
  position: relative;
  min-height: 96px;
  padding: 14px 16px 12px 46px;
}

.calibration-howto > div + div {
  border-left: 1px solid var(--line);
}

.calibration-howto span {
  position: absolute;
  top: 14px;
  left: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.calibration-howto strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.calibration-howto p,
.calibration-reading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
}

.calibration-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(460px, 1.28fr);
  gap: 18px;
  padding-top: 16px;
}

.calibration-form {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
}

.calibration-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
}

.calibration-form legend {
  padding: 0 8px 0 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.calibration-form fieldset:first-child label:first-of-type {
  grid-column: 1 / -1;
}

.calibration-equipment-fieldset,
.calibration-context-fieldset {
  grid-template-columns: minmax(0, 1fr) !important;
}

.calibration-device-kinds {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.calibration-device-kinds button {
  display: grid;
  grid-template-rows: 52px auto;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  justify-items: center;
  gap: 4px;
  border-color: var(--line);
  background: var(--panel-2);
  padding: 5px;
  text-align: center;
}

.calibration-device-kinds img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.calibration-device-kinds span {
  overflow: hidden;
  max-width: 100%;
  font-size: 9px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calibration-device-kinds button.active,
.calibration-device-kinds button[aria-selected="true"] {
  border-color: var(--cf-copper, #c8753d);
  box-shadow: inset 0 0 0 1px var(--cf-copper, #c8753d);
  background: #fff8f1;
  color: var(--ink);
}

.calibration-device-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px;
}

.calibration-device-select-row label { min-width: 0; }
.calibration-device-select-row button { min-height: 34px; }
.calibration-device-status {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.calibration-device-summary { display: none; }

.calibration-material-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px;
}
.calibration-material-control label { min-width: 0; }
.calibration-material-control button { min-height: 34px; }

.calibration-recipe-fields[hidden] {
  display: none;
}

.calibration-guide {
  border-left: 3px solid var(--cf-copper, #c8753d);
  background: #f7f2ec;
  padding: 9px 10px;
  color: #55483c;
  font-size: 10px;
  line-height: 1.45;
}

.calibration-create {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 46px;
}

.calibration-create span,
.calibration-create small { color: inherit; }
.calibration-create small { font-size: 9px; font-weight: 600; opacity: .82; }

.calibration-preview {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #151c24;
  color: white;
  overflow: hidden;
}

.calibration-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #39434e;
  padding: 10px 12px;
}

.calibration-preview-head span {
  color: #aab5c0;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.calibration-preview-head h2 {
  margin: 2px 0 0;
  color: white;
  font-size: 14px;
}

.calibration-preview-head > strong {
  color: #d6dee6;
  font-size: 11px;
}

.calibration-plate-wrap {
  position: relative;
  display: grid;
  min-height: 260px;
  place-items: center;
  background-color: #202a35;
  background-image:
    linear-gradient(45deg, #25313d 25%, transparent 25%),
    linear-gradient(-45deg, #25313d 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #25313d 75%),
    linear-gradient(-45deg, transparent 75%, #25313d 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  padding: 32px 42px 22px 22px;
}

.calibration-dimension {
  position: absolute;
  z-index: 1;
  color: #d6dee6;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.calibration-dimension-width {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.calibration-dimension-height {
  top: 50%;
  right: 9px;
  transform: translateY(-50%) rotate(-90deg);
}

.calibration-plate {
  display: grid;
  box-sizing: border-box;
  width: min(100%, calc(420px * var(--calibration-aspect)));
  min-width: 0;
  min-height: 0;
  max-height: 420px;
  overflow: hidden;
  aspect-ratio: var(--calibration-aspect);
  border: 2px solid #e7edf2;
  background: #f4f6f8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  object-fit: contain;
}

.calibration-preview[data-recipe="print_scale"] .calibration-plate,
.calibration-preview[data-recipe="cnc_tool"] .calibration-plate,
.calibration-preview[data-recipe="cnc_copper_clear"] .calibration-plate,
.calibration-preview[data-recipe="laser_power_speed"] .calibration-plate,
.calibration-preview[data-recipe="laser_line_interval"] .calibration-plate {
  position: relative;
  overflow: hidden;
}

.calibration-scale-preview .scale-frame {
  position: absolute;
  inset: 12%;
  border: 3px solid #18222c;
}

.calibration-scale-preview .scale-axis {
  position: absolute;
  background: #18222c;
}

.calibration-scale-preview .scale-axis.horizontal {
  top: calc(50% - 1px);
  right: 12%;
  left: 12%;
  height: 2px;
}

.calibration-scale-preview .scale-axis.vertical {
  top: 12%;
  bottom: 12%;
  left: calc(50% - 1px);
  width: 2px;
}

.calibration-cnc-preview i {
  position: absolute;
  border: 2px solid #7d4f2f;
  border-radius: 2px;
}

.calibration-laser-preview {
  display: grid;
  gap: 3px;
  padding: 8%;
  background: #e9edf0;
}

.calibration-laser-preview i {
  min-width: 0;
  border: 1px solid #2d3842;
  background: #18222c;
}

.calibration-laser-preview i {
  position: relative;
  display: grid;
  place-items: center;
}

.calibration-laser-preview i span {
  color: white;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.calibration-width-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c8d0d7;
  padding: 4px 10px;
  color: #17212b;
}

.calibration-width-row:last-child { border-bottom: 0; }
.calibration-width-row strong { font-size: 9px; }
.calibration-width-row span { display: block; height: var(--diagnostic-width); min-height: 1px; background: #7d4f2f; }
.calibration-width-row.is-below-tool { background: #f5e5e0; color: #8d3027; }
.calibration-width-row.is-below-tool span { background: repeating-linear-gradient(90deg, #9b3930 0 5px, transparent 5px 8px); }

.calibration-cnc-clear-preview {
  display: grid;
  grid-template-rows: repeat(14, minmax(0, 1fr));
  gap: 2px;
  padding: 10%;
  background: #d8a75d;
}

.calibration-cnc-clear-preview i { display: block; border-radius: 1px; background: #8d5d31; }

.calibration-interval-preview {
  align-items: stretch;
  background: #e9edf0;
  padding: 8px;
}

.calibration-interval-preview > div {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 5px;
  min-width: 0;
  border-right: 1px solid #c6ced5;
  padding: 4px;
  color: #17212b;
  text-align: center;
}

.calibration-interval-preview > div:last-child { border-right: 0; }
.calibration-interval-preview i { display: block; min-height: 120px; background: repeating-linear-gradient(0deg, #18222c 0 1px, transparent 1px var(--line-gap)); }
.calibration-interval-preview strong { font-size: 8px; }

.calibration-preview-zone {
  display: grid;
  box-sizing: border-box;
  grid-template-rows: minmax(0, 1fr) auto auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  align-items: center;
  border-right: 1px solid rgba(20, 28, 36, 0.46);
  padding: 10px 5px 14px;
  color: #17212b;
  text-align: center;
}

.calibration-preview-zone:last-child {
  border-right: 0;
}

.calibration-preview-zone:nth-child(odd) {
  background: #edf1f4;
}

.calibration-preview-zone:nth-child(even) {
  background: #dce3e9;
}

.calibration-preview-zone strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.calibration-preview-zone span {
  max-width: 100%;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.calibration-plate[data-preview-shape="wide"] .calibration-preview-zone {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: 2px 2px 3px;
}

.calibration-plate[data-preview-shape="wide"] .calibration-pattern-demo,
.calibration-plate[data-preview-shape="tall"] .calibration-pattern-demo {
  display: none;
}

.calibration-plate[data-preview-shape="wide"] .calibration-preview-zone strong,
.calibration-plate[data-preview-shape="tall"] .calibration-preview-zone strong {
  font-size: 8px;
}

.calibration-plate[data-preview-shape="wide"] .calibration-preview-zone span {
  margin-top: 0;
  font-size: 7px;
}

.calibration-plate[data-preview-shape="tall"] .calibration-preview-zone {
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(20, 28, 36, 0.46);
  padding: 2px;
}

.calibration-plate[data-preview-shape="tall"] .calibration-preview-zone:last-child {
  border-bottom: 0;
}

.calibration-pattern-demo {
  display: grid;
  box-sizing: border-box;
  align-self: stretch;
  align-content: center;
  gap: 12px;
  width: min(64px, 82%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  overflow: hidden;
}

.calibration-pattern-lines {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 5px;
}

.calibration-pattern-lines i {
  display: block;
  width: 100%;
  background: #1d2833;
}

.calibration-pattern-lines i:nth-child(1) {
  height: 6px;
}

.calibration-pattern-lines i:nth-child(2) {
  height: 4px;
}

.calibration-pattern-lines i:nth-child(3) {
  height: 3px;
}

.calibration-pattern-lines i:nth-child(4) {
  height: 2px;
}

.calibration-pattern-lines i:nth-child(5) {
  height: 1px;
}

.calibration-pattern-lines i:nth-child(6) { height: 1px; opacity: .82; }
.calibration-pattern-lines i:nth-child(7) { height: 1px; opacity: .58; }

.calibration-feature-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 1px solid #39434e;
  padding: 8px 12px;
}

.calibration-feature-legend span {
  border: 1px solid #4b5966;
  border-radius: 999px;
  padding: 2px 6px;
  color: #d6dee6;
  font-size: 8px;
  font-weight: 750;
}

.calibration-capability-hint {
  margin: 0;
  border-top: 1px solid #39434e;
  background: #19232d;
  padding: 9px 12px;
  color: #c7d0d9;
  font-size: 10px;
  line-height: 1.4;
}

.calibration-pattern-shapes {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: clamp(1px, 1vw, 6px);
}

.calibration-pattern-shapes i {
  display: block;
  flex: 0 1 8px;
  width: 8px;
  min-width: 0;
  height: 8px;
  background: #1d2833;
}

.calibration-pattern-shapes .circle {
  border-radius: 50%;
}

.calibration-target-key {
  display: grid;
  gap: 2px;
  border-top: 1px solid #39434e;
  padding: 9px 12px;
}

.calibration-target-key strong {
  color: white;
  font-size: 10px;
}

.calibration-target-key span {
  color: #aeb9c3;
  font-size: 10px;
  line-height: 1.4;
}

.calibration-sequence {
  min-height: 48px;
  margin: 0;
  border-top: 1px solid #39434e;
  border-bottom: 1px solid #39434e;
  padding: 9px 12px;
  color: #c7d0d9;
  font-size: 11px;
  line-height: 1.4;
}

.calibration-reading {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calibration-reading > div {
  position: relative;
  min-height: 104px;
  padding: 12px 10px 10px 30px;
}

.calibration-reading > div + div {
  border-left: 1px solid #39434e;
}

.calibration-reading strong {
  display: block;
  margin-bottom: 4px;
  color: white;
  font-size: 10px;
}

.calibration-reading p {
  color: #aeb9c3;
  font-size: 10px;
}

.reading-mark {
  position: absolute;
  top: 13px;
  left: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.reading-mark.low {
  background: #e7b65d;
}

.reading-mark.good {
  background: #72b298;
}

.reading-mark.high {
  background: #7aa7d6;
}

.calibration-status {
  margin-top: 10px;
}

.calibration-results {
  margin-top: 10px;
}

.calibration-row {
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 1fr) auto;
}

.calibration-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.calibration-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.calibration-file-link,
.save-zone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  padding: 0 9px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 720;
  text-decoration: none;
}

.calibration-file-link.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.calibration-result-help {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.calibration-confirm-mode {
  margin-top: 7px;
  justify-self: start;
}

.calibration-zone-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 8px;
}

.calibration-zone-result span {
  display: grid;
  gap: 2px;
}

.calibration-zone-result small {
  color: var(--muted);
}

.settings-form {
  grid-template-columns: repeat(2, minmax(220px, 360px));
  max-width: 760px;
  border-left: 0;
  padding-left: 0;
}

.settings-form .form-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.app-dialog {
  width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
}

.app-dialog.device-dialog {
  width: min(920px, calc(100vw - 36px));
}

.app-dialog::backdrop {
  background: rgba(13, 20, 27, 0.42);
}

.app-dialog form {
  display: grid;
  gap: 12px;
}

.profile-details-dialog {
  width: min(620px, calc(100vw - 28px));
}

.profile-details-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-details-art {
  width: 92px;
  height: 92px;
  margin: 0;
  align-self: start;
  justify-self: end;
}

.profile-details-art img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: contain;
}

.profile-details-head > div {
  display: grid;
  gap: 3px;
}

.profile-details-head > div > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-details-head h2 {
  font-size: 16px;
  text-transform: none;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.profile-details-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px 10px 0;
}

.profile-details-grid > div:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.profile-details-grid span {
  color: var(--muted);
  font-size: 9px;
}

.profile-details-grid strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.profile-details-note {
  margin-top: 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.profile-details-dialog > .form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

#profileDetailsCopy {
  margin-left: auto;
}

.device-type-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  overflow: auto;
}

.new-device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.new-device-grid button {
  display: grid;
  grid-template-rows: 104px auto auto;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  color: var(--ink);
  text-align: center;
}

.new-device-grid button:hover,
.new-device-grid button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.new-device-art {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.new-device-grid strong {
  font-size: 12px;
}

.new-device-grid small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.device-form-category {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  padding: 7px 10px;
}

.device-form-category img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.device-form-category div {
  display: grid;
  gap: 2px;
}

.device-form-category span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  text-transform: uppercase;
}

.device-form-category strong {
  font-size: 14px;
}

.calibration-material-link {
  min-height: 30px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--accent-soft);
  padding: 7px 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .account-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench-project {
    grid-column: 1 / -1;
  }

  .workbench-workshop {
    grid-row: 2;
    grid-column: 1;
  }

  .workbench-new-project {
    grid-row: 2;
    grid-column: 1;
  }

  .workflow-progress > li { grid-template-columns: 1fr; gap: 1px; }
  .device-profile-picker { grid-template-columns: 1fr; }
  body {
    overflow: auto;
  }

  html.workspace-page-root {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  body.workspace-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  body.workspace-page .shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .workspace {
    height: auto;
    min-height: calc(100vh - 20px);
  }

  .app-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .control-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    overflow: visible;
    padding-right: 0;
  }

  .control-scroll {
    display: contents;
  }

  .job-panel {
    grid-column: 1 / -1;
  }

  .result-action-bar {
    grid-template-columns: minmax(160px, 0.7fr) minmax(300px, 1.3fr);
  }

  .result-package-actions {
    grid-column: 1 / -1;
  }

  .viewer {
    height: 58vh;
    min-height: 440px;
  }

  .site-header {
    grid-template-columns: auto 1fr;
  }

  .site-nav {
    order: 3;
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 4px;
  }

  .calibration-workspace {
    grid-template-columns: 1fr;
  }

  .profile-data-row {
    grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(100px, 1fr));
  }

  .profile-data-row .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .device-table-row {
    grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(82px, 1fr)) auto;
  }

  .device-table-row .row-actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .calibration-device-kinds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calibration-device-kinds button {
    grid-template-rows: 46px auto;
    min-height: 72px;
  }

  .calibration-device-kinds img {
    width: 46px;
    height: 46px;
  }

  .account-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-workbench > * {
    grid-column: 1;
  }

  .workbench-project {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(170px, auto) auto;
    grid-template-areas:
      "project-head"
      "board-preview"
      "project-stage";
    order: 1;
  }

  .workbench-stage {
    min-height: 190px;
    border-top: 1px solid #d3d8d2;
    border-left: 0;
  }

  .workbench-workshop { grid-row: auto; }
  .workbench-workshop { order: 2; }
  #overviewRecentResults { order: 3; }
  #overviewPrecision { order: 4; }
  #overviewActivity { order: 5; }
  #overviewNewProject { order: 6; }

  .workbench-new-project {
    grid-row: auto;
    margin: 0;
  }

  .workbench-continue-button {
    margin-right: 118px;
  }

  .workbench-continue-button span {
    max-width: 136px;
  }

  .workflow-progress { grid-template-columns: repeat(6, 112px); overflow-x: auto; }
  .workflow-progress > li { min-width: 112px; }
  .device-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-category-grid button { min-height: 78px; grid-template-columns: 52px minmax(0, 1fr); }
  .device-category-grid button > .device-kind-art { width: 52px; height: 52px; }
  .shell {
    padding: 6px;
  }

  .workspace {
    height: auto;
  }

  .app-bar,
  .viewer-head,
  .support-head {
    display: grid;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 6px;
    max-width: 100%;
  }

  .site-header > *,
  .header-tools,
  .management-workspace,
  .management-layout,
  .management-content,
  .management-view {
    min-width: 0;
    max-width: 100%;
  }

  .site-brand {
    min-width: 0;
  }

  .site-brand-logo {
    width: 138px;
    max-width: 100%;
  }

  .header-printer-label {
    display: flex;
    padding-left: 0;
  }

  .header-printer-label span {
    display: none;
  }

  .header-printer-label select {
    width: 132px;
    padding-left: 6px;
    font-size: 9px;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .user-menu-button > span:nth-child(2),
  .menu-caret {
    display: none;
  }

  .brand-block,
  .top-nav {
    align-items: start;
    justify-content: start;
  }

  .control-column,
  .fields-dense,
  .summary-grid,
  .layer-summary {
    grid-template-columns: 1fr;
  }

  .project-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .selected-device-summary {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 7px;
    padding-left: 0;
  }

  .result-action-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  #qualityDialogTrigger,
  .result-download-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .result-download-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .result-primary-actions,
  .result-package-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .result-primary-actions > *,
  .result-package-actions > * {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .result-primary-actions > * {
    flex-basis: 100%;
  }

  .result-package-actions {
    grid-column: auto;
  }

  .empty-workspace {
    min-height: 560px;
    padding: 10px;
  }

  .empty-upload {
    min-height: 360px;
    padding: 24px 16px;
  }

  .exposure-fields,
  .profile-details-grid {
    grid-template-columns: 1fr;
  }

  .mirror-control-row {
    grid-template-columns: 1fr;
  }

  .profile-details-grid > div:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }

  .profile-details-head {
    grid-template-columns: minmax(0, 1fr) 72px auto;
  }

  .profile-details-art {
    width: 72px;
    height: 72px;
  }

  #profileDetailsCopy {
    margin-left: 0;
  }

  .new-device-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-device-grid button {
    grid-template-rows: 78px auto auto;
    min-height: 142px;
    padding: 8px;
  }

  .new-device-art {
    width: 72px;
    height: 72px;
  }

  .device-profile-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .viewer {
    height: 440px;
  }

  .management-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    width: 100%;
    max-width: 100%;
  }

  .account-overview-hero {
    align-items: start;
    flex-direction: column;
  }

  .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-metrics a:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .overview-metrics a:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .section-nav {
    display: flex;
    align-self: start;
    width: 100%;
    overflow-x: auto;
  }

  .management-content {
    width: 100%;
    max-width: 100%;
    min-height: 540px;
  }

  .section-nav a {
    flex: 0 0 auto;
  }

  .management-split,
  .settings-form,
  .calibration-form,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .device-category-tabs {
    margin-right: -8px;
    padding-right: 8px;
  }

  .editor-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .data-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    border-top: 0;
  }

  .data-table-head {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    margin: -1px;
    border: 0;
    padding: 0;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
  }

  .project-data-table > .data-list,
  .job-data-table > .data-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .project-data-row,
  .job-data-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    padding: 10px;
  }

  .project-data-row .data-metric::before,
  .job-data-row .data-metric::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 9px;
  }

  .project-data-row .data-metric > span,
  .job-data-row .data-metric > span {
    display: none;
  }

  .data-row,
  .project-data-row,
  .profile-data-row,
  .job-data-row,
  .calibration-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-row-main,
  .row-actions,
  .project-data-row .row-actions,
  .profile-data-row .row-actions {
    grid-column: 1 / -1;
  }

  .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .calibration-howto,
  .calibration-reading {
    grid-template-columns: 1fr;
  }

  .calibration-howto > div + div,
  .calibration-reading > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .calibration-reading > div + div {
    border-top-color: #39434e;
  }

  .calibration-plate-wrap {
    min-height: 220px;
    padding: 14px;
  }

  .archive-requirements ul,
  .support-terms {
    grid-template-columns: 1fr;
  }

  .print-file-row {
    align-items: flex-start;
  }

  .print-file-row {
    display: grid;
  }

  .support-title {
    align-items: flex-start;
  }

  .support-guide {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 16px;
  }

  .guide-heading {
    grid-row: auto;
  }

  .file-checklist {
    grid-template-columns: 1fr;
  }

  .compatibility-table {
    overflow-x: auto;
  }

  .compatibility-table > div {
    min-width: 660px;
  }

  .file-checklist li:not(:nth-child(3n + 1)) {
    border-left: 0;
    padding-left: 0;
  }
}

.export-production-action {
  border-color: var(--cf-green, #163d35);
  background: var(--cf-green, #163d35);
  color: #fff;
}

.export-production-action:hover:not(:disabled) {
  border-color: #225247;
  background: #225247;
  color: #fff;
}

#issueSummary {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.issue-list {
  display: grid;
  gap: 6px;
}

.issue-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.issue-empty-ready {
  color: var(--success);
}

.issue-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  background: var(--panel-2);
  padding: 8px 9px;
}

.issue-card.issue-warning {
  border-left-color: var(--amber);
  background: var(--warn-soft);
}

.issue-card.issue-blocker {
  border-left-color: var(--error);
  background: var(--error-soft);
}

.issue-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.issue-card-heading strong {
  font-size: 12px;
}

.issue-severity-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.issue-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.issue-impact,
.issue-meta {
  color: var(--muted);
}

.issue-remedies,
.issue-location-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.issue-location-controls span {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 10px;
}

.issue-remedy,
.issue-location-controls button {
  min-height: 32px;
  border-color: var(--line-strong);
  background: var(--panel);
  padding: 5px 8px;
  font-size: 10px;
}

.issue-remedy:focus-visible,
.issue-location-controls button:focus-visible,
.issue-acknowledgement input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.issue-acknowledgement {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-size: 11px;
  font-weight: 650;
}

.issue-acknowledgement input {
  width: 18px;
  height: 18px;
  margin: 0;
}

@media (max-width: 520px) {
  .result-primary-actions,
  .result-package-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .issue-card-heading {
    display: grid;
  }

  #issueSummary {
    text-align: left;
  }

  .issue-remedy,
  .issue-location-controls button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workbench-continue-button {
    transition: none;
  }

  :where(.workbench-project, .workbench-workshop, .workbench-card)[data-state="loading"] {
    animation: none;
  }

  .generation-spinner {
    animation: none;
  }
}
