@font-face {
  font-family: "Le Murmure";
  src: url("/blog/assets/fonts/LeMurmure.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("/blog/assets/fonts/HelveticaNeueCyr-Roman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("/blog/assets/fonts/HelveticaNeueCyr-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff6000;
  --orange-soft: rgba(255, 96, 0, 0.75);
  --ink: #333;
  --muted: #737373;
  --line: #e7e7e7;
  --paper: #fff;
  --soft: #f6f6f6;
  --page-pad: clamp(16px, 4.86vw, 70px);
  --hero-h: clamp(220px, 28.96vw, 417px);
  --cover-h: clamp(260px, 35.28vw, 508px);
  --cover-overhang: clamp(48px, 6.32vw, 91px);
  --title-size: clamp(42px, 8.33vw, 120px);
  --h2-size: clamp(46px, 5.55vw, 80px);
  --h3-size: clamp(36px, 4.17vw, 60px);
  --body-size: clamp(18px, 2.08vw, 30px);
  --nav-size: clamp(16px, 2.08vw, 30px);
  --nav-gap: clamp(16px, 4.17vw, 60px);
  --serif: "HelveticaNeueCyr", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Le Murmure", "Impact", sans-serif;
  --ui: Inter, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.5 var(--ui);
  background: var(--paper);
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { touch-action: manipulation; }
button {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  padding: .55rem .85rem;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { background: #f2f2f2; }
button:disabled { opacity: .5; cursor: wait; }
button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
button.primary:hover { background: #e45700; }
.quiet { border: 0; background: transparent; color: var(--muted); }
a { color: var(--orange); text-underline-offset: 3px; }
input, textarea, select {
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  padding: .65rem;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
textarea { resize: vertical; }
label { display: block; font-size: .875rem; color: var(--muted); }
[hidden] { display: none !important; }

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(20px, 4.86vw, 70px) var(--page-pad) 0;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nav-gap);
  font-size: var(--nav-size);
  line-height: 1.1;
}
.site-nav a,
.site-nav .nav-link {
  color: var(--orange);
  text-decoration: none;
  font: 400 var(--nav-size)/1.1 var(--ui);
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}
.site-nav a.is-current { font-weight: 700; }
.site-nav .nav-link:hover { background: none; color: var(--orange); }
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(220px, 42vw);
  min-height: clamp(48px, 5.83vw, 84px);
  padding: 20px 55px;
  border: 0;
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  font: 700 clamp(18px, 2.5vw, 36px)/1 var(--ui);
  text-decoration: none;
  flex-shrink: 0;
}
.login-btn:hover { background: #e45700; color: #fff; }
.login-btn-icon { display: none; }
.login-btn-icon svg { display: block; width: 28px; height: 28px; }

.reader-shell { position: relative; }
.crumbs {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: clamp(16px, 2.3vw, 33px) var(--page-pad) clamp(16px, 1.74vw, 25px);
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.1;
  color: var(--orange-soft);
}
.crumbs a {
  color: var(--orange-soft);
  font-weight: 700;
}
.crumbs span:last-child { font-weight: 400; }

.hero {
  position: relative;
  min-height: var(--hero-h);
  background: var(--orange);
  overflow: visible;
}
.hero h1 {
  position: relative;
  z-index: 2;
  width: min(664px, 52%);
  margin: 0 0 0 var(--page-pad);
  padding: clamp(72px, 13.54vw, 195px) 0 clamp(36px, 6.25vw, 90px);
  color: #fff;
  font: 400 var(--title-size)/1.1 var(--display);
  overflow-wrap: anywhere;
}
.cover-stage {
  position: absolute;
  right: 0;
  top: calc(-1 * var(--cover-overhang));
  bottom: 0;
  width: min(727px, 50.5%);
  overflow: hidden;
  z-index: 1;
}
.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--cover-x, 50%) var(--cover-y, 50%);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-x, 50%) var(--cover-y, 50%);
}

.article-reading {
  position: relative;
  width: min(910px, calc(100% - 2 * var(--page-pad)));
  margin: 0 0 0 var(--page-pad);
  padding: clamp(40px, 4.86vw, 70px) 0 120px;
}
.article-reading .article-body {
  width: auto;
  margin: 0;
  padding: 0;
}
.article-stream { position: relative; }
.article-body {
  width: min(910px, calc(100% - 2 * var(--page-pad)));
  margin: 0 0 0 var(--page-pad);
  padding: clamp(40px, 4.86vw, 70px) 0 120px;
  color: var(--ink);
  font: 400 var(--body-size)/1.5 var(--serif);
  overflow-wrap: anywhere;
}
.article-body p,
.article-body .lead,
.article-body .loud,
.article-body .foot { margin: 0 0 30px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body h1,
.article-body h2 {
  margin: 1.15em 0 .5em;
  color: var(--orange);
  font: 400 var(--h2-size)/1.1 var(--display);
}
.article-body h3,
.article-body h4 {
  margin: 1.15em 0 .5em;
  color: var(--orange);
  font: 400 var(--h3-size)/1.1 var(--display);
}
.article-body strong { font-weight: 700; }
.nobr, nobr { white-space: nowrap; }
.article-body .pullquote,
.article-body blockquote {
  margin: -22px 0 30px;
  padding: 0 0 0 30px;
  border: 0;
  font-weight: 400;
}
.article-body > .pullquote:first-child,
.article-body > blockquote:first-child { margin-top: 0; }
.article-body[data-quote-gap="normal"] .pullquote,
.article-body[data-quote-gap="normal"] blockquote { margin-top: -8px; }
.article-body[data-quote-gap="wide"] .pullquote,
.article-body[data-quote-gap="wide"] blockquote { margin-top: 0; }
.article-body .pullquote + .pullquote,
.article-body blockquote + blockquote { margin-top: .2em; }
.article-body .pullquote strong,
.article-body .pullquote b,
.article-body blockquote strong,
.article-body blockquote b { font-weight: 700; }
.article-body blockquote p { margin: 0; }
.article-body .custom-html {
  position: relative;
  margin: 0 0 30px;
}
.reader .custom-html-bar { display: none; }
.custom-html-bar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 8px;
}
.custom-html-bar button {
  font-size: 12px;
  padding: .25rem .55rem;
}
.custom-html-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
}
.article-body img { max-width: 100%; height: auto; display: block; }
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  color: var(--muted);
  font-size: .6em;
  line-height: 1.45;
  margin-top: .7rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.8em;
  margin: 0 0 30px;
  list-style-position: outside;
}
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body li { margin-bottom: .45em; }
.article-body li::marker { color: var(--ink); }
.has-sidenote {
  position: relative;
  margin: 0 0 30px;
}
.has-sidenote > p,
.has-sidenote > .pullquote,
.has-sidenote > .lead,
.has-sidenote > .loud,
.has-sidenote > .foot {
  margin-bottom: 0;
}
.sidenote-rail { display: flow-root; }
.article-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: .75em;
}
.article-body th,
.article-body td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.article-body pre {
  background: #f4f4f4;
  padding: 1rem;
  overflow: auto;
  font-size: .7em;
}
.article-body code { font-size: .9em; }
.sidenote {
  position: relative;
  z-index: 2;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(51, 51, 51, .6);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.sidenote a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sidenote strong { font-weight: 700; }
.sidenote em { font-style: italic; }
.sidenote p { margin: 0 0 .2em; }
.sidenote p:last-child { margin-bottom: 0; }
.sidenote p + p { margin-top: 0; }
.sidenote-gap {
  display: block;
  height: 1.5em;
}
.sidenote-where { display: inline; }
.article-retell {
  color: var(--ink);
  font: 400 var(--body-size)/1.5 var(--serif);
  overflow-wrap: anywhere;
}
.article-retell p { margin: 0 0 30px; }
.article-retell p:last-child { margin-bottom: 0; }
.article-reading.is-retold:not(.is-animating) .article-body { display: none; }
.article-reading.is-animating .article-body,
.article-reading.is-animating .article-retell {
  width: 100%;
}
.article-reading.is-animating.is-retold .article-body,
.article-reading.is-animating:not(.is-retold) .article-retell {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
}
.article-retell-bar {
  position: relative;
  z-index: 3;
  margin: 0 0 1.5rem;
}
.retell-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--orange);
  font: 400 var(--body-size)/1.5 var(--serif);
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.retell-icon {
  position: relative;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  margin: 0;
}
.retell-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .22s ease, transform .22s ease;
}
.retell-icon-back {
  opacity: 0;
  transform: scale(.84) rotate(-18deg);
}
.article-reading.is-retold .retell-icon-open {
  opacity: 0;
  transform: scale(.84) rotate(18deg);
}
.article-reading.is-retold .retell-icon-back {
  opacity: 1;
  transform: none;
}
.retell-copy {
  display: grid;
  width: 100%;
  justify-items: start;
}
.retell-toggle:hover,
.retell-toggle:focus-visible {
  background: none;
  color: var(--orange);
}
.retell-toggle:disabled { opacity: 1; cursor: wait; }
.retell-label {
  grid-area: 1 / 1;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
  transition: opacity .22s ease, transform .22s ease;
}
.article-body.is-selected > *,
.article-retell.is-selected p {
  background: #cce8ff;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.retell-label-back {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.article-reading.is-retold .retell-label-open {
  position: absolute;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.article-reading.is-retold .retell-label-back {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.retell-caret {
  display: inline-block;
  width: 2px;
  height: .95em;
  margin: 0 0 -.12em 2px;
  background: var(--ink);
  vertical-align: baseline;
  animation: retell-caret 1.05s step-end infinite;
}
@keyframes retell-caret {
  50% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .retell-label,
  .retell-icon img { transition: none; }
  .retell-caret { animation: none; }
}
.lead { font-size: 1.15em; }
.loud {
  font-family: var(--display);
  font-size: var(--h3-size);
  font-weight: 400;
  line-height: 1.1;
  color: var(--orange);
}
.foot { font-size: .6em; color: var(--muted); }

.home {
  padding: clamp(36px, 5vw, 70px) 0 120px;
}
.feature {
  display: block;
  margin: 0 0 80px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.feature:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 8px;
}
.feature-stage {
  position: relative;
  width: min(1300px, calc(100% - 2 * var(--page-pad)));
  aspect-ratio: 1300 / 888;
  height: auto;
  min-height: 0;
  margin: 0 var(--page-pad);
  background: transparent;
  overflow: hidden;
}
.feature-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.feature-cover .cover-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: var(--cover-x, 50%) var(--cover-y, 50%);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-x, 50%) var(--cover-y, 50%);
}
.feature-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 40px;
  width: min(1300px, calc(100% - 2 * var(--page-pad)));
  margin: clamp(32px, 2.8vw, 40px) var(--page-pad) 0;
  padding: 0;
}
.feature-head h2 {
  max-width: 664px;
  margin: 0;
  color: var(--orange);
  font: 400 var(--title-size)/1.1 var(--display);
  text-decoration: none;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}
.feature:hover h2,
.feature:focus-visible h2 { text-decoration: underline; }
.feature-date {
  width: min(289px, 100%);
  margin: 0 0 .35em;
  color: rgba(51, 51, 51, .6);
  font: 700 clamp(13px, 1.05vw, 15px)/1.5 var(--serif);
}
.feature-lead,
.feature-read {
  width: min(910px, calc(100% - 2 * var(--page-pad)));
  margin: 24px 0 0 var(--page-pad);
  padding: 0;
}
.feature-lead {
  color: var(--ink);
  font: 400 var(--body-size)/1.5 var(--serif);
}
.feature-lead p { margin: 0 0 .8em; }
.feature-lead p:last-child { margin-bottom: 0; }
.feature-read {
  display: inline-block;
  margin-top: 40px;
  color: var(--orange);
  font: 700 var(--body-size)/1.5 var(--serif);
  text-decoration: none;
}
.feature:hover .feature-read { text-decoration: underline; }
.feature:not(.is-hero) {
  width: min(1170px, calc(100% - 2 * var(--page-pad)));
  margin: 80px var(--page-pad) 0;
}
.feature:not(.is-hero) .feature-head,
.feature:not(.is-hero) .feature-lead,
.feature:not(.is-hero) .feature-read {
  width: 100%;
  margin-left: 0;
  padding: 0;
}
.empty-public {
  margin: 0 var(--page-pad);
  color: var(--muted);
  font: 400 var(--body-size)/1.5 var(--serif);
}
.wip-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 40px 36px 32px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 80px #0003;
}
.wip-dialog::backdrop { background: rgb(0 0 0 / .45); }
.wip-dialog p {
  margin: 0 0 28px;
  color: var(--orange);
  font: 400 clamp(32px, 4vw, 48px)/1.15 var(--display);
}
.wip-dialog .primary {
  min-width: 180px;
  min-height: 64px;
  border: 0;
  border-radius: 20px;
  font: 700 24px/1 var(--ui);
}

.wordmark {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.wordmark span {
  color: var(--orange);
  font-weight: 400;
  margin-left: 1rem;
}
.admin-header {
  height: 83px;
  border-bottom: 1px solid var(--line);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.header-actions { display: flex; gap: 1rem; align-items: center; }
.save-pill {
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .8rem;
  color: var(--muted);
}
.header-link {
  color: var(--orange);
  font-size: .9rem;
  text-decoration: none;
}
.header-link:hover { text-decoration: underline; }
.workspace {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 83px);
}
.posts-panel {
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem;
  background: #f7f7f7;
}
.posts-panel > .primary { width: 100%; border-radius: 14px; }
#post-search {
  width: 100%;
  margin: .85rem 0 .7rem;
  border: 0;
  background: #fff;
  border-radius: 12px;
}
.posts-panel h2 { font-size: 1rem; margin: 2.1rem .5rem 1rem; }
.posts-panel h2 span { color: var(--muted); font-weight: 400; margin-left: .3rem; }
.post-filters { display: flex; gap: .1rem; margin-bottom: 1rem; }
.post-filters button {
  padding: .3rem .45rem;
  font-size: .875rem;
  border: 0;
  background: transparent;
  border-radius: 5px;
  color: var(--muted);
}
.post-filters button.active { background: #eaeaea; color: var(--ink); }
.post-item {
  display: block;
  width: 100%;
  border: 0;
  text-align: left;
  white-space: normal;
  background: transparent;
  padding: .9rem .7rem;
  margin: .2rem 0;
  border-left: 3px solid transparent;
  border-radius: 3px;
}
.post-item.selected { background: #fff1e9; border-left-color: var(--orange); }
.post-item strong { font-size: .95rem; line-height: 1.4; display: block; }
.post-item span { display: block; margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.empty-list { color: var(--muted); font-size: .9rem; margin: 1.5rem .5rem; }
.editor-main { min-width: 0; }
.editor-top {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgb(255 255 255 / .92);
  backdrop-filter: blur(12px);
}
.publish-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.editing-surface { display: grid; grid-template-columns: minmax(0, 1fr); }
.writing {
  padding: 1.4rem 0 4rem;
  width: 100%;
  margin: 0;
  overflow: visible;
}
.editor-meta,
.media-grid,
.writing-bottom,
.seo-panel,
.live-controls {
  margin-left: var(--page-pad);
  margin-right: var(--page-pad);
}
.editor-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.editor-meta label {
  color: var(--muted);
  font-size: .8rem;
}
.editor-meta input {
  width: 100%;
  margin-top: .3rem;
  border: 0;
  background: var(--soft);
  border-radius: 10px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.summary-field {
  display: block;
  margin: 0 var(--page-pad) 1.6rem;
  color: var(--muted);
  font-size: .8rem;
}
.summary-field textarea {
  display: block;
  width: 100%;
  min-height: 8.5rem;
  margin-top: .35rem;
  border: 0;
  background: var(--soft);
  border-radius: 10px;
  color: var(--ink);
  font: 400 1.05rem/1.5 var(--serif);
}
.style-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 1rem;
  margin: 0 var(--page-pad) 1.6rem;
}
.style-field {
  display: block;
  margin: 0 var(--page-pad) 1.6rem;
  color: var(--muted);
  font-size: .8rem;
}
.quote-gap-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 .15rem 0 .25rem;
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}
.quote-gap-tool select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .25rem .4rem;
  background: #fff;
  color: var(--ink);
  font-size: .75rem;
}
.style-field textarea,
.gap-field select {
  display: block;
  width: 100%;
  margin-top: .35rem;
  border: 0;
  background: var(--soft);
  border-radius: 10px;
  color: var(--ink);
}
.style-field textarea {
  min-height: 6.5rem;
  font: 400 .85rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}
#html-dialog textarea { width: 100%; margin-top: .35rem; }
.summary-count {
  display: block;
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}
.media-card {
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.media-card header {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: baseline;
  margin-bottom: .8rem;
}
.media-card header strong { font-size: .95rem; }
.media-card header span { color: var(--muted); font-size: .8rem; }
.media-actions { display: flex; gap: .5rem; margin-bottom: .7rem; }
.media-card input {
  width: 100%;
  border: 0;
  background: var(--soft);
  border-radius: 10px;
  font-size: .875rem;
}
.media-hint,
.home-cover-empty {
  margin: .7rem 0 0;
  color: var(--muted);
  font-size: .8rem;
}
.home-cover-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1300 / 888;
  height: auto;
  margin-bottom: .8rem;
  background: var(--orange);
  overflow: hidden;
  border-radius: 12px;
  cursor: grab;
  touch-action: none;
}
.home-cover-stage.is-dragging { cursor: grabbing; }
.home-cover-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: var(--cover-x, 50%) var(--cover-y, 50%);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-x, 50%) var(--cover-y, 50%);
  pointer-events: none;
}
.slug-field {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-top: .3rem;
}
.slug-field span { font-size: .85rem; }
.slug-field input {
  border: 0;
  background: var(--soft);
  font-size: .875rem;
}
.cover-editor-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0 0;
}
.cover-editor-tools label {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex: 1;
  color: var(--ink);
}
.cover-editor-tools input[type="range"] { flex: 1; }
.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  align-items: center;
  min-width: 0;
}
.format-toolbar button {
  font-size: .85rem;
  border: 0;
  padding: .4rem .6rem;
  background: transparent;
  border-radius: 8px;
}
.format-toolbar button:hover { background: #f4f4f4; }
.format-toolbar button.is-on { background: #fff1e9; color: var(--orange); }
.toolbar-sep {
  width: 1px;
  height: 22px;
  margin: 0 .25rem;
  background: var(--line);
}
.format-bubble {
  position: fixed;
  z-index: 20;
  display: flex;
  gap: .15rem;
  padding: .3rem;
  border-radius: 12px;
  background: #1f1f1f;
  box-shadow: 0 12px 40px #0003;
}
.format-bubble button {
  border: 0;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: .35rem .55rem;
}
.format-bubble button:hover,
.format-bubble button.is-on { background: #333; }
.visual-page { padding-top: var(--cover-overhang); }
.visual-page .hero h1 {
  min-height: 1.2em;
  outline: none;
  caret-color: #fff;
}
.visual-page .hero h1.is-empty::before {
  content: attr(data-placeholder);
  color: rgb(255 255 255 / .55);
}
.visual-page .cover-stage {
  cursor: grab;
  touch-action: none;
}
.visual-page .cover-stage.is-dragging { cursor: grabbing; }
.visual-page .article-body {
  outline: none;
  min-height: 46vh;
  caret-color: var(--ink);
}
.visual-page .article-body.is-empty::before {
  content: attr(data-placeholder);
  color: #c8c8c8;
  pointer-events: none;
}
.visual-page .article-body.dragging {
  background: #fff1e9;
  outline: 2px dashed var(--orange);
}
.sidenote-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 2px 10px #0002;
  line-height: 1;
  opacity: 0;
}
.sidenote { position: relative; }
.sidenote:hover .sidenote-remove,
.sidenote:focus-within .sidenote-remove { opacity: 1; }
.sidenote-bind {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 28px 8px 0;
  font: 400 11px/1 var(--ui);
  color: var(--muted);
  user-select: none;
}
.sidenote-bind button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  line-height: 1;
}
.reader .sidenote-bind { display: none; }
body.admin .has-sidenote > :not(.sidenote-rail) {
  box-shadow: inset 3px 0 0 rgba(255, 96, 0, .45);
  padding-left: 12px;
}
body.admin .sidenote-rail {
  margin: .65rem 0 0;
}
body.admin .sidenote-rail .sidenote {
  margin: 0 0 .7rem;
  padding: 10px 12px 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
}
#link-dialog label { margin-bottom: 1rem; }
#link-dialog input { width: 100%; margin-top: .35rem; }
#link-dialog div { display: flex; justify-content: flex-end; gap: .6rem; }
.writing-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}
.seo-panel {
  margin-top: 2.2rem;
  padding: 1.2rem 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.seo-panel h2 {
  margin: 0 0 .35rem;
  font: 700 1.15rem/1.3 var(--sans, Inter, sans-serif);
}
.seo-panel .media-hint { margin: 0 0 1.1rem; }
.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.6rem;
}
.seo-col label {
  display: block;
  margin-bottom: .9rem;
  color: var(--muted);
  font-size: .8rem;
}
.seo-col input,
.seo-col textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  border: 0;
  background: var(--soft);
  border-radius: 10px;
  color: var(--ink);
  font: 400 .95rem/1.45 Inter, sans-serif;
}
.seo-col textarea { min-height: 5.2rem; resize: vertical; }
.seo-count {
  display: block;
  margin-top: .25rem;
  font-size: .75rem;
  color: var(--muted);
}
.seo-count.is-long { color: var(--orange); }
.seo-google {
  margin-top: .4rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: #f7f8fa;
}
.seo-google-url {
  margin: 0 0 .15rem;
  color: #202124;
  font-size: .78rem;
}
.seo-google-title {
  margin: 0 0 .2rem;
  color: #1a0dab;
  font-size: 1.15rem;
  line-height: 1.3;
}
.seo-google-desc {
  margin: 0;
  color: #4d5156;
  font-size: .82rem;
  line-height: 1.45;
}
.seo-social {
  overflow: hidden;
  margin: .2rem 0 .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.seo-social-img {
  position: relative;
  aspect-ratio: 1.91 / 1;
  background: var(--soft);
}
.seo-social-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.seo-social-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}
.seo-social-body { padding: .7rem .9rem .85rem; }
.seo-social-host {
  margin: 0 0 .15rem;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.seo-social-title {
  margin: 0 0 .2rem;
  font-size: .95rem;
  line-height: 1.3;
  font-weight: 700;
}
.seo-social-desc {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}
.format-help { margin-top: 2rem; font-size: .9rem; }
.format-help summary { cursor: pointer; color: var(--muted); }
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 2rem;
  color: var(--muted);
  font-size: .85rem;
}
.help-grid b { color: var(--ink); }
.live-controls {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.live-controls p { color: var(--muted); font-size: .85rem; }
.live-controls button { display: block; margin-top: .8rem; padding-left: 0; }
.preview-panel { display: none; min-width: 0; background: #f1f1f1; }
.preview-label {
  font-size: .8rem;
  text-align: center;
  padding: .7rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
#preview {
  display: block;
  width: 100%;
  height: calc(100vh - 210px);
  min-height: 600px;
  border: 0;
  background: #fff;
}
.editing-surface[data-view="split"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editing-surface[data-view="split"] .writing { padding: 2rem; }
.editing-surface[data-view="split"] .preview-panel,
.editing-surface[data-view="preview"] .preview-panel { display: block; }
.editing-surface[data-view="preview"] .writing { display: none; }
.error { color: #b42419; }
.error:empty { display: none; }
#editor-error { margin: 1rem 2rem; padding: 1rem; background: #fff0ed; }
.login { width: min(90%, 420px); margin: 6vh auto 12vh; }
.reader .login h1,
.admin .login h1 {
  font: 400 clamp(42px, 6vw, 80px)/1.1 var(--display);
  color: var(--orange);
  margin: 0 0 1rem;
}
.login > p { color: var(--muted); }
.login form { margin-top: 2rem; }
.login input { display: block; width: 100%; margin: .5rem 0 1rem; }
.login button.primary {
  width: 100%;
  min-height: 64px;
  border-radius: 20px;
  font: 700 28px/1 var(--ui);
}
.setup-note {
  font-size: .85rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
dialog {
  max-width: 470px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 20px 80px #0003;
}
dialog::backdrop { background: #0005; }
dialog h2 { margin-top: 0; font-size: 1.4rem; }
dialog form > div {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.preview-document .hero { min-height: 220px; }
.preview-document .hero h1 { font-size: 64px; padding: 80px 0 48px; }
.preview-document .cover-stage { height: 280px; }
.preview-document .article-body { font-size: 22px; }

@media (min-width: 1400px) {
  .reader .article-body { padding-right: 0; }
  .reader .article-retell-bar,
  .reader .article-body > .sidenote {
    float: right;
    clear: right;
    width: 289px;
    margin: .3rem -379px 1.5rem 40px;
  }
  .reader .has-sidenote > .sidenote-rail {
    position: absolute;
    left: 100%;
    top: .35em;
    width: 289px;
    margin: 0 0 0 90px;
  }
}
@media (min-width: 1700px) {
  body.admin .visual-page .has-sidenote > .sidenote-rail {
    position: absolute;
    left: 100%;
    top: 0;
    width: 240px;
    margin: 0 0 0 28px;
  }
  body.admin .visual-page .sidenote-rail .sidenote {
    background: transparent;
    border: 0;
    padding: 0;
  }
}
@media (min-width: 1500px) {
  .workspace { grid-template-columns: 290px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 230px minmax(0, 1fr); }
  .editor-top { padding: .7rem 1rem; flex-wrap: wrap; }
  .writing { padding: 1.2rem 0 3rem; }
  .media-grid,
  .editor-meta,
  .style-grid,
  .seo-grid { grid-template-columns: 1fr; }
  .login-btn { padding: 14px 28px; }
  .site-nav { gap: 18px; }
}
@media (max-width: 800px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 0;
    padding: 12px 0 0;
    overflow: hidden;
  }
  .login-btn {
    grid-column: 2;
    grid-row: 1;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-right: var(--page-pad);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
  }
  .login-btn:hover { background: transparent; color: var(--ink); }
  .login-btn-label { display: none; }
  .login-btn-icon { display: block; }
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    gap: 28px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 2px var(--page-pad) 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .hero { min-height: 0; }
  .cover-stage {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: min(70vw, 360px);
  }
  .hero h1 {
    width: calc(100% - 2 * var(--page-pad));
    padding: 28px 0 36px;
  }
  .article-reading,
  .article-body { width: calc(100% - 2 * var(--page-pad)); }
  .article-reading .article-body { width: auto; }
  .sidenote,
  .sidenote-rail > .sidenote {
    float: none;
    width: auto;
    margin: .5rem 0 1rem;
    padding: 0 0 0 14px;
    border-left: 2px solid #ececec;
  }
  .sidenote-rail { margin-top: .55rem; }
  .sidenote-where { display: none; }
  .article-body p,
  .article-body .lead,
  .article-body .loud,
  .article-body .foot,
  .article-body ul,
  .article-body ol,
  .has-sidenote { margin-bottom: 24px; }
  .article-body h2,
  .article-body h3,
  .article-body h4 { margin-top: 1.7em; }
  .article-body .pullquote,
  .article-body blockquote {
    padding-left: 12px;
    margin-top: -16px;
  }
  .feature-stage { min-height: 0; }
  .feature-head,
  .feature-lead,
  .feature-read {
    width: calc(100% - 2 * var(--page-pad));
    padding: 0;
  }
  .feature-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .admin-header {
    padding: 1rem;
    height: auto;
    align-items: flex-start;
  }
  .header-actions {
    gap: .2rem;
    flex-direction: column;
    align-items: flex-end;
  }
  .workspace { display: block; }
  .posts-panel {
    padding: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .posts-panel h2 { margin: 1rem 0 .4rem; }
  #posts-list { max-height: 160px; overflow: auto; }
  .editor-top { position: sticky; top: 0; background: #fff; z-index: 2; }
  .publish-actions { width: 100%; }
  .publish-actions button { flex: 1; }
  .writing { padding: 1.2rem 0 3rem; }
  .format-toolbar { position: static; }
  .editor-meta { display: block; }
  .editor-meta label { margin-bottom: .8rem; }
  .writing-bottom { flex-direction: column; gap: .3rem; }
  .help-grid { grid-template-columns: 1fr; }
}
