:root {
  --ink: #1e2a2b; --muted: #718087; --paper: #faf9f4; --surface: rgba(255, 255, 252, .88);
  --line: #e3e6e1; --accent: #c64d38; --accent-dark: #9f3928; --sage: #e9eeea;
  --mono: "DM Mono", ui-monospace, monospace; --serif: "Newsreader", Georgia, serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { position: relative; isolation: isolate; min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font-family: var(--serif); }
body::before, body::after { position: fixed; z-index: -1; display: block; content: ""; pointer-events: none; }
body::before { top: 84px; left: -78px; width: 235px; height: 175px; border-radius: 48% 52% 56% 44%; background: rgba(236, 211, 201, .43); transform: rotate(-20deg); animation: drift-left 12s ease-in-out infinite alternate; }
body::after { right: -105px; bottom: 255px; width: 300px; height: 230px; border: 2px solid rgba(199, 81, 62, .14); border-radius: 49% 51% 43% 57%; transform: rotate(-23deg); box-shadow: 0 0 0 42px rgba(232, 204, 195, .2), 0 0 0 83px rgba(232, 204, 195, .1); animation: drift-right 15s ease-in-out infinite alternate; }
button, label, textarea { font: inherit; }
.topbar { width: calc(100% - clamp(32px, 8vw, 146px)); max-width: 1520px; height: 70px; margin: 0 auto; padding: 0 33px 0 47px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.9); border-radius: 0 0 30px 30px; background: rgba(255,255,255,.64); box-shadow: 0 18px 45px rgba(42, 56, 52, .06); backdrop-filter: blur(16px); animation: slide-down .7s cubic-bezier(.2,.8,.2,1) both; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: linear-gradient(145deg, #d65d45, #b64431); font-size: 25px; font-weight: 600; border-radius: 11px 11px 11px 4px; box-shadow: 0 6px 14px rgba(180,73,50,.2); }.brand-suffix { margin-left: 18px; color: var(--muted); font: 11px var(--mono); letter-spacing: .03em; }.brand-suffix::first-letter { color: var(--accent); }
.top-actions { display: flex; gap: 9px; align-items: center; }.button { border: 1px solid #e3e6e2; border-radius: 999px; padding: 12px 17px; color: var(--ink); background: rgba(255,255,255,.42); cursor: pointer; font: 10px var(--mono); letter-spacing: .01em; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }.button:hover { border-color: rgba(30,42,43,.25); background: white; transform: translateY(-2px); box-shadow: 0 8px 17px rgba(42,56,52,.08); }.button:active { transform: translateY(0) scale(.97); }.button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(198,77,56,.27); outline-offset: 3px; }.button-primary { border-color: var(--accent); color: white; background: linear-gradient(135deg, #cc553f, #b8422e); box-shadow: 0 8px 18px rgba(180,73,50,.2); }.button-primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }.upload-button { cursor: pointer; }
.app-shell { position: relative; max-width: 1146px; margin: 0 auto; padding: clamp(57px, 7vw, 92px) 0 30px; }.intro { display: grid; grid-template-columns: 1fr 300px; align-items: end; gap: 48px; margin-bottom: 51px; animation: rise-in .75s .1s cubic-bezier(.2,.8,.2,1) both; }.eyebrow { margin: 0 0 18px; color: var(--accent); font: 11px var(--mono); font-weight: 500; letter-spacing: .12em; }.intro h1 { margin: 0; font-size: clamp(52px, 6.2vw, 87px); line-height: .84; font-weight: 500; letter-spacing: -.065em; }.intro h1 em { color: var(--accent); font-weight: 400; }.tagline { margin: 0 0 3px; color: var(--muted); font-size: 18px; line-height: 1.35; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 468px; overflow: hidden; border: 1px solid rgba(216, 223, 218, .9); border-radius: 23px; background: var(--surface); box-shadow: 0 24px 60px rgba(38,55,52,.08); animation: rise-in .8s .22s cubic-bezier(.2,.8,.2,1) both; transition: box-shadow .35s ease, transform .35s ease; }.workspace:hover { box-shadow: 0 28px 70px rgba(38,55,52,.12); transform: translateY(-2px); }.pane { min-width: 0; display: flex; flex-direction: column; }.editor-pane { border-right: 1px solid var(--line); background: linear-gradient(135deg, rgba(240,243,239,.88), rgba(234,239,235,.62)); }.pane-header { height: 48px; padding: 0 26px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(217,221,216,.72); }.pane-label { display: flex; gap: 9px; align-items: center; color: #53616a; text-transform: uppercase; font: 11px var(--mono); font-weight: 500; letter-spacing: .08em; }.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(198,77,56,.08); }.preview-icon { color: var(--accent); font-size: 22px; line-height: 0; }.pane-meta, .editor-footer { color: var(--muted); font: 10px var(--mono); }
textarea { width: 100%; flex: 1; resize: none; border: 0; outline: 0; padding: 28px 27px; color: #607783; background: transparent; font: 13px/1.8 var(--mono); tab-size: 2; transition: background .2s ease, padding .2s ease; }.editor-pane:focus-within textarea { color: var(--ink); }.textarea.dragging, textarea.dragging { background: rgba(198,77,56,.1); }.textarea::placeholder, textarea::placeholder { color: #80909a; }.editor-footer { display: flex; justify-content: space-between; padding: 13px 27px 15px; border-top: 1px solid rgba(217,221,216,.72); }
.markdown-body { flex: 1; overflow: auto; padding: 29px 44px 46px; }.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { line-height: 1.05; letter-spacing: -.035em; font-weight: 600; }.markdown-body h1 { font-size: 43px; margin: 0 0 25px; }.markdown-body h2 { font-size: 31px; margin: 38px 0 14px; }.markdown-body h3 { font-size: 24px; margin: 28px 0 12px; }.markdown-body p, .markdown-body li { font-size: 17px; line-height: 1.55; }.markdown-body p { margin: 0 0 18px; }.markdown-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }.markdown-body strong { font-weight: 700; }.markdown-body blockquote { margin: 25px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }.markdown-body ul, .markdown-body ol { padding-left: 25px; margin: 10px 0 22px; }.markdown-body li { padding-left: 5px; margin: 5px 0; }.markdown-body hr { margin: 35px 0; border: 0; border-top: 1px solid var(--line); }.markdown-body pre { overflow-x: auto; margin: 23px 0; padding: 19px; background: #202a28; color: #eff4ed; font: 13px/1.65 var(--mono); }.markdown-body code { padding: 2px 5px; color: var(--accent-dark); background: #f0eae1; font: 13px var(--mono); }.markdown-body pre code { padding: 0; color: inherit; background: none; }.markdown-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }.markdown-body th, .markdown-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }.markdown-body th { background: #eef1eb; font-weight: 600; }.markdown-body img { max-width: 100%; height: auto; }
.legal-page > h1 { margin: 0 0 35px; color: var(--ink); font-size: clamp(52px, 6vw, 78px); line-height: .86; font-weight: 500; letter-spacing: -.06em; }.legal-page > h1 em { color: var(--accent); font-weight: 400; }.legal-content { max-width: 820px; padding: 0; }
.page-footer { display: flex; justify-content: space-between; padding-top: 18px; color: var(--muted); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .05em; animation: rise-in .7s .35s both; }.legal-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 12px; color: var(--muted); font: 10px var(--mono); animation: rise-in .7s .45s both; }.legal-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }.legal-links a { color: inherit; text-decoration: none; transition: color .2s ease; }.legal-links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }.toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; padding: 12px 16px; color: white; border-radius: 999px; background: var(--ink); font: 12px var(--mono); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s ease; box-shadow: 0 10px 25px rgba(31,41,39,.2); }.toast.show { opacity: 1; transform: translateY(0); }
@keyframes slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } @keyframes rise-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes drift-left { to { transform: translate(28px, 16px) rotate(-12deg); } } @keyframes drift-right { to { transform: translate(-20px, -18px) rotate(-12deg); } }
@media (max-width: 1180px) { .app-shell { max-width: calc(100% - 80px); } }
@media (max-width: 720px) { .topbar { width: calc(100% - 24px); height: auto; min-height: 70px; padding: 15px 15px 15px 20px; align-items: flex-start; gap: 14px; border-radius: 0 0 23px 23px; }.brand-suffix { display: none; }.top-actions { flex-wrap: wrap; justify-content: flex-end; }.button { padding: 9px 11px; }.app-shell { max-width: none; padding: 48px 20px 26px; }.intro { display: block; margin-bottom: 34px; }.intro h1 { font-size: clamp(47px, 15vw, 70px); }.tagline { margin-top: 22px; font-size: 17px; }.workspace { display: block; height: auto; min-height: 0; }.editor-pane { min-height: 440px; border-right: 0; border-bottom: 1px solid var(--line); }.preview-pane { min-height: 510px; }textarea { padding: 22px; }.pane-header { padding: 0 19px; }.editor-footer { padding-inline: 19px; }.markdown-body { padding-inline: 23px; }.page-footer, .legal-footer { display: block; line-height: 2; }.legal-links { justify-content: flex-start; gap: 8px 14px; }.desktop-break { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Keep the document itself scrollable on short screens. The editor and preview still scroll independently for long documents. */
body { overflow-y: auto; }
.workspace { height: auto; min-height: 520px; }
.workspace > .pane { min-height: 520px; }
.markdown-body { min-height: 0; }
@media (max-width: 720px) {
  .app-shell { padding-bottom: 44px; }
  .workspace { min-height: 0; overflow: visible; }
  .workspace > .pane { min-height: 520px; }
}
