/* Shared editorial typography for the editor, previews and published stories. */
.editorial-document{max-width:100%;min-width:0;font-size:18px;line-height:1.85;overflow-wrap:anywhere;white-space:normal;color:var(--ink,#e3eedf)}
.editorial-document p{margin:0 0 1.25em}
.editorial-document h1,.story-main .editorial-document h1{font-size:clamp(30px,4.6vw,44px);line-height:1.18;font-weight:600;letter-spacing:-.8px;margin:1.6em 0 .7em}
.editorial-document h2,.story-main .editorial-document h2{font-size:clamp(25px,3.5vw,32px);line-height:1.3;font-weight:600;letter-spacing:-.45px;margin:1.8em 0 .75em}
.editorial-document h3,.story-main .editorial-document h3{font-size:clamp(21px,3vw,25px);line-height:1.4;font-weight:600;letter-spacing:-.2px;margin:1.7em 0 .65em}
.editorial-document>:first-child{margin-top:0!important}
.editorial-document strong{font-weight:700;color:#f0f5ec}
.editorial-document a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;color:var(--green,#b5ee91);overflow-wrap:anywhere}
.editorial-document blockquote{margin:1.7em 0;border-left:3px solid #819b70;padding:4px 0 4px 22px;color:#bfceb7}
.editorial-document blockquote p:last-child{margin-bottom:0}
.editorial-document hr,.story-main .editorial-document hr{border:0;border-top:1px solid #42503c;margin:2.3em 0}
.editorial-document ul,.editorial-document ol{padding-left:1.5em;margin:0 0 1.3em}
.editorial-document li{margin:.4em 0;padding-left:.15em}
.editorial-document li>p{margin:.25em 0}
.editorial-document pre{max-width:100%;overflow-x:auto;white-space:pre;font-size:14px;line-height:1.7;background:#19241b;border:1px solid var(--line,#354633);border-radius:10px;padding:18px}
.editorial-document code{font-family:ui-monospace,monospace;font-size:.88em;background:#22301f;padding:2px 4px;border-radius:4px}
.editorial-document pre code{padding:0;background:none}
.editorial-document .table-scroll,.editorial-document .tableWrapper{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin:1.6em 0;border:1px solid #40513b;border-radius:12px;scrollbar-color:#728968 #172118;scrollbar-width:thin}
.editorial-document table{border-collapse:collapse;width:100%;min-width:420px;table-layout:auto;font-size:15px;line-height:1.6;margin:0;background:#172118}
.editorial-document th,.editorial-document td{padding:13px 16px;min-width:120px;border:0;border-bottom:1px solid #33452f;text-align:left;vertical-align:top;position:relative;overflow-wrap:break-word}
.editorial-document th{background:#263621;font-size:13px;font-weight:650;letter-spacing:.1px;color:#dceccf}
.editorial-document th p,.editorial-document td p{margin:0 0 .5em;min-width:0}
.editorial-document th p:last-child,.editorial-document td p:last-child{margin-bottom:0}
.editorial-document tr:last-child>:is(th,td){border-bottom:0}
.editorial-document .align-right,.editorial-document [data-align=right]{text-align:right;font-variant-numeric:tabular-nums}
.editorial-document .align-center,.editorial-document [data-align=center]{text-align:center}
.editorial-document .align-left,.editorial-document [data-align=left]{text-align:left}
.editorial-document .total-row,.editorial-document tr[data-total=true]{font-weight:700;background:#24331f;border-top:1px solid #6c855e}
.editorial-document .total-row strong,.editorial-document tr[data-total=true] strong{color:var(--green,#b5ee91)}
.editorial-document figure{margin:1.7em 0;max-width:100%}
.editorial-document img{display:block;max-width:100%;height:auto;border-radius:12px}
.editorial-document figcaption{font-size:13px;line-height:1.6;color:var(--muted,#a7b4a1);margin:10px 0 0;overflow-wrap:anywhere}
.rich-editor{margin:0 0 28px;min-width:0}
.rich-toolbar,.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:10px 0;background:var(--background,#101713);border-block:1px solid var(--line,#354633);z-index:10}
.rich-toolbar{position:sticky;top:0}
.table-toolbar[hidden]{display:none}
.story-main .rich-toolbar button,.story-main .table-toolbar button,.rich-toolbar button,.table-toolbar button{font:inherit;font-size:12px;line-height:1.2;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--ink,#e3eedf);padding:8px 10px;min-height:40px;cursor:pointer}
.rich-toolbar button:hover,.table-toolbar button:hover{background:#24331f;border-color:#526948}
.rich-toolbar button[aria-pressed=true],.table-toolbar button[aria-pressed=true]{background:#b5ee91;color:#172613}
.story-main .rich-toolbar select,.rich-toolbar select{font:inherit;font-size:13px;display:inline-block;width:auto;min-height:40px;padding:8px;background:#1b281c;color:var(--ink,#e3eedf);border:1px solid #465d3d;border-radius:8px}
.rich-page .tiptap{min-height:430px;padding:30px 0;outline:none;caret-color:var(--green,#b5ee91)}
.rich-page .tiptap:focus-visible{outline:1px solid #536c46;outline-offset:10px;border-radius:4px}
.rich-page .tiptap p:first-child:last-child:empty:before{content:attr(data-placeholder);color:#7f9276;pointer-events:none}
.rich-page .tiptap[data-empty=true] p:first-child:before{content:'Start writing…';color:#7f9276;pointer-events:none;float:left;height:0}
.rich-page .selectedCell:after{content:'';position:absolute;inset:0;background:#b5ee9120;pointer-events:none}
.rich-page .ProseMirror-selectednode{outline:2px solid var(--green,#b5ee91);outline-offset:3px}
.rich-page .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}
.rich-page .ProseMirror-gapcursor:after{content:'';display:block;position:absolute;top:-2px;width:20px;border-top:1px solid var(--green,#b5ee91)}
.rich-page .ProseMirror-focused .ProseMirror-gapcursor{display:block}
.rich-help{font-size:12px;line-height:1.7;color:var(--muted,#a7b4a1);margin:0 0 24px}
.rich-dialog{background:var(--background,#101713);color:var(--ink,#e3eedf);border:1px solid #526948;border-radius:18px;padding:26px;width:min(720px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-sizing:border-box}
.rich-dialog::backdrop{background:#030a06bb}
.rich-dialog h2{font-size:24px;font-weight:500;margin:0 0 20px}
.rich-dialog label{display:block;margin:14px 0;font-size:14px}
.rich-dialog input,.rich-dialog textarea{display:block;box-sizing:border-box;width:100%;padding:12px;margin-top:8px;border-radius:8px;border:1px solid #516647;background:#18241a;color:#e3eedf;font:inherit;font-size:16px;line-height:1.6}
.rich-dialog button{font:inherit;font-size:14px;padding:10px 17px;min-height:44px;border:1px solid #526948;border-radius:24px;color:#e3eedf;background:transparent;cursor:pointer}
.rich-dialog button.primary{background:#b5ee91;color:#152311}
.rich-dialog .actions{display:flex;gap:12px;justify-content:flex-end;margin:22px 0 0}
.story-preview{width:min(840px,calc(100vw - 24px));padding:30px;max-height:90dvh}
.preview-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:36px}
@media(max-width:760px){
 .editorial-document{font-size:17px;line-height:1.85}
 .editorial-document table{font-size:14px}
 .editorial-document th,.editorial-document td{padding:12px;min-width:112px}
 .editorial-document blockquote{padding-left:16px}
 .rich-toolbar{gap:3px;padding:8px 0}
 .story-main .rich-toolbar button,.story-main .table-toolbar button,.rich-toolbar button,.table-toolbar button{min-height:44px;padding:8px 9px}
 .rich-page .tiptap{padding-top:24px;min-height:50dvh}
 .story-preview{padding:20px}
 .rich-dialog{padding:20px}
}
