/* Fonts are bundled (Montserrat and Playfair Display, SIL Open Font Licence), so no outside requests are made. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/playfair-display-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/playfair-display-latin-600-normal.woff2') format('woff2'); }

/* Bramwell Social. Ivory, gold and ink, matching the original Kimi prototype palette. */
:root {
    --bg: #f7f3ea;
    --card: #fdfcf9;
    --ink: #101014;
    --muted: #6f6e75;
    --line: rgba(16,16,20,.11);
    --gold: #9a7b2d;
    --gold-soft: #c3a254;
    --gold-bg: #f2ecdd;
    --side: #101014;
    --ok: #2f7d4f;
    --ok-bg: #e2f1e8;
    --bad: #b3261e;
    --bad-bg: #f8e1df;
    --warn: #8a5a00;
    --warn-bg: #faefd2;
    --info: #2d5a8a;
    --info-bg: #e1ebf5;
    --radius: 10px;
    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.55 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--gold); }
a:hover { color: #6f5619; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .1px; margin: 0 0 .6rem; }
h1 { font-size: 1.9rem; letter-spacing: -.4px; }
h2 { font-size: 1.12rem; }
p { margin: 0 0 .8rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
code { background: var(--gold-bg); padding: .1em .4em; border-radius: 4px; }
code.wrap { display: block; word-break: break-all; margin: .5rem 0; padding: .5rem; }
pre.code { background: var(--side); color: #f2eddc; padding: .8rem 1rem; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
pre.steps-text { white-space: pre-wrap; font-family: var(--sans); font-size: .9rem; background: transparent; margin: .5rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.pre { white-space: pre-wrap; word-break: break-word; }
.ic { width: 18px; height: 18px; flex: none; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; background: var(--side); color: #f7f3ea; display: flex; flex-direction: column; padding: 24px 16px 16px; position: sticky; top: 0; height: 100vh; flex: none; border-right: 1px solid rgba(247,243,234,.12); z-index: 40; }
.brand { padding: 0 6px 18px; display: flex; flex-direction: column; gap: 6px; }
.brand img { width: 150px; height: auto; display: block; }
.brand span { color: var(--gold-soft); font-size: 8px; font-weight: 600; letter-spacing: 3.5px; padding-left: 2px; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(247,243,234,.12); border-radius: 10px; background: #17171c; margin-bottom: 18px; }
.ws-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--gold); color: #fff; display: grid; place-items: center; font: 600 15px var(--serif); flex: none; }
.workspace b { display: block; font-size: 12px; font-weight: 600; }
.workspace small { color: #a5a5ad; font-size: 10px; }
.nav-label { color: #77767f; font-size: 9px; font-weight: 600; letter-spacing: 2px; padding: 0 10px 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 11px; color: #c9c5b8; text-decoration: none; padding: 10px 11px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.side nav a:hover { background: #1d1d24; color: #fff; }
.side nav a.on { background: #25231b; color: var(--gold-soft); box-shadow: inset 2px 0 0 var(--gold-soft); }
.side-foot { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.tip { background: #1a1a20; border: 1px solid rgba(195,162,84,.22); border-radius: 11px; padding: 13px; }
.tip b { display: flex; gap: 6px; align-items: center; color: var(--gold-soft); font-size: 11px; font-weight: 600; }
.tip b .ic { width: 14px; height: 14px; }
.tip p { color: #a5a5ad; font-size: 10px; line-height: 1.55; margin: 8px 0 10px; }
.tip a { color: var(--gold-soft); font-size: 10px; font-weight: 600; text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.tip a .ic { width: 13px; height: 13px; }
.who-row { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(247,243,234,.12); padding-top: 14px; }
.who { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: 1; min-width: 0; }
.avatar-i { width: 34px; height: 34px; border-radius: 50%; background: #25231b; border: 1px solid var(--gold-soft); color: var(--gold-soft); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }
.who-t { display: flex; flex-direction: column; min-width: 0; }
.who-t b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t small { color: #a5a5ad; font-size: 10px; }
.iconbtn { background: none; border: 1px solid transparent; color: #a5a5ad; border-radius: 9px; width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; }
.iconbtn:hover { color: var(--ink); background: #efe9d9; }
.side .iconbtn:hover { color: #fff; background: #1d1d24; }
.main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; padding: 0 40px; height: 66px; border-bottom: 1px solid var(--line); background: rgba(253,252,249,.94); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 30; }
.gsearch { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--muted); }
.gsearch input { border: 0; outline: 0; margin: 0; padding: 9px 0; background: transparent; box-shadow: none; }
.gsearch input:focus { outline: 0; }
.gsearch:focus-within { border-color: var(--gold-soft); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.1rem; padding: .3rem .6rem; cursor: pointer; }
.scrim { display: none; }
.content { padding: 28px 40px 60px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; font-size: 13px; }
.dot { color: var(--gold-soft); }
.date-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 500; }
.date-chip .ic { width: 15px; height: 15px; color: var(--gold); }
.eyebrow { color: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 2.4px; }

/* Cards, tables, forms */
.wide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.wide-grid > .card { margin-bottom: 0; }
.wide-grid > .span-all { grid-column: 1 / -1; }
@media (max-width: 1180px) { .wide-grid { grid-template-columns: 1fr; } }
@media (min-width: 1900px) { .content { max-width: 1760px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.card.flush { padding: 0; overflow-x: auto; }
.card.narrow { max-width: 520px; }
.pad { padding: 1rem 1.2rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cols > .card { margin-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.form label, label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .8rem; }
label small { display: block; font-weight: 400; margin-top: .2rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
label.check input { margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
    display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font: inherit; color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); outline-offset: 0; border-color: var(--gold-soft); }
.inline { display: inline; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; margin-top: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: #f3eee1; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: .5rem .8rem; }
.cell-main a { font-weight: 600; text-decoration: none; }
.cell-main small { display: block; }

/* Buttons and pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--gold-soft); color: var(--ink); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.primary:hover { background: #7f6320; color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.small { padding: .25rem .6rem; font-size: .82rem; }
.btn.block { width: 100%; }
.btn-stack { display: flex; flex-direction: column; gap: .5rem; }
.pill { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.muted { background: #ece8dc; color: var(--muted); }
.alert { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .9rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: #1d5a37; border-color: #bfe0cb; }
.alert.error { background: var(--bad-bg); color: #8a1b15; border-color: #efc2be; }
.alert.warn { background: var(--warn-bg); color: #6b4600; border-color: #ecd9a0; }
.alert.info { background: var(--info-bg); color: #204a73; border-color: #c3d6ea; }
.err { display: block; color: var(--bad); font-size: .85rem; margin-top: .25rem; }
.err-cell { max-width: 280px; }

/* Platform badges */
.pf { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; color: #fff; font: 700 11px/1 var(--sans); margin-right: 3px; vertical-align: middle; }
.pf-facebook { background: #1877f2; }
.pf-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.pf-linkedin { background: #0a66c2; }
.pf-youtube { background: #e00; }
.pf-tiktok { background: #111; }
.pf-x { background: #111; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.avatar-cell { width: 54px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > a { font-weight: 600; text-decoration: none; display: block; }
.meta { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }

/* Posts and tabs */
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.tabs a.on { background: var(--gold-bg); color: #6f5619; border-color: var(--gold-soft); }
.search input { min-width: 240px; margin: 0; }
.pager { display: flex; gap: .3rem; margin-top: .8rem; }
.pager a { padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pager a.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.post-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.override-view { border-top: 1px dashed var(--line); padding-top: .6rem; margin-top: .6rem; }

/* Composer */
.composer { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); gap: 22px; align-items: start; }
.comp-side { position: sticky; top: 86px; }
.counter { text-align: right; font-size: .8rem; color: var(--muted); margin: .2rem 0 .6rem; }
.counter.over { color: var(--bad); font-weight: 700; }
.dropzone { display: flex; align-items: center; gap: .8rem; border: 2px dashed var(--line); border-radius: 10px; padding: 1rem; background: #fff; }
.dropzone.drag { border-color: var(--gold); background: var(--gold-bg); }
.dropzone .btn { margin: 0; }
.upload-status { font-size: .85rem; margin: .5rem 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.thumb { position: relative; width: 104px; height: 104px; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.thumbs.small .thumb { width: 72px; height: 72px; cursor: pointer; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.7); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; line-height: 20px; cursor: pointer; }
.thumb .tag { position: absolute; left: 3px; bottom: 3px; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.thumb[draggable="true"] { cursor: grab; }
.thumb.current { outline: 2px solid var(--gold); outline-offset: -2px; }
.thumb.dragging { opacity: .4; }
.thumb.over { outline: 2px dashed var(--gold); outline-offset: -2px; }
.thumb .ord { position: absolute; top: 3px; left: 3px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.thumb .mv { position: absolute; top: 50%; transform: translateY(-50%); width: 22px; height: 30px; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: rgba(0,0,0,.6); color: #fff; font-size: 20px; line-height: 28px; cursor: pointer; }
.thumb .mv:hover { background: rgba(0,0,0,.85); }
.thumb .mv.l { left: 0; border-radius: 0 6px 6px 0; }
.thumb .mv.r { right: 0; border-radius: 6px 0 0 6px; }
.pv-slide { position: absolute; inset: 0; }
.pv-ctl { position: absolute; inset: 0; pointer-events: none; }
.pv-nav { pointer-events: auto; position: absolute; top: 0; bottom: 40px; width: 32%; min-height: 0; margin: 0; padding: 0 8px; border: 0; border-radius: 0; box-shadow: none; background: transparent; display: flex; align-items: center; cursor: pointer; }
.pv-nav.prev { left: 0; justify-content: flex-start; }
.pv-nav.next { right: 0; justify-content: flex-end; }
.pv-nav span { width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 22px; line-height: 26px; text-align: center; }
.pv-nav:hover span { background: rgba(0,0,0,.72); }
.pv-count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.pv-dots { position: absolute; left: 0; right: 0; bottom: 7px; display: flex; justify-content: center; gap: 4px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.pv-dots i.on { background: #fff; }
.hol-tag { display: inline-block; background: var(--gold-bg); color: #6f5619; border: 1px solid var(--gold-soft); border-radius: 10px; font-size: 9px; font-weight: 700; letter-spacing: .4px; padding: 0 6px; line-height: 15px; text-transform: uppercase; vertical-align: 1px; }
.cal-item.hol { box-shadow: inset 3px 0 0 var(--gold-soft); }
.lib { margin-top: .8rem; }
.lib summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.acct { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; background: #fff; cursor: pointer; margin: 0; font-weight: 500; }
.acct:has(input:checked) { border-color: var(--gold); background: var(--gold-bg); }
.acct.warn { border-color: #e5c97b; }
.acct small { font-weight: 400; color: var(--muted); }
.acct span { display: flex; flex-direction: column; min-width: 0; }
.acct b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warnings .w { background: var(--warn-bg); color: #6b4600; border-radius: 6px; padding: .4rem .7rem; margin-top: .4rem; font-size: .85rem; }
/* Accounts */
.family-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; }
.family-head h2 { margin: 0; }
.steps li { margin-bottom: .4rem; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.cal-head h2 { margin: 0; min-width: 160px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-dow { background: #f3eee1; text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: .4rem; text-transform: uppercase; }
.cal-cell { background: var(--card); min-height: 96px; padding: .3rem; }
.cal-cell.empty { background: #f1ede2; }
.cal-cell.today { background: #fdf7e4; }
.cal-day { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.cal-item { display: block; font-size: .75rem; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; text-decoration: none; background: var(--info-bg); color: var(--info); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.s-published { background: var(--ok-bg); color: var(--ok); }
.cal-item.s-failed, .cal-item.s-partial { background: var(--bad-bg); color: var(--bad); }
.cal-item.s-draft { background: #ece8dc; color: var(--muted); }
.cal-item.s-pending { background: var(--warn-bg); color: var(--warn); }


/* Buttons: Bramwell gold */
.btn { border-radius: 10px; font-size: 13px; }
.btn.primary { box-shadow: 0 6px 16px rgba(154,123,45,.25); }
.btn .ic { width: 16px; height: 16px; }
.card { border-radius: 14px; }

/* Dashboard */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; position: relative; min-height: 118px; display: flex; flex-direction: column; gap: 6px; }
.m-top { display: flex; align-items: center; gap: 9px; }
.m-top small { color: var(--muted); font-size: 11px; font-weight: 500; }
.metric b { font: 600 30px/1.1 var(--serif); letter-spacing: -.5px; }
.metric.bad b { color: var(--bad); }
.m-note { color: var(--muted); font-size: 11px; }
.m-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.m-ic .ic { width: 17px; height: 17px; }
.m-ic.gold { background: #f2ecdd; color: #9a7b2d; }
.m-ic.green { background: #e2f1e8; color: #2f7d4f; }
.m-ic.blue { background: #e1ebf5; color: #2d5a8a; }
.m-ic.red { background: #f8e1df; color: #b3261e; }
.m-ic.muted { background: #ece8dc; color: #77767f; }
.spark { position: absolute; right: 16px; bottom: 14px; }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-fill { fill: rgba(154,123,45,.12); stroke: none; }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-bottom { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.panel-head h2 { margin: 0 0 2px; font-size: 18px; }
.panel-head p { margin: 0; }
.text-link { color: var(--gold); text-decoration: none; font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.text-link .ic { width: 14px; height: 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; flex: 1; min-height: 170px; padding: 10px 0 0; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; position: relative; }
.bar-col i { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: #e9e2cf; }
.bar-col i.has { background: linear-gradient(180deg, #c3a254, #9a7b2d); }
.bar-n { font-size: 10px; color: var(--muted); height: 12px; }
.bar-col small { font-size: 9px; color: var(--muted); position: absolute; bottom: -20px; }
.bars { margin-bottom: 30px; }
.health { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.health b { font-size: 14px; }
.health p { margin: 2px 0 0; }
.ring-score { --p: 0; width: 74px; height: 74px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), #e9e2cf 0); display: grid; place-items: center; flex: none; }
.ring-score span { width: 56px; height: 56px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font: 600 17px var(--serif); white-space: nowrap; }
.ring-score small { font-size: 10px; margin-left: 1px; }
.channel-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.channel-list span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.channel-list b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-list small { color: var(--muted); font-size: 10px; }
.dotstat { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dotstat.ok { background: #2f7d4f; } .dotstat.bad { background: #b3261e; } .dotstat.off { background: #b8b4a6; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); border-radius: 8px; }
.queue-item:first-child { border-top: 0; }
.queue-item:hover { background: #f6f1e3; }
.q-date { width: 38px; text-align: center; flex: none; }
.q-date b { display: block; font-size: 17px; font-weight: 700; line-height: 1.1; }
.q-date span { color: var(--muted); text-transform: uppercase; font-size: 9px; letter-spacing: .5px; }
.q-thumb { width: 44px; height: 44px; border-radius: 9px; background: linear-gradient(135deg,#efe9da,#e3d8bb); color: var(--gold); display: grid; place-items: center; overflow: hidden; flex: none; }
.q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.q-copy b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-copy span { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.q-copy .ic { width: 12px; height: 12px; }
.q-pf { white-space: nowrap; }
.ctype { display: inline-flex; align-items: center; gap: 4px; background: var(--gold-bg); color: #6f571d; border-radius: 6px; padding: 1px 7px; font-size: 10px; font-weight: 600; }
.ctype .ic { width: 11px; height: 11px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; text-decoration: none; color: var(--ink); background: #fff; }
.quick a:hover { border-color: var(--gold-soft); }
.quick a div { flex: 1; min-width: 0; }
.quick b { display: block; font-size: 13px; }
.quick small { color: var(--muted); font-size: 11px; }
.quick a > .ic { width: 16px; height: 16px; color: var(--muted); }

/* Composer (Bramwell layout) */
.composer-panel { padding: 24px; }
.composer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.composer-top h2 { font-size: 24px; margin: 4px 0 0; }
.field-label { font-size: 11px; font-weight: 700; letter-spacing: .4px; margin: 20px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.field-label .muted { font-weight: 400; letter-spacing: 0; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-tile { margin: 0; cursor: pointer; display: block; }
.type-tile input { position: absolute; opacity: 0; pointer-events: none; }
.type-tile > span { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 13px; height: 100%; transition: border-color .15s, background .15s; }
.type-tile .ic { width: 20px; height: 20px; color: var(--gold); margin-bottom: 4px; }
.type-tile b { font-size: 12px; font-weight: 600; }
.type-tile small { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.4; margin: 0; }
.type-tile:hover > span { border-color: var(--gold-soft); }
.type-tile input:checked + span { border-color: var(--gold); background: var(--gold-bg); box-shadow: 0 0 0 1px var(--gold) inset; }
.type-tile input:focus-visible + span { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.fmt-row { margin-top: 14px; align-items: start; }
.guide { background: #f7f3ea; border: 1px solid #e2d7bd; border-radius: 10px; padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.guide b { color: #6f571d; font-size: 13px; }
.guide span { color: var(--muted); line-height: 1.5; }
.guide em { color: #6f571d; font-style: normal; font-weight: 600; }
.acct.off { opacity: .5; cursor: not-allowed; background: #f3efe3; }
.editor textarea { min-height: 150px; }
.sched { margin-top: 20px; }
.composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; flex-wrap: wrap; }
.composer-footer > span { display: flex; align-items: center; gap: 6px; }
.composer-footer .ic { width: 14px; height: 14px; color: #2f7d4f; }
.foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.preview-heading strong { color: var(--muted); font-size: 10px; font-weight: 500; }
.preview-platforms { display: flex; gap: 5px; margin-bottom: 10px; overflow-x: auto; padding: 2px; flex-wrap: wrap; }
.preview-platforms button { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fdfcf9; color: var(--muted); font: 600 10px var(--sans); cursor: pointer; }
.preview-platforms button.active { color: #6f571d; border-color: var(--gold-soft); background: var(--gold-bg); }
.phone-preview { width: 100%; max-width: 330px; margin: 0 auto; background: #fff; border: 5px solid #292833; border-radius: 28px; padding: 24px 14px 16px; box-shadow: 0 15px 35px rgba(16,16,20,.1); position: relative; }
.phone-speaker { position: absolute; width: 52px; height: 5px; border-radius: 5px; background: #292833; top: 7px; left: 50%; transform: translateX(-50%); }
.pv-head { display: flex; align-items: center; gap: 8px; }
.pv-head > div { display: flex; flex-direction: column; }
.pv-head b { font-size: 11px; }
.pv-head small { font-size: 9px; color: var(--muted); }
.pv-avatar { width: 30px; height: 30px; border-radius: 50%; background: #101014; color: var(--gold-soft); display: grid; place-items: center; font: 600 13px var(--serif); }
.pv-caption { font-size: 12px; line-height: 1.55; margin: 12px 0; white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow: hidden; }
.pv-frame { width: 100%; position: relative; overflow: hidden; border-radius: 9px; background: #101014; }
.pv-frame img, .pv-frame video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.pv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(135deg, #efe9da, #f7f3ea); color: #9a7b2d; font-size: 10px; text-align: center; padding: 8px; }
.pv-empty b { font: 600 16px var(--serif); color: #856a25; }
.safe { position: absolute; inset: 11% 0 14%; border-top: 1px dashed rgba(255,255,255,.7); border-bottom: 1px dashed rgba(255,255,255,.7); display: flex; align-items: flex-end; justify-content: center; padding: 6px; pointer-events: none; }
.safe span { background: rgba(16,16,20,.7); color: #fff; font-size: 8px; padding: 3px 6px; border-radius: 4px; }
.pv-actions { display: flex; gap: 14px; padding: 10px 2px 2px; color: #444; font-size: 15px; }
.preview-spec { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid #e2d7bd; border-radius: 10px; background: #f7f3ea; color: #856a25; }
.preview-spec .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.preview-spec div { display: flex; flex-direction: column; gap: 3px; }
.preview-spec strong { color: #6f571d; font-size: 11px; }
.preview-spec span { color: var(--muted); font-size: 10px; line-height: 1.5; }

/* Calendar: add button and status colours */
.cal-top { display: flex; justify-content: space-between; align-items: center; }
.cal-add { color: var(--muted); text-decoration: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; opacity: 0; }
.cal-add .ic { width: 13px; height: 13px; }
.cal-cell:hover .cal-add, .cal-add:focus { opacity: 1; background: var(--gold-bg); color: var(--gold); }
.cal-cell { min-height: 108px; }
.cal-cell.today .cal-day { color: #fff; background: var(--gold); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-weight: 700; }

/* Roles, 2-step */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 10px 0 14px; }
.perm { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; margin: 0; }
.perm small { display: block; margin-top: 2px; line-height: 1.4; }
.perm input:checked + span b { color: #6f571d; }
.qr-box { display: flex; justify-content: center; margin: 14px 0; }
#qr { width: 210px; height: 210px; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
#qr svg { width: 100%; height: 100%; display: block; }
.steps { padding-left: 1.2rem; font-size: 13px; }

/* Auth: split screen */
.auth-body { background: var(--bg); }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art { background: #101014; color: #f7f3ea; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-logo { width: 190px; height: auto; position: relative; z-index: 1; }
.auth-copy { position: relative; z-index: 1; max-width: 460px; }
.auth-copy .eyebrow { color: var(--gold-soft); }
.auth-copy h2 { font-size: 44px; line-height: 1.12; margin: 14px 0 16px; letter-spacing: -.8px; color: #f7f3ea; }
.auth-copy p { color: #a5a5ad; font-size: 14px; max-width: 380px; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(195,162,84,.2); right: -160px; }
.ring.r1 { width: 520px; height: 520px; top: -120px; }
.ring.r2 { width: 380px; height: 380px; top: -50px; right: -90px; border-color: rgba(195,162,84,.14); }
.ring.r3 { width: 240px; height: 240px; top: 20px; right: -20px; border-color: rgba(195,162,84,.1); }
.auth-pane { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 34px; margin-bottom: 6px; }
.auth-card .form { margin-bottom: 14px; }
.auth-card .btn.block { margin-top: 4px; }
.auth-logo-ink { display: none; width: 170px; margin-bottom: 22px; }
.pw { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 8px 0 11px; margin-top: .3rem; color: var(--muted); }
.pw:focus-within { border-color: var(--gold-soft); outline: 2px solid var(--gold-soft); }
.pw input { border: 0; margin: 0; padding: .55rem 0; outline: 0 !important; background: transparent; }
.eye { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; display: grid; place-items: center; }
.eye:hover { color: var(--ink); }
.auth-card .brand-mark { display: none; }

@media (max-width: 1100px) {
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .dash-grid, .dash-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    .composer, .cols { grid-template-columns: 1fr; }
    .comp-side { position: static; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-logo-ink { display: block; }
}
@media (max-width: 760px) {
    .side { position: fixed; left: -270px; z-index: 50; transition: left .2s; width: 248px; }
    .side.open { left: 0; }
        .scrim { display: none; position: fixed; inset: 0; background: rgba(16,16,20,.5); z-index: 45; }
    .shell:has(.side.open) .scrim { display: block; }
    .burger { display: block; }
    .content { padding: 18px 16px 48px; }
    .top { padding: 0 14px; gap: 8px; }
    .gsearch { display: none; }
    .top-actions { margin-left: auto; }
    .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric b { font-size: 24px; }
    .type-grid { grid-template-columns: repeat(2, 1fr); }
    .perm-grid { grid-template-columns: 1fr; }
    .page-head h1 { font-size: 1.5rem; }
    .auth-pane { padding: 20px; }
    .queue-item { flex-wrap: wrap; }
    .q-pf { display: none; }
    .grid2 { grid-template-columns: 1fr; }
    .cal-cell { min-height: 70px; }
    .cal-item { font-size: .65rem; }
    .search input { min-width: 0; width: 100%; }
    .family .table, .family .table tbody, .family .table tr, .family .table td { display: block; }
    .family .table tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
    .family .table td { padding: .15rem 0; border: 0; }
    .family .table td.right { text-align: left; padding-top: .4rem; }
    .card.flush .table { min-width: 560px; }
}

/* Media library, video players */
.thumb.playable { width: 240px; height: auto; aspect-ratio: 9 / 16; max-height: 420px; }
.thumb.playable video { object-fit: contain; background: #000; }
.pv-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.thumb video { background: #000; }
.media-sources { display: flex; gap: .8rem; flex-wrap: wrap; align-items: stretch; margin-bottom: .6rem; }
.media-sources .dropzone { flex: 1; min-width: 260px; margin: 0; }
.lib-panel { border: 1px solid var(--line); border-radius: 12px; padding: .8rem; background: #fbf9f2; margin-bottom: .8rem; }
.lib-tools { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: .6rem; }
.lib-tools input { margin: 0; max-width: 280px; }
.lib-thumbs { max-height: 320px; overflow-y: auto; }
.lib-thumbs .thumb { width: 96px; height: 96px; cursor: pointer; }
.lib-thumbs .thumb:hover { outline: 2px solid var(--gold-soft); }
.lib-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1rem; }
.lib-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.lib-prev { aspect-ratio: 4 / 3; background: #0d0d10; display: grid; place-items: center; }
.lib-prev img, .lib-prev video { width: 100%; height: 100%; object-fit: contain; display: block; }
.lib-meta { padding: .7rem .8rem .2rem; display: flex; flex-direction: column; gap: 2px; }
.lib-meta b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lib-tags span { background: var(--gold-bg); color: var(--gold); border-radius: 999px; padding: 1px 8px; font-size: .7rem; }
.lib-actions { padding: .6rem .8rem .8rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; margin-top: auto; }
.lib-edit { width: 100%; }
.lib-edit summary { list-style: none; display: inline-block; cursor: pointer; }
.lib-edit summary::-webkit-details-marker { display: none; }
.lib-edit form { margin-top: .6rem; }

/* Content planner */
.plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.plan-bar .cal-head { margin-bottom: 0; }
.plan-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.plan-filter select { padding: .35rem .5rem; margin: 0; }
.plan-counts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.pc { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: .78rem; }
.pc b { font-weight: 700; }
.plan-table td, .plan-table th { vertical-align: top; }
.plan-table .c-date { width: 86px; white-space: nowrap; }
.plan-table tr.wkend td { background: #faf6ea; }
.plan-table tr.today td { background: #fdf3d4; }
.plan-table tr.today .c-date b { color: var(--gold); }
.plan-table tr.plan-empty td { padding-top: .35rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.plan-table tr.plan-row { cursor: pointer; }
.plan-table tr.plan-row:hover td { background: #f6f1e3; }
.plan-table tr.plan-row.loose { cursor: default; }
.plan-table tr.plan-more td { padding-top: 0; padding-bottom: .3rem; }
.plan-add { background: none; border: 0; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; opacity: .55; padding: 2px 4px; border-radius: 6px; }
.plan-add .ic { width: 13px; height: 13px; }
.plan-table tr:hover .plan-add, .plan-add:focus { opacity: 1; color: var(--gold); background: var(--gold-bg); }
.st { width: auto; margin: 0; padding: .25rem .4rem; font-size: .78rem; border-radius: 999px; }
.st-idea { background: #f1eee4; } .st-planned { background: var(--info-bg); } .st-in_production { background: var(--warn-bg); } .st-made { background: var(--ok-bg); }
.cal-add { border: 0; background: none; cursor: pointer; }
.cal-item[class*="s-plan-"] { border-left: 3px solid var(--gold-soft); }
.cal-item.s-plan-idea { background: #f1eee4; color: var(--muted); } .cal-item.s-plan-planned { background: var(--info-bg); color: var(--info); }
.cal-item.s-plan-in_production { background: var(--warn-bg); color: var(--warn); } .cal-item.s-plan-made, .cal-item.s-plan-published { background: var(--ok-bg); color: var(--ok); }
.cal-item.s-plan-scheduled { background: var(--info-bg); color: var(--info); } .cal-item.s-plan-failed { background: var(--bad-bg); color: var(--bad); }
.drawer-scrim { position: fixed; inset: 0; background: rgba(16,16,20,.45); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--card); z-index: 70; overflow-y: auto; padding: 1.2rem 1.4rem 5rem; box-shadow: -12px 0 40px rgba(0,0,0,.18); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.drawer-head h2 { margin: 0; }
.drawer-foot { position: sticky; bottom: -5rem; display: flex; gap: .6rem; align-items: center; padding: .8rem 0; background: var(--card); border-top: 1px solid var(--line); margin-top: 1rem; }
.drawer-foot .grow { flex: 1; }
.chan-pick { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: .8rem; }
.chan-pick label { margin: 0; }
body.drawer-open { overflow: hidden; }
.plan-ref summary { cursor: pointer; }
.plan-ref-row { margin-top: .6rem; }
.plan-ref-row p { margin: .1rem 0 0; }
@media (max-width: 960px) { .plan-table { min-width: 860px; } .plan-table .c-date { width: 70px; } }

/* Reports, history, comments */
.winners { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 0 0 1.2rem; }
.winner { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; border-left: 3px solid var(--gold); }
.winner b { font-size: 1.02rem; }
.winner span { font-size: .85rem; color: var(--muted); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: .8rem 0 0; padding: 0; font-size: .82rem; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hbars { display: flex; flex-direction: column; gap: .7rem; margin-top: .6rem; }
.hbar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; align-items: center; gap: .7rem; font-size: .85rem; }
.hb-t { background: #eee8d8; border-radius: 6px; height: 14px; overflow: hidden; display: block; }
.hb-t i { display: block; height: 100%; border-radius: 6px; }
.hb-v { text-align: right; font-weight: 600; }
.chart-empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; }
.delta { font-size: .78rem; font-weight: 600; }
.delta.up { color: #2e7d4f; } .delta.down { color: #b3382c; }
.num { text-align: right; white-space: nowrap; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.group-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment.is-done { opacity: .6; }
.comment p { margin: .4rem 0 .6rem; }
.comment-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.comment-foot form { margin: 0; }
@media (max-width: 700px) { .hbar { grid-template-columns: 1fr 64px; } .hb-l { grid-column: 1 / -1; } .hb-t { grid-column: 1; } }
.notes summary { cursor: pointer; font-weight: 600; } .notes ul { margin: .5rem 0 0 1.1rem; padding: 0; }
