/* Scoped writing surface; editor assets load only on the submission pages. */
body.rdtp-editor-page{margin:0;background:#f3f3f3;color:#202124;font-family:Roboto,system-ui,-apple-system,"Segoe UI",sans-serif;min-height:100dvh;font-size:16px;line-height:1.5}
.rdtp-editor-page *{box-sizing:border-box}
.rdtp-editor-page [hidden]{display:none!important}
.rdtp-editor-sheet{max-width:800px;min-height:100dvh;margin:0 auto;padding:36px 80px 120px;background:#fff}
.rdtp-editor-close{position:fixed;top:18px;right:22px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e8e8e8;color:#696969;text-decoration:none;z-index:20}
.rdtp-editor-close:hover{background:#ddd;color:#222}
.rdtp-editor-author{display:flex;align-items:center;gap:12px;margin-bottom:28px;min-height:42px;font-size:15px;line-height:1.3}
.rdtp-editor-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0}
.rdtp-editor-author__info{min-width:0;flex:1}
.rdtp-editor-author__info>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.rdtp-editor-topic select{display:block;max-width:100%;margin:4px 0 0;padding:0 20px 0 0;border:0;border-bottom:1px solid transparent;border-radius:0;background-color:transparent;color:#777;font:inherit;font-size:13px;cursor:pointer;box-shadow:none}
.rdtp-editor-drafts{color:#777;font-size:13px;white-space:nowrap;text-decoration:none;align-self:flex-start;margin-top:3px}
.rdtp-editor-drafts:hover{color:#222}
.rdtp-editor-title{display:block;width:100%;min-height:39px;margin:0 0 14px;padding:0;resize:none;overflow:hidden;border:0;border-radius:0;background:transparent;color:inherit;font:700 26px/1.3 Roboto,system-ui,sans-serif;box-shadow:none;outline:0}
.rdtp-editor-title:placeholder-shown{font-size:21px;font-weight:600}
.rdtp-editor-title::placeholder{color:#919191;opacity:1}
.rdtp-editor-page .rdtp-editor-title:focus,
.rdtp-editor-page [contenteditable=true]:focus {
  outline: 0;
  box-shadow: none;
}
.rdtp-editor-page .rdtp-editor-title:focus-visible,
.rdtp-editor-page [contenteditable=true]:focus-visible {
  background-color: #fafafa;
}
.rdtp-editor-page #rdtp-editor-body{font-size:18px;line-height:1.6;overflow-wrap:anywhere;min-height:240px}
.rdtp-editor-page .ce-block__content,.rdtp-editor-page .ce-toolbar__content{max-width:100%}
.rdtp-editor-page .ce-paragraph{padding:9px 0;line-height:1.6}
.rdtp-editor-page .ce-header{font-size:24px;line-height:1.35;padding:20px 0 8px;font-weight:600}
.rdtp-editor-page h3.ce-header{font-size:21px}
.rdtp-editor-page .cdx-block{padding:9px 0}
.rdtp-editor-page .codex-editor__redactor{padding-bottom:100px!important}
.rdtp-editor-page .ce-block--selected .ce-block__content{background:#f1f1f1}
.rdtp-editor-page .ce-toolbar__plus,.rdtp-editor-page .ce-toolbar__settings-btn{color:#888;border-radius:6px;box-shadow:none}
.rdtp-editor-page .ce-toolbar__plus:hover,.rdtp-editor-page .ce-toolbar__settings-btn:hover{color:#222;background:#f1f1f1}
/* Editor.js puts everything in a z-index:1 stacking context by default. Keep
   the writing surface in normal order so only the open tools cover the footer. */
.rdtp-editor-page .codex-editor { z-index: auto; }
.rdtp-editor-page .ce-toolbar,
.rdtp-editor-page .ce-inline-toolbar { z-index: 30; }
@supports selector(:has(*)) {
  .rdtp-editor-page .ce-toolbar:not(:has(.ce-popover--opened)) { z-index: 2; }
}
.rdtp-editor-page .ce-popover,
.rdtp-editor-page .ce-inline-toolbar {
  --border-radius: var(--card-radius, 12px);
  --color-border: var(--line-subtle, #dde3e9);
  --color-shadow: rgb(25 40 55 / 12%);
  --color-background-item-confirm: var(--status-error-color);
  --color-background-item-confirm-hover: var(--status-error-hover);
  font-size: 14px;
}
.rdtp-editor-page .ce-toolbar .ce-popover {
  --max-height: min(320px, 70dvh);
}
.rdtp-editor-page .ce-toolbar .ce-popover-item__title { font-size: 13px; }
@media (max-width: 650px) {
  .rdtp-editor-page .ce-toolbar .ce-popover-item__title { font-size: 14px; }
  .rdtp-editor-page .ce-toolbar .ce-popover-item { min-height: 44px; }
}
.rdtp-editor-page :is(.ce-popover__items, .rdtp-topic-list)[data-fade-top] { --fade-top: 15px; }
.rdtp-editor-page :is(.ce-popover__items, .rdtp-topic-list)[data-fade-bottom] { --fade-bottom: 15px; }
.rdtp-editor-page :is(.ce-popover__items, .rdtp-topic-list):is([data-fade-top], [data-fade-bottom]) {
  -webkit-mask-image: linear-gradient(to bottom, transparent, black var(--fade-top, 0px), black calc(100% - var(--fade-bottom, 0px)), transparent);
  mask-image: linear-gradient(to bottom, transparent, black var(--fade-top, 0px), black calc(100% - var(--fade-bottom, 0px)), transparent);
}
.rdtp-editor-page .ce-popover-item--active,.rdtp-editor-page .ce-popover-item--focused,.rdtp-editor-page .ce-popover-item:hover{background:#f2f2f2;color:#222}
.rdtp-editor-page .cdx-search-field{background:#f5f5f5;border:0;box-shadow:none}
.rdtp-editor-page .ce-inline-tool--active{color:#222;background:#eee}
.rdtp-editor-page .cdx-input{border:0;border-radius:0;box-shadow:none;padding:6px 0}
.rdtp-editor-page .cdx-quote__text{min-height:45px;padding:4px 0 4px 18px;border-left:3px solid #dedede;font-size:20px;font-style:italic}
.rdtp-editor-page .cdx-quote__caption{font-size:14px;color:#777}
.rdtp-editor-page .cdx-quote-settings{display:none}
.rdtp-editor-page button,.rdtp-editor-page input,.rdtp-editor-page select{font-family:inherit}
.rdtp-editor-page button:focus-visible,.rdtp-editor-page a:focus-visible,.rdtp-editor-page input:focus-visible,.rdtp-editor-page select:focus-visible{outline:0;box-shadow:inset 0 0 0 1px #929292}
.rdtp-editor-page button:disabled{opacity:.45;cursor:default}
.rdtp-editor-actions {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  width: min(800px, 100%);
  margin-inline: auto;
  padding: 14px 80px max(18px, env(safe-area-inset-bottom));
  background: #fffffff5;
  backdrop-filter: blur(8px);
  border-top: 1px solid #f1f1f1;
}
.rdtp-editor-actions__buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rdtp-editor-actions__buttons button {
  min-height: 44px;
  touch-action: manipulation;
}
.rdtp-editor-actions__buttons #rdtp-editor-preview {
  padding: 10px 16px;
  border: 0;
  border-radius: 22px;
  background: var(--button-back-bg, #f2f4f6);
  color: var(--button-back-text, #596570);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}
@media (hover: hover) {
  .rdtp-editor-actions__buttons #rdtp-editor-preview:hover:not(:disabled) {
    background: #e8ecf0;
    color: var(--text-main, #252a30);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .rdtp-editor-actions {
    animation: rdtp-editor-slide-up 170ms cubic-bezier(.16, 1, .3, 1);
  }
  .rdtp-editor-actions__buttons button {
    transition: transform 110ms ease-out, background-color 120ms ease-out;
  }

  @media (max-width: 650px) {
    .rdtp-editor-page .ce-popover:not(.ce-popover--inline).ce-popover--opened > .ce-popover__container {
      animation: rdtp-editor-slide-up 150ms cubic-bezier(.16, 1, .3, 1);
    }
  }
}
@keyframes rdtp-editor-slide-up {
  from { opacity: .6; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.rdtp-editor-primary{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border:0;border-radius:22px;padding:10px 19px;background:var(--main-color,#ff6700);color:#fff;font:500 15px/1.3 Roboto,system-ui,sans-serif;text-decoration:none;cursor:pointer;white-space:nowrap}
.rdtp-editor-primary:hover:not(:disabled){filter:brightness(.95);color:#fff}
.rdtp-editor-primary:active:not(:disabled){filter:brightness(.9)}
.rdtp-editor-plain{padding:7px 0;border:0;border-radius:3px;background:transparent;color:#777;font:400 14px/1.4 Roboto,system-ui,sans-serif;cursor:pointer}
.rdtp-editor-plain:hover:not(:disabled){color:#222}
.rdtp-editor-save {
  --toast-ink: #195135;
  --toast-bg: #def3e6;
  position: fixed;
  z-index: 125;
  inset: max(14px, env(safe-area-inset-top)) auto auto 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 28px);
  width: max-content;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  box-shadow: 0 4px 18px rgb(23 36 49 / 14%);
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 140ms, transform 170ms ease-out, visibility 170ms;
}
.rdtp-editor-save[data-visible] { visibility: visible; opacity: 1; transform: translate(-50%,0); }
.rdtp-editor-save[data-tone=error] { --toast-ink: var(--status-error-color); --toast-bg: var(--status-error-background); }
.rdtp-editor-save[data-tone=warning], .rdtp-editor-save[data-tone=review] { --toast-ink: #704300; --toast-bg: #fff0cc; }
.rdtp-editor-save[data-tone=progress] { --toast-ink: #254c75; --toast-bg: #e3edf8; }
.rdtp-save-icon { display: grid; place-items: center; flex: none; width: 23px; height: 23px; border-radius: 50%; background: var(--toast-ink); color: white; font: bold 16px/1 system-ui; }
.rdtp-save-icon::before { content: '✓'; }
[data-tone=error] .rdtp-save-icon::before, [data-tone=warning] .rdtp-save-icon::before { content: '!'; }
/* The visible text describes the operation; the ring is purely decorative. */
.rdtp-media-progress {
  display: flex; align-items: center; gap: 8px; margin: 10px 0;
  color: var(--button-back-text, #596570); font-size: 14px; line-height: 1.5;
}
.rdtp-editor-page button[aria-busy=true]::before,
.rdtp-media-progress::before,
.rdtp-editor-save[data-visible][data-tone=progress] .rdtp-save-icon::before,
.rdtp-article-preview__notice[data-loading]::before {
  content: ''; display: inline-block; flex: none; box-sizing: border-box;
  width: 1em; height: 1em; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .rdtp-editor-page button[aria-busy=true]::before,
  .rdtp-media-progress::before,
  .rdtp-editor-save[data-visible][data-tone=progress] .rdtp-save-icon::before,
  .rdtp-article-preview__notice[data-loading]::before {
    animation: rdtp-editor-progress 800ms linear infinite;
  }
}
@keyframes rdtp-editor-progress { to { transform: rotate(1turn); } }
[data-tone=review] .rdtp-save-icon::before { content: '◷'; }
.rdtp-editor-save[data-visible] .rdtp-editor-plain { pointer-events: auto; padding: 4px 7px; color: inherit; font-weight: 600; text-decoration: underline; }
.rdtp-editor-error{font-size:14px;color:var(--status-error-color);margin:12px 0;line-height:1.5}
.rdtp-editor-muted{color:#888}
.rdtp-editor-notice{font-size:14px;color:#6b6b6b;background:#f6f6f6;padding:12px 15px;border-radius:8px}
.rdtp-media{margin:10px 0 20px}
.rdtp-media-link-header { display:flex; align-items:flex-start; gap:8px; margin-bottom:6px; }
.rdtp-media-source { flex:1; min-width:0; overflow-wrap:anywhere; color:inherit; }
.rdtp-media--link .rdtp-media__content { max-width:384px; }
.rdtp-media--link .rusdtp-video { margin:6px 0; }
.rdtp-media--link video-player { width:min(100%, calc(320px * var(--video-ratio, 1.7778))); margin-inline:0; }
.rdtp-media--link video-player:not(:fullscreen) video { max-height:320px; }
.rdtp-media-dismiss {
  display:grid; flex:none; place-items:center; width:32px; height:32px; padding:0;
  border:0; border-radius:50%; background:#eef0f2; color:#4c5862; cursor:pointer;
}
.rdtp-media-dismiss:is(:hover,:focus-visible) { background:#dce1e5; color:#18222c; }
.rdtp-media-link-feedback { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 10px; }
.rdtp-media-link-feedback p { margin:2px 0; }
.rdtp-media-link-feedback .rdtp-media-retry { padding:3px 4px; font-size:14px; color:#445360; }
.rdtp-media--link [hidden] { display:none; }
@media (pointer:coarse) {
  .rdtp-media-dismiss { width:42px; height:42px; background-clip:padding-box; border:6px solid transparent; }
}
.rdtp-media img{display:block;width:100%;height:auto;border-radius:4px}
.rdtp-media iframe{display:block;width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:4px;background:#f5f5f5}
.rdtp-media-caption{font-size:14px;line-height:1.45;color:#888;text-align:center;padding:8px 0;min-height:35px}
.rdtp-media-caption:empty::before{content:attr(data-placeholder);color:#aaa;pointer-events:none}
.rdtp-media-picker{display:block;width:100%;min-height:105px;background:#f6f6f6;border:0;border-radius:6px;font-size:15px;color:#777;cursor:pointer}
.rdtp-media-picker:hover{background:#eee;color:#222}
.rdtp-media-form{display:flex;align-items:center;gap:12px;padding:12px;background:#f6f6f6;border-radius:6px}
.rdtp-media-url{width:100%;min-width:0;font-size:14px;border:0;background:transparent;padding:9px 0;color:#333;border-radius:0}
.rdtp-legacy{margin:10px 0}
.rdtp-legacy>small{font-size:12px}
.rdtp-legacy__preview{font-size:16px;max-height:400px;overflow:auto;pointer-events:none}
.rdtp-legacy__preview img,.rdtp-legacy__preview video{max-width:100%;height:auto}
.rdtp-editor-recovery{position:fixed;left:50%;transform:translateX(-50%);bottom:125px;width:min(560px,calc(100% - 32px));padding:16px 20px;border:1px solid #ddd;border-radius:10px;background:white;box-shadow:0 6px 24px #00000012;z-index:22;font-size:14px}
.rdtp-editor-recovery p{margin:0 0 7px}
.rdtp-editor-recovery button+button{margin-left:15px}
.rdtp-block-grip{position:absolute;left:-58px;top:9px;display:grid;place-items:center;opacity:0;width:22px;height:28px;border:0;border-radius:4px;color:#aaa;background:transparent;cursor:grab}
.ce-block:hover>.rdtp-block-grip,.rdtp-block-grip:focus-visible{opacity:1}
.rdtp-block-grip:hover{background:#f0f0f0}
.rdtp-editor-page .rdtp-dragging { opacity: .65; user-select: none; cursor: grabbing; }
.rdtp-editor-page [data-drop-edge="top"] { box-shadow: inset 0 1px #999; }
.rdtp-editor-page [data-drop-edge="bottom"] { box-shadow: inset 0 -1px #999; }
.rdtp-editor-list h1,.rdtp-editor-guest h1{font-size:26px;line-height:1.4;margin:0 0 20px}
.rdtp-editor-guest{padding-top:60px}
.rdtp-editor-guest .pageform .popup-close{display:none}
.rdtp-editor-list__item{display:block;padding:18px 0;border-bottom:1px solid #eee;color:#222;text-decoration:none;font-size:17px}
.rdtp-editor-list__item:hover{color:var(--main-color,#ff6700)}
.rdtp-editor-list__item small{display:block;font-size:13px;color:#999;margin-top:5px}
.rdtp-editor-page #wpadminbar{display:none}
html:has(body.rdtp-editor-page){margin-top:0!important}
@media(max-width:900px){.rdtp-editor-close{right:12px;top:10px}.rdtp-editor-sheet{padding-top:48px}}
@media(max-width:650px){body.rdtp-editor-page{background:#fff}.rdtp-editor-sheet{padding:56px 24px 145px}.rdtp-editor-author{margin-bottom:24px}.rdtp-editor-title{font-size:23px}.rdtp-editor-page #rdtp-editor-body{font-size:17px}.rdtp-editor-actions{padding:12px 24px max(16px,env(safe-area-inset-bottom))}.rdtp-editor-primary{font-size:14px;padding:10px 16px}.rdtp-editor-plain{font-size:13px}.rdtp-editor-drafts{font-size:12px}.rdtp-block-grip{display:none}.rdtp-editor-page .ce-toolbar__actions{right:0}.rdtp-editor-page .ce-toolbar__plus,.rdtp-editor-page .ce-toolbar__settings-btn{background:#f5f5f5;border:0;box-shadow:none}.rdtp-media-form{flex-wrap:wrap}.rdtp-media-url{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.rdtp-editor-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.rdtp-editor-actions__buttons #rdtp-editor-submit { position: relative; gap: 7px; min-height: 48px; }
#rdtp-editor-submit::after { content: ''; position: absolute; inset: 0; }
.rdtp-editor-actions__buttons button > * { pointer-events: none; }
.rdtp-editor-page button[aria-busy=true] { position: relative; cursor: progress; opacity: .85; }
.rdtp-editor-page button[aria-busy=true]::before { vertical-align: -.12em; }
#rdtp-editor-submit[aria-busy=true] > svg { display: none; }
.rdtp-editor-page #rdtp-editor-submit[aria-busy=true]::before { width: 17px; height: 17px; }
.rdtp-editor-page button[aria-busy=true]:not(#rdtp-editor-submit) { color: transparent !important; }
.rdtp-editor-page button[aria-busy=true]:not(#rdtp-editor-submit)::before {
  position: absolute;
  inset: 0;
  margin: auto;
  color: #38434e;
}
.rdtp-editor-actions__buttons #rdtp-editor-draft { border-radius: 22px; background: #edf0f3; color: #38434e; padding: 10px 15px; font-size: 14px; font-weight: 500; }
.rdtp-editor-actions__buttons #rdtp-editor-draft:hover:not(:disabled), .rdtp-editor-actions__buttons #rdtp-editor-preview:hover:not(:disabled) { background: #e0e5e9; color: #1d2730; }
.rdtp-media-form .rdtp-editor-plain { flex: none; color: #354352; padding: 7px 10px; background: #e4e9ed; border-radius: 8px; }
.rdtp-media-form .rdtp-editor-plain:hover { background: #d3dae0; color: #19242d; }
.rdtp-editor-page .ce-popover-item:is(:hover,.ce-popover-item--focused,.ce-popover-item--active) { background-color: #e3e8ec; color: #1e2932; }
.rdtp-editor-page .ce-popover-item--confirmation { background-color: var(--color-background-item-confirm); color: #fff; }
.rdtp-editor-page .ce-popover-item--confirmation:is(:hover,.ce-popover-item--focused,.ce-popover-item--active) { background-color: var(--color-background-item-confirm-hover); color: #fff; }
.rdtp-editor-page .ce-popover-item--confirmation :is(.ce-popover-item__title,.ce-popover-item__icon) { color: #fff; }
.rdtp-editor-page .ce-popover-item--confirmation .ce-popover-item__icon { background: transparent; }
.rdtp-withdraw { margin: 0 0 12px; }
@media(max-width:650px) {
  .rdtp-editor-actions__buttons { gap: 6px; }
  .rdtp-editor-actions { padding-inline: 14px; }
  .rdtp-editor-sheet { padding-bottom: 165px; }
  .rdtp-editor-actions__buttons :is(#rdtp-editor-preview,#rdtp-editor-draft,#rdtp-editor-submit) { font-size: 13px; padding-inline: 12px; }
}

.rdtp-media-form { flex-wrap: wrap; column-gap: 8px; row-gap: 8px; }
.rdtp-media-form .rdtp-media-url { flex: 1 1 160px; }
.rdtp-media-form__formats { flex-basis: 100%; color: #53606b; font-size: 13px; }
@media(max-width:650px) {
  .rdtp-media-form .rdtp-media-url { flex-basis: 100%; }
  .rdtp-editor-author { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 1px 10px; }
  .rdtp-editor-author__info { display: contents; }
  .rdtp-editor-avatar { grid-column: 1; grid-row: 1 / 3; }
  .rdtp-editor-author__info > span { grid-column: 2; grid-row: 1; }
  .rdtp-editor-topic { grid-column: 2 / -1; grid-row: 2; }
  .rdtp-editor-drafts { grid-column: 3; grid-row: 1; }
}
