/* Compose page only. Linked from pages/compose.html. */

body[data-page="compose"] .site-header {
  padding: 0 28px;
  background: #fff;
  justify-content: flex-start;
  gap: 10px;
  border-bottom: 1px solid #e6eaef;
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
body[data-page="compose"] .brand,
body[data-page="compose"] .header-actions .icon-button,
body[data-page="compose"] [data-dropdown="messages"],
body[data-page="compose"] .header-msg-link,
body[data-page="compose"] .create-button { display: none; }
body[data-page="compose"] .main-nav {
  display: flex;
  align-items: center;
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
  gap: 0;
}
body[data-page="compose"] .header-actions { margin-left: auto; gap: 12px; }
body[data-page="compose"] .menu-button { display: none; }
body[data-page="compose"] .site-footer { display: none; }
.compose-back {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 0;
  border-radius: 50%;
  background: #f3f5f8;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.compose-back:hover { background: #e8ecf0; }
.compose-back::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-left: 1.8px solid #4b5563;
  border-bottom: 1.8px solid #4b5563;
  transform: rotate(45deg);
}
.compose-write-link {
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.compose-write-link:hover { background: #f3f5f8; }
.compose-write-link:focus { outline: none; }
.compose-write-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.compose-app {
  background:
  radial-gradient(1200px 420px at 50% -80px, rgba(36, 87, 214, .06), transparent 60%),
  #e8ecf0;
  min-height: 100vh;
  overflow-x: hidden;
}
.compose-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.compose-main {
  flex: 1;
  width: 100%;
  max-width: none;
  position: relative;
  padding: 28px 20px 108px;
  overflow-x: hidden;
}
.compose-main .form-error,
.compose-main .form-success {
  max-width: 920px;
  margin: 0 auto 14px;
}
.compose-main .form-error:empty,
.compose-main .form-success[hidden] {
  margin: 0;
  min-height: 0;
}
.compose-stage {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.compose-paper {
  background: #fff;
  border-radius: 4px;
  box-shadow:
  0 1px 2px rgba(16, 24, 40, .04),
  0 16px 40px rgba(16, 24, 40, .08);
  min-height: calc(100vh - 78px - 64px - 72px);
  padding: 16px 0 96px;
}
.compose-title-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 80px 20px;
  border-bottom: 1px solid #e6eaef;
}
.compose-title {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  /* Match published .article-main h1; slightly tighter on <input> (OS text field metrics). */
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.12em;
  color: var(--ink);
  background: transparent;
  outline: 0;
}
.compose-title::placeholder { color: #c5cad3; font-weight: 500; }
.compose-title-hint {
  flex: 0 0 auto;
  color: #9aa1ab;
  font-size: 13px;
  white-space: nowrap;
}
.compose-title-hint:empty { display: none; }
.compose-toolbar-shell {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #f4f5f7;
  border-bottom: 1px solid #e6eaef;
  position: sticky;
  top: 78px;
  z-index: 9;
}
.compose-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  margin: 0;
  padding: 10px 16px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.compose-toolbar-row { display: contents; }
.compose-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.compose-tool-split {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  margin: 8px 8px;
  background: #dde1e6;
  pointer-events: none;
}
.compose-tool-wrap { position: relative; flex: 1 1 0; min-width: min-content; }
.compose-tool-wrap > .compose-tool { width: 100%; }
.compose-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  flex: 1 1 0;
  min-width: min-content;
  width: auto;
  height: auto;
  padding: 6px 4px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4a5560;
  font: 400 12px/1.2 var(--sans);
  cursor: pointer;
}
.compose-tool span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: visible;
}
.compose-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #5b6470;
  flex: 0 0 auto;
}
.compose-tool.is-open .compose-caret { transform: rotate(180deg); }
.compose-tool svg,
.compose-menu svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compose-tool:hover,
.compose-tool.is-on,
.compose-tool.is-open { background: #e8eaee; }
.compose-tool:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.compose-swatch { position: relative; }
.compose-palette {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, 22px);
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .12);
}
.compose-palette button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(16, 24, 40, .12);
  border-radius: 4px;
  cursor: pointer;
}
.compose-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9;
  min-width: 168px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.compose-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #3d4450;
  font: 400 14px/1.4 var(--sans);
  text-align: left;
  cursor: pointer;
}
.compose-menu button:hover,
.compose-menu button.is-current { background: #f3f5f8; }
.compose-menu button.is-current::after {
  content: "✓";
  margin-left: auto;
  color: #2f9e44;
  font-weight: 700;
}
.compose-menu [data-cmd="format-p"] { font-size: 14px; }
.compose-menu [data-cmd="format-h2"] { font-size: 20px; font-weight: 700; }
.compose-menu [data-cmd="format-h3"] { font-size: 17px; font-weight: 700; }
.compose-menu [data-cmd="format-h4"] { font-size: 15px; font-weight: 700; }
.compose-menu [data-cmd="format-h5"],
.compose-menu [data-cmd="format-h5b"] { font-size: 13px; font-weight: 700; }
.compose-menu-fontsize {
  min-width: 148px;
  max-height: min(420px, 70vh);
}
.compose-menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: #e6eaef;
}
.compose-menu-fontsize button {
  justify-content: space-between;
  font-size: 14px;
}
.compose-link-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 280px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.compose-link-pop input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e6eb;
  border-radius: var(--radius);
  padding: 7px 10px;
  outline: 0;
}
.compose-link-pop button {
  border: 1px solid #e2e6eb;
  background: #fff;
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
}
.compose-history-pop,
.compose-formula-pop,
.compose-tpl-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.compose-history-pop {
  width: 260px;
  max-height: 280px;
  overflow: auto;
}
.compose-history-empty {
  margin: 8px 10px;
  color: #8b929c;
  font-size: 13px;
}
#compose-history-list button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}
#compose-history-list button:hover,
#compose-history-list button.is-current { background: #f3f5f8; }
#compose-history-list em {
  color: #8b929c;
  font-size: 11px;
  font-style: normal;
}
#compose-history-list span { color: #3d4450; font-size: 13px; }
.compose-formula-pop { width: 280px; }
.compose-formula-pop textarea {
  width: 100%;
  border: 1px solid #e2e6eb;
  border-radius: var(--radius);
  padding: 8px 10px;
  outline: 0;
  font: 13px/1.5 var(--mono);
  resize: vertical;
}
.compose-pop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.compose-tpl-pop {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
  width: 220px;
}
.compose-tpl-pop p { margin: 0 0 4px; color: #3d4450; font-size: 13px; }
.compose-formula-pop button,
.compose-tpl-pop button {
  border: 1px solid #e2e6eb;
  background: #fff;
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
}
.compose-sandbox {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  height: 280px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .16);
}
.compose-sandbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f4;
  color: #3d4450;
  font-size: 12px;
}
.compose-sandbox-bar button {
  border: 0;
  background: transparent;
  color: #5b6470;
  cursor: pointer;
}
.compose-sandbox iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f7f8fa;
}
.compose-file,
.compose-formula,
.compose-toc { margin: 12px 0 20px; }
.compose-toc .toc-h2 { margin-left: 0; }
.compose-toc .toc-h3 { margin-left: 12px; }
.compose-toc .toc-h4 { margin-left: 24px; }
.compose-toc .toc-h5 { margin-left: 36px; }
.compose-paper > #compose-body,
.compose-preview-pane {
  display: block;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - 180px);
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  /* Exact match for published .article-copy body. */
  font: 16px/1.75 var(--serif);
  letter-spacing: 0;
  word-spacing: 0;
  color: #42534d;
  padding: 20px 80px 0;
  text-align: start;
}
.compose-body p,
.compose-body h2,
.compose-body h3,
.compose-body h4,
.compose-body h5,
.compose-body li,
.compose-body blockquote,
.compose-preview-pane p,
.compose-preview-pane h2,
.compose-preview-pane h3,
.compose-preview-pane li {
  letter-spacing: 0;
  word-spacing: 0;
}
.compose-body [style*="text-align: justify"],
.compose-body [style*="text-align:justify"],
.compose-body [align="justify"],
.compose-preview-pane [style*="text-align: justify"],
.compose-preview-pane [style*="text-align:justify"],
.compose-preview-pane [align="justify"] {
  text-align: start !important;
}
.compose-preview-pane.article-copy { padding: 20px 80px 40px; }
.compose-body.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  left: 80px;
  right: 80px;
  top: 20px;
  color: #b8bec8;
  pointer-events: none;
}
.compose-body p { margin: 0 0 1.1em; color: #42534d; font: 16px/1.75 var(--serif); letter-spacing: 0; word-spacing: 0; }
.compose-body blockquote {
  margin: 0 0 1.2em;
  padding: 11px 25px;
  border-left: 3px solid var(--orange);
  font: 700 22px/1.65 var(--serif);
  color: var(--ink);
}
.compose-body pre {
  margin: 0 0 1.2em;
  padding: 16px 18px;
  background: #e9eee9;
  border-radius: var(--radius);
  overflow-x: auto;
}
.compose-body code { font: 13px/1.7 var(--mono); background: #e9eee9; padding: 1px 5px; border-radius: var(--radius-sm); }
.compose-body pre code { background: transparent; padding: 0; }
.compose-body ul, .compose-body ol { margin: 0 0 1.2em; padding-left: 22px; color: #42534d; font: 16px/1.75 var(--serif); }
.compose-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.compose-body h2 { font: 700 28px/1.35 var(--serif); letter-spacing: -.05em; margin: 0 0 0.7em; }
.compose-body h3 { font: 700 22px/1.4 var(--serif); letter-spacing: -.04em; margin: 0 0 0.7em; }
.compose-body h4 { font: 700 18px/1.45 var(--serif); margin: 0 0 0.7em; }
.compose-body h5 { font: 700 16px/1.5 var(--serif); margin: 0 0 0.7em; }
.compose-table {
  margin: 8px 0 28px;
  cursor: grab;
}
.compose-table table {
  width: 100%;
  border-collapse: collapse;
  font: 15px/1.6 var(--sans);
}
.compose-table th,
.compose-table td {
  border: 1px solid #d7dde4;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.compose-table th {
  background: #f4f6f8;
  font-weight: 700;
}
.compose-figure {
  position: relative;
  margin: 8px 0 28px;
  cursor: grab;
}
.compose-figure.is-center:not(.is-sized) {
  max-width: 72%;
  margin-left: auto;
  margin-right: auto;
}
.compose-figure.is-wide {
  width: calc(100% + 80px);
  max-width: none;
  margin-left: -40px;
  margin-right: -40px;
}
.compose-figure.is-sized {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.compose-figure-frame {
  position: relative;
  display: block;
}
.compose-figure img { display: block; width: 100%; border-radius: var(--radius); }
.compose-figure.is-dragging { opacity: .45; }
.compose-figure.is-resizing { cursor: ew-resize; }
.compose-figure.is-resizing .compose-figure-tools { pointer-events: none; opacity: .55; }
.compose-resize-handle {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 2px solid #fff;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(36, 87, 214, .35);
  touch-action: none;
  user-select: none;
}
.compose-resize-handle[data-resize="e"] {
  top: 50%;
  right: -6px;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: ew-resize;
}
.compose-resize-handle[data-resize="se"] {
  right: -5px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  cursor: nwse-resize;
}
.compose-resize-width {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 3;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 32, 30, .82);
  color: #fff;
  font: 700 11px/1.4 var(--sans);
  letter-spacing: .02em;
  pointer-events: none;
}
.compose-figure-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-width: min(100%, 280px);
  box-sizing: border-box;
}
.compose-figure-tools button,
.compose-figure-tools input {
  border: 1px solid #e2e6eb;
  background: #fff;
  border-radius: 7px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  color: #3d4450;
}
.compose-figure-tools button.is-on { border-color: var(--blue); color: var(--blue); }
.compose-figure-tools input { flex: 1; min-width: 140px; }
.compose-drop-line {
  display: block;
  height: 3px;
  margin: 6px 0;
  background: var(--blue);
  border-radius: 99px;
}
.compose-settings {
  max-width: 920px;
  margin: 20px auto 0;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  padding: 8px 32px 28px;
  overflow: visible;
}
.compose-set-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eef1f4;
}
.compose-set-row--top { align-items: flex-start; }
.compose-set-row:last-child { border-bottom: 0; }
.compose-set-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding-top: 0;
  color: #3d4450;
  font: 600 14px/1.4 var(--sans);
  white-space: nowrap;
}
.compose-set-row--top .compose-set-label { padding-top: 8px; }
.compose-set-req { color: #e24b4b; font-weight: 600; }
.compose-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid #c5ccd4;
  border-radius: 50%;
  background: #fff;
  color: #8b929c;
  font: 11px/1 var(--sans);
  cursor: help;
}
.compose-help-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: max-content;
  max-width: 280px;
  padding: 10px 12px;
  background: #2c3038;
  color: #fff;
  border-radius: 6px;
  font: 400 12px/1.65 var(--sans);
  font-weight: 400;
  text-align: left;
  white-space: normal;
  z-index: 30;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .18);
}
.compose-help-tip strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.compose-help-tip span {
  display: block;
  padding-left: 0.7em;
  text-indent: -0.7em;
}
.compose-help-tip span::before { content: "· "; }
.compose-help-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 8px;
  border: 6px solid transparent;
  border-top-color: #2c3038;
}
.compose-help:hover .compose-help-tip,
.compose-help:focus .compose-help-tip,
.compose-help:focus-visible .compose-help-tip { display: block; }
.compose-set-ctrl { flex: 1; min-width: 0; }
.compose-settings textarea,
.compose-settings select,
.compose-settings input:not([type="file"]):not([type="radio"]) {
  border: 1px solid #e2e6eb;
  border-radius: var(--radius);
  padding: 9px 12px;
  outline: 0;
  font: 14px/1.6 var(--sans);
  background: #fff;
}
.compose-settings textarea { width: 100%; }
.compose-settings select { width: 280px; max-width: 100%; }
.compose-settings textarea:focus,
.compose-settings select:focus,
.compose-settings input:focus { border-color: #c9d0d8; }
.compose-radios {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 28px;
}
.compose-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3d4450;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.compose-radios input { width: auto; margin: 0; accent-color: var(--orange); }
.compose-vis-hint,
.compose-kind-hint { display: block; margin: 8px 0 0; color: #b7791f; font-size: 12px; font-style: normal; }
.compose-decl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compose-decl-chip {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #e2e6eb;
  border-radius: 999px;
  background: #fff;
  color: #5b6470;
  font: 500 13px/1.3 var(--sans);
  cursor: pointer;
}
.compose-decl-chip:hover { border-color: #c9d0d8; color: #3d4450; }
.compose-decl-chip.is-active {
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 10%, #fff);
  color: #c45a12;
}
.compose-decl-chip:focus { outline: none; }
.compose-decl-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--orange) 45%, #fff);
  outline-offset: 2px;
}
#compose-decl-custom { margin-top: 10px; }
#compose-decl-custom[hidden] { display: none; }
.compose-sources { display: flex; flex-direction: column; gap: 8px; }
.compose-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.compose-source-row input { flex: 1; min-width: 0; }
.compose-source-remove {
  border: 0;
  background: transparent;
  color: #8b929c;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.compose-source-add {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}
.compose-cover-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.compose-cover-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 120px;
  min-height: 108px;
  border: 1px dashed #c9d0d8;
  border-radius: var(--radius);
  background: #f7f8fa;
  color: #5b6470;
  font-size: 13px;
  cursor: pointer;
}
.compose-cover-plus {
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  color: #9aa3ad;
}
.compose-cover-upload:hover { border-color: #9aa3ad; background: #f3f5f8; }
.compose-cover-from-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 108px;
  padding: 10px 12px;
  border: 1px solid #eef1f4;
  border-radius: var(--radius);
  background: #fafbfc;
  color: #8b929c;
  font-size: 13px;
  line-height: 1.6;
}
.compose-cover-from-body span { width: 100%; color: #8b929c; font-size: 12px; }
.compose-cover-from-body button {
  width: 72px;
  height: 48px;
  padding: 0;
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.compose-cover-from-body img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compose-cover-preview {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 10px;
}
.compose-cover-clear {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #8b929c;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.compose-tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.compose-tags { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 0; vertical-align: middle; }
#compose-tag-input { width: 220px; max-width: 100%; }
.compose-tag {
  border: 1px solid #e2e6eb;
  background: #f7f8fa;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #3d4450;
  cursor: pointer;
}
.compose-tag.is-locked { cursor: default; color: #8b929c; }
.compose-tag span { margin-left: 6px; color: #9aa1ab; }
.compose-tag-add {
  display: inline-flex;
  align-items: center;
  height: 28px;
  margin: 0;
  padding: 0 10px;
  border: 1px dashed #c9d0d8;
  border-radius: 999px;
  background: #fff;
  color: #5b6470;
  font-size: 12px;
  cursor: pointer;
}
.compose-tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.compose-tag-suggest button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.compose-excerpt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.compose-field-count { color: #8b929c; font-size: 12px; font-style: normal; }
.compose-excerpt-fill {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.compose-skill-paper { padding: 20px 80px 0; }
.compose-skill-note {
  margin: 0 0 28px;
  color: #8b929c;
  font-size: 13px;
}
.compose-skill-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.compose-skill-file-row .compose-draft {
  width: auto;
  padding: 8px 14px;
}
.compose-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
  min-height: 58px;
  padding: 8px 28px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid #e6eaef;
  box-shadow: 0 -10px 28px rgba(20, 32, 44, .05);
  backdrop-filter: blur(12px);
}
.compose-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.compose-bar-count {
  color: #6d7480;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  background: #f3f5f8;
  border-radius: 999px;
}
.compose-bar-text {
  border: 0;
  background: transparent;
  color: #5b6470;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}
.compose-bar-text:hover,
.compose-bar-text.is-active { color: var(--blue); }
.compose-bar-hint {
  margin: 0;
  text-align: center;
  color: #8a93a0;
  font-size: 12px;
  line-height: 1.4;
}
.compose-bar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.compose-schedule { position: relative; }
.compose-schedule-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  width: 280px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6eaef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
}
.compose-schedule-pop label {
  display: grid;
  gap: 6px;
  color: #3d4450;
  font-size: 13px;
}
.compose-schedule-pop input {
  width: 100%;
  border: 1px solid #e2e6eb;
  border-radius: var(--radius);
  padding: 8px 10px;
}
.compose-schedule-pop p {
  margin: 8px 0 12px;
  color: #8a93a0;
  font-size: 12px;
  line-height: 1.5;
}
.compose-leave-dialog {
  border: 0;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  max-width: calc(100vw - 32px);
  color: inherit;
}
.compose-leave-dialog::backdrop {
  background: rgba(32, 36, 40, .45);
}
.compose-leave-card {
  position: relative;
  width: min(400px, 100%);
  margin: 0;
  padding: 20px 22px 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .22);
}
.compose-leave-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.compose-leave-close::before,
.compose-leave-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background: #6b7280;
}
.compose-leave-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.compose-leave-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.compose-leave-close:hover { background: #f3f4f6; }
.compose-leave-card h2 {
  margin: 0 28px 8px 0;
  font: 600 17px/1.4 var(--sans);
  color: #1f2937;
  letter-spacing: 0;
}
.compose-leave-card p {
  margin: 0 0 20px;
  color: #6b7280;
  font: 13px/1.6 var(--sans);
}
.compose-leave-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.compose-leave-actions button {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  height: 36px;
  padding: 0 16px;
  font: 600 13px/1 var(--sans);
  color: #374151;
  cursor: pointer;
}
.compose-leave-cancel:hover { background: #f9fafb; border-color: #d1d5db; }
.compose-leave-discard {
  border-color: var(--line);
  background: var(--fill-soft);
  color: var(--ink);
}
.compose-leave-discard:hover { background: #e8ece9; border-color: #c9d4cd; }
.compose-leave-save {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.compose-leave-save:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.compose-leave-discard:disabled,
.compose-leave-cancel:disabled,
.compose-leave-save:disabled {
  opacity: .55;
  cursor: wait;
}
.compose-schedule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.compose-schedule-actions button {
  border: 1px solid #e2e6eb;
  background: #fff;
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.compose-schedule-actions [data-schedule-ok] {
  border: 0;
  background: var(--orange);
  color: #fff;
}
.compose-draft {
  border: 1px solid #e2e6eb;
  background: #fff;
  color: #3d4450;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--radius);
  white-space: nowrap;
}
.compose-draft:hover { background: #f7f8fa; border-color: #d5dae1; }
.compose-publish {
  border: 0;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: var(--radius);
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(242, 107, 56, .28);
}
.compose-publish:hover { background: #e45512; }
@media (max-width: 1100px) {
  .compose-toolbar { flex-wrap: wrap; }
  .compose-toolbar-row {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    overflow: visible;
  }
}
@media (max-width: 720px) {
  .compose-toolbar-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .compose-tool,
  .compose-tool-wrap { flex: 0 0 auto; min-width: min-content; }
  .compose-set-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .compose-set-row--top .compose-set-label { padding-top: 0; }
  .compose-cover-grid { grid-template-columns: 1fr; }
  .compose-radios { flex-wrap: wrap; }
  .compose-settings { padding: 8px 18px 20px; }
}
@media (max-width: 600px) {
  .compose-title { font-size: 24px; }
  .compose-paper { padding: 16px 0 64px; }
  .compose-title-row,
  .compose-paper > #compose-body,
  .compose-preview-pane,
  .compose-preview-pane.article-copy,
  .compose-skill-paper { padding-left: 22px; padding-right: 22px; }
  .compose-body.is-empty::before { left: 22px; right: 22px; }
  .compose-title-row { flex-wrap: wrap; gap: 8px; }
  .compose-bar {
    grid-template-columns: 1fr;
    padding: 10px 16px;
    gap: 8px;
  }
  .compose-bar-hint { text-align: left; }
  .compose-bar-actions { width: 100%; justify-content: flex-end; }
}
