:root {
  color-scheme: light;
  --ink: #1b1e1f;
  --muted: #62696a;
  --line: #d5dad8;
  --surface: #ffffff;
  --canvas: #eef1ef;
  --dark: #25292a;
  --green: #14755e;
  --green-soft: #e7f3ee;
  --red: #b44235;
  --red-soft: #f8e9e7;
  --amber: #8c641f;
  --shadow: 0 18px 45px rgba(22, 27, 25, 0.12);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-bar {
  align-items: center;
  background: var(--dark);
  color: #fff;
  display: flex;
  height: 68px;
  justify-content: space-between;
  padding: 0 24px;
}

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

.brand-mark {
  align-items: center;
  background: #fff;
  border-radius: 4px;
  color: var(--dark);
  display: inline-flex;
  font-family: "DIN Alternate", "Avenir Next", sans-serif;
  font-size: 13px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

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

.brand-block h1 {
  font-size: 16px;
  line-height: 1.2;
}

.brand-block p {
  color: #bfc7c4;
  font-size: 11px;
  margin-top: 3px;
  max-width: min(52vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-state {
  align-items: center;
  color: #d9dedc;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  gap: 7px;
}

.state-dot {
  background: var(--amber);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.connection-state.is-ready .state-dot {
  background: #51c89e;
}

.connection-state.is-error .state-dot {
  background: #f27868;
}

.app-actions {
  align-items: center;
  display: flex;
  gap: 16px;
}

.logout-action {
  background: transparent;
  border: 1px solid #66706d;
  border-radius: 4px;
  color: #e1e6e4;
  cursor: pointer;
  font-size: 11px;
  height: 30px;
  padding: 0 10px;
}

.logout-action:hover,
.logout-action:focus-visible {
  border-color: #75d0af;
  color: #75d0af;
  outline: 0;
}

.logout-action:focus-visible {
  box-shadow: 0 0 0 3px rgba(117, 208, 175, 0.2);
}

.logout-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.login-body {
  background: #e9edeb;
  min-height: 100vh;
}

.login-body::before {
  background: repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(37, 41, 42, 0.045) 80px);
  content: "";
  inset: 68px 0 0;
  pointer-events: none;
  position: fixed;
}

.login-bar {
  align-items: center;
  background: var(--dark);
  color: #fff;
  display: flex;
  height: 68px;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.login-bar .brand-block h1,
.login-bar .brand-block p {
  margin: 0;
}

.login-bar .brand-block h1 {
  font-size: 16px;
}

.login-bar .brand-block p {
  color: #bfc7c4;
  font-size: 10px;
  margin-top: 3px;
}

.login-environment {
  color: #9eaaa6;
  font-family: "DIN Alternate", "Avenir Next", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 32px 20px;
  position: relative;
}

.login-panel {
  background: var(--surface);
  border: 1px solid #cbd1ce;
  border-top: 4px solid var(--green);
  box-shadow: 0 18px 44px rgba(22, 27, 25, 0.1);
  max-width: 400px;
  padding: 34px;
  width: 100%;
}

.login-index {
  color: var(--green);
  font-family: "DIN Alternate", "Avenir Next", sans-serif;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 16px;
}

.login-panel h2 {
  font-size: 25px;
  margin: 0 0 28px;
}

.login-panel label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-bottom: 7px;
}

.login-panel input {
  background: #fff;
  border: 1px solid #aeb7b3;
  border-radius: 5px;
  color: var(--ink);
  height: 46px;
  padding: 0 12px;
  width: 100%;
}

.login-panel input:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 117, 94, 0.14);
  outline: 0;
}

.login-panel button {
  background: var(--dark);
  border: 0;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  height: 46px;
  margin-top: 14px;
  width: 100%;
}

.login-panel button:hover,
.login-panel button:focus-visible {
  background: #111415;
  outline: 0;
}

.login-panel button:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 117, 94, 0.22);
}

.login-panel button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-error {
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  color: #752a22;
  font-size: 12px;
  line-height: 1.5;
  margin: 14px 0 0;
  padding: 9px 10px;
}

@media (max-width: 560px) {
  .login-bar {
    padding: 0 16px;
  }

  .login-environment {
    display: none;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .app-actions {
    gap: 8px;
  }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: calc(100vh - 68px);
  min-height: 640px;
}

.preview-region {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 48px auto minmax(0, 1fr);
  min-width: 0;
}

.preview-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.view-switch {
  background: #dde2df;
  border-radius: 5px;
  display: inline-grid;
  grid-template-columns: repeat(2, 76px);
  padding: 3px;
}

.view-option {
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  height: 28px;
}

.view-option.is-active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 4px rgba(20, 25, 23, 0.12);
}

.view-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.preview-caption {
  color: var(--muted);
  font-size: 12px;
}

.record-strip {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: grid;
  font-family: ui-sans-serif, system-ui, sans-serif;
  gap: 16px;
  grid-template-columns: minmax(220px, 1.35fr) minmax(250px, 1fr) minmax(100px, 0.45fr) 78px;
  min-height: 80px;
  padding: 16px;
}

.record-identity,
.record-reference {
  min-width: 0;
}

.record-product-line,
.record-id-line {
  align-items: center;
  display: flex;
  min-width: 0;
}

.record-product-line {
  flex-wrap: wrap;
  gap: 8px;
}

.record-product-line > strong {
  color: #000;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.record-tag {
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  padding: 2px 8px;
  white-space: nowrap;
}

.record-tag.is-neutral {
  background: #f1f1f5;
  color: #374151;
}

.record-tag.is-positive {
  background: #e1f2e5;
  color: #34a853;
}

.record-secondary {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

#record-email {
  color: #3189ef;
}

#record-created-at {
  color: #979797;
}

.record-id-line {
  gap: 7px;
}

.record-id-line strong {
  color: #000;
  font-family: Ubuntu, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.copy-record-id {
  align-items: center;
  background: transparent;
  border: 0;
  color: #8f9693;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 30px;
  font-size: 19px;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.copy-record-id:hover:not(:disabled),
.copy-record-id:focus-visible {
  color: var(--green);
}

.copy-record-id:focus-visible {
  outline: 2px solid rgba(20, 117, 94, 0.35);
  outline-offset: 1px;
}

.copy-record-id:disabled {
  cursor: default;
  opacity: 0.35;
}

.record-amount {
  color: #000;
  font-family: UbuntuB, Ubuntu, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.record-status {
  font-size: 14px;
  font-weight: 500;
  justify-self: end;
  white-space: nowrap;
}

.record-status.is-idle {
  color: var(--muted);
}

.record-status.is-generating {
  color: var(--amber);
}

.record-status.is-source,
.record-status.is-completed {
  color: #34a853;
}

.record-status.is-failed {
  color: var(--red);
}

.page-stage {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: auto;
  padding: 24px 28px 36px;
}

.page-frame {
  aspect-ratio: 595.92 / 841.92;
  background: #fff;
  box-shadow: var(--shadow);
  max-width: 690px;
  min-height: 400px;
  min-width: 0;
  position: relative;
  width: 100%;
}

#preview-image {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.preview-loading {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  display: flex;
  font-weight: 650;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.preview-loading::before {
  animation: turn 0.8s linear infinite;
  border: 2px solid var(--line);
  border-radius: 50%;
  border-top-color: var(--green);
  content: "";
  height: 18px;
  margin-right: 9px;
  width: 18px;
}

.control-region {
  background: var(--surface);
  border-left: 1px solid var(--line);
  min-width: 0;
  overflow: auto;
}

.control-section {
  border-bottom: 1px solid var(--line);
  padding: 24px;
}

.source-selector {
  display: grid;
  gap: 9px;
}

.source-file-action {
  align-items: center;
  border: 1px solid #aeb7b3;
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 650;
  gap: 9px;
  height: 44px;
  justify-content: center;
  transition: border-color 140ms ease, background 140ms ease;
}

.source-file-action:hover {
  background: #f5f7f6;
  border-color: var(--green);
}

.source-file-action.is-busy {
  cursor: wait;
  opacity: 0.6;
  pointer-events: none;
}

.source-file-action span {
  color: var(--green);
  font-size: 18px;
  line-height: 1;
}

.source-selector small {
  color: var(--muted);
  font-size: 11px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading span {
  color: var(--green);
  font-family: "DIN Alternate", "Avenir Next", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.section-heading h2 {
  font-size: 14px;
  margin: 0;
}

.date-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 72px 76px minmax(110px, 1fr);
  margin-bottom: 16px;
}

.field label,
.field-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}

.field input,
.field select {
  background: #fff;
  border: 1px solid #bcc4c1;
  border-radius: 5px;
  color: var(--ink);
  height: 40px;
  min-width: 0;
  padding: 0 11px;
  width: 100%;
}

.field input:focus-visible,
.field select:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 117, 94, 0.14);
  outline: 0;
}

.field select {
  appearance: auto;
}

.field input[readonly] {
  background: #eef1ef;
  color: #525958;
}

#receipt-number-field {
  margin-bottom: 16px;
}

.bill-to-fields {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.bill-to-fields small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.amount-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
}

.amount-input {
  align-items: center;
  border: 1px solid #bcc4c1;
  border-radius: 5px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  overflow: hidden;
}

.amount-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20, 117, 94, 0.14);
}

.amount-input > span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.amount-input.is-derived {
  background: #eef1ef;
}

.field .amount-input.is-derived input {
  background: transparent;
  color: #525958;
  cursor: default;
}

.field .amount-input input {
  border: 0;
  box-shadow: none;
  padding-left: 5px;
}

.field-hint,
.field-error {
  display: block;
  font-size: 9px;
  line-height: 1.35;
  margin-top: 5px;
}

.field-hint {
  color: var(--muted);
}

.field-error {
  color: #8a2f26;
}

.amount-field.is-invalid .amount-input {
  border-color: var(--red);
}

.receipt-number-parts {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(42px, 2fr) 10px minmax(70px, 4fr) 10px minmax(42px, 2fr) 10px minmax(70px, 4fr);
}

.receipt-number-parts input {
  font-family: "SFMono-Regular", Menlo, monospace;
  padding: 0 8px;
  text-align: center;
  text-transform: uppercase;
}

.receipt-number-separator {
  color: var(--muted);
  font-size: 17px;
  text-align: center;
}

.primary-action {
  background: var(--dark);
  border: 0;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-weight: 650;
  height: 44px;
  width: 100%;
}

.primary-action:hover {
  background: #111415;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-error {
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  color: #752a22;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0 0;
  padding: 9px 10px;
}

.result-summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.result-summary div span,
.result-summary div strong {
  display: block;
}

.result-summary div span {
  color: var(--muted);
  font-size: 10px;
}

.result-summary div strong {
  font-size: 16px;
  margin-top: 3px;
}

.status-label {
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 7px;
}

.status-label.is-idle {
  background: #ecefed;
  color: #646b69;
}

.status-label.is-pass {
  background: var(--green-soft);
  color: #0e624d;
}

.status-label.is-error {
  background: var(--red-soft);
  color: #852f25;
}

.validation-list {
  border-top: 1px solid var(--line);
  list-style: none;
  margin: 0;
  padding: 0;
}

.validation-list li {
  align-items: center;
  border-bottom: 1px solid #e7eae9;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 38px;
}

.validation-list span {
  color: var(--muted);
  font-size: 12px;
}

.validation-list strong {
  font-size: 11px;
  text-align: right;
}

.export-section {
  border-bottom: 0;
}

.export-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
}

.download-action {
  align-items: center;
  border: 1px solid #aeb7b3;
  border-radius: 5px;
  color: var(--ink);
  display: flex;
  font-size: 12px;
  font-weight: 650;
  height: 38px;
  justify-content: center;
  text-decoration: none;
}

button.download-action {
  cursor: pointer;
}

.download-action:not(.is-disabled):hover {
  border-color: var(--green);
  color: var(--green);
}

.download-action.is-disabled {
  color: #9aa19f;
  cursor: not-allowed;
  pointer-events: none;
}

.audit-report-view {
  background: var(--canvas);
  min-height: calc(100vh - 68px);
  overflow: auto;
  padding: 28px clamp(16px, 4vw, 52px) 44px;
}

.audit-report-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  margin: 0 auto 18px;
  max-width: 960px;
}

.report-back {
  background: transparent;
  border: 1px solid #aeb7b3;
  border-radius: 5px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  padding: 8px 12px;
}

.report-back:hover,
.report-back:focus-visible {
  border-color: var(--green);
  color: var(--green);
}

.audit-report-toolbar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.audit-report-content {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 960px;
}

.audit-report-head {
  align-items: center;
  background: var(--dark);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 22px 26px;
}

.audit-report-head small {
  color: #bfc7c4;
  display: block;
  font-size: 11px;
  margin-bottom: 7px;
}

.audit-report-head h1 {
  font-size: 21px;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.audit-verdict {
  border: 1px solid currentColor;
  flex: 0 0 auto;
  font-size: 13px;
  padding: 8px 11px;
}

.audit-verdict.is-pass {
  color: #74d7b3;
}

.audit-verdict.is-fail {
  color: #f39b8f;
}

.audit-meta {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  padding: 20px 26px 0;
}

.audit-section {
  padding: 0 26px;
}

.audit-section h2 {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 8px;
  margin: 23px 0 10px;
}

.audit-section h2 span {
  color: var(--green);
  font-family: "DIN Alternate", "Avenir Next", sans-serif;
  font-size: 12px;
}

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

.audit-change-grid > div {
  align-items: center;
  background: #f2f4f3;
  display: grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  padding: 12px;
}

.audit-change-grid small {
  color: var(--muted);
  grid-column: 1 / -1;
  font-size: 11px;
}

.audit-change-grid strong {
  color: #222728;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.audit-change-grid b {
  color: var(--green);
}

.audit-check-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audit-check {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 70px;
  padding: 11px;
}

.audit-check small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-bottom: 9px;
}

.audit-check strong {
  font-size: 13px;
}

.audit-check.is-pass strong {
  color: var(--green);
}

.audit-check.is-fail strong {
  color: var(--red);
}

.audit-identity {
  border-top: 1px solid var(--line);
  display: grid;
  font-size: 11px;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr);
  margin: 0;
}

.audit-identity dt,
.audit-identity dd {
  border-bottom: 1px solid #e7eae9;
  margin: 0;
  padding: 9px 6px;
}

.audit-identity dt {
  color: var(--muted);
}

.audit-identity dd {
  overflow-wrap: anywhere;
}

.audit-identity dd {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.audit-identity code {
  color: #4d5653;
  font-size: 10px;
  word-break: break-all;
}

.audit-copy {
  flex: 0 0 auto;
  border: 1px solid #c8d2ce;
  background: #fff;
  color: #087f68;
  border-radius: 4px;
  padding: 3px 7px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.audit-copy:focus-visible,
.report-back:focus-visible {
  outline: 2px solid #087f68;
  outline-offset: 2px;
}

.audit-report-error {
  max-width: 720px;
  margin: 48px auto;
  padding: 24px;
  border: 1px solid #edc8c2;
  border-left: 4px solid #c44636;
  background: #fff8f6;
}

.audit-report-error strong {
  display: block;
  color: #8d2d22;
  font-size: 20px;
}

.audit-report-error p {
  color: #5d3a35;
}

.audit-technical {
  margin: 23px 26px 26px;
}

.audit-technical summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  padding: 13px 14px;
}

.audit-technical summary::after {
  color: var(--green);
  content: "展开 / 收起";
  float: right;
  font-size: 10px;
}

.audit-technical-grid {
  background: #f3f5f4;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.audit-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.audit-detail-list li {
  align-items: flex-start;
  border-bottom: 1px solid #dfe4e1;
  display: flex;
  font-size: 10px;
  gap: 10px;
  justify-content: space-between;
  padding: 7px 0;
}

.audit-detail-list span {
  color: var(--muted);
}

.audit-detail-list strong {
  color: #3f4845;
  max-width: 70%;
  overflow-wrap: anywhere;
  text-align: right;
}

.audit-glyph-sources {
  border-top: 1px solid #dfe4e1;
  grid-column: 1 / -1;
  padding-top: 6px;
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

@media (max-width: 880px) {
  .workspace {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 68px);
  }

  .control-region {
    border-bottom: 1px solid var(--line);
    border-left: 0;
    order: -1;
    overflow: visible;
  }

  #editor-form {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  }

  .control-section {
    padding: 18px 20px;
  }

  .export-section {
    border-left: 1px solid var(--line);
    grid-column: 2;
  }

  .validation-section {
    border-left: 1px solid var(--line);
    grid-column: 2;
    grid-row: 1;
  }

  .preview-region {
    min-height: 720px;
  }

  .record-strip {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .record-status {
    justify-self: start;
  }

  .audit-check-grid,
  .audit-technical-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-bar {
    height: 62px;
    padding: 0 14px;
  }

  .brand-block p {
    max-width: 48vw;
  }

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

  #editor-form {
    display: block;
  }

  .validation-section,
  .export-section {
    border-left: 0;
  }

  .date-grid {
    grid-template-columns: 62px 72px minmax(100px, 1fr);
  }

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

  .preview-toolbar {
    padding: 0 12px;
  }

  .preview-caption {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .record-strip {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .record-product-line > strong {
    font-size: 16px;
  }

  .record-amount {
    font-size: 18px;
  }

  .audit-report-head {
    align-items: flex-start;
    display: block;
  }

  .audit-verdict {
    display: inline-block;
    margin-top: 14px;
  }

  .audit-section {
    padding: 0 14px;
  }

  .audit-meta {
    padding-left: 14px;
    padding-right: 14px;
  }

  .audit-change-grid,
  .audit-check-grid,
  .audit-technical-grid {
    grid-template-columns: 1fr;
  }

  .audit-technical {
    margin-left: 14px;
    margin-right: 14px;
  }

  .page-stage {
    padding: 16px 10px 28px;
  }

  .preview-region {
    min-height: 590px;
  }

  .page-frame {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
