:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #202733;
  background: #f6f7fa;
  font-synthesis: none;
  --ink: #202733;
  --muted: #687182;
  --line: #e6e8ee;
  --accent: #3858e9;
  --light: #eef1ff;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
.button-label {
  cursor: pointer;
  border: 1px solid #dce0e8;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.5;
}
button:hover,
.button-label:hover {
  background: #f2f4fa;
  border-color: #bbc3d4;
}
button.primary,
.button-label.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 3px #26358e12;
}
button.primary:hover,
.button-label.primary:hover {
  background: #2846cf;
}
button.danger,
.danger {
  color: #bd3448;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: #626d80;
}
.text-button {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--accent);
  font-size: 13px;
}
.compact {
  padding: 8px 13px;
}
.fa-solid {
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid #8499ff;
  outline-offset: 3px;
}
.layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #161e31;
  color: #b6bfd2;
  padding: 26px 16px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.logo {
  font-size: 27px;
  font-weight: 720;
  letter-spacing: -1px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
}
.logo:hover {
  text-decoration: none;
}
.sidebar .logo {
  color: #fff;
  padding: 0 12px 25px;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 19px;
}
.logo-tag {
  font-size: 9px;
  border: 1px solid #49516a;
  color: #aeb8cd;
  letter-spacing: 1px;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: auto;
}
.sidebar-site {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 10px;
  background: #222c42;
  border: 1px solid #303b51;
  border-radius: 8px;
  margin-bottom: 12px;
}
.sidebar-site > div:last-child {
  min-width: 0;
}
.sidebar-site strong {
  font-size: 12px;
  font-weight: 600;
  color: #e9edf8;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-site small {
  font-size: 10px;
  color: #98a6c1;
}
.site-avatar {
  display: grid;
  place-items: center;
  background: #354261;
  border-radius: 7px;
  width: 30px;
  height: 32px;
  flex-shrink: 0;
  color: #b8c6fd;
}
.nav-label {
  color: #7f8da9;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
  margin: 22px 12px 10px;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.sidebar nav a {
  padding: 10px 12px;
  color: #b9c3d8;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.sidebar nav a > i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}
.sidebar nav a:hover {
  background: #25304a;
  text-decoration: none;
  color: #fff;
}
.sidebar nav a.active {
  background: #3858e9;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px #0001;
}
.nav-dot {
  height: 5px;
  width: 5px;
  background: currentColor;
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
}
.visit-site {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px 20px;
  color: #b9c3d8;
}
.visit-site i:last-child {
  margin-left: auto;
}
.sidebar-user {
  border-top: 1px solid #30384c;
  padding: 17px 4px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  border-radius: 50%;
  background: #dbe2ff;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #354b9b;
  font-weight: 700;
}
.sidebar-user > div {
  min-width: 0;
  flex: 1;
}
.sidebar-user strong {
  display: block;
  color: #e2e8f4;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user small {
  font-size: 10px;
  color: #929eb7;
}
.sidebar-user button {
  color: #9fabc3;
  width: 30px;
  flex-basis: 30px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 76px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 18px;
}
.topbar-context,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.breadcrumb {
  font-size: 12px;
  color: #7f8999;
  white-space: nowrap;
}
.breadcrumb span {
  margin: 0 12px;
  color: #c3c9d4;
}
.breadcrumb strong {
  font-weight: 550;
  color: #495367;
}
.command-trigger {
  font-size: 12px;
  border: 0;
  color: #7d8798;
  padding: 7px 8px;
}
.command-trigger kbd {
  font-size: 10px;
  background: #f5f6f9;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 14px;
}
.topbar select {
  max-width: 230px;
  min-width: 130px;
  font-size: 12px;
  background: #fafbfc;
}
.topbar #mobile-menu {
  display: none;
}
main {
  padding: 34px 38px 60px;
  max-width: 1600px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.heading h1 {
  font-size: 29px;
  font-weight: 680;
  letter-spacing: -0.8px;
  margin: 0 0 5px;
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.metric,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.metric {
  padding: 22px;
}
.metric > span {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.metric > span i {
  color: #7184ce;
}
.metric strong {
  display: block;
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 12px 0 5px;
}
.metric small {
  font-size: 11px;
  color: var(--muted);
}
.panel {
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 650;
}
.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.panel-head > a {
  font-size: 12px;
}
.panel-body {
  padding: 23px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 22px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #fafbfc;
  color: #798394;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 13px 22px;
}
td {
  padding: 17px 22px;
  font-size: 13px;
  border-top: 1px solid #eef0f4;
}
td strong {
  font-weight: 600;
  display: block;
}
td small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
td .actions button {
  padding: 5px 10px;
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #f0f2f6;
  color: #657084;
  font-weight: 550;
}
.badge:before {
  content: '';
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.badge.active,
.badge.published,
.badge.completed,
.badge.verified {
  background: #e9f7ef;
  color: #27714d;
}
.badge.staging,
.badge.draft,
.badge.queued,
.badge.pending {
  background: #fff5e3;
  color: #99671d;
}
.badge.archived,
.badge.failed,
.badge.error {
  background: #ffedf0;
  color: #b34859;
}
.badge.scheduled {
  background: #eef1ff;
  color: #5268b5;
}
.positive {
  color: #218157;
}
.negative {
  color: #bd4d5b;
}
.muted {
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty-symbol {
  display: grid;
  place-items: center;
  background: #f0f3ff;
  border: 1px solid #e3e8fa;
  border-radius: 14px;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  font-size: 22px;
  color: #7185d6;
}
.empty h3 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}
.empty p {
  max-width: 420px;
  margin: 0 auto 22px;
  font-size: 13px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input[type='search'] {
  max-width: 320px;
}
input,
select,
textarea {
  border: 1px solid #dce0e8;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
input:not([type='checkbox']):not([type='radio']):not([type='file']),
textarea {
  width: 100%;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
input::placeholder,
textarea::placeholder {
  color: #9ba3b1;
}
label {
  font-size: 12px;
  font-weight: 550;
  display: block;
  margin-bottom: 16px;
}
label > span {
  display: block;
  margin-bottom: 6px;
}
label input,
label textarea,
label select {
  font-weight: 400;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.hint,
.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
  line-height: 1.7;
}
label small {
  display: block;
  color: #7e8795;
  font-size: 10px;
  font-weight: 400;
  margin-top: 5px;
}
.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 10%, #e3e8ff, transparent 60%), #f5f7fb;
}
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 40px;
  border-radius: 16px;
  width: min(450px, calc(100vw - 40px));
  box-shadow: 0 18px 60px #22377a0c;
}
.login-card .logo {
  padding: 0 0 32px;
}
.login-card h1 {
  font-size: 24px;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.login-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 25px;
}
.login-card button {
  width: 100%;
  margin-top: 6px;
}
.login-foot {
  color: #8991a1;
  font-size: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}
.error-message,
.dialog-error {
  color: #b13249;
  font-size: 13px;
  white-space: pre-wrap;
}
.error-message:empty,
.dialog-error:empty {
  display: none;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.loading-ring {
  width: 18px;
  height: 18px;
  border: 2px solid #dce2ff;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  width: min(620px, calc(100vw - 32px));
  padding: 28px;
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 24px 80px #14213f30;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #111b365b;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin: 0 0 22px;
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 650;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.dialog-heading button {
  margin-right: -8px;
}
.wide-dialog {
  width: min(1140px, calc(100vw - 40px));
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 28px;
  background: #172139;
  color: #fff;
  border-radius: 9px;
  padding: 13px 20px;
  z-index: 100;
  box-shadow: 0 5px 30px #0002;
  max-width: calc(100vw - 40px);
  display: none;
  font-size: 13px;
}
#toast.visible {
  display: block;
}
.command-dialog {
  padding: 0;
}
.command-search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: #8b96aa;
}
.command-search input {
  border: 0;
  padding: 0;
  outline: none;
}
.command-search button {
  color: #7c879a;
}
#command-results {
  padding: 10px;
  max-height: 450px;
  overflow: auto;
}
#command-results button {
  display: flex;
  justify-content: flex-start;
  border: 0;
  width: 100%;
  padding: 13px;
  gap: 14px;
  font-size: 13px;
}
#command-results button i:last-child {
  margin-left: auto;
  color: #c0c7d7;
}
.content-library {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.content-tabs {
  display: flex;
  gap: 28px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.content-tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 18px 0 16px;
  color: #778092;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.content-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.content-tabs button span {
  font-size: 10px;
  background: #f0f2f7;
  color: #7b879b;
  padding: 1px 6px;
  border-radius: 4px;
}
.content-tabs button.active span {
  background: #eef1ff;
  color: var(--accent);
}
.content-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  margin: 0;
  color: #929aab;
  font-weight: 400;
  max-width: 370px;
  flex: 1;
  background: #fff;
}
.search-field input {
  border: 0;
  padding: 10px 0;
  background: none;
  min-width: 0;
  font-size: 12px;
}
.search-field:focus-within {
  outline: 2px solid #a5b4ff;
}
.search-field input:focus-visible {
  outline: none;
}
.sort-label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #909aaa;
  margin: 0;
}
.sort-label select {
  border: 0;
  font-size: 11px;
}
.posts-table th:first-child,
.posts-table td:first-child {
  width: 42px;
  padding-left: 24px;
  padding-right: 10px;
}
.posts-table td {
  padding-top: 20px;
  padding-bottom: 20px;
}
.post-cell {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 200px;
  max-width: 480px;
  white-space: normal;
}
.post-cell > div {
  min-width: 0;
}
.post-cell strong {
  font-size: 13px;
  color: #263044;
}
.post-cell a:hover strong {
  color: var(--accent);
}
.post-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
  font-size: 10px;
}
.post-type-icon {
  width: 34px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid #e7eaf4;
  border-radius: 7px;
  background: #f6f8fe;
  color: #8090c6;
  flex-shrink: 0;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.row-actions .icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 12px;
}
.content-pagination {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px;
  color: #8a93a3;
  font-size: 11px;
}
.content-pagination .actions {
  gap: 12px;
}
.content-bulk {
  background: #f0f3ff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.content-bulk button {
  padding: 5px 10px;
  font-size: 11px;
}
.welcome-card {
  background: linear-gradient(115deg, #eef1ff, #f8faff);
  border: 1px solid #dfe5fc;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.welcome-card h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin: 6px 0 10px;
  font-weight: 650;
}
.welcome-card p {
  max-width: 500px;
  color: #77829a;
  font-size: 13px;
  margin: 0 0 20px;
}
.welcome-art {
  color: #bac6ff;
  font-size: 70px;
  padding-right: 30px;
  transform: rotate(-13deg);
}
.welcome-card .eyebrow {
  color: #7083c7;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
}
.recent-item:last-child {
  border: 0;
}
.recent-item > div {
  min-width: 0;
  flex: 1;
}
.recent-item strong {
  font-size: 13px;
  color: var(--ink);
  display: block;
}
.recent-item small {
  font-size: 10px;
  color: var(--muted);
}
.recent-item > a:last-child {
  font-size: 12px;
}
.quick-links {
  display: grid;
}
.quick-links a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  color: #56627a;
}
.quick-links a:last-child {
  border: 0;
}
.quick-links a > i:first-child {
  color: #8193d5;
  width: 20px;
}
.quick-links a > i:last-child {
  margin-left: auto;
  color: #b6bfd1;
}
.quick-links strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.quick-links small {
  font-size: 10px;
  color: #8b94a4;
}
.editor-shell {
  display: block;
  height: 100vh;
  overflow: hidden;
}
.editor-shell > .sidebar,
.editor-shell .topbar {
  display: none;
}
.editor-shell .workspace {
  height: 100%;
}
.editor-main-surface {
  padding: 0;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
  flex-shrink: 0;
}
.editor-top-left,
.editor-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.editor-top-left {
  min-width: 0;
}
.editor-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-right: 10px;
  color: #616d86;
}
.editor-back:hover {
  background: #f3f5fc;
}
.editor-context {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.editor-context small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #8a93a4;
  margin-top: 1px;
}
.editor-top-actions > button:not(.icon-button) {
  font-size: 11px;
  padding: 9px 13px;
}
.save-state {
  font-size: 10px;
  color: #7f8b9c;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  white-space: nowrap;
}
.save-state.saved i {
  color: #5c9b79;
}
.save-state.local {
  color: #917337;
}
.save-state.error {
  color: #c14055;
}
.save-state.saving i {
  animation: spin 1s linear infinite;
}
.toolbar-divider {
  width: 1px;
  background: var(--line);
  height: 22px;
  margin: 0 4px;
  flex-shrink: 0;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  min-height: 0;
  flex: 1;
}
.writing-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f7f8fb;
}
.writing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.format-tools {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
}
.format-tools .icon-button {
  width: 30px;
  height: 32px;
  flex-basis: 30px;
  font-size: 12px;
}
.format-tools select {
  border: 0;
  font-size: 11px;
  width: 112px;
  padding: 7px;
}
.editor-view-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f2f4f8;
  border: 1px solid #e9edf4;
  border-radius: 6px;
  padding: 3px;
}
.segmented button {
  font-size: 10px;
  padding: 5px 9px;
  border: 0;
  background: none;
  color: #7e8798;
  border-radius: 4px;
}
.segmented button.active {
  background: #fff;
  box-shadow: 0 1px 5px #18274913;
  color: #425785;
}
.writing-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 30px;
}
.writing-paper {
  max-width: 830px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e8ebf2;
  border-radius: 3px;
  min-height: calc(100vh - 240px);
  padding: 46px 60px 60px;
  box-shadow: 0 2px 7px #1c284903;
}
.document-kicker {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.7px;
  color: #8a99bc;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 21px;
}
.document-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.8px;
  line-height: 1.3 !important;
  resize: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  color: #202b43;
  min-height: 100px;
  overflow: hidden;
  background: transparent;
}
.document-title::placeholder {
  color: #bac2d2;
}
.document-title:focus-visible {
  outline: none;
  box-shadow: 0 2px #d2daff;
}
.document-byline {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: #97a0af;
  border-bottom: 1px solid #edf0f5;
  padding: 17px 0 24px;
  margin-bottom: 24px;
}
.document-byline > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
#rich-editor .toastui-editor-defaultUI {
  border: 0;
  border-radius: 0;
  font-family: inherit;
}
#rich-editor .toastui-editor-defaultUI-toolbar,
#rich-editor .toastui-editor-mode-switch {
  display: none;
}
#rich-editor .toastui-editor-main {
  min-height: 400px;
}
#rich-editor .toastui-editor-ww-container {
  overflow: visible;
  background: none;
}
#rich-editor .toastui-editor-ww-container .toastui-editor-contents {
  padding: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.9;
  color: #3d465a;
}
#rich-editor .toastui-editor-contents p {
  line-height: 1.9;
  margin: 12px 0;
}
#rich-editor .toastui-editor-contents h2 {
  font-family: Georgia, serif;
  border: 0;
  font-size: 27px;
  line-height: 1.4;
  margin-top: 30px;
  color: #24314d;
}
#rich-editor .toastui-editor-contents h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.5;
  color: #24314d;
}
#rich-editor .toastui-editor-contents blockquote {
  border-left: 3px solid #aab9fb;
  color: #687899;
  background: #f7f9ff;
  margin: 18px 0;
  padding: 4px 18px;
}
#rich-editor .toastui-editor-contents img {
  max-width: 100%;
  border-radius: 5px;
}
#rich-editor .toastui-editor-md-container {
  background: #fff;
}
#rich-editor .toastui-editor-md-container .toastui-editor {
  padding: 0;
  font-size: 14px;
  line-height: 1.9;
}
#rich-editor .toastui-editor-md-tab-container {
  display: none;
}
#rich-editor .ProseMirror:focus-visible {
  outline: none;
}
#rich-editor .toastui-editor-contents .placeholder:before {
  color: #a4adbe;
}
#rich-editor pre {
  white-space: pre;
  overflow-wrap: normal;
}
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #8b96a8;
  background: #fff;
  flex-shrink: 0;
}
.footer-separator {
  padding: 0 8px;
}
.document-sidebar {
  background: #fff;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  min-height: 0;
}
.inspector-tabs {
  position: sticky;
  top: 0;
  display: flex;
  background: #fff;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}
.inspector-tabs button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
  font-size: 11px;
  color: #8590a4;
  padding: 20px 7px;
  white-space: nowrap;
}
.inspector-tabs button[aria-selected='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.inspector-section {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.inspector-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 18px;
}
.inspector-section label:last-child,
.inspector-section p:last-child {
  margin-bottom: 0;
}
.inspector-section label {
  font-size: 11px;
}
.inspector-section input,
.inspector-section textarea,
.inspector-section select {
  font-size: 11px;
  width: 100%;
  padding: 8px 10px;
}
.inspector-section label > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inspector-section label > span small {
  margin: 0;
  color: #9aa3b4;
}
.property-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  margin: 0 0 17px;
  color: #8790a0;
}
.property-row strong {
  font-weight: 500;
  color: #52617a;
}
.slug-input {
  display: flex;
  align-items: center;
  border: 1px solid #dce0e8;
  border-radius: 6px;
  overflow: hidden;
}
.slug-input > span {
  padding: 0 10px;
  background: #f6f7fa;
  color: #909baf;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.slug-input input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}
.featured-placeholder {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  padding: 22px 12px;
  border: 1px dashed #cdd5e7;
  border-radius: 7px;
  background: #fafbff;
  color: #7c90c1;
}
.featured-placeholder > i {
  font-size: 25px;
  margin-bottom: 5px;
}
.featured-placeholder strong {
  font-size: 11px;
  font-weight: 500;
}
.featured-placeholder small {
  font-size: 9px;
  color: #99a2b5;
}
.featured-preview {
  display: block;
  padding: 0;
  overflow: hidden;
  width: 100%;
}
.featured-preview img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
}
.featured-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #939caf;
}
.featured-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.inspector-section .check-label input {
  width: 14px;
  height: 14px;
}
.category-checklist {
  max-height: 180px;
  overflow: auto;
}
.category-checklist label {
  margin-bottom: 9px;
  color: #616c80;
}
.inspector-section .text-button {
  font-size: 10px;
}
details.inspector-section summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #6b7892;
}
details.inspector-section[open] summary {
  margin-bottom: 20px;
}
.serp-card {
  padding: 15px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.serp-card > span {
  font-size: 10px;
  color: #515c70;
}
.serp-card small {
  font-size: 8px;
  color: #7a8796;
  display: block;
  margin: 3px 0 9px;
}
.serp-card strong {
  display: block;
  font-size: 16px;
  font-weight: 400;
  color: #2548a0;
  line-height: 1.4;
}
.serp-card p {
  font-size: 10px;
  color: #737d8e;
  margin: 7px 0 0;
  line-height: 1.6;
}
.outline-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.outline-numbers strong {
  font-size: 24px;
  font-weight: 500;
  color: #667699;
  background: #f7f8fd;
  border-radius: 6px;
  padding: 12px;
}
.outline-numbers small {
  font-size: 10px;
  display: block;
  color: #99a2b3;
}
#outline-list button,
.suggestion-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  justify-content: flex-start;
  font-size: 11px;
  padding: 9px 0;
  color: #626f8a;
}
#outline-list button > span {
  font-size: 9px;
  padding: 2px 4px;
  background: #f0f3fc;
  color: #899ac4;
  border-radius: 3px;
}
.suggestion-link small {
  display: block;
  font-size: 9px;
  color: #99a3b5;
  overflow-wrap: anywhere;
}
.document-sidebar.closed,
.focus-mode .document-sidebar {
  display: none;
}
.sidebar-closed,
.focus-mode .editor-layout {
  grid-template-columns: minmax(0, 1fr);
}
.focus-mode .writing-paper {
  border-color: transparent;
  box-shadow: none;
}
.focus-mode .writing-workspace {
  background: #fff;
}
.focus-mode #focus-mode {
  background: #eaf0ff;
  color: var(--accent);
}
.editor-error,
.recovery-notice {
  padding: 12px 20px;
  font-size: 11px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff2f4;
  color: #ac4055;
  flex-shrink: 0;
  border-bottom: 1px solid #f4dce2;
}
.editor-error button,
.recovery-notice button {
  font-size: 10px;
  padding: 5px 9px;
  white-space: nowrap;
}
.editor-error > span,
.recovery-notice > span {
  flex: 1;
}
.recovery-notice {
  background: #fff8e9;
  color: #8a6e37;
  border-bottom-color: #f0e3c3;
}
.read-only-head {
  display: flex;
  justify-content: space-between;
  padding: 20px;
}
.read-only-preview {
  width: 100%;
  height: 85vh;
  border: 0;
}
.preview-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.preview-controls > span {
  font-size: 11px;
  color: #8a93a4;
}
.preview-canvas {
  padding: 20px;
  background: #eef0f5;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: auto;
  display: flex;
  justify-content: center;
}
.preview-canvas iframe {
  width: 100%;
  height: 66vh;
  border: 0;
  background: #fff;
  box-shadow: 0 2px 10px #17234112;
  flex-shrink: 0;
}
.preview-canvas iframe.mobile-preview {
  width: 390px;
  max-width: 100%;
}
.publish-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f4f6ff;
  border: 1px solid #e5eafe;
  border-radius: 8px;
  padding: 24px;
  gap: 10px;
}
.publish-summary > i {
  font-size: 23px;
  color: #7c92d9;
  margin-bottom: 5px;
}
.publish-summary strong {
  font-size: 17px;
}
.publish-summary small {
  color: #8390af;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.publish-checks {
  padding: 15px 0;
}
.publish-checks p {
  display: flex;
  gap: 8px;
  font-size: 12px;
  align-items: center;
}
.publish-checks i {
  color: #73a188;
}
.publish-checks .check-warning {
  color: #92773f;
  font-size: 11px;
}
.publish-checks .check-warning i {
  color: #c9a767;
}
.media-picker-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.media-picker-toolbar .search-field {
  max-width: none;
}
.button-label {
  margin: 0;
  font-size: 12px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  max-height: 48vh;
  min-height: 200px;
  overflow: auto;
  margin: 22px 0;
}
.picker-item {
  display: block;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 2px solid var(--line);
}
.picker-item.selected {
  border-color: var(--accent);
  background: #eef2ff;
}
.picker-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: #f2f4f9;
}
.picker-item span {
  display: block;
  padding: 10px;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 50px 20px;
  color: #a0abc0;
}
.picker-empty > i {
  font-size: 36px;
  color: #b8c5e8;
}
.picker-empty h3 {
  font-size: 15px;
  color: #7282a2;
}
.picker-empty p {
  font-size: 12px;
}
.picker-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.picker-footer label {
  flex: 1;
  margin: 0;
}
.picker-footer button {
  flex-shrink: 0;
}
.media-panel {
  padding: 20px;
}
.media-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.media-toolbar .search-field {
  flex: 1 1 260px;
  max-width: 420px;
}
.media-toolbar .search-field input,
.media-toolbar .sort-label select {
  font-size: 16px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.media-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.15s;
}
.media-card:hover {
  box-shadow: 0 6px 18px #1b254014;
}
/* A fixed square frame: the image is cropped to fill it and never spills out.
   height:auto overrides the height attribute, which would otherwise win over
   aspect-ratio and stretch the image to its natural height. */
.media-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #edf0f4;
  cursor: zoom-in;
}
.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-info {
  display: grid;
  gap: 4px;
  padding: 12px 14px 4px;
  min-width: 0;
}
.media-info strong,
.media-alt {
  font-size: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.media-meta {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
.media-alt {
  color: var(--muted);
}
.media-alt.missing {
  color: #b45309;
}
.media-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  padding: 4px 8px 8px;
  margin-top: auto;
}
.media-none {
  font-size: 16px;
  color: var(--muted);
}
.media-preview {
  display: flex;
  justify-content: center;
  background: #edf0f4;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.media-preview img {
  display: block;
  max-width: 100%;
  max-height: 46vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 2px dashed #c9d0dc;
  border-radius: 10px;
  background: #f8f9fc;
  text-align: center;
  cursor: pointer;
  font-size: 16px;
}
.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--light);
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon {
  font-size: 28px;
  color: var(--accent);
}
.dropzone > span:last-child {
  color: var(--muted);
}
.upload-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.upload-list:empty {
  display: none;
}
.upload-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  min-width: 0;
}
.upload-list img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #edf0f4;
}
.upload-list span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.upload-list small {
  color: var(--muted);
  font-size: 16px;
}
.upload-list li.busy {
  opacity: 0.6;
}
.upload-list li.done small::after {
  content: ' ✓';
  color: #15803d;
}
#alt-field {
  margin-top: 16px;
}
#alt-field small,
.upload-note {
  font-size: 16px;
  color: var(--muted);
}
.upload-note {
  margin: 16px 0 0;
}
@media (max-width: 560px) {
  .media-panel {
    padding: 14px;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .media-info {
    padding: 10px 10px 2px;
  }
}
pre {
  background: #f4f6fa;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 7px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  padding: 14px 0;
  border-bottom: 1px solid #eef0f6;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.checklist li:last-child {
  border: 0;
}
.preview-frame {
  width: 100%;
  height: 65vh;
  border: 1px solid var(--line);
}
.pagination {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  gap: 10px;
}
.daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
  padding: 10px 0;
}
.daily-chart meter {
  width: 100%;
  height: 14px;
}
.chart-table {
  max-height: 300px;
  overflow: auto;
}
.seo-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-wrap: anywhere;
}
.seo-preview small {
  color: #43715e;
  font-size: 12px;
}
.seo-preview strong {
  display: block;
  font-size: 18px;
  color: #254494;
  font-weight: 500;
  margin: 5px 0;
}
.seo-preview p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
@media (min-width: 1600px) {
  .writing-paper {
    padding: 55px 80px;
  }
  .writing-toolbar {
    padding-inline: 30px;
  }
}
@media (max-width: 1250px) {
  .topbar {
    padding: 0 24px;
  }
  .breadcrumb {
    display: none;
  }
  .command-trigger kbd {
    margin-left: 4px;
  }
  main {
    padding: 28px;
  }
  .editor-top-actions {
    gap: 5px;
  }
  .save-state {
    margin-right: 3px;
  }
  .editor-context {
    max-width: 180px;
  }
  .writing-paper {
    padding: 36px;
  }
  .writing-toolbar {
    padding: 8px 16px;
  }
  .format-tools {
    gap: 0;
  }
  .format-tools .icon-button {
    width: 28px;
    flex-basis: 28px;
  }
  .document-title {
    font-size: 34px;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 18px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .welcome-art {
    font-size: 55px;
  }
}
@media (max-width: 1000px) {
  .layout:not(.editor-shell) {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 10px 15px;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar .command-trigger span,
  .topbar .command-trigger kbd {
    display: none;
  }
  .topbar select {
    max-width: 190px;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
  .sidebar-closed,
  .focus-mode .editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-top {
    padding: 12px 16px;
  }
  .editor-top-actions > #editor-undo,
  .editor-top-actions > #editor-redo,
  .editor-top-actions > .toolbar-divider {
    display: none;
  }
  .editor-context {
    max-width: 160px;
  }
  .save-state {
    font-size: 9px;
  }
  .editor-top-actions > button:not(.icon-button) {
    padding: 8px 10px;
  }
  .writing-scroll {
    padding: 20px;
  }
  .writing-paper {
    padding: 30px;
  }
  .document-title {
    font-size: 31px;
  }
  .inspector-section {
    padding: 20px;
  }
  .editor-footer > span:last-child {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .format-tools {
    gap: 2px;
  }
  .writing-toolbar {
    gap: 10px;
  }
  .editor-view-tools {
    margin-left: auto;
  }
  .content-filters {
    padding: 18px;
  }
  .content-tabs {
    gap: 20px;
    padding: 0 18px;
  }
}
@media (max-width: 760px) {
  .layout:not(.editor-shell) {
    display: block;
  }
  .layout > .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 65px;
    bottom: 0;
    width: 244px;
    height: calc(100vh - 65px);
    z-index: 10;
    box-shadow: 10px 0 40px #14234330;
  }
  .layout.menu-open > .sidebar {
    display: flex;
  }
  .topbar {
    height: 65px;
    padding: 0 14px;
    gap: 8px;
  }
  .topbar #mobile-menu {
    display: flex;
  }
  .topbar-context {
    gap: 0;
  }
  .topbar-right {
    gap: 7px;
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
  }
  .topbar .command-trigger {
    display: none;
  }
  .topbar select {
    max-width: 180px;
    min-width: 90px;
    padding: 8px;
    font-size: 11px;
  }
  .topbar .primary {
    font-size: 11px;
    padding: 9px;
  }
  .heading {
    align-items: flex-start;
    gap: 14px;
  }
  .heading h1 {
    font-size: 25px;
  }
  .heading p {
    font-size: 11px;
  }
  .heading > .actions button {
    font-size: 11px;
    padding: 9px;
  }
  .heading > .actions {
    flex-shrink: 0;
  }
  main {
    padding: 24px 18px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 25px;
  }
  .metric small {
    font-size: 10px;
  }
  .welcome-card {
    padding: 24px;
  }
  .welcome-card h2 {
    font-size: 20px;
  }
  .welcome-card p {
    font-size: 12px;
  }
  .welcome-art {
    display: none;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .content-filters {
    flex-wrap: wrap;
    gap: 12px;
  }
  .content-filters > .search-field {
    max-width: none;
    flex-basis: 100%;
  }
  .content-filters > .actions {
    width: 100%;
    justify-content: space-between;
  }
  .content-tabs {
    gap: 18px;
  }
  .content-tabs button {
    font-size: 11px;
  }
  .content-pagination {
    padding: 14px 16px;
    gap: 12px;
  }
  .posts-table td,
  .posts-table th {
    padding: 15px 12px;
  }
  .posts-table td:first-child,
  .posts-table th:first-child {
    padding-left: 16px;
  }
  .post-cell {
    min-width: 240px;
  }
  .content-bulk {
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .editor-top {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }
  .editor-top-left {
    width: 100%;
    justify-content: flex-start;
  }
  .editor-context {
    max-width: 210px;
  }
  .editor-context small {
    display: inline;
    margin-left: 10px;
  }
  .editor-back {
    width: 32px;
    height: 32px;
    margin-right: 0;
  }
  .editor-top-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 7px;
  }
  .editor-top-actions .save-state {
    margin-right: auto;
    font-size: 9px;
    max-width: 105px;
    white-space: normal;
  }
  .editor-top-actions > #save-post {
    padding: 7px;
  }
  .editor-top-actions > #save-post span {
    font-size: 10px;
  }
  .editor-top-actions > #preview {
    padding: 7px;
  }
  .editor-top-actions > #preview span {
    display: none;
  }
  .editor-top-actions > #publish {
    padding: 7px 10px;
  }
  .editor-top-actions > #publish span {
    font-size: 10px;
  }
  .editor-top-actions > .icon-button {
    width: 30px;
    flex-basis: 30px;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
  }
  .document-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 90vw);
    z-index: 5;
    box-shadow: -12px 0 35px #27345620;
  }
  .document-sidebar.closed {
    display: none;
  }
  .writing-toolbar {
    padding: 8px 10px;
    gap: 7px;
  }
  .format-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
    padding-bottom: 2px;
    gap: 2px;
  }
  .format-tools select {
    flex: 0 0 95px;
    width: 95px;
    font-size: 10px;
  }
  .format-tools .icon-button {
    width: 30px;
    flex-basis: 30px;
    height: 32px;
  }
  .editor-view-tools {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .writing-scroll {
    padding: 15px 12px;
  }
  .writing-paper {
    padding: 28px 24px;
    min-height: 600px;
  }
  .document-title {
    font-size: 30px;
    min-height: 90px;
  }
  .document-kicker {
    font-size: 8px;
    margin-bottom: 17px;
  }
  .document-byline {
    font-size: 9px;
    gap: 13px;
    flex-wrap: wrap;
  }
  #rich-editor .toastui-editor-ww-container .toastui-editor-contents {
    font-size: 16px;
  }
  .editor-footer {
    padding: 9px 14px;
  }
  .editor-error,
  .recovery-notice {
    flex-wrap: wrap;
    font-size: 10px;
    padding: 12px;
  }
  .recovery-notice > span {
    flex-basis: 80%;
  }
  .wide-dialog {
    width: calc(100vw - 20px);
    padding: 18px;
  }
  .dialog-footer {
    gap: 8px;
    flex-wrap: wrap;
  }
  .dialog-footer button {
    font-size: 11px;
  }
  .preview-controls {
    flex-wrap: wrap;
  }
  .preview-canvas {
    padding: 8px;
  }
  .preview-canvas iframe {
    height: 62vh;
  }
  .preview-controls > span {
    font-size: 10px;
  }
  .media-picker-toolbar {
    flex-wrap: wrap;
  }
  .media-picker-toolbar .search-field {
    flex-basis: 100%;
  }
  .picker-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .picker-footer label {
    flex-basis: 100%;
  }
  .picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .picker-item img {
    height: 100px;
  }
  .picker-item span {
    padding: 7px;
  }
  .recent-item {
    padding: 16px;
    gap: 10px;
  }
  .panel-head {
    padding: 18px;
  }
  .panel-head h2 {
    font-size: 13px;
  }
  .quick-links a {
    padding: 16px;
  }
  .login-card {
    padding: 30px;
  }
  dialog {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep one toolbar; the editor library toggles its own tabs with inline styles. */
#rich-editor .toastui-editor-toolbar {
  display: none !important;
}
#rich-editor .toastui-editor-md-container .ProseMirror {
  padding: 0;
  font:
    14px/1.9 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.inspector-section label,
.inspector-section input,
.inspector-section textarea,
.inspector-section select,
.inspector-section h3,
.property-row {
  font-size: 12px;
}
.field-hint,
.inspector-section label small {
  font-size: 11px;
}
.editor-top-actions > button:not(.icon-button) {
  font-size: 12px;
}
.save-state,
.editor-footer {
  font-size: 11px;
}
@media (max-width: 760px) {
  .editor-top-actions .save-state {
    font-size: 10px;
  }
  .editor-footer {
    font-size: 10px;
  }
}

.post-title-link {
  color: #28364d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.post-title-link:hover {
  color: var(--accent);
}
a.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
a.icon-button:hover {
  background: #eef2fc;
  text-decoration: none;
}
.posts-table tr.is-selected {
  background: #f6f8ff;
}

/* Isolate library z-indices below the mobile inspector. */
.writing-workspace {
  position: relative;
  isolation: isolate;
  z-index: 0;
}

/* Content stays actionable on a phone without horizontal table scrolling. */
@media (max-width: 760px) {
  .posts-table,
  .posts-table tbody {
    display: block;
    white-space: normal;
  }
  .posts-table thead {
    display: none;
  }
  .posts-table tr {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 20px 16px;
    border-top: 1px solid var(--line);
  }
  .posts-table td,
  .posts-table td:first-child {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
  }
  .posts-table .checkbox-cell {
    grid-column: 1;
    grid-row: 1 / span 4;
    width: auto;
  }
  .posts-table .post-title-cell {
    grid-column: 2;
    grid-row: 1;
  }
  .posts-table .post-cell {
    min-width: 0;
    max-width: 100%;
    gap: 10px;
  }
  .posts-table .post-cell small {
    max-width: 220px;
    font-size: 9px;
  }
  .posts-table td[data-column='status'] {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
  .posts-table td[data-column='updated'] {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    text-align: right;
    font-size: 10px;
    color: var(--muted);
  }
  .posts-table td[data-column='updated'] small {
    display: inline;
    margin-left: 6px;
    font-size: 9px;
  }
  .posts-table td[data-column='site'] {
    grid-column: 2;
    grid-row: 3;
    font-size: 11px;
    color: var(--muted);
  }
  .posts-table td[data-column='actions'] {
    grid-column: 2;
    grid-row: 4;
  }
  .posts-table .row-actions {
    gap: 10px;
  }
  .posts-table .row-actions .icon-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border: 1px solid var(--line);
  }
  .inspector-section input,
  .inspector-section textarea,
  .content-filters input,
  .login input {
    font-size: 16px;
  }
}

/* Two-level navigation: websites home (global) and a single website (site). */
.sidebar nav a {
  font-size: 16px;
}
.nav-label {
  font-size: 12px;
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  color: #aeb8cd;
  font-size: 16px;
  border-radius: 7px;
}
.nav-back:hover {
  background: #25304a;
  color: #fff;
  text-decoration: none;
}
.sidebar .sidebar-site strong {
  font-size: 16px;
}
.sidebar .sidebar-site small {
  font-size: 13px;
}
.site-switch {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.site-switch > i {
  margin-left: auto;
  color: #98a6c1;
}
.site-switch:hover {
  border-color: #4a5876;
}
.site-level .site-avatar {
  font-weight: 700;
  font-size: 16px;
}
.breadcrumb {
  font-size: 16px;
}
.breadcrumb a {
  color: var(--muted);
}
.site-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.site-toolbar .search-field {
  flex: 1 1 260px;
  background: #fff;
}
.site-toolbar .search-field input {
  font-size: 16px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chips button {
  font-size: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.filter-chips button span {
  font-size: 14px;
  color: var(--muted);
}
.filter-chips button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-chips button.active span {
  color: #dfe5ff;
}
.site-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 18px;
  background: var(--light);
  border-radius: 10px;
  font-size: 16px;
}
.health-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.health-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 23px;
  font-size: 16px;
}
.health-list li + li {
  border-top: 1px solid var(--line);
}
.health-list li > i {
  font-size: 18px;
  color: #2f9e6a;
}
.health-list li.warn > i {
  color: #e3a13a;
}
.health-list li > div {
  flex: 1;
  min-width: 0;
}
.health-list strong,
.health-list small {
  display: block;
}
.health-list small {
  color: var(--muted);
  font-size: 15px;
}
.health-list a {
  font-size: 16px;
  white-space: nowrap;
}
.danger-zone {
  border-color: #f2c9cf;
}
.danger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}
.danger-row + .danger-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.danger-row small {
  display: block;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 760px) {
  .site-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .site-toolbar .search-field {
    flex: none;
  }
  .filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    min-width: 0;
    max-width: 100%;
  }
  .filter-chips button {
    flex-shrink: 0;
  }
  .danger-row {
    flex-direction: column;
    align-items: stretch;
  }
  .breadcrumb a,
  .breadcrumb span {
    display: none;
  }
}
.metric > span {
  font-size: 15px;
}
.metric small {
  font-size: 14px;
}
.heading p {
  font-size: 16px;
}

/* Websites table: built for hundreds of rows, sortable, sticky name column. */
.sites-panel .site-toolbar {
  padding: 18px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.sites-panel .site-bulk {
  margin: 0;
  border-radius: 0;
}
.sites-table th {
  padding: 0;
  font-size: 14px;
  letter-spacing: 0;
}
.sites-table th.checkbox-cell,
.sites-table th:last-child {
  padding: 12px 16px;
}
.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sort-button i {
  font-size: 12px;
  opacity: 0.35;
}
.sort-button.sorted {
  color: var(--ink);
}
.sort-button.sorted i {
  opacity: 1;
  color: var(--accent);
}
.sites-table td {
  padding: 12px 16px;
  font-size: 16px;
}
.sites-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sites-table th:has([data-sort='published']),
.sites-table th:has([data-sort='draft']),
.sites-table th:has([data-sort='scheduled']),
.sites-table th:has([data-sort='pages']),
.sites-table th:has([data-sort='seo']),
.sites-table th:has([data-sort='clicks']) {
  text-align: right;
}
.sites-table th:has([data-sort='published']) .sort-button,
.sites-table th:has([data-sort='draft']) .sort-button,
.sites-table th:has([data-sort='scheduled']) .sort-button,
.sites-table th:has([data-sort='pages']) .sort-button,
.sites-table th:has([data-sort='seo']) .sort-button,
.sites-table th:has([data-sort='clicks']) .sort-button {
  justify-content: flex-end;
}
.sites-table .checkbox-cell input {
  width: 18px;
  height: 18px;
}
.sites-table tbody tr:hover td {
  background: #fafbff;
}
.sites-table tr.is-selected td {
  background: var(--light);
}
.site-name-cell .link-button {
  display: block;
  font-size: 16px;
}
.site-name-cell a {
  display: block;
  font-size: 14px;
  color: var(--muted);
}
.sites-table .badge {
  font-size: 13px;
}
.health-cell {
  max-width: 280px;
}
.health-cell > i {
  margin-right: 8px;
}
.health-cell > span {
  white-space: normal;
}
.health-cell small {
  display: inline;
  font-size: 13px;
  color: inherit;
  font-weight: 600;
}
.health-cell.health-ok {
  color: #27714d;
}
.health-cell.health-warn {
  color: #99671d;
}
.health-cell.health-off {
  color: var(--muted);
}
.warn-text {
  color: #b34859;
  font-weight: 650;
}
.nowrap {
  white-space: nowrap;
}
.sites-table .row-actions {
  justify-content: flex-end;
}
.sites-table .row-actions button.compact {
  font-size: 15px;
  white-space: nowrap;
}
.sites-panel .content-pagination {
  font-size: 16px;
}
.sites-panel .content-pagination select {
  font-size: 16px;
}
@media (max-width: 760px) {
  .sites-panel .site-toolbar {
    padding: 14px;
  }
  /* Keep the checkbox and website name visible while scrolling the numbers. */
  .sites-table .checkbox-cell {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
  }
  .sites-table .site-name-cell,
  .sites-table th:has([data-sort='name']) {
    position: sticky;
    left: 48px;
    z-index: 1;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
    max-width: 180px;
    white-space: normal;
  }
  .sites-table th.checkbox-cell,
  .sites-table th:has([data-sort='name']) {
    background: #fafbfc;
  }
  .sites-panel .content-pagination {
    flex-wrap: wrap;
    gap: 10px;
  }
}
.sites-table .checkbox-cell {
  width: 48px;
  min-width: 48px;
}
@media (max-width: 760px) {
  .sites-table:not(:has(.checkbox-cell)) .site-name-cell,
  .sites-table:not(:has(.checkbox-cell)) th:has([data-sort='name']) {
    left: 0;
  }
}
.link-button {
  display: inline;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.link-button:hover {
  color: var(--accent);
  text-decoration: underline;
}
.sites-table th:has([data-sort='name']) .sort-button {
  justify-content: flex-start;
}
.health-cell {
  white-space: nowrap;
}
.health-cell > span {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}
.sites-table td {
  padding: 10px 12px;
}
.sort-button {
  padding: 12px;
}
.health-cell > span {
  max-width: 190px;
}
/* Row actions stay pinned to the right edge while the numbers scroll. */
.sites-table td:last-child,
.sites-table th:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -1px 0 0 var(--line);
}
.sites-table th:last-child {
  background: #fafbfc;
}
.sites-table tbody tr:hover td:last-child {
  background: #fafbff;
}
.sites-table tr.is-selected td:last-child {
  background: var(--light);
}

/* Penlum Flat theme settings form */
.theme-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 6px;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.theme-group legend {
  font-weight: 650;
  font-size: 16px;
  padding: 0 6px;
}
.theme-group input[type='color'] {
  width: 64px;
  height: 40px;
  padding: 2px;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.check-row input {
  width: 18px;
  height: 18px;
}

/* Giao diện: settings panel + live preview of the real Penlum Flat page */
.appearance {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.appearance-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 20px;
}
.appearance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.appearance-tabs button {
  font-size: 15px;
  padding: 7px 12px;
  border-radius: 999px;
}
.appearance-tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.appearance-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  font-size: 16px;
}
.appearance-form label {
  display: grid;
  gap: 6px;
  font-size: 16px;
}
.appearance-form label > span {
  font-size: 15px;
  font-weight: 600;
}
.appearance-form input:not([type='checkbox']),
.appearance-form select,
.appearance-form textarea {
  font-size: 16px;
  width: 100%;
}
.appearance-form input[type='color'] {
  height: 44px;
  padding: 2px;
}
.appearance-form h3 {
  margin: 8px 0 0;
  font-size: 16px;
}
.appearance-form .hint {
  font-size: 15px;
  margin: 0;
}
.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.block-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}
.block-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.block-card header strong {
  font-size: 16px;
}
.add-block {
  display: flex;
  gap: 8px;
}
.add-block select {
  flex: 1;
}
.appearance-preview .preview-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.appearance-preview .segmented button {
  font-size: 15px;
  padding: 7px 12px;
}
.appearance-preview .preview-canvas iframe {
  height: calc(100vh - 230px);
  min-height: 560px;
}
.dirty-state {
  font-size: 15px;
  color: #99671d;
  align-self: center;
}
@media (max-width: 1100px) {
  .appearance {
    grid-template-columns: minmax(0, 1fr);
  }
  .appearance-panel {
    position: static;
  }
  .appearance-form {
    max-height: none;
  }
}
/* Keep "Lưu thay đổi" reachable while the long settings form scrolls. */
#main:has(.appearance) > .heading {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -8px 12px;
  padding: 16px 8px 12px;
  background: #f6f7fa;
}
.appearance-panel {
  top: 110px;
}
.appearance-form {
  max-height: calc(100vh - 290px);
}
.appearance-preview .preview-canvas {
  display: block;
  overflow: hidden;
  text-align: center;
}
.appearance-preview .preview-canvas iframe,
.appearance-preview .preview-canvas iframe.mobile-preview {
  max-width: none;
  min-height: 0;
  display: block;
  margin: 0 auto;
}
.appearance-preview {
  position: sticky;
  top: 110px;
}
.appearance-preview .preview-canvas iframe,
.appearance-preview .preview-canvas iframe.mobile-preview {
  margin: 0;
}
#main:has(.appearance) > .heading {
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  .appearance-preview {
    position: static;
  }
}
@media (max-width: 760px) {
  #main:has(.appearance) > .heading {
    position: static;
    display: block;
  }
  #main:has(.appearance) > .heading .actions {
    flex-wrap: wrap;
    margin-top: 12px;
  }
}
.appearance-panel,
.appearance-preview {
  top: 122px;
}
.dropzone > span,
.dropzone strong {
  font-weight: 400;
}
.dropzone strong {
  font-weight: 650;
}
dialog:has(.dropzone) input,
dialog:has(.media-preview) input,
dialog:has(.media-preview) textarea {
  font-size: 16px;
}
.media-preview + .media-meta {
  margin-bottom: 16px;
}
