:root {
  --bg: #f4f3f3;
  --text: #2a2623;
  --accent: #fffc00;
  --border: #d8d6d4;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header, main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  border-bottom: 3px solid var(--accent);
  background: #fff;
}

section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

button {
  background: var(--text);
  color: #fff;
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button.secondary {
  background: #47403c;
}

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

/* Review-Aktionsleiste: klare Hierarchie + Kontrast */
.review-actions button,
.review-actions .btn-download {
  min-height: 2.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.review-actions #confirm-btn {
  background: #2a2623;
  color: #fff;
  border-color: #2a2623;
}

.review-actions #confirm-btn:hover:not(:disabled) {
  background: #1a1715;
}

.review-actions #save-btn.secondary,
.review-actions #check-btn.secondary,
.review-actions #refine-btn.secondary {
  background: #fff;
  color: #2a2623;
  border: 1.5px solid #6b635e;
}

.review-actions #save-btn.secondary:hover:not(:disabled),
.review-actions #check-btn.secondary:hover:not(:disabled),
.review-actions #refine-btn.secondary:hover:not(:disabled) {
  background: #f7f6f5;
  border-color: #2a2623;
}

.review-actions #check-btn.secondary {
  border-color: #3d6b8a;
  color: #1f4560;
}

.review-actions #refine-btn.secondary {
  border-color: #6b5a3d;
  color: #4a3a1f;
}

.review-actions button.danger,
#wipe-btn-job.danger {
  background: #fff5f5;
  color: #8a1f1f;
  border: 1.5px solid #8a1f1f;
}

.review-actions button.danger:hover:not(:disabled),
#wipe-btn-job.danger:hover:not(:disabled) {
  background: #8a1f1f;
  color: #fff;
}

button.danger.wipe-armed,
#wipe-btn-job.wipe-armed {
  background: #8a1f1f;
  color: #fff;
  border-color: #5c1010;
  animation: wipe-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes wipe-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.12); }
}

.review-actions .btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f5d50;
  color: #fff;
  border: 1.5px solid #2f5d50;
  text-decoration: none;
  box-sizing: border-box;
}

.review-actions .btn-download:hover {
  background: #244a40;
  border-color: #244a40;
}

.review-actions .btn-download[hidden] {
  display: none !important;
}

.pdfua-ok {
  color: #1f5a3d;
  font-weight: 600;
}

.pdfua-fail {
  color: #8a1f1f;
  font-weight: 600;
}

.hint {
  color: #47403c;
  font-size: 0.95rem;
}

.error {
  /* ≥ 4,5:1 auf #fff (5,6:1) und auf #fff8f8 (5,4:1) */
  color: #c62828;
}

:focus-visible {
  outline: 2px solid #1a4480;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.finding {
  border-left: 4px solid #fd4d4d;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  background: #fff8f8;
}

.finding.warning {
  border-color: #508cf1;
  background: #f5f9ff;
}

.review-note {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0.75rem;
  margin: 0.4rem 0;
  background: #fffef0;
  font-size: 0.95rem;
}

#download-link {
  color: var(--text);
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: start;
}

.review-lists {
  max-height: min(75vh, 780px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  scrollbar-gutter: stable;
}

.review-lists:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

.review-preview {
  position: sticky;
  top: 0.75rem;
}

@media (max-width: 800px) {
  .review-grid {
    grid-template-columns: 1fr;
  }

  .review-lists {
    max-height: min(55vh, 480px);
  }

  .review-preview {
    position: static;
  }
}

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

.block-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #fafafa;
  cursor: grab;
}

.block-item.dragging {
  opacity: 0.5;
  border-color: var(--text);
}

.block-item.drag-over {
  border-color: #508cf1;
  background: #f5f9ff;
}

.block-item.is-selected,
.image-item.is-selected {
  border-color: #2f5d50;
  box-shadow: 0 0 0 2px rgba(47, 93, 80, 0.25);
  background: #f3f8f6;
}

.block-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-right: 0.35rem;
  padding: 0 0.25rem;
  border-radius: 4px;
  background: #2f5d50;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
}

.block-text-label {
  display: block;
  font-size: 0.8rem;
  color: #47403c;
  margin-top: 0.15rem;
}

.block-text-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
  background: #fff;
  resize: vertical;
  min-height: 2.5rem;
}

.block-text-input:focus {
  outline: 2px solid #2f5d50;
  outline-offset: 1px;
  border-color: #2f5d50;
}

.block-meta {
  font-size: 0.8rem;
  color: #47403c;
  margin-bottom: 0.25rem;
}

.block-controls {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.move-btn {
  padding: 0.15rem 0.55rem;
  font-size: 0.85rem;
  line-height: 1.3;
  background: #47403c;
}

.image-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.image-item:hover {
  border-color: #8a7f78;
}

.image-item.is-selected {
  border-color: #2f5d50;
  box-shadow: 0 0 0 2px rgba(47, 93, 80, 0.25);
  background: #f3f8f6;
}

.image-item label {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  cursor: default;
}

.image-item input[type="text"],
.image-item input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.image-link-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

.image-link-row input {
  flex: 1;
  min-width: 0;
}

.image-link-open {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2f5d50;
  text-decoration: underline;
}

.image-thumb-btn {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}

.image-thumb-btn:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

.image-thumb {
  display: block;
  max-width: 100%;
  max-height: 140px;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 12px 12px;
}

.image-thumb.is-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  color: #666;
  font-size: 0.85rem;
  background: #f0eeec;
}

.image-focus {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #2f5d50;
  border-radius: 6px;
  background: #f3f8f6;
}

.image-focus img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  margin-top: 0.4rem;
  object-fit: contain;
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 12px 12px;
}

#pdf-preview {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.structure-editor {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.editor-page-label {
  min-width: 6.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.editor-field select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.editor-draw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.editor-stage {
  position: relative;
  width: 100%;
  max-height: min(70vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #e8e6e4;
}

.editor-stage.is-drawing {
  cursor: crosshair;
  outline: 2px solid #2f5d50;
  outline-offset: -2px;
}

/* Während des Aufziehens kein Scroll-Jump im Vorschaubereich */
.editor-stage.is-draw-dragging {
  overflow: hidden;
  touch-action: none;
}

.editor-stage img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  user-select: none;
  pointer-events: none;
}

.editor-overlay {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.editor-stage.is-drawing .editor-box {
  pointer-events: none;
}

.editor-draw-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  cursor: crosshair;
  touch-action: none;
}

.editor-rubber {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed #c45c26;
  background: rgba(196, 92, 38, 0.18);
  pointer-events: none;
}

.editor-box {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(47, 93, 80, 0.85);
  background: rgba(47, 93, 80, 0.12);
  border-radius: 2px;
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
}

.editor-box:hover,
.editor-box:focus-visible {
  background: rgba(47, 93, 80, 0.22);
  outline: none;
}

.editor-box.is-selected {
  border-color: #c45c26;
  background: rgba(196, 92, 38, 0.22);
  box-shadow: 0 0 0 1px #c45c26;
}

.editor-box-image {
  border-color: rgba(47, 93, 80, 0.95);
  border-style: dashed;
}

.editor-box-form {
  border-color: rgba(80, 140, 241, 0.95);
  background: rgba(80, 140, 241, 0.12);
}

.editor-box.kind-heading {
  border-color: rgba(26, 68, 128, 0.9);
  background: rgba(26, 68, 128, 0.12);
}

.editor-badge {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 1.25rem;
  padding: 0.05rem 0.28rem;
  background: #2f5d50;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  border-radius: 0 0 4px 0;
  pointer-events: none;
}

.editor-box.is-selected .editor-badge {
  background: #c45c26;
}

.editor-box-form .editor-badge {
  background: #1a4480;
}

.style-map {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.style-map th,
.style-map td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.style-map th {
  background: #faf9f8;
}

.style-confirm {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

#style-map-custom {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  color: #47403c;
  font-size: 0.9rem;
}

.hint.warn {
  color: #8a6d00;
}

.hint.ok {
  color: #2d6a2d;
}

.processing {
  color: #47403c;
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.5; }
}

.template-box {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #fafafa;
}

.template-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}

.meta-row label {
  flex: 1 1 220px;
  font-size: 0.9rem;
}

.meta-row input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.tables-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.table-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
  background: #fafafa;
  font-size: 0.9rem;
}

.login-box {
  max-width: 420px;
  margin: 1rem auto;
}

.login-box label {
  display: block;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.login-box input,
.login-box select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.3rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.login-box button {
  margin-top: 1rem;
}

.header-actions {
  margin: 0.5rem 0 0;
}

button.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field label {
  font-size: 0.9rem;
}

.admin-link {
  text-align: center;
  font-size: 0.8rem;
  color: #47403c;
  margin-top: 2.5rem;
}

.admin-link a {
  color: #47403c;
}

.ai-privacy-notice {
  border: 1px solid #e0c200;
  border-left: 5px solid #e0c200;
  background: #fffbe0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.disclaimer-accept {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.disclaimer-accept input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

button.danger {
  background: #fff5f5;
  border: 1.5px solid #8a1f1f;
  color: #8a1f1f;
}

button.danger:hover:not(:disabled) {
  background: #8a1f1f;
  color: #fff;
}

.batch-jobs {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.batch-jobs li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e5e0d8;
}

.batch-jobs a {
  color: #2a2623;
  font-weight: 600;
}

.table-editor {
  border: 1px solid #d8d2c8;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.85rem;
  background: #faf8f5;
}

.table-editor h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.table-editor .meta-row {
  margin-bottom: 0.5rem;
}

.table-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.table-grid th,
.table-grid td {
  border: 1px solid #cfc7bb;
  padding: 0.25rem 0.4rem;
  vertical-align: top;
}

.table-grid th {
  background: #fff3a0;
}

.form-item {
  border: 1px solid #d8d2c8;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.6rem;
}

.form-item label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.form-item input[type="text"] {
  width: 100%;
  max-width: 32rem;
}

/* —— BaWue Corporate Fonts (Redesign-Editor) —— */
@font-face {
  font-family: "BaWue Sans";
  src: url("/ui/fonts/bawue/BaWueSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BaWue Sans";
  src: url("/ui/fonts/bawue/BaWueSans-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "BaWue Sans";
  src: url("/ui/fonts/bawue/BaWueSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BaWue Sans";
  src: url("/ui/fonts/bawue/BaWueSans-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "BaWue Serif";
  src: url("/ui/fonts/bawue/BaWueSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "BaWue Serif";
  src: url("/ui/fonts/bawue/BaWueSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* —— Word-ähnlicher Redesign-Editor —— */
.word-editor {
  margin-top: 1rem;
}

.word-preview {
  position: relative;
  max-height: min(75vh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #e8e6e4;
  scrollbar-gutter: stable;
}

.word-preview:focus-visible {
  outline: 2px solid #2f5d50;
  outline-offset: 2px;
}

.word-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin: 0;
  border: none;
  border-bottom: 1px solid #d9d3cb;
  border-radius: 0;
  background: rgba(247, 246, 245, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(42, 38, 35, 0.1);
}

.word-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.word-toolbar button.is-active {
  background: #2f5d50;
  color: #fff;
  border-color: #2f5d50;
}

.word-surface {
  max-width: 52rem;
  margin: 0.85rem auto 1.25rem;
  min-height: 28rem;
  padding: 0 2.5rem 3rem;
  background: #fff;
  border: 1px solid #cfc9c2;
  box-shadow: 0 1px 0 #ebe7e2, 0 8px 28px rgba(42, 38, 35, 0.08);
  font-family: "BaWue Sans", Arial, sans-serif;
  color: #2a2623;
}

.word-brand-bar {
  height: 0.85rem;
  margin: 0 -2.5rem 1.75rem;
  background: #fffc00;
  border-bottom: 1px solid #e6e200;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1rem;
}

.word-brand-mark {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a2623;
  opacity: 0.55;
}

.word-block {
  position: relative;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: text;
}

.word-block:hover {
  border-color: #e4dfd8;
  background: #fffcf7;
}

.word-block.is-selected {
  border-color: #2f5d50;
  background: #f3f8f6;
  box-shadow: 0 0 0 1px rgba(47, 93, 80, 0.2);
}

.word-block-label {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7a736c;
  margin-bottom: 0.2rem;
  user-select: none;
}

.word-text {
  outline: none;
  min-height: 1.4em;
  white-space: pre-wrap;
  word-break: break-word;
}

.word-title .word-text {
  font-family: "BaWue Serif", "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
}

.word-h1 .word-text {
  font-family: "BaWue Serif", "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
}

.word-h2 .word-text {
  font-family: "BaWue Sans", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}

.word-h3 .word-text {
  font-family: "BaWue Sans", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.word-list .word-text {
  padding-left: 1.25rem;
}

.word-list .word-text::before {
  content: "•";
  display: inline-block;
  width: 1rem;
  margin-left: -1.25rem;
}

.word-caption .word-text {
  font-size: 0.9rem;
  font-style: italic;
  color: #4a453f;
}

.word-address .word-text {
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.word-subject .word-text {
  font-family: "BaWue Serif", "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.word-salutation .word-text {
  margin-top: 0.5rem;
}

.word-docmeta .word-text {
  font-size: 0.9rem;
  color: #47403c;
}

.word-figure {
  cursor: pointer;
}

.word-figure-img {
  display: block;
  max-width: 100%;
  max-height: 22rem;
  height: auto;
  margin: 0.35rem 0;
  border: 1px solid #ddd7cf;
}

.word-figure-missing {
  padding: 1.25rem;
  margin: 0.35rem 0;
  background: #f3f1ee;
  color: #6a645c;
  text-align: center;
  font-size: 0.9rem;
}

.word-alt-label,
.word-deco-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.word-alt-label input {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.35rem 0.5rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.word-table-wrap {
  overflow-x: auto;
}

.word-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.word-table th,
.word-table td {
  border: 1px solid #cfc7bb;
  padding: 0.35rem 0.5rem;
  vertical-align: top;
}

.word-table th {
  background: #fff8d6;
  text-align: left;
}

body.is-redesign-review header,
body.is-redesign-review main {
  max-width: 920px;
}

@media (max-width: 700px) {
  .word-preview {
    max-height: min(70vh, 640px);
  }

  .word-surface {
    margin: 0.65rem 0.5rem 1rem;
    padding: 1.25rem 1rem 2rem;
  }

  .word-brand-bar {
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

