:root {
  --ink: #2f2e2e;
  --muted: #686868;
  --line: #d2d2d2;
  --paper: #f3f3f3;
  --surface: #ffffff;
  --steel: #262626;
  --steel-deep: #090909;
  --steel-soft: #e9e9e9;
  --brand-blue: #2a93c8;
  --gold: #896009;
  --gold-soft: #f6edd7;
  --success-soft: #e5efea;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
}

a {
  color: var(--ink);
}

.app-bar {
  align-items: center;
  background: linear-gradient(90deg, #060606, #202020 68%, #303030);
  border-bottom: 4px solid var(--brand-blue);
  display: flex;
  min-height: 110px;
  justify-content: space-between;
  padding: 13px clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 28px;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 94px;
  object-fit: contain;
  width: auto;
}

.brand span {
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.88);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.08rem;
  font-weight: 400;
  padding-left: 28px;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 6px;
}

.app-tools,
.language-switch {
  align-items: center;
  display: flex;
  gap: 6px;
}

nav a,
.language-switch a,
.quiet-button,
button {
  border: 1px solid transparent;
  border-radius: 2px;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  text-decoration: none;
}

nav a.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

.language-switch {
  border-left: 1px solid var(--line);
  margin-left: 8px;
  padding-left: 12px;
}

.language-switch a {
  color: rgba(255, 255, 255, 0.78);
  min-width: 42px;
}

.language-switch a.selected {
  background: #fff;
  border-color: #fff;
  color: var(--steel-deep);
}

.app-bar nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.app-bar .language-switch {
  border-left-color: rgba(255, 255, 255, 0.28);
}

.language-switch a:not(.selected):hover,
.app-bar nav a:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: white;
}

.workspace,
.offer-sheet {
  margin: 0 auto;
  max-width: 1260px;
  padding: clamp(22px, 4vw, 48px);
}

.upload-workspace {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1100px;
}

.page-head {
  grid-column: 1 / -1;
}

.page-head.compact {
  margin-bottom: 22px;
}

.admin-head-actions {
  margin-top: 14px;
}

.page-head h1,
.offer-header h1,
.error-page h1 {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 2rem, 2.6rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 5px 0 8px;
}

.page-head p {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

h2 {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  margin: 0;
  text-transform: uppercase;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(16px, 2vw, 24px);
}

.upload-form,
.review-form,
.pricing-form {
  display: grid;
  gap: 15px;
}

.form-grid,
.review-form {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 6px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

.quantity-control {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  width: 100%;
}

.quantity-control input {
  border-right: 0;
  min-height: 48px;
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-buttons {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.quantity-step {
  align-items: center;
  background: #f6f6f6;
  border: 1px solid #bdbdbd;
  border-radius: 0;
  color: var(--ink);
  display: flex;
  font-size: 1.02rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 24px;
  padding: 0;
}

.quantity-step + .quantity-step {
  border-top: 0;
}

.quantity-step:hover {
  background: var(--steel-soft);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.file-drop {
  background: #f6f6f6;
  border: 1px dashed #8d8d8d;
  border-radius: 2px;
  color: var(--ink);
  gap: 9px;
  min-height: 146px;
  padding: 20px;
}

.file-title {
  font-size: 1.05rem;
}

.file-hint,
.empty,
td span {
  color: var(--muted);
}

.file-drop input {
  background: var(--surface);
}

.part-upload-list {
  display: grid;
  gap: 12px;
}

.compact-head {
  margin-bottom: 0;
}

.add-part-button {
  align-items: center;
  border-style: dashed;
  display: flex;
  font-size: 0.86rem;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  text-transform: uppercase;
  width: 100%;
}

.upload-part-row {
  align-items: stretch;
  background: #f6f6f6;
  border: 1px dashed #8d8d8d;
  border-radius: 2px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 300px 42px;
  padding: 14px;
}

.upload-part-index {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  padding-bottom: 10px;
  text-transform: uppercase;
}

.upload-part-index strong {
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.upload-part-index span {
  font-size: 0.72rem;
  font-weight: 800;
}

.upload-file-pair {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-file-field {
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  gap: 6px;
  justify-content: start;
  min-height: 104px;
  padding: 12px;
  position: relative;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.upload-file-field input {
  cursor: pointer;
  height: 100%;
  inset: 0;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.upload-file-field.drag-over {
  background: #eef8fb;
  border-color: var(--brand-blue);
  box-shadow: inset 0 0 0 1px var(--brand-blue);
}

.upload-file-field.has-file {
  border-color: #7aa948;
}

.upload-file-field.drop-rejected {
  background: #fff2f0;
  border-color: #a31d1d;
}

.file-selected {
  color: var(--ink);
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
  margin-top: auto;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.upload-part-meta {
  align-self: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 92px;
}

.compact-file {
  min-height: 94px;
  padding: 14px;
}

.compact-file .file-title {
  font-size: 0.92rem;
}

.compact-file .file-hint {
  font-size: 0.78rem;
}

.remove-part-button {
  align-self: end;
  min-height: 42px;
  min-width: 42px;
  padding: 8px 12px;
}

.remove-part-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.optional-file {
  min-height: 112px;
}

.compact-file.optional-file {
  min-height: 94px;
}

.part-annotation {
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.annotation-head {
  margin-bottom: 0;
}

.annotation-head .quiet-button {
  font-size: 0.78rem;
  min-height: 34px;
  padding: 7px 10px;
  text-transform: uppercase;
}

.annotation-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.7fr);
}

.viewer-shell {
  background: #f7f7f7;
  border: 1px solid var(--line);
  min-height: 280px;
}

.upload-part-view {
  cursor: crosshair;
  display: block;
  height: auto;
  min-height: 280px;
  touch-action: none;
  width: 100%;
}

.viewer-background {
  fill: #fbfbfb;
}

.part-lines {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.part-marker .marker-leader,
.part-marker .marker-arrow {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.part-marker .marker-dot {
  fill: #b92323;
  stroke: #fff;
  stroke-width: 2;
}

.part-marker rect {
  fill: var(--gold-soft);
  stroke: var(--gold);
  stroke-width: 2;
}

.part-marker text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 800;
  pointer-events: none;
  text-anchor: middle;
}

.viewer-empty {
  fill: var(--muted);
  font-size: 24px;
  font-weight: 700;
  text-anchor: middle;
}

.marker-tools {
  display: grid;
  gap: 12px;
  align-content: start;
}

.marker-tools p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.marker-list {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.marker-list li {
  align-items: center;
  background: #f6f6f6;
  border: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 9px;
}

.marker-list li.empty {
  color: var(--muted);
  display: block;
}

.marker-list button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
  min-height: 28px;
  padding: 3px 8px;
}

button {
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.primary {
  background: var(--steel);
  border-color: var(--steel-deep);
  color: white;
  font-size: 0.86rem;
  text-transform: uppercase;
  width: fit-content;
}

.quiet-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.inline-form {
  display: inline;
  margin: 0;
}

.icon-delete-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  font-size: 1.35rem;
  height: 30px;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
  padding: 0;
  text-transform: none;
  width: 30px;
}

.icon-delete-button:hover {
  background: #fff5f5;
  border-color: #9b2d2d;
  color: #8f1d1d;
}

.icon-delete-button span {
  transform: translateY(-1px);
}

.danger {
  background: #8f1d1d;
  border-color: #6f1515;
  color: white;
  font-size: 0.86rem;
  text-transform: uppercase;
  width: fit-content;
}

.primary:hover {
  background: #000;
}

.danger:hover {
  background: #651111;
}

.queue {
  min-width: 0;
}

.section-head,
.detail-head,
.offer-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 15px;
}

.request-table,
.breakdown,
.offer-price {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.request-table th,
.request-table td,
.breakdown th,
.breakdown td,
.offer-price th,
.offer-price td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

.request-table th,
.offer-price th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.request-table td:first-child {
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}

.request-table td:not(:first-child),
.request-table th:not(:first-child) {
  text-align: right;
}

.score,
.status {
  border: 1px solid transparent;
  border-radius: 2px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  min-width: 44px;
  padding: 5px 9px;
}

.score.calm {
  background: var(--success-soft);
  border-color: #9bc7b8;
}

.score.alert {
  background: var(--gold-soft);
  border-color: #dfb267;
  color: #6e4403;
}

.status {
  background: var(--steel-soft);
  border-color: #c7c7c7;
}

.price-statuses {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.price-confidence {
  border: 1px solid transparent;
  border-radius: 2px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  min-width: 58px;
  padding: 5px 9px;
  text-transform: uppercase;
}

.confidence-high {
  background: var(--success-soft);
  border-color: #79b8a1;
  color: #164e3c;
}

.confidence-medium {
  background: var(--gold-soft);
  border-color: #dfb267;
  color: #6e4403;
}

.confidence-low {
  background: #f8e7e5;
  border-color: #d8a29d;
  color: #7a231c;
}

.price-confidence-note {
  border-left: 3px solid var(--brand-blue);
  color: var(--muted);
  font-size: 0.9rem;
  margin: 14px 0 0;
  padding: 7px 10px;
}

.detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 0.9fr);
  margin-bottom: 18px;
}

.actions,
.offer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.actions form {
  margin: 0;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.metrics div {
  border-top: 1px solid var(--line);
  min-width: 0;
  padding-top: 9px;
}

dt {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  font-weight: 650;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.warning-list {
  color: #63380a;
  margin-top: 17px;
}

.warning-list p {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  margin: 8px 0;
  padding: 9px 11px;
}

.breakdown th {
  font-weight: 650;
}

.breakdown td,
.offer-price td:last-child,
.offer-price th:last-child {
  text-align: right;
}

.breakdown tr.total th,
.breakdown tr.total td {
  font-size: 1.08rem;
  font-weight: 850;
}

.review-surface,
.context-surface,
.retention-surface {
  margin-top: 18px;
}

.review-form {
  align-items: end;
  grid-template-columns: 180px 190px 190px minmax(220px, 1fr) auto;
}

.review-form .wide {
  min-width: 0;
}

.retention-note {
  color: #666;
  margin: 0 0 14px;
}

.retention-metrics {
  margin-bottom: 16px;
}

.retention-actions,
.retention-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.retention-form label {
  min-width: min(420px, 100%);
}

.pricing-surface {
  margin-top: 22px;
}

.admin-head-actions form {
  margin: 0;
}

.quiet-button.danger {
  border-color: #9b2d2d;
  color: #9b2d2d;
}

.market-price-surface {
  margin-top: 22px;
}

.market-price-table {
  margin-top: 12px;
}

.market-price-note {
  margin: 12px 0 0;
  color: #6c6c6c;
  font-size: 0.9rem;
}

.testing-surface,
.testing-results {
  margin-top: 18px;
}

.testing-form {
  display: grid;
  gap: 15px;
}

.testing-controls {
  max-width: 620px;
}

.testing-results {
  overflow-x: auto;
}

.testing-table {
  min-width: 1630px;
}

.sourcing-badge {
  display: inline-block;
  max-width: 150px;
  padding: 4px 7px;
  border: 1px solid #c9c9c9;
  color: #303030;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.sourcing-outsource {
  border-color: #c49137;
  background: #f8edcf;
  color: #6d4a12;
}

.expected-price-input {
  min-height: 34px;
  min-width: 110px;
  padding: 6px 8px;
}

.learning-match {
  color: #176b50;
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 4px;
}

.learning-form {
  display: grid;
  gap: 14px;
}

.learning-ok,
.learning-review,
.learning-off {
  font-weight: 800;
}

.learning-ok {
  color: #1f6b42;
}

.learning-review {
  color: #7b5307;
}

.learning-off {
  color: #8f1d1d;
}

.pricing-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 1.05rem;
  gap: 12px;
  justify-content: space-between;
  text-transform: uppercase;
}

.pricing-toggle::before {
  align-items: center;
  border: 1px solid var(--line);
  content: "+";
  display: inline-flex;
  flex: 0 0 26px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
}

.pricing-toggle span {
  margin-right: auto;
}

.pricing-toggle small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pricing-surface[open] .pricing-toggle::before {
  content: "-";
}

.pricing-surface[open] .pricing-toggle {
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.pricing-groups {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-form fieldset {
  border: 1px solid var(--line);
  margin: 0;
  min-width: 0;
  padding: 15px;
}

.pricing-form legend {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 6px;
  text-transform: uppercase;
}

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

.material-parameter-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.material-parameter-table th,
.material-parameter-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
}

.material-parameter-table thead th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.material-parameter-table tbody th {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.offer-sheet {
  background: var(--surface);
  min-height: calc(100vh - 110px);
}

.offer-lines {
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 28px;
  padding-top: 28px;
}

.offer-document-head {
  align-items: center;
  display: flex;
  gap: 20px;
  min-width: 0;
}

.offer-document-logo {
  align-items: center;
  background: var(--steel-deep);
  display: flex;
  flex: 0 0 auto;
  height: 92px;
  justify-content: center;
  padding: 7px 14px;
  width: 158px;
}

.offer-document-logo img {
  display: block;
  height: 78px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

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

.drawing-sheet {
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.9fr);
  min-height: 560px;
}

.drawing-field {
  border-right: 1px solid var(--ink);
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(16px, 2.2vw, 28px);
}

.part-figure {
  display: grid;
  gap: 12px;
  margin: 0;
  min-height: 0;
}

.part-figure figcaption {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 9px;
}

.part-figure figcaption span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.part-figure figcaption strong {
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.part-preview {
  display: block;
  height: auto;
  width: 100%;
}

.part-preview g {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
  vector-effect: non-scaling-stroke;
}

.part-preview.envelope g {
  stroke-dasharray: 7 5;
}

.part-preview .part-annotation-markers {
  fill: none;
  stroke: none;
}

.part-preview .part-annotation-markers .marker-leader,
.part-preview .part-annotation-markers .marker-arrow {
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.part-preview .part-annotation-markers .marker-dot {
  fill: #b92323;
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.part-preview .part-annotation-markers rect {
  fill: var(--gold-soft);
  stroke: var(--gold);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.part-preview .part-annotation-markers text {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 800;
  stroke: none;
  text-anchor: middle;
}

.offer-annotation-legend {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.offer-annotation-legend ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.offer-annotation-legend li {
  overflow-wrap: anywhere;
}

.part-view-grid {
  align-items: stretch;
  display: grid;
  gap: 12px 24px;
  grid-template-areas:
    "main end"
    "top iso";
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.72fr);
  min-height: 390px;
}

.part-view {
  align-content: center;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.part-view span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.part-view-main {
  grid-area: main;
}

.part-view-top {
  grid-area: top;
}

.part-view-end {
  grid-area: end;
}

.part-view-iso {
  grid-area: iso;
}

.part-preview-empty {
  align-items: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 310px;
}

.uploaded-drawing-preview {
  border: 1px solid var(--line);
  min-height: 390px;
}

.uploaded-drawing-preview object {
  display: block;
  height: 520px;
  width: 100%;
}

.drawing-price-note {
  align-self: end;
  color: #bd2424;
  font-weight: 700;
  margin: 0;
}

.drawing-title-block {
  align-content: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.drawing-title-block div {
  border-bottom: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  min-width: 0;
  padding: 11px 12px;
}

.drawing-title-block div:nth-child(2n),
.drawing-title-block .wide {
  border-right: 0;
}

.drawing-title-block .wide {
  grid-column: 1 / -1;
}

.drawing-title-block div:first-child,
.drawing-title-block div:nth-child(2) {
  border-top: 1px solid var(--ink);
}

.assumptions {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 18px;
}

.assumptions h2 {
  color: var(--ink);
}

.error-page {
  max-width: 720px;
}

.login-page,
.message-page {
  max-width: 720px;
}

.login-form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
  max-width: 360px;
}

.form-alert {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  margin: 14px 0;
  padding: 10px 12px;
}

.message-page .surface {
  display: grid;
  gap: 14px;
}

.message-page h1,
.login-page h1 {
  margin-bottom: 0;
}

.message-metrics {
  margin: 8px 0;
}

@media (max-width: 860px) {
  .app-bar,
  .detail-head,
  .offer-header,
  .offer-document-head {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
  }

  .app-bar {
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .app-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .language-switch {
    margin-left: 0;
  }

  .upload-workspace,
  .detail-grid,
  .form-grid,
  .upload-part-row,
  .upload-file-pair,
  .upload-part-meta,
  .pricing-groups,
  .parameter-grid,
  .annotation-layout,
  .review-form,
  .metrics,
  .offer-meta,
  .drawing-sheet {
    grid-template-columns: 1fr;
  }

  .drawing-field {
    border-bottom: 1px solid var(--ink);
    border-right: 0;
  }

  .upload-part-index {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    grid-template-columns: auto 1fr;
    justify-items: start;
    padding-bottom: 10px;
    padding-right: 0;
  }

  .part-view-grid {
    grid-template-areas:
      "main"
      "top"
      "end"
      "iso";
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .request-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media print {
  @page {
    margin: 10mm;
    size: A3 landscape;
  }

  .app-bar,
  .offer-actions {
    display: none;
  }

  body,
  .offer-sheet {
    background: white;
  }

  .offer-sheet {
    max-width: none;
    padding: 0;
  }

  .offer-lines {
    gap: 5mm;
    padding-top: 5mm;
  }

  .offer-document-logo {
    height: 24mm;
    padding: 2mm 4mm;
    width: 41mm;
  }

  .offer-document-logo img {
    height: 20mm;
  }

  .drawing-sheet {
    break-inside: avoid;
    min-height: 150mm;
  }

  .drawing-field {
    padding: 5mm;
  }

  .part-preview {
    max-height: 112mm;
  }

  .part-view-grid {
    min-height: 105mm;
  }
}
