@font-face { font-family: RedDocument; src: url("./editor-fonts/Roboto-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: RedDocument; src: url("./editor-fonts/Roboto-Medium.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: RedDocument; src: url("./editor-fonts/Roboto-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }
@font-face { font-family: RedDocument; src: url("./editor-fonts/Roboto-MediumItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
.document-authoring-page .registration-layout { display: block; max-width: 1120px; }
.document-authoring-page .registration-hero { padding-bottom: 20px; }
.document-authoring-page .registration-copy h1 { font-size: 2rem; max-width: 25ch; }
.document-authoring-page .registration-form { padding: 0; border: 0; box-shadow: none; background: transparent; }
.document-authoring-page .registration-form > .form-section { margin-bottom: 28px; }
.document-authoring-page [data-upload-step-two] { min-width: 0; }
.document-authoring-page [data-upload-verify] { width: auto; justify-self: start; padding-inline: 22px; }
.document-authoring-page [data-upload-step-two][hidden], .red-editor [hidden] { display: none !important; }
.document-authoring-page [data-upload-submit] { width: auto; max-width: 100%; margin: 8px 0 0 auto; min-height: 48px; }
.red-editor { margin-top: 22px; border: 1px solid #bdd1c5; border-radius: 8px; overflow: clip; background: #eaf0ec; }
.red-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; background: #f8fbf9; border-bottom: 1px solid #c5d8cc; }
.red-tool-group { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-right: 7px; border-right: 1px solid #c5d8cc; max-width: 100%; }
.red-tool-group:last-child { border-right: 0; }
.red-editor button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #274d38; cursor: pointer; box-shadow: none; }
.red-editor button:hover:not(:disabled) { background: #e0eee4; }
.red-editor button[aria-pressed="true"] { background: #cde5d5; border-color: #7dae8e; color: #143c23; }
.red-editor button:disabled { opacity: .38; cursor: default; }
.red-editor button:focus-visible, .red-editor select:focus-visible, .red-editor input:focus-visible { outline: 3px solid #246d41; outline-offset: 2px; }
.red-editor select { width: auto; min-width: 0; max-width: 170px; min-height: 40px; padding: 6px 26px 6px 9px; border: 1px solid #bbcfc2; border-radius: 5px; background-color: white; font-size: 14px; color: #193b28; }
.red-editor input[type="color"] { width: 36px; min-height: 36px; height: 36px; padding: 4px; border-radius: 5px; cursor: pointer; }
.red-paper-scroll { padding: 28px; }
.red-paper { width: 100%; max-width: 794px; min-height: 670px; margin: auto; padding: 36px 54px 24px; background: #fff; color: #172d23; box-shadow: 0 3px 16px #1536220d; font-family: RedDocument, Arial, sans-serif; }
.red-paper-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 2px solid #176438; font-size: 13px; }
.red-paper-header img { width: 155px; max-width: 50%; height: auto; object-fit: contain; }
.red-paper-header > span { text-align: right; }
.red-paper-title { font-size: 28px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; margin: 28px 0 8px; }
.red-paper-author { color: #456153; font-size: 14px; margin: 0 0 24px; }
.red-paper-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px; border-top: 1px solid #d3e0d8; color: #456153; font-size: 12px; margin-top: 32px; }
.red-editor .tiptap { min-height: 330px; outline: none; overflow-wrap: anywhere; font: 11pt/1.55 RedDocument, Arial, sans-serif; caret-color: #176438; }
.red-editor .tiptap:focus-visible { outline: 2px solid #accfba; outline-offset: 10px; }
.red-editor .tiptap p { margin: 0 0 10px; font: inherit; color: inherit; }
.red-editor .tiptap h1, .red-editor .tiptap h2, .red-editor .tiptap h3 { font-family: inherit; font-weight: 700; max-width: none; margin: 20px 0 12px; }
.red-editor .tiptap h1 { font-size: 22pt; }.red-editor .tiptap h2 { font-size: 17pt; }.red-editor .tiptap h3 { font-size: 14pt; }
.red-editor .tiptap ul, .red-editor .tiptap ol { padding-left: 24px; margin: 8px 0 12px; }
.red-editor .tiptap blockquote { margin: 14px 0; border-left: 3px solid #95bea4; padding-left: 16px; }
.red-editor .tiptap img { display: block; max-width: 100%; height: auto !important; }
.red-editor [data-resize-container] { max-width: 100%; margin: 14px 0; }
.red-editor [data-resize-wrapper] { max-width: 100%; }
.red-editor [data-resize-container]:has(img[data-align="center"]) { justify-content: center; }
.red-editor [data-resize-container]:has(img[data-align="right"]) { justify-content: flex-end; }
.red-editor [data-resize-handle] { width: 18px !important; height: 18px !important; border: 2px solid #fff; border-radius: 3px; background: #176438; }
.red-editor .ProseMirror-selectednode { outline: 2px solid #176438; outline-offset: 3px; }
.red-editor .tableWrapper { overflow-x: auto; margin: 14px 0; }
.red-editor table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.red-editor td, .red-editor th { min-width: 40px; border: 1px solid #a8bfb1; padding: 8px; vertical-align: top; position: relative; }
.red-editor th { background: #edf5ef; text-align: left; }
.red-editor .selectedCell { background: #dcefe2; }
.red-image-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; background: #fff6ce; border-bottom: 1px solid #dfd59c; }
.red-image-controls label { display: grid; gap: 5px; font-size: 13px; flex: 1 1 180px; min-width: 0; }
.red-image-controls input[type="text"] { min-height: 40px; width: 100%; font-size: 14px; }
.red-image-controls input[type="range"] { min-height: 32px; padding: 0; width: 100%; accent-color: #176438; }
.red-image-controls [data-image-actions] { display: flex; }
.red-properties { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 0; margin: auto; border: 1px solid #8aaf99; border-radius: 8px; background: #fff; color: #172d23; overflow-y: auto; box-shadow: 0 16px 60px #173c2333; }
.red-properties::backdrop { background: #0f271f66; }
.red-properties > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #d3e0d8; }
.red-properties h2 { font-size: 18px; margin: 0; }
.red-properties .red-image-controls, .red-layout-controls { display: grid; gap: 16px; padding: 18px; background: white; }
.red-properties label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.red-properties label > span { display: flex; align-items: center; gap: 12px; }
.red-properties input[type="text"], .red-properties textarea, .red-properties select { width: 100%; max-width: none; min-height: 44px; font-size: 16px; border: 1px solid #abc4b4; border-radius: 5px; padding: 9px; background: white; color: #172d23; }
.red-properties textarea { resize: vertical; }
.red-properties input[type="range"] { width: 100%; min-width: 0; min-height: 36px; accent-color: #176438; padding: 0; }
.red-properties output { min-width: 48px; text-align: right; }
.red-properties [data-layout-actions], .red-properties [data-image-actions] { display: flex; flex-wrap: wrap; gap: 8px; }
.red-properties button { width: 44px; height: 44px; flex-basis: 44px; border-color: #c4d7cb; }
.red-properties textarea:focus-visible { outline: 3px solid #246d41; outline-offset: 2px; }
.red-editor table[data-layout="gallery"], .red-editor table[data-layout="imageText"] { display: block; min-width: 0 !important; width: 100%; margin: 0; }
.red-editor table[data-layout="gallery"] > colgroup, .red-editor table[data-layout="imageText"] > colgroup { display: none; }
.red-editor table[data-layout="gallery"] > tbody, .red-editor table[data-layout="imageText"] > tbody { display: block; }
.red-editor table[data-layout="gallery"] > tbody > tr, .red-editor table[data-layout="imageText"] > tbody > tr { display: grid; gap: var(--layout-gap, 16px); align-items: start; }
.red-editor table[data-layout="gallery"] > tbody > tr { grid-template-columns: repeat(var(--layout-columns, 4), minmax(0, 1fr)); }
.red-editor table[data-layout="imageText"] > tbody > tr { grid-template-columns: minmax(0, var(--image-share, 40fr)) minmax(0, var(--text-share, 60fr)); }
.red-editor table[data-layout="imageText"][data-image-side="right"] > tbody > tr { grid-template-columns: minmax(0, var(--text-share, 60fr)) minmax(0, var(--image-share, 40fr)); }
.red-editor table[data-layout="gallery"] td, .red-editor table[data-layout="imageText"] td { display: block; min-width: 0; padding: 0; border: 0; background: transparent; }
.red-editor table[data-layout="gallery"] td > p { text-align: center; font-size: 11pt; min-height: 24px; margin: 8px 0 0; }
.red-editor table[data-layout="gallery"] td > p span,
.red-editor table[data-layout="imageText"] td:has(> [data-resize-container]) > p span { font-size: inherit !important; }
.red-editor table[data-layout="imageText"] td > p { min-height: 24px; }
.red-editor table[data-layout="gallery"] [data-resize-container] { width: 100%; aspect-ratio: 4 / 3; margin: 0; align-items: center; }
.red-editor table[data-layout="gallery"] [data-resize-wrapper] { width: 100%; height: 100%; }
.red-editor table[data-layout="gallery"] img { width: 100% !important; height: 100% !important; object-fit: contain; }
.red-editor table[data-layout="imageText"] [data-resize-container] { margin: 0 0 12px; }
.red-editor table[data-layout="imageText"] [data-resize-wrapper] { width: 100%; }
.red-editor table[data-layout="imageText"] img { width: 100% !important; height: auto !important; max-height: 440px; object-fit: contain; }
.red-editor table[data-layout="gallery"] [data-resize-handle], .red-editor table[data-layout="imageText"] [data-resize-handle] { display: none; }
.red-editor .red-layout-empty::before { content: attr(data-placeholder); float: left; height: 0; color: #607b68; pointer-events: none; font-size: 14px; }
.red-editor-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid #c5d8cc; color: #375d46; font-size: 12px; background: #f8fbf9; }
@media (min-width: 900px) {
  .document-authoring-page .registration-form > fieldset:first-of-type .form-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 639px) {
  .document-authoring-page .registration-copy h1 { font-size: 1.65rem; }
  .document-authoring-page .registration-summary { display: none; }
  .red-toolbar { padding: 7px; gap: 5px; }
  .red-tool-group { padding-right: 0; border: 0; }
  .red-editor button { width: 44px; height: 44px; flex-basis: 44px; }
  .red-editor select { min-height: 44px; }
  .red-paper-scroll { padding: 10px 0; }
  .red-paper { min-height: 520px; padding: 18px 16px; }
  .red-paper-header { gap: 8px; font-size: 11px; }
  .red-paper-header img { width: 116px; }
  .red-paper-title { font-size: 24px; }
  .red-editor .tiptap { font-size: 12pt; }
  .document-authoring-page [data-upload-submit] { width: 100%; }
  .red-editor table[data-layout="gallery"] > tbody > tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .red-editor table[data-layout="imageText"] > tbody > tr,
  .red-editor table[data-layout="imageText"][data-image-side="right"] > tbody > tr { grid-template-columns: minmax(0, 1fr); }
}
