/* The writing surface. The editor body itself is @quickish/composer — its own
   stylesheet is loaded alongside this one and owns the marks, chips and images
   inside the text. What is here is the blog's chrome around it. */

.ed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ed-kicker {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.gate {
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 18px;
}

.gate b { color: var(--fg); }

.note {
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--card);
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--dim);
  margin: 0 0 14px;
}

.note b { color: var(--fg); }

/* ---- hero picker ---- */

.hero-edit { margin: 0 0 14px; }

.hero-drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
  cursor: pointer;
  color: var(--dim);
  transition: border-color .12s, background .12s;
}

.hero-drop:hover { border-color: var(--accent); background: var(--card); }
.hero-drop .hero-drop-ic { font-size: 19px; display: block; margin-bottom: 4px; }
.hero-drop .hero-drop-t { font: 600 14px var(--sans); color: var(--fg); display: block; }
.hero-drop .hero-drop-s { font-size: 11.5px; display: block; margin-top: 3px; }

.hero-set img, .hero-set video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  background: #000;
}

.hero-set-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-alt {
  flex: 1;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  padding: 8px 11px;
  font: 400 13px var(--sans);
  outline: none;
}

.hero-alt:focus { border-color: var(--accent); }

.hero-status { font-size: 12px; color: var(--dim); }
.hero-status.err { color: var(--danger); }
.hero-status.ok { color: var(--accent); }

/* ---- title ---- */

.ti {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--fg);
  font: 800 clamp(26px, 5vw, 40px)/1.1 var(--sans);
  letter-spacing: -.02em;
  padding: 8px 0;
  margin-bottom: 4px;
}

.ti::placeholder { color: var(--faint); }

/* ---- composer ----
   The blog frames the shared composer rather than restyling it: no border or
   background of its own, so writing a post looks like the post it will become. */

.quick-composer.rich {
  border: 0;
  background: transparent;
  border-radius: 0;
}

.quick-composer.rich:focus-within { border: 0; box-shadow: none; }

.toolbar {
  position: sticky;
  top: 66px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 10px 0 14px;
}

.tb {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  font: 600 13px var(--mono);
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .12s;
}

.tb:hover { background: var(--chip); border-color: var(--line-2); }
.tb.is-active { background: var(--chip); border-color: var(--accent); color: var(--accent); }
.tb.bold { font-weight: 800; }
.tb.italic { font-style: italic; }
.tb.code { font-family: var(--mono); }

.tb-div { width: 1px; align-self: stretch; background: var(--line); margin: 4px 3px; }

.quick-composer.rich .editor {
  min-height: 320px;
  padding: 6px 2px 40px;
  font: 400 18px/1.72 var(--sans);
  color: var(--fg);
  max-width: 75ch;
}

.quick-composer.rich .editor.is-empty::before { color: var(--faint); padding: 6px 2px; }
.quick-composer.rich .editor h2 { font: 700 27px/1.25 var(--sans); margin: 30px 0 10px; }
.quick-composer.rich .editor h3 { font: 700 21px/1.3 var(--sans); margin: 24px 0 8px; }
.quick-composer.rich .editor p { margin: 0 0 16px; }
.quick-composer.rich .editor ul, .quick-composer.rich .editor ol { padding-left: 24px; margin: 0 0 16px; }

.quick-composer.rich .editor img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px 0;
  border: 1px solid var(--line);
}

.quick-composer.rich .editor blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
  color: var(--dim);
  font-style: italic;
}

.quick-composer.rich .editor a { color: var(--accent); text-decoration: underline; }

.quick-composer.rich .editor code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.ed-hint { font-size: 12px; color: var(--faint); margin: 0 0 4px; }

/* ---- actions ---- */

.ed-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.ed-status { font-size: 13px; color: var(--dim); margin-left: auto; }
.ed-status.err { color: var(--danger); }
.ed-status.ok { color: var(--accent); }

@media (max-width: 560px) {
  .toolbar { top: 60px; }
}
