:root {
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --bg: #ffffff;
  --surface: #ffffff;
  --hover: #f3f4f6;
  --maxw: 720px;
  --radius: 8px;
  /* --font-body is injected per-page from the site-wide font setting. */
}

[data-theme="dark"] {
  --ink: #e7e9ea;
  --muted: #9aa3af;
  --line: #2b3138;
  --accent: #6ea8fe;
  --bg: #14171a;
  --surface: #1b1f24;
  --hover: #252b32;
}

* { box-sizing: border-box; }

/* `hidden` has to beat the display rule an element already carries. Several
   buttons here are .btn (inline-block or inline-flex) and start out hidden,
   and an author display rule outranks the browser's [hidden] rule without this. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 17px/1.65 var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- layout ---- */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---- icons ---- */
/* Google's own sheet loads first and sets 24px; this brings the glyphs down to
   the size of the text they sit beside. */
.material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'opsz' 20;
  vertical-align: middle;
  user-select: none;
}

/* ---- header ---- */
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---- new post menu ---- */
.new-post { position: relative; }
.btn-new {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; font-size: 14px;
}
.new-post-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 268px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  display: flex; flex-direction: column;
}
/* Same trick as the account menu: an author `display` beats the UA [hidden]. */
.new-post-menu[hidden] { display: none; }
.new-post-menu a {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 12px; border-radius: 7px; color: var(--ink);
}
.new-post-menu a:hover { background: var(--hover); text-decoration: none; }
.new-post-menu .material-symbols-rounded { color: var(--accent); margin-top: 1px; }
.mode-copy { display: flex; flex-direction: column; line-height: 1.3; }
.mode-name { font-size: 14px; font-weight: 600; }
.mode-hint { font-size: 12.5px; color: var(--muted); }

/* ---- account menu ---- */
.account { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 6px; border-radius: 10px; color: var(--ink);
  font: inherit; text-align: left;
}
.account-btn:hover { background: var(--hover); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex: 0 0 32px; display: block;
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: #059669; color: #fff; font-weight: 700; font-size: 15px;
}
.account-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.account-name { font-size: 14px; font-weight: 600; }
.account-email { font-size: 12px; color: var(--muted); }

.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 190px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  display: flex; flex-direction: column;
}
/* Author `display: flex` above outranks the UA stylesheet's [hidden] rule, so
   the closed state has to be restated explicitly or the menu never hides. */
.account-menu[hidden] { display: none; }
.account-menu a,
.account-menu button {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 7px;
  font-size: 14px; color: var(--ink);
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
}
.account-menu a:hover,
.account-menu button:hover { background: var(--hover); text-decoration: none; }
.account-menu form { margin: 0; }
.account-menu .menu-danger { color: #dc2626; }
/* Shown only on narrow screens, where the header hides the name/email. */
.account-menu-id {
  display: none; flex-direction: column; line-height: 1.3;
  padding: 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}

.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px 80px;
}

.site-footer {
  display: flex;
  gap: 16px;
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

.muted { color: var(--muted); }
.empty { color: var(--muted); }

/* ---- home hero ---- */
/* Sits between the header and .content, so it can run wider than the text
   column. Text overlays the image when there is one, otherwise it stands alone. */
.hero {
  max-width: 1080px;
  margin: 8px auto 34px;
  padding: 0 20px;
}
.hero.has-image {
  position: relative;
}
.hero-img {
  display: block;
  width: 100%;
  height: clamp(240px, 42vw, 460px);
  object-fit: cover;
  border-radius: 14px;
}
.hero-copy { margin-top: 20px; }
.hero.has-image .hero-copy {
  position: absolute;
  left: 20px; right: 20px; bottom: 0;
  margin: 0;
  padding: 46px 30px 26px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  color: #fff;
}
.hero-title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-text {
  margin: 8px 0 0;
  font-size: 17px;
  color: var(--muted);
  max-width: 62ch;
}
.hero.has-image .hero-text { color: rgba(255, 255, 255, .88); }

/* ---- post list ---- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.post-item { min-width: 0; }
.post-link { font-size: 19px; font-weight: 600; color: var(--ink); }
.post-desc { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.post-date { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---- single post ---- */
.post-title { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; margin: 12px 0 6px; }
.post-meta {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 6px 14px; margin-bottom: 28px;
}
.post-meta .post-date { margin: 0; }
.post-author { font-size: 14px; font-weight: 600; }
.post-updated { color: var(--muted); font-size: 14px; font-style: italic; }
.edit-link { font-size: 14px; }
.draft-flag {
  display: inline-block; background: #fef3c7; color: #92400e;
  font-size: 13px; padding: 3px 10px; border-radius: 999px; margin: 0 0 8px;
}

.post-body { font-size: 18px; }
.post-body h2 { font-size: 26px; margin: 1.6em 0 .4em; letter-spacing: -0.01em; }
.post-body h3 { font-size: 21px; margin: 1.4em 0 .3em; }
.post-body p { margin: 0 0 1.1em; }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.post-body blockquote {
  margin: 1.2em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--line); color: var(--muted);
}
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body a { text-decoration: underline; }

/* ---- share row ---- */
/* Sits under the post body. Each button is a plain link to a network's own
   share endpoint, so there is nothing to load and nothing to consent to. */
.share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
}
.share-label {
  font-size: 13px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .08em; margin-right: 4px;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.share-btn:hover { color: var(--ink); border-color: var(--ink); }
.share-icon { width: 15px; height: 15px; display: block; }
.share-copied { font-size: 13px; color: var(--muted); }

/* ---- image alignment (shared by editor + rendered post) ---- */
.img-center { display: block; margin: 1.2em auto; }
.img-left  { float: left;  margin: .3em 1.2em 1em 0; max-width: 50%; }
.img-right { float: right; margin: .3em 0 1em 1.2em; max-width: 50%; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  background: var(--ink); color: #fff;
  padding: 9px 16px; border-radius: var(--radius);
  font-size: 15px; border: 0; cursor: pointer; font-weight: 500;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn-plain { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-google { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* ---- login ---- */
.login-card {
  max-width: 360px; margin: 60px auto; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 34px 28px;
}
.login-card h1 { margin: 0 0 6px; font-size: 24px; }
.error { color: #b91c1c; font-size: 14px; margin: 10px 0; }

/* ---- admin list ---- */
.admin-head { display: flex; align-items: center; justify-content: space-between; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row-actions { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.row-actions form { margin: 0; }
.link-danger { background: none; border: 0; color: #b91c1c; cursor: pointer; font-size: 15px; padding: 0; }
.link-danger:hover { text-decoration: underline; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.badge.live { background: #dcfce7; color: #166534; }
.badge.draft { background: #f3f4f6; color: #4b5563; }

/* ---- editor ---- */
.editor-form { display: flex; flex-direction: column; }
.title-input {
  border: 0; outline: 0; width: 100%;
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  padding: 8px 0; margin-bottom: 8px;
}
.title-input::placeholder { color: #cbd5e1; }

.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px; margin-bottom: 12px;
}
.toolbar button {
  min-width: 34px; height: 32px; padding: 0 9px;
  border: 0; background: transparent; border-radius: 6px;
  cursor: pointer; font-size: 14px; color: var(--ink);
}
.toolbar button:hover { background: #f3f4f6; }
.toolbar button.is-active { background: #e0e7ff; color: var(--accent); }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* The editor and the controls that sit inside its top-right corner. The top
   padding is what keeps the first line of text clear of those controls. */
.editor-shell { position: relative; }
.editor {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 56px 20px 18px; min-height: 320px;
}
.editor-tools {
  position: absolute; top: 10px; right: 11px; z-index: 4;
  display: flex; align-items: center; gap: 6px;
}
.tool-btn {
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--muted);
}
.tool-btn:hover { background: var(--hover); color: var(--ink); }
.btn.btn-tool { padding: 6px 13px; font-size: 14px; }

/* ---- version history panel ---- */
.history-panel {
  position: absolute; top: 48px; right: 11px; z-index: 10;
  width: min(440px, calc(100% - 22px));
  max-height: 420px; overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.history-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 8px 12px; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.history-list { display: flex; flex-direction: column; }
.history-empty { font-size: 13px; color: var(--muted); padding: 10px 12px; margin: 0; }
.history-item {
  display: grid; gap: 1px; text-align: left;
  padding: 8px 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink); cursor: pointer; font: inherit;
}
.history-item:hover { background: var(--hover); }
.history-item.is-open { background: var(--hover); }
.history-item-label { font-size: 14px; font-weight: 600; }
.history-item-meta { font-size: 12px; color: var(--muted); }
.history-item-note {
  font-size: 12.5px; color: var(--muted); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-preview { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 12px 4px; }
.history-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.history-preview-label { font-size: 13px; color: var(--muted); }
.history-preview .btn { padding: 6px 12px; font-size: 14px; }
.history-body {
  font-size: 14.5px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; background: var(--bg);
}
.history-body h2 { font-size: 18px; }
.history-body h3 { font-size: 16px; }
.history-body img { max-width: 100%; height: auto; }
.editor .ProseMirror { outline: 0; min-height: 300px; font-size: 18px; }
.editor .ProseMirror:focus { outline: 0; }
.editor .ProseMirror > * + * { margin-top: .2em; }
.editor .ProseMirror h2 { font-size: 26px; margin: 1em 0 .3em; }
.editor .ProseMirror h3 { font-size: 21px; margin: .9em 0 .3em; }
.editor .ProseMirror ul, .editor .ProseMirror ol { padding-left: 1.4em; }
.editor .ProseMirror blockquote { border-left: 3px solid var(--line); padding-left: 16px; color: var(--muted); }
.editor .ProseMirror img { max-width: 100%; height: auto; border-radius: var(--radius); }
.editor .ProseMirror img.ProseMirror-selectednode { outline: 2px solid var(--accent); }
/* placeholder-ish empty look */
.editor .ProseMirror p.is-empty:first-child::before { color: #cbd5e1; }

.editor-actions {
  display: flex; align-items: center; gap: 18px; margin-top: 18px;
}
.publish-toggle { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.date-field { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.date-field input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
.editor-actions .btn { margin-left: 0; }
.editor-actions { flex-wrap: wrap; }

/* ---- post description ---- */
.desc-field { margin-top: 18px; }
.desc-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}
.desc-head label { font-size: 14px; font-weight: 600; color: var(--muted); }
.desc-wrap { position: relative; }
.desc-field textarea {
  width: 100%; font: inherit; font-size: 15px; resize: vertical;
  /* Right padding keeps the text clear of the refresh icon sitting over it. */
  padding: 10px 44px 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
  display: block;
}
.desc-refresh {
  position: absolute; top: 7px; right: 7px;
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--muted);
}
.desc-refresh:hover { background: var(--hover); color: var(--accent); }
.desc-refresh:disabled { cursor: default; color: var(--muted); }
.desc-refresh.is-spinning .material-symbols-rounded {
  animation: desc-spin .9s linear infinite;
}
@keyframes desc-spin { to { transform: rotate(360deg); } }
.desc-status { font-size: 13px; color: var(--muted); }

/* ---- polish ---- */
.btn.btn-magic {
  background: #7c3aed; color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
}
/* One line of guidance on the screen the Draft to Polish menu item opens. */
.mode-banner {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 14px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); font-size: 14px;
}
.mode-banner .material-symbols-rounded { color: #7c3aed; flex: 0 0 auto; }
[data-theme="dark"] .mode-banner .material-symbols-rounded { color: #a78bfa; }
.btn-magic:disabled { opacity: .55; cursor: default; }
/* Two classes deep so it outranks the generic dark-mode .btn override below. */
[data-theme="dark"] .btn.btn-magic { background: #8b5cf6; color: #fff; }
.polish-status { font-size: 13px; color: var(--muted); }

/* ---- request a revision ---- */
.revise-field { margin-top: 22px; }
.revise-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.revise-row input {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 15px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.revise-row .btn { padding: 9px 16px; }

/* ---- interview wizard ---- */
.head-actions { display: flex; gap: 10px; align-items: center; }
.interview { max-width: 640px; margin: 10px auto 0; }
.step-count {
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
.step-question {
  font-size: 27px; line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 12px;
}
.step-tip { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.step-answer {
  width: 100%; font: inherit; font-size: 17px; line-height: 1.6; resize: vertical;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.step-answer:disabled { opacity: .6; }
.step-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.step-status { font-size: 14px; color: var(--muted); }
.step-hint { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.transcript { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 14px; }
.transcript summary {
  cursor: pointer; font-size: 14px; color: var(--muted); user-select: none;
}
.transcript-turn { margin: 16px 0 0; }
.transcript-q { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.transcript-a { margin: 3px 0 0; font-size: 15px; white-space: pre-wrap; }

/* ---- settings ---- */
.saved-flag {
  display: inline-block; background: #dcfce7; color: #166534;
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
}
[data-theme="dark"] .saved-flag { background: #064e3b; color: #a7f3d0; }

.settings-form { margin-top: 20px; }
.setting-group {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 0 0 20px;
}
.setting-group legend { padding: 0 8px; font-weight: 600; font-size: 15px; }
.choice-row { display: flex; gap: 20px; flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }

.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.font-choice {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: 4px 10px; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
}
.font-choice:hover { background: var(--hover); }
.font-choice.is-current { border-color: var(--accent); }
.font-choice input { grid-row: span 2; }
.font-name { font-size: 14px; font-weight: 600; }
.font-sample { font-size: 15px; color: var(--muted); grid-column: 2; }

.setting-hint { font-size: 13px; margin: 0 0 12px; display: block; }
.field { display: block; margin: 0 0 16px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"],
.field textarea {
  width: 100%; font: inherit; font-size: 15px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
.field textarea { resize: vertical; }
.field input[type="file"] { font-size: 14px; }
/* ---- hero image library ---- */
.hero-library {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 10px;
}
.hero-tile {
  position: relative; display: block; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; height: 96px; background: var(--bg);
}
.hero-tile:hover { border-color: var(--muted); }
.hero-tile.is-current { border-color: var(--accent); }
.hero-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The radio itself is the selection state; the tile is the visible control. */
.hero-tile input { position: absolute; opacity: 0; pointer-events: none; }
.hero-tile-none {
  display: flex; align-items: center; justify-content: center;
  border-style: dashed;
}
.hero-tile-label { font-size: 14px; color: var(--muted); }
.hero-del {
  position: absolute; top: 5px; right: 5px;
  width: 24px; height: 24px; padding: 0; line-height: 1;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 16px;
  opacity: 0; transition: opacity .12s;
}
.hero-tile:hover .hero-del, .hero-del:focus { opacity: 1; }
.hero-del:hover { background: #dc2626; }

/* ---- dark-mode corrections for the few fixed-colour chips ---- */
[data-theme="dark"] .badge.live { background: #064e3b; color: #a7f3d0; }
[data-theme="dark"] .badge.draft { background: #262c33; color: #cbd5e1; }
[data-theme="dark"] .draft-flag { background: #422006; color: #fde68a; }
[data-theme="dark"] .toolbar button:hover { background: var(--hover); }
[data-theme="dark"] .toolbar button.is-active { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .btn { background: #e7e9ea; color: #14171a; }
[data-theme="dark"] .btn-plain { background: transparent; color: var(--muted); }
[data-theme="dark"] .btn-google { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .title-input::placeholder { color: #4b5563; }
[data-theme="dark"] .error { color: #fca5a5; }
[data-theme="dark"] .account-menu .menu-danger { color: #fca5a5; }

.title-input, .editor, .toolbar { background: var(--bg); color: var(--ink); }
.date-field input, .login-card, .setting-group { background: var(--surface); }

/* ---- responsive ---- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-title { font-size: 27px; }
  .title-input { font-size: 24px; }
  .img-left, .img-right { float: none; max-width: 100%; margin: 1.2em auto; display: block; }
  /* Keep the header on one line: avatar only, name/email move into the menu,
     and New Post shrinks to its icon. */
  .account-text { display: none; }
  .account-menu-id { display: flex !important; }
  .new-post-text { display: none; }
  .btn-new { padding: 8px 10px; }
  .new-post-menu { min-width: 240px; }
  .font-grid { grid-template-columns: 1fr; }
  .hero { padding: 0 14px; margin-bottom: 26px; }
  .hero.has-image .hero-copy { left: 14px; right: 14px; padding: 34px 18px 18px; }
  .post-list li { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ---- preview banner ---- */
/* Shown only while a site is served from a temporary hostname, so nobody
   mistakes a staging copy for the real thing. */
.preview-banner {
  margin: 40px auto 0; padding: 10px 16px; max-width: var(--content-width, 720px);
  border: 1px dashed var(--line); border-radius: 6px;
  color: var(--muted); font-size: 13px; text-align: center;
  text-transform: uppercase; letter-spacing: .08em;
}
