:root {
  --bg: #0f0f0f;
  --panel: #171717;
  --panel-2: #202020;
  --text: #f3f0ea;
  --muted: #b7b0a6;
  --line: #34312d;
  --accent: #f2f0ea;
  --danger: #c14b4b;
  --success: #6fbf73;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:hover { opacity: .8; }

.site-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 22px 12px;
}

.site-title {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 22px 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: .98;
  margin: 0 0 18px;
  letter-spacing: -.05em;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.15rem;
}

.page-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 22px 72px;
}

.article {
  max-width: 760px;
}

.article h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: -.04em;
}

.description {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.meta, .eyebrow {
  color: var(--muted);
  font-size: .9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  margin: 0 0 12px;
}

.content {
  margin-top: 42px;
}

.content h2 {
  font-size: 2rem;
  line-height: 1.15;
  margin: 44px 0 12px;
}

.content h3 {
  font-size: 1.45rem;
  margin: 34px 0 10px;
}

.content p, .content li {
  font-size: 1.06rem;
}

.content blockquote {
  border-left: 4px solid var(--accent);
  margin: 32px 0;
  padding: 6px 0 6px 22px;
  color: var(--muted);
}

.content pre {
  overflow-x: auto;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.content code {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.content pre code {
  border: 0;
  padding: 0;
}

.content table, .admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
}

.content th, .content td, .admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
}

.card h2 {
  margin: 0 0 8px;
  line-height: 1.1;
}

.card h2 a {
  text-decoration: none;
}

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}

.admin-wrap.narrow {
  max-width: 520px;
  padding-top: 15vh;
}

.admin-nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin: 20px 0;
}

label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}

input[type="password"], input[type="file"] {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

button {
  background: var(--accent);
  color: #090909;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 12px;
}

button:hover { opacity: .85; }
button.danger { background: var(--danger); color: #fff; }

.inline-form {
  display: inline;
}

.inline-form button {
  margin: 0;
  padding: 6px 10px;
}

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

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  margin: 14px 0;
}

.flash.success { border-color: var(--success); }
.flash.error { border-color: var(--danger); }

.preview-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.preview-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr {
    display: block;
  }

  .admin-table thead { display: none; }
  .admin-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 12px 0;
    padding: 10px;
  }

  .admin-table td { border: 0; padding: 6px 0; }
}

.admin-footer {
  color: var(--muted);
  font-size: .85rem;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.editor-header h2 {
  margin: 0 0 6px;
}

textarea {
  width: 100%;
  min-height: 640px;
  resize: vertical;
  background: #080808;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  font: 15px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

.publish-from-editor {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
}

@media (max-width: 720px) {
  .editor-header {
    display: block;
  }

  textarea {
    min-height: 520px;
  }
}

.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.action-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.action-card h3 {
  margin: 0 0 8px;
}

.button-link {
  display: inline-block;
  background: var(--accent);
  color: #090909;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .dashboard-actions-grid {
    grid-template-columns: 1fr;
  }
}

.public-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.public-nav a,
.terms a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-2);
  font-size: .86rem;
}

.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.terms.compact {
  margin-top: 12px;
}

.eyebrow a {
  color: var(--muted);
  text-decoration: none;
}

.taxonomy-heading {
  margin-bottom: 28px;
}

.taxonomy-heading h1,
.article > h1 {
  margin-top: 0;
}

.taxonomy-list,
.admin-term-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.taxonomy-list li,
.admin-term-list li {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.admin-term-list {
  margin-top: 12px;
}

.admin-term-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Bonumark editor */
.editor-panel {
  padding: 28px;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.editor-header h2 {
  margin: 0 0 8px;
  line-height: 1.15;
}

.editor-form {
  margin-top: 20px;
}

textarea,
.editor-form textarea,
textarea#markdown {
  display: block;
  width: 100%;
  min-height: 68vh;
  background: #080808;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.65;
  resize: vertical;
  tab-size: 2;
  outline: none;
}

textarea:focus,
.editor-form textarea:focus,
textarea#markdown:focus {
  border-color: var(--accent);
}

.editor-actions,
.publish-from-editor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.editor-actions button,
.publish-from-editor button {
  margin-top: 0;
}

.publish-from-editor {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.admin-footer {
  color: var(--muted);
  margin-top: 26px;
}

.flash {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--panel-2);
}

.flash.success {
  border-color: var(--success);
}

.flash.error {
  border-color: var(--danger);
}

@media (max-width: 760px) {
  .editor-header {
    display: block;
  }

  textarea,
  .editor-form textarea,
  textarea#markdown {
    min-height: 62vh;
    font-size: .95rem;
  }
}

/* Bonumark account area */
input[type="text"],
input[type="password"],
input[type="file"],
select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-form {
  max-width: 720px;
}

.field-help {
  color: var(--muted);
  font-size: .88rem;
  margin: 4px 0 14px;
}

.readonly-field {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 6px;
}

.readonly-field span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 4px;
}

.readonly-field strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}

.admin-user {
  color: var(--muted);
  font-size: .9rem;
  text-align: right;
  margin-bottom: 8px;
}

.admin-user strong {
  color: var(--text);
}

.admin-user span {
  color: var(--muted);
}

.nav-form {
  display: inline;
  margin: 0;
}

.nav-form button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.nav-form button:hover {
  color: var(--accent);
  opacity: 1;
}

.security-checks {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.security-check {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-2);
}

.security-check strong {
  display: block;
  margin-bottom: 6px;
}

.security-check span {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.security-check p {
  margin: 0;
  color: var(--muted);
}

.security-check.pass {
  border-color: var(--success);
}

.security-check.warn {
  border-color: #d99b28;
}

.security-check.fail {
  border-color: var(--danger);
}

/* Bonumark dual editor foundation */
.document-details {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 18px 0 22px;
  padding: 18px;
}

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

.details-grid .wide {
  grid-column: 1 / -1;
}

input[type="date"] {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.editor-tab,
.visual-toolbar button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 0;
  padding: 8px 12px;
}

.editor-tab.active {
  background: var(--accent);
  color: #090909;
}

.visual-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.visual-toolbar button:hover,
.editor-tab:hover {
  opacity: .85;
}

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

.visual-editor,
.visual-preview {
  width: 100%;
  min-height: 68vh;
  background: #080808;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  outline: none;
  overflow-wrap: anywhere;
}

.visual-editor:focus {
  border-color: var(--accent);
}

.visual-editor h1,
.visual-preview h1 {
  font-size: 2.2rem;
  line-height: 1.08;
  margin: 0 0 18px;
}

.visual-editor h2,
.visual-preview h2 {
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 34px 0 12px;
}

.visual-editor h3,
.visual-preview h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 28px 0 10px;
}

.visual-editor p,
.visual-preview p,
.visual-editor li,
.visual-preview li {
  font-size: 1.03rem;
}

.visual-editor blockquote,
.visual-preview blockquote {
  border-left: 4px solid var(--accent);
  color: var(--muted);
  margin: 28px 0;
  padding: 6px 0 6px 18px;
}

.visual-editor pre,
.visual-preview pre {
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  padding: 16px;
}

.visual-editor code,
.visual-preview code {
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.visual-editor pre code,
.visual-preview pre code {
  border: 0;
  padding: 0;
}

.visual-editor table,
.visual-preview table {
  width: 100%;
  border-collapse: collapse;
}

.visual-editor th,
.visual-editor td,
.visual-preview th,
.visual-preview td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .details-grid {
    grid-template-columns: 1fr;
  }

  .visual-editor,
  .visual-preview {
    min-height: 62vh;
    padding: 16px;
  }
}

/* Bonumark admin interface, WordPress-inspired application layout */
body.bonumark-admin {
  --admin-bg: #f0f0f1;
  --admin-surface: #ffffff;
  --admin-text: #1d2327;
  --admin-muted: #646970;
  --admin-border: #c3c4c7;
  --admin-sidebar: #1d2327;
  --admin-sidebar-hover: #2c3338;
  --admin-sidebar-text: #f0f0f1;
  --admin-blue: #2271b1;
  --admin-blue-dark: #135e96;
  --admin-danger: #b32d2e;
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.5;
}

body.bonumark-admin a {
  color: var(--admin-blue);
  text-underline-offset: 2px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.admin-sidebar {
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
}

.admin-brand {
  display: block;
  color: #fff !important;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.admin-sidebar-nav a,
.admin-sidebar-nav .nav-form button {
  display: block;
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--admin-sidebar-text) !important;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  padding: 10px 18px;
  text-align: left;
  text-decoration: none;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav .nav-form button:hover {
  background: var(--admin-sidebar-hover);
  opacity: 1;
}

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

.admin-topbar {
  min-height: 48px;
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
}

.admin-topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-muted);
}

body.bonumark-admin .admin-user {
  color: var(--admin-muted);
  font-size: 13px;
  margin: 0;
  text-align: right;
}

body.bonumark-admin .admin-user strong {
  color: var(--admin-text);
}

.admin-content {
  max-width: 1280px;
  margin: 0;
  padding: 26px 30px 70px;
}

.admin-page-title h1,
body.bonumark-admin h1 {
  color: var(--admin-text);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -.02em;
  margin: 0 0 22px;
}

body.bonumark-admin h2 {
  color: var(--admin-text);
}

body.bonumark-admin .panel,
body.bonumark-admin .action-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
  color: var(--admin-text);
}

body.bonumark-admin .panel {
  padding: 22px 24px;
  margin: 18px 0;
}

body.bonumark-admin .card {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}

body.bonumark-admin .meta,
body.bonumark-admin .eyebrow,
body.bonumark-admin .field-help {
  color: var(--admin-muted);
}

body.bonumark-admin .eyebrow {
  font-size: 12px;
  letter-spacing: .12em;
}

body.bonumark-admin input[type="text"],
body.bonumark-admin input[type="password"],
body.bonumark-admin input[type="file"],
body.bonumark-admin input[type="date"],
body.bonumark-admin select,
body.bonumark-admin textarea {
  background: #fff;
  color: var(--admin-text);
  border: 1px solid #8c8f94;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
  padding: 8px 10px;
}

body.bonumark-admin input:focus,
body.bonumark-admin select:focus,
body.bonumark-admin textarea:focus,
body.bonumark-admin .visual-editor:focus {
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 1px var(--admin-blue);
  outline: 2px solid transparent;
}

body.bonumark-admin button,
body.bonumark-admin .button-link,
body.bonumark-admin .primary-button {
  background: var(--admin-blue);
  border: 1px solid var(--admin-blue-dark);
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 12px;
  text-decoration: none;
}

body.bonumark-admin button:hover,
body.bonumark-admin .button-link:hover,
body.bonumark-admin .primary-button:hover {
  background: var(--admin-blue-dark);
  opacity: 1;
}

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

body.bonumark-admin .inline-form button {
  padding: 5px 9px;
}

body.bonumark-admin .flash {
  background: #fff;
  border-left: 4px solid var(--admin-blue);
  border-radius: 0;
  color: var(--admin-text);
  margin: 0 0 18px;
  padding: 12px 14px;
}

body.bonumark-admin .flash.success {
  border-color: #00a32a;
}

body.bonumark-admin .flash.error {
  border-color: var(--admin-danger);
}

body.bonumark-admin .admin-table th,
body.bonumark-admin .admin-table td {
  border-bottom: 1px solid #dcdcde;
  color: var(--admin-text);
}

body.bonumark-admin .admin-table th {
  color: #50575e;
  font-weight: 600;
}

/* Real visual editor surface */
body.bonumark-admin .editor-panel {
  padding: 0;
  overflow: hidden;
}

body.bonumark-admin .editor-header {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  margin: 0;
  padding: 20px 24px;
}

body.bonumark-admin .editor-form {
  margin: 0;
}

body.bonumark-admin .document-details {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  padding: 18px 24px 8px;
}

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

.details-grid .wide {
  grid-column: 1 / -1;
}

body.bonumark-admin .dual-editor {
  background: #fff;
  padding: 0;
}

body.bonumark-admin .editor-chrome {
  background: #f6f7f7;
  border-bottom: 1px solid var(--admin-border);
  padding: 10px 12px 0;
}

body.bonumark-admin .editor-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 -1px;
}

body.bonumark-admin .editor-tab {
  background: #f0f0f1;
  border: 1px solid var(--admin-border);
  border-bottom-color: var(--admin-border);
  color: #2c3338;
  margin: 0;
  padding: 7px 12px;
}

body.bonumark-admin .editor-tab.active {
  background: #fff;
  border-bottom-color: #fff;
  color: #000;
}

body.bonumark-admin .visual-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 0 9px;
}

body.bonumark-admin .visual-toolbar button {
  background: #fff;
  border: 1px solid var(--admin-border);
  color: #1d2327;
  margin: 0;
  min-height: 32px;
  padding: 5px 9px;
}

body.bonumark-admin .visual-toolbar button:hover {
  background: #f0f0f1;
  color: #000;
}

body.bonumark-admin .editor-mode-panel {
  background: #fff;
  padding: 0;
}

body.bonumark-admin .visual-editor,
body.bonumark-admin .visual-preview {
  background: #fff;
  color: #1d2327;
  border: 0;
  border-radius: 0;
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.75;
  min-height: 58vh;
  padding: 34px 42px;
  width: 100%;
}

body.bonumark-admin .visual-editor:empty::before {
  content: "Start writing...";
  color: #8c8f94;
}

body.bonumark-admin .visual-editor h1,
body.bonumark-admin .visual-editor h2,
body.bonumark-admin .visual-editor h3,
body.bonumark-admin .visual-preview h1,
body.bonumark-admin .visual-preview h2,
body.bonumark-admin .visual-preview h3 {
  color: #1d2327;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
}

body.bonumark-admin .visual-editor p,
body.bonumark-admin .visual-preview p {
  margin: 0 0 1.2em;
}

body.bonumark-admin .visual-editor blockquote,
body.bonumark-admin .visual-preview blockquote {
  border-left: 4px solid #dcdcde;
  color: #50575e;
  margin: 1.5em 0;
  padding: .25em 0 .25em 1.2em;
}

body.bonumark-admin textarea#body_markdown,
body.bonumark-admin .editor-form textarea#body_markdown {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #1d2327;
  font-size: 15px;
  min-height: 58vh;
  padding: 28px 34px;
}

body.bonumark-admin .editor-actions {
  background: #f6f7f7;
  border-top: 1px solid var(--admin-border);
  margin: 0;
  padding: 14px 24px;
}

body.bonumark-admin .publish-from-editor {
  background: #fff;
  border-top: 1px solid var(--admin-border);
  margin: 0;
  padding: 14px 24px 22px;
}

.sr-only {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

body.bonumark-admin .admin-footer {
  color: var(--admin-muted);
  border-top: 1px solid var(--admin-border);
  margin-top: 28px;
  padding-top: 16px;
}

@media (max-width: 860px) {
  .admin-shell {
    display: block;
  }

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

  .admin-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-sidebar-nav a,
  .admin-sidebar-nav .nav-form button {
    width: auto;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 18px;
  }

  .admin-content {
    padding: 22px 18px 54px;
  }

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

  body.bonumark-admin .visual-editor,
  body.bonumark-admin .visual-preview,
  body.bonumark-admin textarea#body_markdown {
    min-height: 54vh;
    padding: 24px 20px;
  }
}

/* Bonumark dark admin direction, v0.2.0-alpha.6 */
body.bonumark-admin {
  --admin-bg: #0b0d10;
  --admin-surface: #14171c;
  --admin-surface-2: #1b1f26;
  --admin-text: #f3f0ea;
  --admin-muted: #a8a29a;
  --admin-border: #2b3038;
  --admin-sidebar: #08090b;
  --admin-sidebar-hover: #171b21;
  --admin-sidebar-text: #f3f0ea;
  --admin-blue: #d8d2c3;
  --admin-blue-dark: #bcb3a1;
  --admin-danger: #d45b5b;
  background: var(--admin-bg);
  color: var(--admin-text);
}

body.bonumark-admin a {
  color: #efe8d8;
}

body.bonumark-admin .admin-sidebar {
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
}

body.bonumark-admin .admin-brand {
  background: #0d0f13;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text) !important;
}

body.bonumark-admin .admin-sidebar-nav a,
body.bonumark-admin .admin-sidebar-nav .nav-form button {
  color: var(--admin-sidebar-text) !important;
}

body.bonumark-admin .admin-sidebar-nav a:hover,
body.bonumark-admin .admin-sidebar-nav .nav-form button:hover {
  background: var(--admin-sidebar-hover);
  color: #ffffff !important;
}

body.bonumark-admin .admin-topbar {
  background: #101318;
  border-bottom: 1px solid var(--admin-border);
}

body.bonumark-admin .admin-topbar-title,
body.bonumark-admin .admin-user,
body.bonumark-admin .admin-user span {
  color: var(--admin-muted);
}

body.bonumark-admin .admin-user strong,
body.bonumark-admin .admin-page-title h1,
body.bonumark-admin h1,
body.bonumark-admin h2,
body.bonumark-admin h3 {
  color: var(--admin-text);
}

body.bonumark-admin .panel,
body.bonumark-admin .action-card,
body.bonumark-admin .card {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  color: var(--admin-text);
}

body.bonumark-admin .panel strong,
body.bonumark-admin .card strong,
body.bonumark-admin .action-card strong {
  color: var(--admin-text);
}

body.bonumark-admin .meta,
body.bonumark-admin .eyebrow,
body.bonumark-admin .field-help {
  color: var(--admin-muted);
}

body.bonumark-admin input[type="text"],
body.bonumark-admin input[type="password"],
body.bonumark-admin input[type="file"],
body.bonumark-admin input[type="date"],
body.bonumark-admin select,
body.bonumark-admin textarea {
  background: #0f1217;
  border-color: #3a404b;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35);
  color: var(--admin-text);
}

body.bonumark-admin input:focus,
body.bonumark-admin select:focus,
body.bonumark-admin textarea:focus,
body.bonumark-admin .visual-editor:focus {
  border-color: #d8d2c3;
  box-shadow: 0 0 0 1px #d8d2c3;
}

body.bonumark-admin button,
body.bonumark-admin .button-link,
body.bonumark-admin .primary-button {
  background: #e8e0cf;
  border-color: #c7bea9;
  color: #0b0d10;
}

body.bonumark-admin button:hover,
body.bonumark-admin .button-link:hover,
body.bonumark-admin .primary-button:hover {
  background: #f6efe0;
  border-color: #d8d2c3;
  color: #050607;
}

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

body.bonumark-admin .flash {
  background: #11151b;
  border-left-color: #d8d2c3;
  color: var(--admin-text);
}

body.bonumark-admin .flash.success {
  border-color: #6fbf73;
}

body.bonumark-admin .flash.error {
  border-color: var(--admin-danger);
}

body.bonumark-admin .admin-table th,
body.bonumark-admin .admin-table td {
  border-bottom-color: var(--admin-border);
  color: var(--admin-text);
}

body.bonumark-admin .admin-table th {
  color: var(--admin-muted);
}

body.bonumark-admin .document-details,
body.bonumark-admin .dual-editor,
body.bonumark-admin .editor-header,
body.bonumark-admin .editor-mode-panel,
body.bonumark-admin .publish-from-editor {
  background: var(--admin-surface);
  border-color: var(--admin-border);
}

body.bonumark-admin .editor-chrome,
body.bonumark-admin .editor-actions {
  background: #11151b;
  border-color: var(--admin-border);
}

body.bonumark-admin .editor-tab {
  background: #101318;
  border-color: var(--admin-border);
  color: var(--admin-muted);
}

body.bonumark-admin .editor-tab.active {
  background: var(--admin-surface);
  border-bottom-color: var(--admin-surface);
  color: var(--admin-text);
}

body.bonumark-admin .visual-toolbar button {
  background: #171b21;
  border-color: #343a45;
  color: var(--admin-text);
}

body.bonumark-admin .visual-toolbar button:hover {
  background: #222832;
  color: #ffffff;
}

body.bonumark-admin .visual-editor,
body.bonumark-admin .visual-preview {
  background: #0f1217;
  color: var(--admin-text);
}

body.bonumark-admin .visual-editor:empty::before {
  color: #7f8792;
}

body.bonumark-admin .visual-editor h1,
body.bonumark-admin .visual-editor h2,
body.bonumark-admin .visual-editor h3,
body.bonumark-admin .visual-preview h1,
body.bonumark-admin .visual-preview h2,
body.bonumark-admin .visual-preview h3 {
  color: var(--admin-text);
}

body.bonumark-admin .visual-editor blockquote,
body.bonumark-admin .visual-preview blockquote {
  border-left-color: #d8d2c3;
  color: var(--admin-muted);
}

body.bonumark-admin .visual-editor pre,
body.bonumark-admin .visual-preview pre,
body.bonumark-admin .visual-editor code,
body.bonumark-admin .visual-preview code {
  background: #08090b;
  border-color: var(--admin-border);
  color: var(--admin-text);
}

body.bonumark-admin textarea#body_markdown,
body.bonumark-admin .editor-form textarea#body_markdown {
  background: #0f1217;
  color: var(--admin-text);
}

body.bonumark-admin .preview-frame {
  background: #fff;
  border-color: var(--admin-border);
}

body.bonumark-admin .security-check,
body.bonumark-admin .readonly-field {
  background: var(--admin-surface-2);
  border-color: var(--admin-border);
}

body.bonumark-admin .readonly-field strong {
  color: var(--admin-text);
}

body.bonumark-admin .admin-footer {
  border-top-color: var(--admin-border);
  color: var(--admin-muted);
}

/* Bonumark admin workflow refinement, v0.2.0-alpha.7 */
body.bonumark-admin {
  --admin-bg: #0b0d10;
  --admin-surface: #14171c;
  --admin-surface-2: #1b1f26;
  --admin-surface-3: #101318;
  --admin-text: #f3f0ea;
  --admin-muted: #a8a29a;
  --admin-border: #2b3038;
  --admin-sidebar: #08090b;
  --admin-sidebar-hover: #171b21;
  --admin-sidebar-text: #f3f0ea;
  --admin-accent: #e8e0cf;
  --admin-accent-dark: #c7bea9;
  --admin-danger: #d45b5b;
  --admin-success: #6fbf73;
  background: var(--admin-bg);
  color: var(--admin-text);
}

body.bonumark-admin .admin-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

body.bonumark-admin .admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px;
}

.admin-brand-mark {
  align-items: center;
  background: var(--admin-accent);
  border-radius: 8px;
  color: #08090b;
  display: inline-flex;
  font-size: .95rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.admin-nav-section {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 8px 0;
}

.admin-nav-section:first-child {
  border-top: 0;
}

.admin-nav-heading {
  color: #777f89;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  padding: 10px 18px 5px;
  text-transform: uppercase;
}

body.bonumark-admin .admin-sidebar-nav a,
body.bonumark-admin .admin-sidebar-nav .nav-form button {
  border-left: 3px solid transparent;
  padding: 9px 18px 9px 21px;
}

body.bonumark-admin .admin-sidebar-nav a:hover,
body.bonumark-admin .admin-sidebar-nav .nav-form button:hover {
  border-left-color: var(--admin-accent);
}

body.bonumark-admin .admin-topbar {
  min-height: 52px;
}

body.bonumark-admin .admin-content {
  max-width: 1400px;
  padding: 28px 32px 76px;
}

.dashboard-welcome {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-welcome h2 {
  font-size: 1.85rem;
  line-height: 1.15;
  margin: 0 0 8px;
}

.dashboard-welcome-actions,
.content-toolbar,
.section-header-row,
.stacked-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-welcome-actions {
  justify-content: flex-end;
}

.section-header-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header-row h2 {
  margin-bottom: 4px;
}

.dashboard-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  color: var(--admin-text) !important;
  padding: 18px;
  text-decoration: none;
}

.stat-card span {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card strong {
  color: var(--admin-muted);
  font-size: .9rem;
}

.stat-card:hover {
  background: var(--admin-surface-2);
  opacity: 1;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}

.stacked-actions {
  align-items: flex-start;
  flex-direction: column;
}

body.bonumark-admin .button-link.secondary,
body.bonumark-admin .secondary {
  background: transparent;
  border-color: var(--admin-border);
  color: var(--admin-text);
}

body.bonumark-admin .button-link.secondary:hover,
body.bonumark-admin .secondary:hover {
  background: var(--admin-surface-2);
  border-color: var(--admin-accent-dark);
  color: #fff;
}

.content-toolbar {
  margin: -8px 0 16px;
}

.content-filter {
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 18px;
  padding-bottom: 10px;
}

.content-filter a {
  color: var(--admin-muted);
  font-weight: 700;
  text-decoration: none;
}

.content-filter a.active,
.content-filter a:hover {
  color: var(--admin-text);
}

.content-filter span {
  color: var(--admin-muted);
  font-weight: 600;
}

.content-list-panel {
  padding: 0 !important;
  overflow: hidden;
}

body.bonumark-admin .content-table {
  margin: 0;
}

.title-column strong a {
  color: var(--admin-text);
  text-decoration: none;
}

.title-column strong a:hover {
  color: #fff;
  text-decoration: underline;
}

.row-actions {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .86rem;
  gap: 6px;
  margin-top: 5px;
}

.row-actions a,
.row-actions .link-button {
  color: #d8d2c3;
  font-size: .86rem;
  text-decoration: none;
}

.row-actions a:hover,
.row-actions .link-button:hover {
  color: #fff;
  text-decoration: underline;
}

.row-form,
.inline-form.row-form {
  display: inline-flex;
  margin: 0;
}

body.bonumark-admin .link-button,
body.bonumark-admin .link-button:hover {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font-weight: 500;
  margin: 0;
  padding: 0;
}

body.bonumark-admin .danger-link,
body.bonumark-admin .danger-link:hover {
  color: #ff8989;
}

.status-pill {
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 8px;
  text-transform: uppercase;
}

.status-pill.published {
  border-color: rgba(111,191,115,.45);
  color: #9be49f;
}

.status-pill.draft {
  border-color: rgba(216,210,195,.35);
  color: #d8d2c3;
}

.empty-state {
  padding: 28px;
}

.empty-state h2 {
  margin-top: 0;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
}

body.bonumark-admin .editor-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

body.bonumark-admin .editor-header {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  margin: 0 0 18px;
  padding: 18px 20px;
}

.editor-layout-form {
  margin: 0;
}

.editor-workspace {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.editor-primary-column {
  min-width: 0;
}

.editor-sidebar-column {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 68px;
}

.editor-title-card,
.side-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 18px;
}

.editor-title-card {
  margin-bottom: 14px;
}

.editor-title-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--admin-text) !important;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.05;
  padding: 0 !important;
}

.editor-title-input:focus {
  box-shadow: none !important;
}

.permalink-row {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .9rem;
  gap: 8px;
  margin: 14px 0 8px;
}

.permalink-row code {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-text);
  padding: 4px 9px;
}

.editor-slug-input {
  max-width: 520px;
}

.side-card h3 {
  border-bottom: 1px solid var(--admin-border);
  font-size: 1rem;
  margin: -2px 0 14px;
  padding-bottom: 10px;
}

.publish-card .status-line {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.publish-card .status-line span {
  color: var(--admin-muted);
}

.publish-main-button {
  justify-content: center;
  margin-top: 0 !important;
  text-align: center;
  width: 100%;
}

.small-textarea,
body.bonumark-admin textarea.small-textarea {
  min-height: 96px !important;
  resize: vertical;
}

body.bonumark-admin .dual-editor {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  overflow: hidden;
}

body.bonumark-admin .editor-chrome {
  background: #101318;
}

body.bonumark-admin .visual-editor,
body.bonumark-admin .visual-preview,
body.bonumark-admin textarea#body_markdown,
body.bonumark-admin .editor-form textarea#body_markdown {
  min-height: 66vh;
}

body.bonumark-admin .visual-editor,
body.bonumark-admin .visual-preview {
  padding: 38px 46px;
}

.secondary-publish-row {
  align-items: center;
  background: var(--admin-surface) !important;
  border: 1px solid var(--admin-border) !important;
  border-radius: 14px;
  gap: 12px;
  margin-top: 18px !important;
  padding: 16px 18px !important;
}

@media (max-width: 1080px) {
  .editor-workspace,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .editor-sidebar-column {
    position: static;
  }

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

@media (max-width: 860px) {
  body.bonumark-admin .admin-shell {
    display: block;
  }

  body.bonumark-admin .admin-sidebar-nav {
    display: block;
  }

  .admin-nav-section {
    border-top: 1px solid rgba(255,255,255,.06);
  }

  .dashboard-welcome,
  .section-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  body.bonumark-admin .admin-content {
    padding: 22px 18px 54px;
  }

  body.bonumark-admin .visual-editor,
  body.bonumark-admin .visual-preview {
    padding: 26px 22px;
  }
}

/* Bonumark editor and dashboard polish, v0.2.0-alpha.9 */
body.bonumark-admin .dashboard-welcome-actions .primary-button,
body.bonumark-admin .dashboard-welcome-actions .button-link {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  margin: 0;
  min-height: 40px;
  padding: 9px 14px;
}

body.bonumark-admin .dashboard-welcome-actions {
  align-items: center;
}

body.bonumark-admin .editor-title-card {
  padding: 22px 20px;
}

body.bonumark-admin .permalink-card .permalink-preview-row {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  color: var(--admin-muted);
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

body.bonumark-admin .permalink-card .permalink-preview-row span {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.bonumark-admin .permalink-card .permalink-preview-row code {
  background: transparent;
  border: 0;
  color: var(--admin-text);
  display: block;
  font-size: .86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 0;
  white-space: normal;
}

body.bonumark-admin .permalink-card .editor-slug-input {
  max-width: none;
  width: 100%;
}

/* Bonumark v0.2.0-alpha.12 admin familiarity and identity refinements */
body.bonumark-admin .admin-sidebar-nav .admin-nav-heading {
  color: #8f98a3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 18px 12px 6px;
  text-transform: uppercase;
}

body.bonumark-admin .admin-sidebar-nav .nav-primary {
  margin-bottom: 8px;
}

body.bonumark-admin .admin-nav-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
  padding-top: 4px;
}

body.bonumark-admin .admin-sidebar-nav a,
body.bonumark-admin .admin-sidebar-nav .nav-form button {
  border-radius: 8px;
  display: block;
  margin: 2px 8px;
  padding: 8px 10px;
}

body.bonumark-admin .admin-sidebar-nav .nav-form {
  margin: 0;
}

body.bonumark-admin .admin-sidebar-nav .nav-form button {
  width: calc(100% - 16px);
  text-align: left;
}

.page-intro-panel h2,
.dashboard-welcome h2 {
  margin-top: 0;
}

.info-grid,
.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.theme-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
}

.info-card p,
.theme-card p {
  color: var(--muted);
  margin: 0;
}

.theme-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  height: 130px;
  margin-bottom: 16px;
}

.dark-preview {
  background: linear-gradient(135deg, #08090b 0%, #11151b 55%, #252016 100%);
}

.light-preview {
  background: linear-gradient(135deg, #f6f1e7 0%, #e5dfd2 55%, #cfc6b5 100%);
}

.active-theme {
  outline: 1px solid rgba(232, 220, 194, 0.45);
}

.muted-card {
  opacity: 0.8;
}

.static-pill,
.static-state {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 9px;
  white-space: nowrap;
}

.static-pill.generated,
.static-state.generated {
  background: rgba(111, 191, 115, 0.12);
  border-color: rgba(111, 191, 115, 0.55);
  color: #a8e3ab;
}

.static-pill.warning,
.static-state.warning {
  background: rgba(236, 178, 83, 0.12);
  border-color: rgba(236, 178, 83, 0.55);
  color: #f0d08e;
}

.static-pill.draft,
.static-state.draft {
  background: rgba(143, 152, 163, 0.12);
  color: #c6ccd4;
}

.source-card .source-row,
.readonly-settings-grid > div {
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.source-card .source-row span,
.readonly-settings-grid span {
  color: var(--muted);
  font-size: 0.86rem;
}

.source-card .source-row strong,
.source-card .source-row code,
.readonly-settings-grid code {
  max-width: 58%;
  overflow-wrap: anywhere;
  text-align: right;
}

.settings-panel form {
  max-width: 760px;
}

.settings-panel input[type="text"],
.settings-panel select,
.bonumark-admin select {
  width: 100%;
  background: #0f1217;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}

.readonly-settings-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.plain-list {
  color: var(--muted);
  margin: 14px 0 0;
}

.plain-list li {
  margin: 8px 0;
}

.import-panel input[type="file"] {
  margin-bottom: 6px;
}

.system-checks {
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .info-grid,
  .theme-card-grid {
    grid-template-columns: 1fr;
  }
}

.split-toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.toolbar-actions-left,
.toolbar-actions-right {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.content-search-form,
.bulk-actions-row,
.form-actions-row {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.content-search-form input[type="search"],
.settings-panel input[type="email"],
.settings-panel input[type="number"],
.quick-edit-panel input[type="date"],
.quick-edit-panel textarea,
.quick-edit-panel select,
.quick-edit-panel input[type="text"] {
  background: #0f1217;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
}

.content-search-form input[type="search"] {
  min-width: min(340px, 100%);
}

.bulk-content-form {
  margin-bottom: 0;
}

.check-column {
  width: 42px;
}

.source-pill {
  background: rgba(232, 220, 194, 0.08);
  border: 1px solid rgba(232, 220, 194, 0.18);
  border-radius: 999px;
  color: #e8dcc2;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.system-summary-panel {
  margin-top: 18px;
}

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

.system-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.system-summary strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.system-summary span {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
  margin-top: 6px;
}

.system-summary.pass {
  background: rgba(111, 191, 115, 0.08);
}

.system-summary.warn {
  background: rgba(236, 178, 83, 0.08);
}

.system-summary.fail {
  background: rgba(218, 92, 92, 0.08);
}

.radio-card-list {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}

.radio-card {
  align-items: flex-start;
  background: #0f1217;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.radio-card input {
  margin-top: 4px;
}

.radio-card strong,
.radio-card code {
  display: block;
}

.radio-card code {
  color: #d8cab0;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.static-output-card .source-row {
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.static-output-card .source-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.static-output-card .source-row strong,
.static-output-card .source-row code {
  max-width: 58%;
  overflow-wrap: anywhere;
  text-align: right;
}

.card-full-content {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 900px) {
  .system-summary-grid {
    grid-template-columns: 1fr;
  }

  .content-search-form input[type="search"] {
    min-width: 100%;
  }
}

/* Bonumark workflow feedback and header actions, v0.2.0-alpha.12 */
body.bonumark-admin .admin-page-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  justify-content: space-between;
  margin: 0 0 22px;
}

body.bonumark-admin .admin-page-title h1 {
  margin: 0;
}

body.bonumark-admin .admin-page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

body.bonumark-admin .admin-page-actions .primary-button,
body.bonumark-admin .admin-page-actions .button-link {
  align-items: center;
  display: inline-flex;
  min-height: 36px;
  white-space: nowrap;
}

body.bonumark-admin .notice-stack {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

body.bonumark-admin .flash.notice {
  align-items: flex-start;
  border: 1px solid var(--admin-border);
  border-left-width: 5px;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 13px 15px;
}

body.bonumark-admin .flash.notice .notice-icon {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 22px;
  font-size: 13px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin-top: 1px;
  width: 22px;
}

body.bonumark-admin .flash.notice .notice-copy {
  min-width: 0;
}

body.bonumark-admin .flash.notice .notice-copy strong {
  display: block;
  font-size: .86rem;
  line-height: 1.2;
  margin: 0 0 3px;
}

body.bonumark-admin .flash.notice .notice-copy p {
  color: var(--admin-muted);
  margin: 0;
}

body.bonumark-admin .flash.notice.success {
  border-left-color: #6fbf73;
}

body.bonumark-admin .flash.notice.success .notice-icon,
body.bonumark-admin .flash.notice.success .notice-copy strong {
  color: #8bd48f;
}

body.bonumark-admin .flash.notice.error {
  border-left-color: var(--admin-danger);
}

body.bonumark-admin .flash.notice.error .notice-icon,
body.bonumark-admin .flash.notice.error .notice-copy strong {
  color: #ff8a8a;
}

body.bonumark-admin .flash.notice.warning {
  border-left-color: #d8a843;
}

body.bonumark-admin .flash.notice.warning .notice-icon,
body.bonumark-admin .flash.notice.warning .notice-copy strong {
  color: #ffd27a;
}

body.bonumark-admin .flash.notice.info {
  border-left-color: #d8d2c3;
}

body.bonumark-admin .flash.notice.info .notice-icon,
body.bonumark-admin .flash.notice.info .notice-copy strong {
  color: #efe7d6;
}

body.bonumark-admin .editor-header .actions,
body.bonumark-admin .content-toolbar {
  display: none;
}

@media (max-width: 782px) {
  body.bonumark-admin .admin-page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  body.bonumark-admin .admin-page-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Bonumark v0.2.0-alpha.13 Media Library foundation */
/* Bonumark v0.2.0-alpha.14 Trash and revisions */
.media-toolbar-panel .filter-form,
.media-search-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.media-search-form input[type="search"],
.copy-field,
.upload-media-panel input[type="text"],
.media-edit-fields input[type="text"] {
  width: 100%;
  background: #101010;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}

.media-search-form input[type="search"] {
  min-width: min(420px, 100%);
  flex: 1;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.media-card {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.media-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: #070707;
  border-bottom: 1px solid var(--line);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.media-card-body {
  padding: 14px;
}

.media-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.media-card label,
.media-edit-fields label {
  font-size: .82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.media-caption {
  color: var(--muted);
  font-size: .92rem;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.link-button,
.secondary-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  margin: 0;
  font-weight: 800;
  cursor: pointer;
}

.link-button:hover,
.secondary-button:hover {
  background: var(--panel-2);
}

.empty-state {
  background: #111;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px;
}

.media-edit-layout {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.media-edit-preview {
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.media-edit-preview img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 10px;
  background: #050505;
}

.media-detail-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.media-detail-list div,
.source-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.media-detail-list span {
  color: var(--muted);
}

.form-actions-row,
.side-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.danger-zone {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.visual-editor img,
.visual-preview img,
.content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .media-edit-layout {
    grid-template-columns: 1fr;
  }
}


.status-pill.trash {
  border-color: rgba(255, 137, 137, 0.45);
  color: #ffabab;
}

.static-pill.trash,
.static-state.trash {
  background: rgba(255, 137, 137, 0.12);
  border-color: rgba(255, 137, 137, 0.5);
  color: #ffabab;
}

.trash-empty-form {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 14px;
}

.revision-source-view {
  background: #0f1319;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  color: var(--admin-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 420px;
  padding: 16px;
  width: 100%;
}

.revisions-card .button-link {
  justify-content: center;
  width: 100%;
}

/* Bonumark v0.2.0-alpha.15 Appearance and navigation foundation */
body.bonumark-public.theme-light {
  --bg: #f7f3ea;
  --panel: #ffffff;
  --panel-2: #eee7dc;
  --text: #17130f;
  --muted: #6c6357;
  --line: #d8cebf;
  --accent: #17130f;
  background: var(--bg);
  color: var(--text);
}

body.bonumark-public.theme-dark {
  --bg: #0f0f0f;
  --panel: #171717;
  --panel-2: #202020;
  --text: #f3f0ea;
  --muted: #b7b0a6;
  --line: #34312d;
  --accent: #f2f0ea;
  background: var(--bg);
  color: var(--text);
}

.public-site-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.header-nav,
.hero-nav {
  justify-content: flex-end;
}

.home-intro {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding: 18px 0 28px;
}

.home-intro h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -.045em;
  line-height: 1;
  margin: 0 0 12px;
}

.home-intro p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 720px;
}

.article-template-focused {
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
}

.article-template-focused .content {
  margin-top: 34px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 920px;
  padding: 24px 22px 48px;
}

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

.appearance-card {
  color: var(--admin-text) !important;
  display: block;
  min-height: 170px;
  text-decoration: none;
}

.appearance-card h3 {
  margin: 8px 0;
}

.appearance-card p {
  color: var(--admin-muted);
  margin: 0;
}

.selectable-theme {
  cursor: pointer;
  display: block;
  position: relative;
}

.selectable-theme input[type="radio"] {
  position: absolute;
  right: 18px;
  top: 18px;
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0 18px;
}

.checkbox-grid label,
.checkbox-line {
  align-items: center;
  background: #0f1217;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.checkbox-grid input,
.checkbox-line input {
  flex: 0 0 auto;
}

.navigation-builder {
  display: grid;
  gap: 12px;
}

.navigation-row {
  align-items: end;
  background: #0f1217;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.3fr) minmax(120px, .6fr);
  padding: 14px;
}

.navigation-row label {
  margin-top: 0;
}

body.bonumark-admin .appearance-card:hover,
body.bonumark-admin .selectable-theme:hover {
  background: var(--admin-surface-2);
  opacity: 1;
}

@media (max-width: 1180px) {
  .appearance-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .header-nav,
  .hero-nav {
    justify-content: flex-start;
  }

  .appearance-overview-grid,
  .checkbox-grid,
  .navigation-row {
    grid-template-columns: 1fr;
  }
}

/* Bonumark v0.2.0-alpha.16 workflow completion */
.sort-link {
  color: var(--admin-text);
  text-decoration: none;
  white-space: nowrap;
}

.sort-link:hover {
  color: #fff;
  text-decoration: underline;
}

.original-pill {
  border: 1px solid rgba(143, 152, 163, 0.28);
  border-radius: 999px;
  color: #c6ccd4;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.original-pill.preserved {
  background: rgba(111, 191, 115, 0.10);
  border-color: rgba(111, 191, 115, 0.42);
  color: #a8e3ab;
}

.original-pill.none {
  background: rgba(143, 152, 163, 0.10);
}

.full-width-button {
  justify-content: center;
  margin-top: 12px !important;
  width: 100%;
}

.media-picker[hidden] {
  display: none !important;
}

.media-picker {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 9999;
}

.media-picker-backdrop {
  background: rgba(0, 0, 0, 0.72);
  inset: 0;
  position: absolute;
}

.media-picker-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
  max-height: min(720px, 86vh);
  max-width: 980px;
  overflow: auto;
  padding: 20px;
  position: relative;
  width: min(980px, 94vw);
}

.media-picker-header {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.media-picker-header h3 {
  margin: 0;
}

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

.media-picker-item {
  background: #0f1217;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  color: var(--admin-text);
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

.media-picker-item:hover,
.media-picker-item:focus {
  border-color: rgba(232, 220, 194, 0.45);
  outline: none;
}

.media-picker-item img {
  aspect-ratio: 4 / 3;
  background: #050607;
  border-radius: 8px;
  object-fit: contain;
  width: 100%;
}

.media-picker-item span {
  color: var(--admin-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.compact-empty-state {
  margin: 0;
}

.upgrade-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 18px 0;
}

.upgrade-status-card {
  background: #0f1217;
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 14px;
}

.upgrade-status-card span {
  color: var(--admin-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.upgrade-status-card strong {
  display: block;
  font-size: 1.05rem;
}

.upgrade-status-card.pass {
  border-color: rgba(111, 191, 115, 0.36);
}

.upgrade-status-card.fail {
  border-color: rgba(255, 137, 137, 0.5);
}

.upgrade-migrations-list ul {
  margin: 8px 0 0;
}

.warning-text {
  color: #f0d08e;
}

/* v0.3.0-alpha.1 CMS confidence polish */
.type-pill, .original-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .2rem .55rem; font-size: .78rem; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #dce5f4; }
.context-help { margin-top: .75rem; border: 1px solid rgba(255,255,255,.10); border-radius: .75rem; padding: .65rem .75rem; background: rgba(255,255,255,.035); }
.context-help summary { cursor: pointer; font-weight: 700; color: #f3f6fb; }
.context-help p { margin: .5rem 0 0; color: #aebbd0; font-size: .92rem; }
.autosave-banner { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .08); color: #ffe4b5; padding: .75rem; border-radius: .85rem; margin-bottom: .8rem; }
.autosave-banner[hidden] { display: none; }
.editor-save-state { color: #aebbd0; font-size: .85rem; margin-bottom: .55rem; }
.media-picker-tools { display: grid; gap: .65rem; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.10); }
.media-picker-tools input { width: 100%; }
.media-picker-item[hidden] { display: none; }
.big-welcome-panel h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: .6rem; }
.welcome-steps .stat-card { min-height: 8rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.feature-grid > div { border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; background: rgba(255,255,255,.035); padding: 1rem; }
.diff-view { white-space: pre-wrap; overflow: auto; background: #07101f; border: 1px solid rgba(255,255,255,.1); border-radius: .8rem; padding: 1rem; line-height: 1.45; }
.diff-line { display: block; padding: .05rem .35rem; border-left: 3px solid transparent; }
.diff-line.added { background: rgba(34,197,94,.08); border-left-color: #22c55e; }
.diff-line.removed { background: rgba(239,68,68,.08); border-left-color: #ef4444; }
.theme-preview .mock-nav, .theme-preview .mock-title, .theme-preview .mock-line { display: block; border-radius: 999px; margin: .6rem; height: .5rem; background: currentColor; opacity: .25; }
.theme-preview .mock-title { height: 1.2rem; width: 70%; opacity: .45; }
.theme-preview .mock-line { width: 85%; }
.theme-preview .mock-line.short { width: 52%; }
.inline-user-form { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.inline-user-form select { min-width: 120px; }
.checkbox-line { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; }
@media (max-width: 820px) { .media-picker-tools { grid-template-columns: 1fr; } .admin-topbar-actions { order: 3; width: 100%; } }

/* Bonumark v0.3.0-alpha.2 CMS confidence completion */
.media-picker-subhead {
  margin: 1rem 0 .75rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.appearance-preview-builder {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.preview-controls-panel label {
  display: block;
  margin-top: .85rem;
}
.checkbox-stack {
  display: grid;
  gap: .45rem;
  margin: .9rem 0;
}
.checkbox-stack label {
  margin: 0;
}
.preview-output-panel {
  overflow: hidden;
}
.live-preview-frame {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 1.25rem;
  min-height: 520px;
}
.live-preview-frame.dark-preview {
  background: radial-gradient(circle at top left, rgba(234,179,8,.12), transparent 28%), #0f172a;
  color: #f8fafc;
}
.live-preview-frame.light-preview {
  background: #f8fafc;
  color: #111827;
}
.preview-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: .85rem;
  opacity: .9;
}
.preview-site-header nav {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .85rem;
}
.preview-home-hero {
  padding: 2.5rem 0 1.5rem;
}
.homepage-compact .preview-home-hero {
  padding: 1.25rem 0;
}
.preview-home-hero h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1;
  margin: .2rem 0 .75rem;
}
.homepage-compact .preview-home-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.preview-article-card {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 760px;
  background: rgba(255,255,255,.06);
}
.light-preview .preview-article-card {
  border-color: rgba(17,24,39,.15);
  background: white;
}
.article-focused .preview-article-card {
  max-width: 620px;
  margin-inline: auto;
}
.tag-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.tag-row span {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .2rem .55rem;
  opacity: .75;
  font-size: .8rem;
}
.revision-actions-panel {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
@media (max-width: 980px) {
  .appearance-preview-builder { grid-template-columns: 1fr; }
}

/* Bonumark v0.3.0-alpha.3 admin topbar cleanup */
body.bonumark-admin .admin-topbar {
  justify-content: space-between;
}
body.bonumark-admin .admin-topbar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bonumark v0.3.0-alpha.5 sidebar workflow cleanup */
body.bonumark-admin .admin-nav-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 6px 8px 0;
  padding: 4px 0;
}

body.bonumark-admin details.admin-nav-section:first-of-type {
  border-top: 0;
}

body.bonumark-admin .admin-nav-section > summary.admin-nav-heading {
  align-items: center;
  border-radius: 8px;
  color: #8f98a3;
  cursor: pointer;
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  justify-content: space-between;
  letter-spacing: 0.12em;
  list-style: none;
  margin: 0;
  padding: 9px 10px;
  text-transform: uppercase;
  user-select: none;
}

body.bonumark-admin .admin-nav-section > summary.admin-nav-heading::-webkit-details-marker {
  display: none;
}

body.bonumark-admin .admin-nav-section > summary.admin-nav-heading::after {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  opacity: .72;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

body.bonumark-admin .admin-nav-section[open] > summary.admin-nav-heading::after {
  transform: rotate(90deg);
}

body.bonumark-admin .admin-nav-section > summary.admin-nav-heading:hover,
body.bonumark-admin .admin-nav-section[open] > summary.admin-nav-heading {
  background: var(--admin-sidebar-hover);
  color: var(--admin-sidebar-text);
}

body.bonumark-admin .admin-nav-links {
  margin-top: 4px;
}

body.bonumark-admin .admin-sidebar-nav .admin-nav-links a,
body.bonumark-admin .admin-sidebar-nav .admin-nav-links .nav-form button {
  margin-left: 0;
  margin-right: 0;
  padding-left: 18px;
}

body.bonumark-admin .admin-sidebar-nav > .nav-primary {
  margin: 8px;
}


/* Bonumark v0.3.0-alpha.5 admin navigation refinement */
body.bonumark-admin .admin-sidebar-nav > .view-site-nav {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f7fb;
  font-weight: 800;
}

body.bonumark-admin .admin-sidebar-nav > .view-site-nav::after {
  content: "↗";
  float: right;
  opacity: .72;
}

/* Bonumark v0.3.0-alpha.6 sidebar link cleanup */
body.bonumark-admin .admin-sidebar-nav a,
body.bonumark-admin .admin-sidebar-nav .nav-form button {
  width: auto;
}

body.bonumark-admin .admin-sidebar-nav > .nav-primary {
  margin: 2px 8px;
  width: auto;
}

body.bonumark-admin .admin-sidebar-nav > .view-site-nav {
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 8px;
  color: var(--admin-sidebar-text) !important;
  font-weight: 600;
  padding: 8px 10px;
}

body.bonumark-admin .admin-sidebar-nav > .view-site-nav:hover {
  background: var(--admin-sidebar-hover);
  border-left-color: var(--admin-accent);
}

body.bonumark-admin .admin-sidebar-nav > .view-site-nav::after {
  content: none;
}

/* v0.3.0-alpha.7 import messaging polish */
.format-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}

.format-badge {
  align-items: center;
  background: rgba(232, 220, 194, 0.07);
  border: 1px solid rgba(232, 220, 194, 0.18);
  border-radius: 999px;
  color: #f3ead7;
  display: inline-flex;
  gap: 8px;
  padding: 6px 10px;
  white-space: nowrap;
}

.format-badge strong {
  font-size: 0.82rem;
}

.format-badge small {
  color: var(--muted);
  font-size: 0.74rem;
}


/* v0.3.0-alpha.8 stream mode foundation */
.stream-wrap {
  margin: 0 auto;
  max-width: 720px;
  padding: 40px 20px 72px;
}

.stream-profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 26px;
}

.stream-profile h1 {
  margin-bottom: 8px;
}

.stream-feed {
  display: grid;
  gap: 14px;
}

.stream-card,
.stream-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.stream-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 10px;
  margin-bottom: 12px;
}

.stream-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  opacity: .6;
}

.stream-card h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
}

.stream-content > :first-child {
  margin-top: 0;
}

.stream-content > :last-child {
  margin-bottom: 0;
}

.stream-tags {
  margin-top: 14px;
}

/* v0.3.0-alpha.9 Stream Visual Pass */
.context-home-stream-home .site-header,
.context-stream-single .site-header {
  max-width: 760px;
}

.stream-shell {
  margin: 0 auto;
  max-width: 680px;
  padding: 28px 18px 72px;
}

.stream-profile {
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 10px 0 18px;
  padding: 28px;
}

.stream-profile h1 {
  font-size: clamp(2rem, 7vw, 4.25rem);
  letter-spacing: -.055em;
  line-height: .95;
  margin: 0 0 10px;
}

.stream-profile p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.stream-feed {
  display: grid;
  gap: 14px;
}

.stream-card,
.stream-empty,
.stream-composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}

.stream-card {
  position: relative;
}

.stream-card::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  height: 7px;
  left: 20px;
  opacity: .9;
  position: absolute;
  top: 22px;
  width: 7px;
}

.stream-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .86rem;
  gap: 7px 10px;
  line-height: 1.3;
  margin: 0 0 12px;
  padding-left: 18px;
}

.stream-meta > *:not(:last-child)::after {
  color: var(--muted);
  content: "·";
  margin-left: 10px;
  opacity: .7;
}

.stream-meta a {
  color: var(--muted);
  text-decoration: none;
}

.stream-meta a:hover,
.stream-meta a:focus-visible {
  color: var(--text);
}

.stream-author {
  color: var(--text);
  font-weight: 800;
}

.stream-content {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.stream-content p,
.stream-content li {
  font-size: 1rem;
}

.stream-content > :first-child {
  margin-top: 0;
}

.stream-content > :last-child {
  margin-bottom: 0;
}

.stream-media {
  margin: 16px 0 0;
}

.stream-media img {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: block;
  height: auto;
  max-width: 100%;
}

.stream-tags {
  margin-top: 14px;
}

.stream-empty h2 {
  margin: 0 0 6px;
}

.stream-empty p {
  color: var(--muted);
  margin: 0;
}

.stream-composer {
  margin-bottom: 16px;
}

.stream-composer-form textarea {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font: inherit;
  min-height: 126px;
  padding: 16px;
  resize: vertical;
  width: 100%;
}

.stream-composer-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.stream-composer-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}

.stream-file-control {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
}

.stream-file-control input {
  max-width: 220px;
  padding: 0;
}

.stream-composer-footer button,
.stream-preview-inner button {
  margin-top: 0;
}

.stream-composer-preview {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 12px;
  padding: 12px;
}

.stream-preview-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stream-preview-inner img {
  border-radius: 10px;
  display: block;
  height: 74px;
  object-fit: cover;
  width: 74px;
}

.stream-preview-inner span {
  color: var(--muted);
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}

.stream-notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.stream-notice-success {
  border-color: var(--success);
}

.stream-notice-error {
  border-color: var(--danger);
}

.stream-single-shell {
  max-width: 720px;
}

.stream-back-link {
  margin: 0 0 14px;
}

.stream-back-link a {
  color: var(--muted);
  text-decoration: none;
}

.stream-single-title {
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1;
  margin: 0 0 18px;
}

.settings-subsection {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 18px 0;
  padding: 16px;
}

.settings-subsection h3 {
  margin: 0 0 6px;
}

@media (max-width: 640px) {
  .stream-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stream-profile,
  .stream-card,
  .stream-empty,
  .stream-composer {
    border-radius: 16px;
    padding: 16px;
  }

  .stream-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .stream-file-control,
  .stream-composer-footer button {
    width: 100%;
  }
}

/* v0.3.0-alpha.10 stream management hardening */
.content-type-filter {
  margin-top: -8px;
}

.content-preview {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
  margin: 6px 0 0;
  max-width: 58ch;
}

.media-indicator {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  margin-left: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.content-row.content-type-stream .title-column strong a,
.content-row.content-type-stream .title-column strong {
  letter-spacing: -.01em;
}

.stream-media a {
  display: block;
}

.stream-media a:hover img,
.stream-media a:focus-visible img {
  border-color: rgba(255,255,255,.36);
}

/* v0.3.0-alpha.11 stream UX and feed pass */
.stream-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stream-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.stream-pagination a:hover,
.stream-pagination a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.stream-pagination span {
  margin-inline: auto;
  white-space: nowrap;
}

.context-stream-archive .stream-profile,
.context-stream-single .stream-profile {
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .stream-pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .stream-pagination span {
    order: -1;
    width: 100%;
    text-align: center;
  }
}


/* v0.3.0-alpha.13.1 view-stream admin cleanup */

.stream-composer-tools {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 0.6rem 1rem;
  justify-content: space-between;
  margin-top: 0.55rem;
}

.stream-counter {
  font-variant-numeric: tabular-nums;
}

.stream-counter.near-limit {
  color: var(--danger);
  font-weight: 800;
}

.stream-file-help {
  color: var(--muted);
  flex: 1 1 180px;
  font-size: 0.82rem;
}

.stream-preview-inner button {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .stream-composer-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .stream-file-help {
    flex: 0 1 auto;
  }

  .stream-preview-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .stream-preview-inner img {
    height: auto;
    max-width: 100%;
    width: 100%;
  }

  .stream-preview-inner button {
    width: 100%;
  }
}
