:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #687084;
  --line: #dfe3ea;
  --surface: #ffffff;
  --soft: #f6f8fb;
  --accent: #1a6c7a;
  --accent-dark: #10515d;
  --danger: #a93131;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Montserrat, Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.admin-header,
.site-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.admin-header nav,
.site-admin-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-header a,
.site-admin-header a {
  color: var(--ink);
  text-decoration: none;
}

.admin-view-nav button {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.admin-view-nav button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: #eef5f6;
  border-color: #c7dadd;
}

.admin-layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.editor-panel,
.posts-panel,
.media-panel,
.analytics-panel,
.messages-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-actions p {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 13px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.editor-panel {
  padding: 28px;
}

.posts-panel,
.media-panel,
.analytics-panel,
.messages-panel {
  padding: 24px;
}

.admin-workspace[hidden] {
  display: none;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.editor-panel > .panel-title {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.editor-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-header-actions #save-state {
  max-width: 280px;
  margin-right: 6px;
  text-align: right;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

.post-form {
  display: block;
}

.editor-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.editor-main-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.title-field input {
  min-height: 64px;
  padding: 12px 2px;
  color: #111827;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cfd5df;
  border-radius: 0;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
}

.title-field input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.excerpt-field textarea {
  min-height: 92px;
  background: #fbfcfe;
}

.editor-inspector {
  position: sticky;
  top: 18px;
  display: grid;
  overflow: hidden;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inspector-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.inspector-section:last-child {
  border-bottom: 0;
}

.inspector-section h2 {
  font-size: 15px;
  font-weight: 700;
}

.inspector-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.featured-image-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  color: var(--muted);
  background: #edf2f7;
  border: 1px dashed #c7d0dc;
  border-radius: 6px;
  font-size: 12px;
}

.featured-image-preview img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfd5df;
  border-radius: 6px;
  outline: none;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

.media-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.blog-editor {
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfd5df;
  border-radius: 8px;
}

.blog-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}

.blog-editor-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.blog-editor-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.editor-mode-tabs {
  display: inline-flex;
  padding: 3px;
  background: #eef3f6;
  border: 1px solid #d9e3e8;
  border-radius: 7px;
}

.editor-mode-tabs button {
  min-height: 32px;
  padding: 6px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.editor-mode-tabs button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.08);
}

.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.editor-toolbar select {
  width: auto;
  min-width: 132px;
  min-height: 34px;
  padding: 5px 30px 5px 10px;
  font-size: 13px;
}

.editor-toolbar button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
}

.editor-toolbar button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.editor-toolbar button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #dce3ea;
}

.editor-canvas {
  background: #f6f8fb;
  padding: 18px;
}

.rich-editor,
.editor-source {
  width: 100%;
  min-height: 520px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  color: #1c2537;
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 7px;
  outline: none;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.rich-editor {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
}

.rich-editor:focus,
.editor-source:focus {
  border-color: var(--accent);
  box-shadow: 0 18px 52px rgba(23, 32, 51, 0.08), 0 0 0 3px rgba(26, 108, 122, 0.14);
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #96a0b2;
}

.rich-editor h2,
.rich-editor h3,
.rich-editor p,
.rich-editor pre,
.rich-editor blockquote,
.rich-editor ul,
.rich-editor ol,
.rich-editor figure {
  margin-top: 0;
}

.rich-editor h2 {
  margin-bottom: 0.65em;
  color: #111827;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 600;
}

.rich-editor h3 {
  margin-bottom: 0.7em;
  color: #172033;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 23px;
  line-height: 1.3;
  font-weight: 600;
}

.rich-editor p,
.rich-editor pre,
.rich-editor blockquote,
.rich-editor ul,
.rich-editor ol,
.rich-editor figure {
  margin-bottom: 1.25em;
}

.rich-editor ul,
.rich-editor ol {
  padding-left: 1.35em;
}

.rich-editor li + li {
  margin-top: 0.35em;
}

.rich-editor pre {
  white-space: pre-wrap;
  padding: 18px 22px;
  overflow-x: auto;
  color: #3f4a5f;
  background: #f1f5f8;
  border-radius: 7px;
  font: 15px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.rich-editor blockquote {
  margin-left: 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--accent);
  color: #3f4a5f;
  font-size: 19px;
}

.rich-editor figure {
  margin-left: 0;
  margin-right: 0;
}

.rich-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 7px;
  cursor: pointer;
}

.rich-editor img.is-editor-selected {
  outline: 3px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.rich-editor figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 12px;
  text-align: center;
}

.editor-preview {
  pointer-events: none;
}

.editor-empty-preview {
  color: var(--muted);
  font-family: Montserrat, Arial, sans-serif;
}

.editor-source {
  display: block;
  resize: vertical;
  color: #263044;
  font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.gallery-manager {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-heading,
.media-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-heading span,
.media-library-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.gallery-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.upload-button input {
  display: none;
}

.gallery-strip {
  display: grid;
  grid-auto-columns: 152px;
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  overscroll-behavior-x: contain;
}

.media-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.media-tools {
  display: grid;
  grid-template-columns: minmax(260px, 520px) 1fr;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

.media-tools .library-summary {
  margin: 0;
  text-align: right;
}

.media-selection-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.media-selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.media-load-more {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.media-tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.media-tile.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.18);
}

.media-select {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 6px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.media-select input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.media-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf2f7;
  cursor: zoom-in;
}

.media-tile figcaption {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.media-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.tile-actions button {
  min-height: 32px;
  padding: 5px 8px;
  color: var(--accent);
  background: #fff;
  border: 1px solid #bdd3d8;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.2;
}

.tile-actions button[data-action="remove"],
.tile-actions button[data-action="delete-upload"] {
  color: var(--danger);
  border-color: #e6c4c4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.14);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.text-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button,
.text-button {
  color: var(--accent);
  background: #fff;
  border-color: #bdd3d8;
}

.danger-button {
  color: var(--danger);
  background: #fff;
  border-color: #e6c4c4;
}

#save-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.posts-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.compact-field {
  margin-bottom: 14px;
}

.admin-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-tools .compact-field {
  margin-bottom: 0;
}

.quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.quick-filters button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--accent);
  background: #fff;
  border: 1px solid #bdd3d8;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.quick-filters button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-actions .ghost-button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

.library-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.analytics-metric {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.analytics-metric span {
  color: var(--muted);
  font-size: 13px;
}

.analytics-metric strong {
  color: #000f2b;
  font-size: 30px;
  line-height: 1;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.analytics-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.analytics-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.analytics-daily,
.analytics-pages {
  display: grid;
  gap: 10px;
}

.analytics-daily-row,
.analytics-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.analytics-daily-row:first-child,
.analytics-page-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.analytics-daily-row span,
.analytics-page-row p,
.analytics-page-counts span {
  color: var(--muted);
  font-size: 13px;
}

.analytics-page-row h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.analytics-page-row a {
  color: var(--accent);
  font-size: 13px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.analytics-page-row p {
  margin: 4px 0 0;
}

.analytics-page-counts {
  display: grid;
  gap: 4px;
  min-width: 88px;
  text-align: right;
}

.analytics-page-counts strong {
  color: #000f2b;
  font-size: 20px;
}

.messages-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.message-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-card.is-unread {
  border-left: 4px solid var(--accent);
}

.message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-meta h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.message-card.is-unread .message-meta h3::after {
  content: " · New";
  color: var(--accent);
  font-size: 13px;
}

.message-contact,
.message-meta time {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.message-contact a {
  color: var(--accent);
}

.message-meta time {
  flex-shrink: 0;
}

.message-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.post-row-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.post-select {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 22px;
}

.post-select input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.post-select span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.post-row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.source-link {
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5f6;
  color: var(--accent-dark);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-selector {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 20, 0.62);
}

.image-selector[hidden] {
  display: none;
}

.image-selector-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
  max-height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 90px rgba(8, 12, 20, 0.34);
}

.image-selector-header,
.image-selector-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.image-selector-header {
  border-bottom: 1px solid var(--line);
}

.image-selector-header h2 {
  font-size: 24px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--muted);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.image-selector-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 16px 20px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
 
.image-selector-upload-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.image-selector-upload {
  min-width: 176px;
}

.image-selector-upload-state {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.image-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 20px;
  background: #f6f8fb;
}

.image-choice {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.image-choice:hover,
.image-choice[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.12);
}

.image-choice img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf2f7;
  border-radius: 5px;
}

.image-choice-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-choice-source {
  color: var(--muted);
  font-size: 12px;
}

.image-selector-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.image-selector-actions .primary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.posts-page {
  background: #fff;
  min-height: calc(100vh - 92px);
}

.cms-post-shell {
  margin: 0;
  color: #3a3a3a;
  background: #f5f5f5;
  font-family: Montserrat, Arial, sans-serif;
}

.cms-post-header {
  display: grid;
  justify-items: center;
  gap: 30px;
  min-height: 350px;
  padding: 22px 24px 42px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.cms-post-brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: #666;
  text-decoration: none;
}

.cms-post-brand img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.cms-post-header nav {
  display: flex;
  gap: 36px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.cms-post-header nav a {
  color: #555;
  font-size: 17px;
  text-decoration: none;
}

.single-post-page {
  min-height: calc(100vh - 350px);
  padding: 72px 24px 84px;
}

.single-post-article {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 118px);
  background: #fff;
}

.single-post-article h1 {
  margin: 0 0 10px;
  color: #000f2b;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.4;
}

.single-post-meta {
  margin-bottom: 38px;
  color: #1a6c7a;
  font-size: 15px;
  line-height: 1.45;
}

.single-post-meta a {
  color: #1a6c7a;
  text-decoration: none;
}

.single-post-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 28px 0 0;
}

.single-post-gallery figure {
  margin: 0;
}

.single-post-gallery--single,
.single-post-gallery:has(> figure:only-child) {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.single-post-gallery--single figure,
.single-post-gallery:has(> figure:only-child) figure {
  width: min(100%, 560px);
}

.single-post-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.single-post-gallery--single img,
.single-post-gallery:has(> figure:only-child) img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.single-post-content {
  color: #777;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

.single-post-content p {
  margin: 0 0 1.6em;
}

.single-post-content h2,
.single-post-content h3 {
  color: #000f2b;
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1.3;
}

.single-post-content h2 {
  margin-top: 1.8em;
  font-size: 28px;
}

.single-post-content h3 {
  margin-top: 1.6em;
  font-size: 25px;
}

.single-post-content img {
  display: block;
  max-width: 100%;
}

.single-post-content figure {
  margin: 28px 0;
}

/* Display sizes chosen in the post editor (figure.image-size-*). */
.entry-content figure[class*="image-size-"],
.rich-editor figure[class*="image-size-"] {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.entry-content figure[class*="image-size-"] img,
.rich-editor figure[class*="image-size-"] img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.entry-content figure.image-size-small,
.rich-editor figure.image-size-small {
  width: 33.333%;
}

.entry-content figure.image-size-medium,
.rich-editor figure.image-size-medium {
  width: 50%;
}

.entry-content figure.image-size-large,
.rich-editor figure.image-size-large {
  width: 75%;
}

.entry-content figure.image-size-full,
.rich-editor figure.image-size-full {
  width: 100%;
}

@media (max-width: 600px) {
  .entry-content figure.image-size-small {
    width: 60%;
  }

  .entry-content figure.image-size-medium,
  .entry-content figure.image-size-large {
    width: 100%;
  }
}

.single-post-content figcaption {
  margin-top: 8px;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.single-post-content blockquote {
  margin-left: 0;
  padding: 1.2em;
  color: #000;
}

.cms-public-shell .ast-mobile-menu-buttons {
  display: none;
}

.cms-public-shell .main-header-bar {
  padding: 1em 0;
  border-bottom: 1px solid #e5e5e5;
}

.cms-public-shell .ast-site-identity {
  padding: 0;
}

.cms-public-shell .site-logo-img {
  padding-right: 1em;
}

.cms-public-shell .custom-logo-link img {
  width: 80px;
  max-width: 80px;
  height: auto;
}

.cms-public-shell .site-description {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.cms-public-shell .main-header-menu .menu-link {
  color: #3a3a3a;
}

.cms-public-shell .main-header-menu .current-menu-item > .menu-link,
.cms-public-shell .main-header-menu .current_page_item > .menu-link {
  color: #1a6c7a;
}

.cms-public-shell .main-header-menu .menu-link:hover,
.cms-public-shell .main-header-menu .menu-link:focus {
  color: #1a6c7a;
}

.cms-public-shell .single-post-gallery {
  margin-top: 28px;
}

.cms-public-footer {
  padding: 48px 0;
  color: #f7f7f7;
  background: #1b1d24;
}

.cms-public-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.cms-public-footer p {
  margin: 10px 0 0;
}

.cms-public-footer a {
  color: #f7f7f7;
}

.cms-public-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 12px 24px;
}

.page-content-card {
  display: grid;
  gap: 36px;
  margin: 48px 0 72px;
  padding: clamp(24px, 5vw, 56px);
  background: #fff;
  border: 1px solid #e2e8ea;
  border-radius: 8px;
  box-shadow: 0 16px 46px rgba(23, 32, 51, 0.06);
}

.testimonies-hero {
  display: grid;
  gap: 12px;
  padding: 0 0 8px;
}

.testimonies-hero h1 {
  max-width: 840px;
  margin: 0;
  color: #000f2b;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}

.testimonies-hero p {
  max-width: 760px;
  margin: 0;
  color: #5f6670;
  font-size: 16px;
  line-height: 1.8;
}

.testimonies-eyebrow,
.testimony-card__eyebrow {
  margin: 0;
  color: #1a6c7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.testimonies-featured,
.testimonies-list {
  display: grid;
  gap: 24px;
}

.testimonies-featured h2,
.testimonies-section-header h2 {
  margin: 6px 0 0;
  color: #000f2b;
  font-size: 30px;
}

.testimony-feature,
.testimony-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 28px;
  background: #fff;
  border: 1px solid #e2e8ea;
}

.testimony-feature {
  padding: clamp(28px, 5vw, 46px);
}

.testimony-card__mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  background: #1a6c7a;
}

.testimony-feature .testimony-card__mark {
  width: 78px;
  height: 78px;
  font-size: 20px;
}

.testimony-feature h2,
.testimony-card h2 {
  margin: 8px 0 12px;
  color: #000f2b;
  font-size: 24px;
  line-height: 1.25;
}

.testimony-feature h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.testimony-feature h2 a,
.testimony-card h2 a {
  color: inherit;
  text-decoration: none;
}

.testimony-feature p,
.testimony-card p {
  margin: 0;
  color: #66717a;
  line-height: 1.75;
}

.testimony-card__link {
  display: inline-flex;
  margin-top: 18px;
  color: #1a6c7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.testimonies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.devotions-hero {
  display: grid;
  gap: 12px;
  padding: 0 0 8px;
}

.devotions-hero h1 {
  max-width: 840px;
  margin: 0;
  color: #000f2b;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}

.devotions-hero p {
  max-width: 760px;
  margin: 0;
  color: #5f6670;
  font-size: 16px;
  line-height: 1.8;
}

.devotions-eyebrow {
  margin: 0;
  color: #1a6c7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.latest-devotion,
.previous-devotions {
  display: grid;
  gap: 24px;
}

.devotions-section-header h2 {
  margin: 6px 0 0;
  color: #000f2b;
  font-size: 30px;
}

.devotion-date {
  margin: 8px 0 0;
  color: #66717a;
  font-size: 13px;
}

.latest-devotion__image {
  display: block;
  overflow: hidden;
  width: min(760px, 100%);
  margin: 0 auto;
  background: #eef3f6;
  border: 1px solid #e2e8ea;
}

.latest-devotion__image img {
  display: block;
  width: 100%;
  height: auto;
}

.latest-devotion__empty {
  padding: 48px 24px;
  color: #66717a;
  text-align: center;
  background: #fff;
  border: 1px dashed #cfd5df;
}

.latest-devotion__summary {
  max-width: 760px;
  margin: 0 auto;
  color: #66717a;
  line-height: 1.75;
}

.devotion-read-link {
  justify-self: center;
  color: #1a6c7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.devotion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.devotion-card {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8ea;
}

.devotion-card__image {
  display: block;
  background: #eef3f6;
}

.devotion-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.devotion-card__body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.devotion-card h3 {
  margin: 0;
  color: #000f2b;
  font-size: 20px;
  line-height: 1.3;
}

.devotion-card h3 a {
  color: inherit;
  text-decoration: none;
}

.devotion-card p {
  margin: 0;
  color: #66717a;
  line-height: 1.65;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--soft);
}

.login-panel {
  width: min(460px, 100%);
  padding: 34px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-panel img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 18px;
}

.login-panel h1 {
  margin-bottom: 12px;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.auth-message {
  padding: 12px;
  color: var(--danger) !important;
  background: #fff6f6;
  border: 1px solid #f0cdcd;
  border-radius: 6px;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  text-decoration: none;
}

.posts-hero {
  padding: clamp(42px, 8vw, 92px) 24px 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.posts-hero h1 {
  color: #000f2b;
  font-size: clamp(38px, 6vw, 64px);
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.category-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  color: var(--accent);
  background: #fff;
  border: 1px solid #bdd3d8;
  border-radius: 999px;
  cursor: pointer;
}

.category-tabs button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.public-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.public-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8eef2;
}

.post-carousel {
  position: relative;
  overflow: hidden;
  background: #e8eef2;
}

.post-carousel img {
  display: none;
  cursor: zoom-in;
}

.post-carousel img.is-active {
  display: block;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: rgba(23, 32, 51, 0.72);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.carousel-button[data-direction="prev"] {
  left: 10px;
}

.carousel-button[data-direction="next"] {
  right: 10px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(8, 12, 20, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1100px, 96vw);
  max-height: 86vh;
  object-fit: contain;
  background: #111827;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  cursor: pointer;
}

.public-card-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.public-card h2 {
  font-size: 20px;
  line-height: 1.3;
}

.public-card h2 a {
  color: #000f2b;
  text-decoration: none;
}

.public-card h2 a:hover {
  color: var(--accent);
}

.public-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.public-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.view-post-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.view-post-link:hover {
  background: rgba(0, 104, 122, 0.78);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cfd5df;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .public-posts {
    grid-template-columns: 1fr;
  }

  .analytics-summary,
  .analytics-layout {
    grid-template-columns: 1fr;
  }

  .editor-compose {
    grid-template-columns: 1fr;
  }

  .editor-inspector {
    position: static;
  }

  .devotion-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 921px) {
  .cms-public-shell .ast-flex.main-header-container {
    align-items: center;
    justify-content: space-between;
  }

  .cms-public-shell .ast-mobile-menu-buttons {
    display: block;
  }

  .cms-public-shell .ast-main-header-bar-alignment {
    display: none;
    width: 100%;
  }

  .cms-public-shell.is-menu-open .ast-main-header-bar-alignment {
    display: block;
  }

  .cms-public-shell.is-menu-open .main-header-bar-navigation {
    display: block;
  }

  .cms-public-shell .main-header-menu {
    display: grid;
    width: 100%;
    padding: 12px 0 0;
  }

  .cms-public-shell .main-header-menu .menu-link {
    display: block;
    padding: 12px 0;
  }

  .cms-public-shell .main-header-menu .menu-item {
    border-top: 1px solid #e5e5e5;
  }
}

@media (max-width: 640px) {
  .admin-header,
  .site-admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .editor-panel,
  .posts-panel,
  .media-panel,
  .analytics-panel,
  .messages-panel {
    padding: 18px;
  }

  .editor-panel > .panel-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .editor-header-actions #save-state {
    order: 3;
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .title-field input {
    min-height: 56px;
    font-size: 27px;
  }

  .media-picker {
    grid-template-columns: 1fr;
  }

  .admin-tools {
    grid-template-columns: 1fr;
  }

  .media-tools {
    grid-template-columns: 1fr;
  }

  .media-tools .library-summary {
    text-align: left;
  }

  .image-selector {
    padding: 12px;
  }

  .image-selector-panel {
    max-height: calc(100vh - 24px);
  }

  .image-selector-header,
  .image-selector-actions {
    padding: 14px;
  }

  .image-selector-tools {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .image-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .cms-post-header {
    min-height: 240px;
    gap: 22px;
    padding: 20px 16px 30px;
  }

  .cms-post-brand {
    gap: 12px;
  }

  .cms-post-brand img {
    width: 64px;
    height: 64px;
  }

  .cms-post-header nav {
    gap: 18px;
  }

  .single-post-page {
    padding: 24px 10px 48px;
  }

  .single-post-article {
    padding: 24px 18px;
  }

  .single-post-article h1 {
    font-size: 26px;
  }

  .single-post-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cms-public-footer {
    padding: 34px 18px;
  }

  .cms-public-footer__inner {
    display: grid;
    gap: 22px;
  }

  .cms-public-footer nav {
    justify-content: flex-start;
  }

  .testimonies-hero {
    padding-top: 42px;
  }

  .testimonies-grid {
    grid-template-columns: 1fr;
  }

  .testimony-feature,
  .testimony-card {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .testimony-card__mark,
  .testimony-feature .testimony-card__mark {
    width: 54px;
    height: 54px;
    font-size: 14px;
  }

  .admin-layout {
    padding: 14px;
  }
}


/* Admin workspace redesign */
.admin-shell {
  --admin-panel: #ffffff;
  --admin-panel-soft: #f8fbfc;
  --admin-line: #d8e3e7;
  --admin-ink-soft: #5e6c78;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(26, 108, 122, 0.08), transparent 32rem),
    #eef3f5;
}

.admin-shell .admin-header {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--admin-line);
  box-shadow: 0 2px 14px rgba(23, 32, 51, 0.04);
}

.admin-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1540px, 100%);
  margin: 0 auto;
}

.admin-shell .brand {
  gap: 12px;
}

.admin-shell .brand img {
  width: 46px;
  height: 46px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  color: #000f2b;
  font-size: 15px;
  font-weight: 700;
}

.brand-copy small {
  color: var(--admin-ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-header-actions a {
  padding: 8px 10px;
  color: var(--admin-ink-soft);
  border-radius: 6px;
  font-size: 13px;
}

.admin-header-actions a:hover,
.admin-header-actions a:focus-visible {
  color: var(--accent-dark);
  background: #eef5f6;
}

.admin-header-actions .header-sign-out {
  margin-left: 6px;
  color: var(--danger);
}

.admin-shell .admin-app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 56px) 56px;
}

.admin-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  display: flex;
  min-height: calc(100vh - 124px);
  flex-direction: column;
  padding: 20px 14px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.05);
}

.sidebar-intro {
  padding: 0 8px 18px;
}

.sidebar-intro p:last-child {
  margin: 0;
  color: var(--admin-ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.admin-sidebar .admin-view-nav {
  display: grid;
  gap: 5px;
}

.admin-sidebar .admin-view-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--admin-ink-soft);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
}

.admin-sidebar .admin-view-nav button:hover,
.admin-sidebar .admin-view-nav button:focus-visible {
  color: var(--accent-dark);
  background: #f1f7f8;
  border-color: #d5e5e8;
}

.admin-sidebar .admin-view-nav button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: #eaf4f5;
  border-color: #c7dfe2;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  grid-row: 1 / -1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--accent);
  border: 1px solid #b9d5d9;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-label {
  font-size: 13px;
  font-weight: 700;
}

.nav-detail {
  grid-column: 2 / -1;
  color: var(--admin-ink-soft);
  font-size: 11px;
}

.nav-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 20px;
  place-items: center;
  padding: 2px 6px;
  color: var(--accent-dark);
  background: #dcecef;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 18px 8px 0;
}

.sidebar-footer p {
  margin: 0;
  color: var(--admin-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.admin-main {
  min-width: 0;
}

.admin-shell .admin-workspace {
  min-width: 0;
  padding: 28px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(23, 32, 51, 0.06);
}

.admin-shell .workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--admin-line);
}

.workspace-heading {
  min-width: 0;
}

.editor-back-button {
  min-height: 32px;
  margin-bottom: 12px;
  padding: 6px 10px;
  font-size: 12px;
}

.workspace-heading h1,
.workspace-heading h2 {
  color: #000f2b;
}

.workspace-heading h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.workspace-heading h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.workspace-heading > p:last-child {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--admin-ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.editor-header-actions {
  flex: 0 0 auto;
  align-items: center;
}

.admin-shell .editor-header-actions #save-state {
  max-width: 220px;
  margin-right: 4px;
  text-align: right;
}

.editor-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin: -8px 0 18px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-ink-soft);
  font-size: 12px;
}

.status-indicator::before {
  width: 7px;
  height: 7px;
  background: #8b9aa4;
  border-radius: 50%;
  content: "";
}

.status-indicator.is-dirty {
  color: #8a5b12;
}

.status-indicator.is-dirty::before {
  background: #d9952e;
}

.status-indicator.is-saved {
  color: #2d6d58;
}

.status-indicator.is-saved::before {
  background: #4a9c7d;
}

.editor-compose {
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 28px;
}

.editor-main-column {
  gap: 22px;
}

.title-field {
  gap: 5px;
}

.title-field span,
.excerpt-field > span {
  color: #334155;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.title-field input {
  min-height: 60px;
  padding: 9px 0 12px;
  border-bottom-color: #b9c8cf;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.title-field input::placeholder {
  color: #a3afb8;
}

.excerpt-field {
  gap: 6px;
}

.excerpt-field textarea {
  min-height: 86px;
  background: var(--admin-panel-soft);
}

.field-hint {
  color: #82909a;
  font-size: 11px;
  text-align: right;
}

.editor-details {
  background: var(--admin-panel-soft);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
}

.editor-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.editor-details > summary::-webkit-details-marker {
  display: none;
}

.editor-details > summary::after {
  color: var(--admin-ink-soft);
  content: "+";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.editor-details[open] > summary {
  border-bottom: 1px solid var(--admin-line);
}

.editor-details[open] > summary::after {
  content: "−";
}

.editor-details > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.summary-details > summary small {
  margin-right: auto;
  color: #84929b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-details > .excerpt-field {
  padding: 14px 16px 16px;
}

.admin-shell .blog-editor {
  border-color: var(--admin-line);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.04);
}

.admin-shell .blog-editor-header {
  padding: 15px 18px;
  background: #f7fafb;
  border-bottom-color: var(--admin-line);
}

.admin-shell .blog-editor-header span {
  color: #334155;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-shell .editor-toolbar {
  gap: 6px;
  padding: 9px 12px;
  background: #ffffff;
  border-bottom-color: var(--admin-line);
}

.admin-shell .editor-toolbar button {
  min-height: 32px;
  padding: 6px 9px;
}

.toolbar-label {
  display: none;
}

.admin-shell .editor-canvas {
  padding: 14px;
  background: #edf3f5;
}

.admin-shell .rich-editor,
.admin-shell .editor-source {
  min-height: 560px;
  padding: clamp(24px, 4vw, 52px);
  border-color: #d5e0e4;
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.06);
}

.admin-shell .editor-inspector {
  top: 24px;
  background: var(--admin-panel-soft);
  border-color: var(--admin-line);
  border-radius: 10px;
}

.admin-shell .inspector-section {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border-bottom-color: var(--admin-line);
}

.admin-shell .inspector-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -16px -18px 0;
  padding: 14px 18px;
  color: #1f2937;
  cursor: pointer;
  list-style: none;
}

.admin-shell .inspector-section > summary::-webkit-details-marker {
  display: none;
}

.admin-shell .inspector-section > summary::after {
  color: var(--admin-ink-soft);
  content: "+";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.admin-shell .inspector-section[open] > summary::after {
  content: "−";
}

.admin-shell .inspector-section > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.inspector-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-heading-title {
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.inspector-status,
.inspector-optional {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inspector-optional {
  color: #84929b;
  font-weight: 600;
}

.inspector-help {
  margin: -3px 0 2px;
  color: var(--admin-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.admin-shell .inspector-section label {
  gap: 6px;
}

.admin-shell .inspector-section label span {
  color: #596b76;
  font-size: 11px;
}

.admin-shell .inspector-section input,
.admin-shell .inspector-section select {
  min-height: 40px;
  padding: 8px 10px;
  border-color: #cbd9de;
  border-radius: 7px;
  font-size: 13px;
}

.post-url-preview {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--accent);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.admin-shell .featured-image-preview {
  min-height: 142px;
  border-color: #c7d7dc;
  border-radius: 8px;
}

.admin-shell .featured-image-preview img {
  height: 142px;
}

.admin-shell .inspector-actions {
  gap: 7px;
}

.admin-shell .gallery-manager {
  gap: 15px;
  padding: 18px;
  background: var(--admin-panel-soft);
  border-color: var(--admin-line);
  border-radius: 10px;
}

.admin-shell .gallery-manager > summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: -18px -18px 0;
  padding: 14px 18px;
}

.admin-shell .gallery-manager > summary::after {
  margin-left: auto;
}

.admin-shell .gallery-manager > summary .inspector-optional {
  margin-right: auto;
}

.admin-shell .gallery-content {
  display: grid;
  gap: 15px;
  padding: 0;
}

.admin-shell .gallery-heading {
  align-items: flex-start;
}

.admin-shell .gallery-heading span {
  color: #334155;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-shell .gallery-heading p {
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.admin-shell .gallery-strip {
  grid-auto-columns: 168px;
  gap: 12px;
}

.admin-shell .gallery-strip .media-tile {
  border-radius: 9px;
}

.admin-shell .gallery-strip .media-tile figcaption {
  padding: 9px;
}

.admin-shell .panel-title {
  margin-bottom: 0;
}

.library-metrics,
.media-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.library-metric {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #f7fafb;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
}

.library-metric strong {
  color: #000f2b;
  font-size: 24px;
  line-height: 1;
}

.library-metric span {
  color: var(--admin-ink-soft);
  font-size: 11px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.32fr) minmax(150px, 0.32fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.search-field,
.compact-field {
  margin-bottom: 0;
}

.search-field input,
.compact-field input,
.compact-field select {
  min-height: 42px;
}

.library-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
}

.quick-filters {
  margin: 0;
}

.quick-filters button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  border-color: #c8d9de;
  font-size: 11px;
}

.quick-filters button span {
  display: inline-grid;
  min-width: 17px;
  min-height: 17px;
  place-items: center;
  padding: 1px 4px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 10px;
}

.admin-actions {
  justify-content: flex-end;
  margin: 0;
}

.admin-shell .admin-actions .ghost-button {
  min-height: 32px;
  padding: 6px 9px;
}

.admin-shell .bulk-actions-row {
  position: sticky;
  z-index: 4;
  bottom: 14px;
  margin: 16px 0 0;
  padding: 10px 12px;
  background: rgba(247, 250, 251, 0.96);
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(23, 32, 51, 0.08);
}

.admin-shell .library-summary {
  margin: 16px 0 10px;
}

.admin-shell .post-row {
  grid-template-rows: auto auto;
  gap: 12px;
  padding: 15px;
  border-color: var(--admin-line);
  border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.admin-shell .post-row:hover {
  border-color: #b5d2d7;
  box-shadow: 0 5px 18px rgba(23, 32, 51, 0.06);
}

.admin-shell .post-row-heading {
  grid-template-columns: auto minmax(0, 1fr) 104px;
  gap: 12px;
}

.post-row-main {
  min-width: 0;
}

.post-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-shell .post-row h3 {
  color: #172033;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.post-title-button {
  display: inline;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.post-title-button:hover,
.post-title-button:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  color: #2f6b58;
  background: #e7f3ee;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-status-pill.is-draft {
  color: #8a5b12;
  background: #fff2d9;
}

.post-row-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 8px;
  color: var(--admin-ink-soft);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-row-thumb,
.post-row-thumb-empty {
  display: block;
  width: 104px;
  height: 78px;
  overflow: hidden;
  background: #e8f0f2;
  border-radius: 7px;
}

.post-row-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-row-thumb-empty {
  display: grid;
  place-items: center;
  color: #7e929c;
  font-size: 10px;
  text-align: center;
}

.admin-shell .post-meta {
  gap: 6px;
}

.admin-shell .post-meta .pill {
  min-height: 21px;
  padding: 3px 7px;
  background: #f0f5f6;
  font-size: 10px;
}

.admin-shell .row-actions {
  align-items: center;
  padding-left: 40px;
}

.admin-shell .row-actions .text-button,
.admin-shell .row-actions .danger-button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}

.media-overview {
  grid-template-columns: 160px 160px minmax(0, 1fr);
  align-items: stretch;
}

.media-upload-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 14px 16px;
  color: var(--admin-ink-soft);
  background: #f7fafb;
  border: 1px dashed #c2d4d9;
  border-radius: 9px;
  font-size: 12px;
  text-align: right;
}

.upload-button {
  display: grid;
  min-width: 184px;
  gap: 3px;
  min-height: 58px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
}

.upload-button:hover,
.upload-button:focus-within {
  background: var(--accent-dark);
}

.upload-button span {
  font-size: 12px;
  font-weight: 700;
}

.upload-button small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
}

.media-tools {
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.media-selection-tools {
  gap: 7px;
}

.media-selection-actions {
  gap: 7px;
}

.admin-shell .media-tools .library-summary {
  margin: 0;
}

.media-library {
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 12px;
}

.admin-shell .media-tile {
  border-color: var(--admin-line);
  border-radius: 9px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.admin-shell .media-tile:hover {
  border-color: #b5d2d7;
  box-shadow: 0 5px 18px rgba(23, 32, 51, 0.06);
}

.admin-shell .media-tile img {
  aspect-ratio: 4 / 3;
}

.media-tile figcaption {
  min-height: 82px;
}

.media-tile-info {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #83919a;
  font-size: 10px;
}

.media-usage {
  color: #2f6b58;
  font-weight: 700;
}

.media-usage.is-unused {
  color: #83919a;
  font-weight: 500;
}

.admin-shell .tile-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .tile-actions button {
  min-height: 30px;
  padding: 5px 6px;
  font-size: 10px;
}

.admin-shell .media-select {
  top: 7px;
  left: 7px;
}

.admin-shell .analytics-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-shell .analytics-layout {
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
}

.admin-shell .analytics-page-row > div:first-child {
  min-width: 0;
}

.admin-shell .analytics-page-row a {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .admin-shell .analytics-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-shell .analytics-card {
  border-color: var(--admin-line);
  border-radius: 10px;
}

.admin-shell .image-selector-panel {
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .admin-shell .admin-app {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-sidebar {
    position: static;
    min-height: 0;
    padding: 14px;
  }

  .sidebar-intro,
  .sidebar-footer p {
    display: none;
  }

  .admin-sidebar .admin-view-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-sidebar .admin-view-nav button {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    min-height: 52px;
  }

  .sidebar-footer {
    display: none;
  }

  .admin-shell .editor-compose {
    grid-template-columns: 1fr;
  }

  .admin-shell .editor-inspector {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-shell .inspector-section {
    border-right: 1px solid var(--admin-line);
    border-bottom: 0;
  }

  .admin-shell .inspector-section:last-child {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .admin-shell .admin-header {
    padding: 12px 16px;
  }

  .admin-header-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 2px;
  }

  .admin-header-actions a {
    padding: 6px;
    font-size: 11px;
  }

  .admin-shell .admin-app {
    padding: 12px 10px 36px;
  }

  .admin-sidebar {
    padding: 8px;
  }

  .admin-sidebar .admin-view-nav {
    gap: 3px;
  }

  .admin-sidebar .admin-view-nav button {
    grid-template-columns: 1fr;
    grid-template-rows: 24px auto;
    justify-items: center;
    min-height: 66px;
    padding: 7px 3px;
    text-align: center;
  }

  .admin-sidebar .admin-view-nav button[aria-pressed="true"] {
    box-shadow: inset 0 3px 0 var(--accent);
  }

  .nav-icon {
    grid-row: auto;
  }

  .nav-label {
    font-size: 10px;
  }

  .nav-detail,
  .nav-count {
    display: none;
  }

  .admin-shell .admin-workspace {
    padding: 18px 14px;
    border-radius: 11px;
  }

  .admin-shell .workspace-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .admin-shell .editor-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-shell .editor-header-actions #save-state {
    order: 5;
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .editor-status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-shell .editor-inspector {
    grid-template-columns: 1fr;
  }

  .admin-shell .inspector-section {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .admin-shell .inspector-section:last-child {
    border-bottom: 0;
  }

  .admin-shell .rich-editor,
  .admin-shell .editor-source {
    min-height: 420px;
    padding: 22px 18px;
  }

  .admin-shell .editor-toolbar {
    gap: 4px;
  }

  .admin-shell .editor-toolbar button {
    padding: 6px 7px;
    font-size: 11px;
  }

  .admin-shell .toolbar-divider {
    display: none;
  }

  .admin-shell .library-metrics,
  .admin-shell .analytics-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-metric {
    padding: 11px 9px;
  }

  .library-metric strong {
    font-size: 20px;
  }

  .library-metric span {
    font-size: 10px;
  }

  .library-toolbar,
  .media-tools {
    grid-template-columns: 1fr;
  }

  .library-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-shell .post-row-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .post-row-thumb,
  .post-row-thumb-empty {
    display: none;
  }

  .admin-shell .row-actions {
    padding-left: 30px;
  }

  .media-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-upload-state {
    grid-column: 1 / -1;
    justify-content: flex-start;
    text-align: left;
  }

  .admin-shell .media-selection-tools {
    justify-items: start;
  }

  .admin-shell .media-tools .library-summary {
    text-align: left;
  }

  .admin-shell .tile-actions {
    grid-template-columns: 1fr 1fr;
  }
  .admin-shell .image-selector-upload-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .admin-shell .image-selector-upload {
    width: 100%;
    min-width: 0;
  }
}

.upload-button.is-dragging {
  background: var(--accent-dark);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(26, 108, 122, 0.2);
}

.admin-shell .editor-mode-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-shell .editor-advanced-tools {
  position: relative;
}

.admin-shell .editor-advanced-tools > summary {
  min-height: 32px;
  padding: 6px 9px;
  color: var(--admin-ink-soft);
  background: #fff;
  border: 1px solid #cbd9de;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.admin-shell .editor-advanced-tools > summary::-webkit-details-marker {
  display: none;
}

.admin-shell .editor-advanced-tools > summary::after {
  margin-left: 7px;
  color: var(--accent);
  content: "+";
  font-size: 14px;
  font-weight: 400;
}

.admin-shell .editor-advanced-tools[open] > summary::after {
  content: "−";
}

.admin-shell .editor-advanced-tools > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-shell .editor-advanced-controls {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: min(460px, calc(100vw - 48px));
  padding: 9px;
  background: #f7fafb;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.12);
}

.admin-shell .editor-mode-advanced-button {
  min-height: 32px;
  padding: 6px 9px;
  color: var(--admin-ink-soft);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
}

.admin-shell .editor-mode-advanced-button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.admin-shell .focus-mode-button {
  min-height: 32px;
  padding: 6px 9px;
  color: var(--admin-ink-soft);
  border-color: #cbd9de;
  font-size: 11px;
}

.admin-shell .editor-toolbar button[data-action="remove-link"] {
  color: var(--danger);
  border-color: #e6c4c4;
}

.admin-shell .rich-editor a,
.admin-shell .editor-preview a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.admin-shell .rich-editor s {
  text-decoration-thickness: 2px;
}

.admin-shell .rich-editor hr,
.admin-shell .editor-preview hr {
  margin: 2em 0;
  border: 0;
  border-top: 2px solid #d8e3e7;
}

.admin-shell .rich-editor code,
.admin-shell .editor-preview code {
  padding: 0.15em 0.35em;
  color: #8a3f54;
  background: #f4eaf0;
  border-radius: 4px;
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-shell .rich-editor pre code,
.admin-shell .editor-preview pre code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font: inherit;
}

.admin-shell .image-selector-tools label small {
  color: #84929b;
  font-size: 10px;
  font-weight: 500;
}

.admin-shell .image-selector-upload-row {
  background: #f7fafb;
}

.admin-shell .image-selector-upload-state {
  color: var(--admin-ink-soft);
}

.editor-dialog {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 12, 20, 0.62);
}

.editor-dialog[hidden] {
  display: none;
}

.editor-dialog-panel {
  width: min(520px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: 0 24px 90px rgba(8, 12, 20, 0.34);
}

.editor-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--admin-line);
}

.editor-dialog-header h2 {
  color: #000f2b;
  font-size: 22px;
}

.editor-dialog-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.editor-dialog-form label {
  gap: 6px;
}

.editor-dialog-form label > span {
  color: #596b76;
  font-size: 12px;
}

.editor-dialog-form input[type="text"] {
  min-height: 44px;
}

.link-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-dialog-form .link-checkbox input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.editor-dialog-form .link-checkbox span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.editor-dialog-help {
  margin: 0;
  color: var(--admin-ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.editor-dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.admin-shell .blog-editor.is-fullscreen {
  position: fixed;
  inset: 14px;
  z-index: 1050;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border-color: #b9cdd2;
  box-shadow: 0 24px 90px rgba(8, 12, 20, 0.3);
}

.admin-shell.admin-editor-focus {
  overflow: hidden;
}

.admin-shell .blog-editor.is-fullscreen .editor-canvas {
  min-height: 0;
  overflow: auto;
}

.admin-shell .blog-editor.is-fullscreen .rich-editor,
.admin-shell .blog-editor.is-fullscreen .editor-source {
  min-height: calc(100vh - 210px);
  max-width: 980px;
}

.single-post-content hr {
  margin: 2.2em 0;
  border: 0;
  border-top: 2px solid #dfe7e9;
}

.single-post-content pre {
  padding: 18px 22px;
  overflow-x: auto;
  color: #3f4a5f;
  background: #f1f5f8;
  border-radius: 7px;
  font: 15px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.single-post-content code {
  padding: 0.15em 0.35em;
  color: #8a3f54;
  background: #f4eaf0;
  border-radius: 4px;
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 760px) {
  .admin-shell .editor-mode-tools {
    width: 100%;
    justify-content: space-between;
  }

  .admin-shell .editor-mode-tabs {
    flex: 1 1 auto;
    justify-content: center;
  }

  .editor-dialog {
    padding: 12px;
  }

  .editor-dialog-header {
    padding: 14px;
  }

  .editor-dialog-form {
    padding: 14px;
  }

  .editor-dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .editor-dialog-actions span {
    display: none;
  }

  .editor-dialog-actions .danger-button {
    grid-column: 1 / -1;
  }

  .admin-shell .blog-editor.is-fullscreen {
    inset: 8px;
  }
}

.admin-shell .admin-workspace [hidden] {
  display: none !important;
}


.admin-shell .editor-advanced-controls select {
  width: auto;
  min-width: 128px;
  min-height: 32px;
  padding: 5px 30px 5px 10px;
  font-size: 13px;
}
.admin-shell .editor-advanced-controls #font-family {
  min-width: 128px;
}

.admin-shell .editor-advanced-controls .toolbar-color-group {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.admin-shell .editor-advanced-controls .toolbar-color-presets {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  padding: 4px 5px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 5px;
}

.admin-shell .editor-advanced-controls .toolbar-color-preset {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid #cbd7dc;
  border-radius: 50%;
  background: var(--preset-color);
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.14);
  cursor: pointer;
}

.admin-shell .editor-advanced-controls .toolbar-color-preset:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.admin-shell .editor-advanced-controls .toolbar-color-preset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.admin-shell .editor-advanced-controls .toolbar-color-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 7px;
  color: var(--admin-ink-soft);
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.admin-shell .editor-advanced-controls .toolbar-color-control:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-shell .editor-advanced-controls .toolbar-color-control input[type="color"] {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 2px;
  background: #fff;
  border: 1px solid #cbd7dc;
  border-radius: 4px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .admin-shell .editor-advanced-controls #font-family {
    min-width: 112px;
  }

  .admin-shell .editor-advanced-controls .toolbar-color-control {
    padding-inline: 6px;
  }
}
