:root { color-scheme: dark; color: #ebfbff; background: #090d14; }
body { background: #090d14; }
.eyebrow { color: #75eadd; }
.muted { color: #a1adbf; }
.brand-mark { border: 1px solid #61e9df; border-radius: 10px; background: #182232; color: #eafffc; box-shadow: none; }
.brand small { color: #78aeb6; }
.button { border-radius: 10px; }
.button-primary { background: #68e9df; border-color: #68e9df; color: #061922; box-shadow: none; }
.button-primary:hover { background: #a6fff3; }
.button-outline { background: #182232; border-color: #3c4b60; color: #d7fbf5; }
.button-outline:hover { background: #18434b; border-color: #68e9df; }
input, textarea, select { background: #0e1520; border-color: #2e3a4d; border-radius: 10px; color: #edfafc; }
input:focus, textarea:focus, select:focus { border-color: #70e8dc; box-shadow: none; }
input::placeholder, textarea::placeholder { color: #7794a4; }
label { color: #c7e0e5; }
label small { color: #91a0b5; }
.login-shell {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 77% 23%, rgb(56 130 150 / 24%), transparent 27rem),
    radial-gradient(circle at 20% 78%, rgb(86 67 139 / 21%), transparent 30rem), #090d14;
}

.login-card { position: relative; z-index: 1; border-color: #344157; border-radius: 10px; background: linear-gradient(145deg, #111824, #111824); box-shadow: none; }



.login-card .eyebrow { color: #82f4e6; }
.login-card h1 { color: #f1ffff; }
.login-card .muted { color: #a1adbf; }
.back-link { color: #86eadf; }

.sidebar { background: #0d131d; border-right-color: #273143; }
.sidebar-label { color: #729ca9; }
.kind-nav button { border: 1px solid transparent; border-radius: 10px; color: #aac9d4; font-family: ui-monospace, Consolas, monospace; }
.kind-nav button:hover { background: #13313d; }
.kind-nav button.active { background: #123841; border-color: #438c8d; color: #b5fff3; box-shadow: none; }
.sidebar-bottom a, .sidebar-bottom button { color: #91c2c6; }
.workspace { background: radial-gradient(circle at 89% 4%, rgb(69 97 169 / 12%), transparent 30rem), #090d14; }
.workspace-top { border-bottom: 1px solid #273143; margin-bottom: 18px; }
.workspace-top h1 { color: #f0ffff; }
.account-badge { border: 1px solid #3a847f; border-radius: 10px; color: #98ffdf; background: #10382f; font-family: ui-monospace, Consolas, monospace; }
.library, .editor { border-color: #2e3a4d; border-radius: 10px; background: linear-gradient(145deg, #111824, #111824); box-shadow: none; }
.panel-heading h2 { color: #eafbff; }
.search-label input { background: #0e1520; }
.item-row { border-color: #273143; border-radius: 10px; background: #182232; }
.item-row:hover { border-color: #5fc1b5; }
.item-row.active { border-color: #6fe5d8; background: #20313e; box-shadow: none; }
.item-meta { color: #9cb9c3; }
.status { border-radius: 10px; background: #403629; color: #f3cc89; }
.status.live { background: #12433c; color: #a3fbdc; }
.editor-heading, .editor-actions { border-color: #2e3a4d; }
.public-link { color: #90f4e6; }
.advanced-fields { border-color: #2e3a4d; border-radius: 10px; background: #0e1520; }
.advanced-fields summary { color: #a6efe5; }
.format-toolbar button { border-color: #3c4b60; border-radius: 10px; background: #182232; color: #b6f4ec; }
.format-toolbar button:hover { background: #1a4c55; }
.writing-grid { border-color: #2e3a4d; border-radius: 10px; }
.body-label textarea { background: #0e1520; }
.preview-panel { background: #141e2c; border-color: #2e3a4d; }
.preview-title { border-color: #2e3a4d; color: #9ce5dc; }
.preview-content { color: #d8edf0; }
.preview-content h1, .preview-content h2, .preview-content h3 { color: #f4fffe; }
.preview-content a { color: #87f2e5; }
.preview-content pre, .preview-content code { background: #061824; color: #b9f4e9; }
.preview-content blockquote { border-color: #71e8dc; color: #b1cbd1; }
.notice { border-color: #458c8c; border-radius: 10px; background: #182a35; color: #e9fbfb; }
.notice.error { border-color: #a95868; background: #492834; color: #ffe2e7; }
@media (max-width: 760px) { .sidebar { border-bottom: 1px solid #273143; } }
.save-status { color: #96e9cf; margin: 10px 0; font-size: 13px; min-height: 18px; }
.save-status.error { color: #ffc1ab; }
.recovery-banner, .backup-panel { margin: 16px 0; padding: 18px; border: 1px solid #344157; border-radius: 10px; background: #141f2e; }
.backup-panel { margin-inline: 0; }
.backup-panel summary, #local-drafts summary { cursor: pointer; color: #c4d3e5; }
.backup-panel p, .writing-help p, .advanced-fields p { color: #a1adbf; font-size: 13px; line-height: 1.7; }
#backup-list { display: grid; gap: 12px; margin-top: 16px; max-height: 240px; overflow: auto; }
#backup-list a { font-size: 13px; color: #a8e8df; }
.local-draft-link { display: block; width: 100%; margin-top: 8px; padding: 9px; text-align: left; border: 1px solid #37616d; border-radius: 10px; background: #182232; color: #c1e7e5; }
#local-drafts { padding: 12px; margin-bottom: 14px; border: 1px solid #344157; font-size: 12px; }
.writing-help { margin: 12px 0; color: #a1adbf; font-size: 13px; }
#history-body { margin-bottom: 12px; font: 13px/1.7 ui-monospace, monospace; }
.action-confirm { width: min(480px, calc(100vw - 40px)); padding: 28px; border: 1px solid #506779; border-radius: 8px; background: #141e2c; color: #e7faf6; box-shadow: none; }
.action-confirm::backdrop { background: #020c16bf; backdrop-filter: blur(4px); }
.action-confirm h2 { margin-top: 0; font-size: 20px; }
.action-confirm p { line-height: 1.8; color: #bbd6df; }
.confirm-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.confirm-actions { flex-wrap: wrap; }
.metadata-panel { border: 1px solid #344157; padding: 16px; border-radius: 10px; min-width: 0; }
.metadata-panel > summary { cursor: pointer; color: #c4d3e5; font-size: 14px; }
.metadata-fields { display: grid; gap: 18px; margin-top: 20px; min-width: 0; }
.metadata-fields > *, .field-grid > *, .recovery-comparison > * { min-width: 0; }
.recovery-dialog { width: min(1000px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; padding: 24px; border: 1px solid #506779; border-radius: 8px; background: #141e2c; color: #e7faf6; }
.recovery-dialog::backdrop { background: #020c16bf; }
.recovery-dialog p { color: #c2d7df; line-height: 1.7; }
.recovery-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.recovery-dialog textarea { font: 13px/1.7 ui-monospace, monospace; }
.recovery-dialog details { border: 1px solid #344157; padding: 14px; }
.writing-tabs { display: flex; gap: 12px; }
.writing-tabs button { flex: 1; padding: 12px; color: #c1e7e5; background: #141f2e; border: 1px solid #344157; border-radius: 10px; }
.writing-tabs button[aria-selected="true"] { color: #041b22; background: #69e9e0; }
.format-toolbar { flex-wrap: wrap; }
@media (max-width: 1100px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 12px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; border-bottom: 1px solid #344157; }
  .sidebar .brand, .sidebar-label { display: none; }
  .kind-nav { display: flex; flex-wrap: wrap; }
  .sidebar-bottom { display: flex; flex-direction: row; gap: 18px; margin: 0 0 0 auto; padding: 8px; }
  .workspace { padding: 22px; }
}
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .library, .editor { min-height: 0; }
  .library { padding: 16px; }
  .search-label { margin-top: 12px; }
  .item-list { max-height: 180px; overflow: auto; }
  .writing-grid { display: block; min-height: 460px; }
  .body-label textarea { min-height: 460px; }
  .preview-panel { border: 0; min-height: 460px; }
  .body-heading > span { display: none; }
}
@media (max-width: 600px) {
  .workspace { padding: 14px 10px; }
  .sidebar { padding: 8px 10px; }
  .editor { padding: 14px; }
  .field-grid, .recovery-comparison { grid-template-columns: minmax(0, 1fr); }
  .recovery-dialog { padding: 16px; }
  .editor-heading { flex-wrap: wrap; }
  .primary-actions { flex-wrap: wrap; }
}

.owner-panel { padding: 18px 22px; margin: 14px 0; border: 1px solid #344157; border-radius: 14px; background: #111824; }
.owner-panel>summary { cursor: pointer; color: #c4d3e5; font-size: 14px; font-weight: 550; }
.owner-panel>.muted { font-size: 13px; margin: 16px 0; }
#site-settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 950px; margin-top: 24px; }
#site-settings-form label { min-width: 0; } #site-settings-form label:nth-child(2),#site-settings-form label:nth-child(3) { grid-column: 1/-1; }
#site-settings-form>button { justify-self: start; } #site-settings-status { color: #a1adbf; font-size: 13px; line-height: 1.7; margin-bottom: 0; }
.overview-content { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.overview-content>div { background: #182232; border: 1px solid #2e3a4d; border-radius: 12px; padding: 20px; }
.overview-content h3 { font-size: 13px; color: #a1adbf; margin: 0 0 18px; } .overview-content strong { font-size: 23px; font-weight: 550; }
.overview-content p { font-size: 12px; color: #a1adbf; margin-bottom: 0; }.overview-content>.overview-backup { grid-column: 1/-1; }
@media(max-width:900px) { .overview-content { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { #site-settings-form { grid-template-columns: 1fr; } .owner-panel { padding: 16px; } .overview-content { gap: 10px; }.overview-content>div { padding: 15px; }.overview-content strong { font-size: 19px; } }
