/* Client blog portal, Digital Gym Growth chrome. Roslindale Display carries the
   wordmark only (self-hosted, preloaded, font-display: block — no flash); the UI
   is system type. --accent is the client's signature colour, set per client in
   the service unit; the Edge default is its cyan. */
/* Type: Roslindale Display for headings and the wordmark, Red Hat Text for
   everything else (both self-hosted latin woff2, preloaded, font-display: block:
   nothing flashes). This is the house look for every DGG client portal. */
@font-face {
  font-family: "Red Hat Text";
  font-style: normal; font-weight: 300 700; font-display: block;
  src: url("/admin/static/fonts/red-hat-text-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Red Hat Text";
  font-style: italic; font-weight: 300 700; font-display: block;
  src: url("/admin/static/fonts/red-hat-text-latin-italic-var.woff2") format("woff2");
}
@font-face {
  font-family: "Roslindale Display";
  font-style: normal; font-weight: 600; font-display: block;
  src: url("/admin/static/fonts/RoslindaleDisplay-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Roslindale Display";
  font-style: italic; font-weight: 600; font-display: block;
  src: url("/admin/static/fonts/RoslindaleDisplay-SemiBoldItalic.woff2") format("woff2");
}
:root {
  --accent: #00c8fb;
  --cyan: #00c8fb; --cyan-deep: #00a8d6; --ink: #06283d; --ink-2: #041b2b;
  --paper: #f4f8fb; --muted: #5b7285; --line: #d6e2ea; --white: #fff; --red: #c62828;
}
* { box-sizing: border-box; }
html { font: 16px/1.5 "Red Hat Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--paper); }
h1, h2, h3, .brand { font-family: "Roslindale Display", Georgia, "Times New Roman", serif; font-weight: 600; }
body { margin: 0; min-height: 100vh; }
a { color: var(--cyan-deep); }
main { max-width: 760px; margin: 0 auto; padding: 24px 20px 60px; }
body.wide main { max-width: 1200px; }

/* App shell: sidebar + main. The login page keeps a plain top bar. */
body.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink-2); color: var(--white); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { display: block; padding: 4px 8px 18px; font-size: 21px; white-space: nowrap; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .client { color: #9fb8c6; margin: 0 0 10px; }
.sidebar-foot form { margin: 0; }
.top { background: var(--ink-2); color: var(--white); display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; }
/* Same recipe as the DGG CRM's .brand: Roslindale 600, -0.01em, last word italic in the accent. */
.brand { font-size: 22px; letter-spacing: -0.01em; color: var(--white); text-decoration: none; line-height: 1; }
.brand span { font-style: italic; color: var(--accent); }
.client { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top nav { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.top nav a { color: #cfe3ee; text-decoration: none; }
.top nav a:hover { color: var(--white); }
.who { color: #9fb8c6; }
.top form { margin: 0; }
button.link { background: none; border: 0; color: #cfe3ee; cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: var(--white); }

h1 { font-size: 30px; margin: 0 0 16px; letter-spacing: -0.01em; line-height: 1.1; }
.card { background: var(--white); border-radius: 10px; padding: 24px; box-shadow: 0 10px 32px -18px rgba(6,40,61,.25); }
.narrow { max-width: 440px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label small { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input:not([type]), select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan); }
textarea { resize: vertical; }
.button, button.primary, button.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; cursor: pointer; }
.button.primary, button.primary { background: var(--cyan); border-color: var(--cyan); color: var(--ink-2); }
.button.primary:hover, button.primary:hover { background: var(--cyan-deep); border-color: var(--cyan-deep); }
.button.small { padding: 6px 12px; font-size: 13px; }
.button[disabled], button[disabled] { opacity: .6; cursor: wait; }
.error { background: #fdecec; color: var(--red); padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.flash { background: #e3f8ff; color: var(--ink); padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.flash.bad { background: #fdecec; color: var(--red); }
.muted { color: var(--muted); font-size: 13px; }
.hint { margin-top: 20px; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.bar h1 { margin: 0; }
.bar-actions { display: flex; align-items: center; gap: 10px; }
.back { text-decoration: none; font-weight: 600; }

table.posts { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 32px -18px rgba(6,40,61,.25); }
table.posts th, table.posts td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.posts th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.posts tr:last-child td { border-bottom: 0; }
table.posts a.title { font-weight: 600; text-decoration: none; color: var(--ink); }
table.posts a.title:hover { color: var(--cyan-deep); }
.badge { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
.badge.published { background: #dff6ff; color: #006c8c; }
.badge.scheduled { background: #fff2d6; color: #8a5a00; }
.badge.draft { background: #e9eef2; color: var(--muted); }
td.actions { white-space: nowrap; }

.editor .cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.editor .main, .editor .side { display: flex; flex-direction: column; gap: 16px; }
.editor .side { background: var(--white); padding: 18px; border-radius: 10px; box-shadow: 0 10px 32px -18px rgba(6,40,61,.25); }
label.big input { font-size: 20px; font-weight: 600; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
legend { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 0 6px; }
.cover { position: relative; aspect-ratio: 4 / 3; background: var(--paper); border-radius: 6px; overflow: hidden; display: grid; place-items: center; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.empty img { display: none; }
.cover:not(.empty) span { display: none; }
.row { display: flex; gap: 8px; }
.danger { border-top: 1px solid var(--line); padding-top: 14px; }
.danger .button { color: var(--red); }

/* EasyMDE tweaks: brand the toolbar, keep the type readable */
.EasyMDEContainer .CodeMirror { border-color: var(--line); border-radius: 0 0 6px 6px; font: 16px/1.6 "Red Hat Text", sans-serif; min-height: 420px; color: var(--ink); }
.editor-toolbar { border-color: var(--line); border-radius: 6px 6px 0 0; background: var(--white); }
.editor-toolbar button.active, .editor-toolbar button:hover { background: #e3f8ff; border-color: var(--cyan); }
.editor-preview, .editor-preview-side { background: var(--white); }
.editor-preview img, .editor-preview-side img { max-width: 100%; border-radius: 6px; }
.editor-preview .callout, .editor-preview-side .callout { background: #e3f8ff; border-left: 4px solid var(--cyan); padding: 12px 14px; border-radius: 6px; }
.cm-s-easymde .cm-header-1, .cm-s-easymde .cm-header-2 { font-size: 1.3em; }

@media (max-width: 900px) {
  .editor .cols { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 8px; }
}

/* ---- navigation, panels, new screens (spec build 2026-09-04) ---- */
.main-nav { display: flex; flex-direction: column; gap: 3px; }
.main-nav a { color: #cfe3ee; text-decoration: none; font-size: 15px; font-weight: 600; padding: 9px 12px; border-radius: 6px; }
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.main-nav a.on { color: var(--white); background: rgba(255,255,255,.1); }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 10px; }
.card h2 + p, .card h2 + ul { margin-top: 0; }
.row.wrap { flex-wrap: wrap; align-items: center; }
.card.row { gap: 10px; margin-bottom: 18px; }
.card.row input, .card.row select { width: auto; flex: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }

.assistant { background: #f2fbff; border-color: #bfeeff; }
.button.ai { border-color: var(--accent); color: var(--ink); background: #e3f8ff; }
.button.ai:hover { background: var(--accent); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.panel ol, .panel ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.panel li .badge { margin-right: 6px; }
#check-score.ok { color: #1b7f3b; font-weight: 700; }
#check-score.warn { color: #8a5a00; font-weight: 700; }
#check-score.bad { color: var(--red); font-weight: 700; }

/* schedule */
.cal { margin-bottom: 18px; }
.cal table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px; text-align: left; }
.cal td { vertical-align: top; height: 76px; border: 1px solid var(--line); padding: 4px; font-size: 12px; }
.cal td.pad { background: var(--paper); border-color: transparent; }
.cal td.today { background: #f2fbff; }
.cal .d { display: block; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.cal .dot { display: block; padding: 2px 6px; border-radius: 4px; margin-top: 3px; text-decoration: none; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .dot.published { background: #dff6ff; color: #006c8c; }
.cal .dot.scheduled { background: #fff2d6; color: #8a5a00; }
.cal .dot.draft { background: #e9eef2; color: var(--muted); }

/* tasks */
ul.tasks { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
ul.tasks li { background: var(--white); border-radius: 10px; padding: 14px 16px; box-shadow: 0 10px 32px -18px rgba(6,40,61,.25); }
ul.tasks li.done strong { text-decoration: line-through; color: var(--muted); }
ul.tasks .why { margin: 6px 0 2px; }
ul.tasks .how { margin: 0 0 6px; font-size: 14px; }
ul.tasks button.link { color: var(--muted); font-size: 12px; }
ul.tasks label.inline { font-size: 15px; }

#restored button.link { color: var(--cyan-deep); text-decoration: underline; }
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  body.app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; }
  .sidebar .brand { padding: 4px 8px; }
  .main-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; gap: 12px; align-items: center; }
  .sidebar-foot .client { margin: 0; }
}

/* blog subtabs + nested sidebar entry */
.main-nav a.sub { font-size: 14px; font-weight: 500; padding: 5px 12px 5px 28px; color: #9fb8c6; }
.main-nav a.sub.on { color: var(--white); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.one { margin-bottom: 18px; }
\n.status-line { display: flex; flex-direction: column; gap: 6px; margin: 0; }\n.status-line .badge { align-self: flex-start; }\n.danger.row { gap: 8px; }\n