@font-face { font-family: "Cormorant Garamond"; font-weight: 400 700; src: url(/fonts/CormorantGaramond-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400 700; src: url(/fonts/CormorantGaramond-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 700; src: url(/fonts/Inter-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --maroon: #5e1620; --gold: #c9a24b; --gold-deep: #a9772f; --cream: #fbf5ea; --cream-deep: #f3ead9;
  --ink: #2f2a26; --muted: #7a7266; --line: #e6dcc8; --card: #fffdf8;
  --ok: #3f6b3a; --ok-bg: #e5efdf; --bad: #a3271d; --bad-bg: #f8e1dc; --warn: #8a5a00; --warn-bg: #fbefd2;
  --info: #2c5a7a; --info-bg: #e0ecf4; --sage: #e7e9dc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 15px/1.45 "Inter", system-ui, sans-serif; }
a { color: var(--maroon); }
h1, h2, .headline, .brand { font-family: "Cormorant Garamond", Georgia, serif; }
h1 { font-size: 34px; line-height: 1.1; margin: 0; color: var(--maroon); }
h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
pre { white-space: pre-wrap; font: inherit; margin: 0; }
code { background: var(--cream-deep); padding: 1px 5px; border-radius: 4px; }
small { color: var(--muted); font-weight: 400; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: var(--maroon); color: var(--cream); }
.brand { color: var(--cream); text-decoration: none; font-size: 24px; font-weight: 600; }
.brand span { font-style: italic; color: var(--gold); }
.brand small { font: 500 11px "Inter"; letter-spacing: .2em; text-transform: uppercase; color: #e9d9c0; margin-left: 4px; }
.top nav { display: flex; gap: 6px; align-items: center; flex: 1; }
.top nav a { color: #e9d9c0; text-decoration: none; padding: 6px 12px; border-radius: 999px; }
.top nav a[aria-current] { background: #ffffff1f; color: #fff; }
.top nav a.btn { background: var(--gold); color: var(--maroon); margin-left: 8px; }
.who { font-size: 12px; color: #e9d9c0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
main { padding: 20px 24px 60px; max-width: 1800px; margin: 0 auto; }
main.narrow { max-width: 560px; padding-top: 80px; }

/* buttons, forms */
.btn { display: inline-block; border: 0; cursor: pointer; background: var(--maroon); color: var(--cream); font: 600 14px "Inter";
  padding: 9px 16px; border-radius: 999px; text-decoration: none; list-style: none; }
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--maroon); box-shadow: inset 0 0 0 1.5px var(--maroon); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn.small { padding: 5px 12px; font-size: 13px; }
summary.btn::-webkit-details-marker { display: none; }
input, select, textarea { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
legend { font-weight: 600; font-size: 13px; }
form.inline { display: inline-flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
form.inline label { flex-direction: row; align-items: center; gap: 8px; }
form.inline input { width: auto; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid .wide { grid-column: 1 / -1; }
.card-form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-top: 16px; max-width: 900px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.sub { color: var(--muted); margin: 6px 0 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* stats */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats span { color: var(--muted); }
.stats .warn { background: var(--warn-bg); border-color: #e9cf8c; }
meter { width: 120px; }

/* board */
.columns { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #f6eedf; border-radius: 14px; padding: 12px; min-height: 200px; }
.col h2 { margin: 0; font-size: 22px; color: var(--maroon); display: flex; align-items: baseline; gap: 8px; }
.col .n { font: 600 12px "Inter"; background: var(--maroon); color: var(--cream); border-radius: 999px; padding: 1px 8px; }
.col-attention .n { background: var(--bad); }
.col-process .n { background: var(--info); }
.hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.empty { color: #c8bca6; text-align: center; }
.card { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  margin-bottom: 8px; text-decoration: none; color: inherit; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 3px 12px #5e162022; }
.card img, .card .noimg { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; flex: none; }
.noimg { background: var(--cream-deep); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.noimg.big { width: 100%; aspect-ratio: 4/5; border-radius: 12px; font-size: 14px; }
.meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.when { font-size: 12px; font-weight: 600; color: var(--gold-deep); }
.topic { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ch, .pill, .flag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--cream-deep); color: var(--muted); }
.ch-instagram { background: #f6dde6; color: #8a2350; } .ch-threads { background: #e3e3e3; color: #222; } .ch-facebook { background: #dde6f6; color: #23498a; }
.flag { background: var(--warn-bg); color: var(--warn); }
.job { font-size: 12px; color: var(--info); display: inline-flex; gap: 6px; align-items: center; }
.err { font-size: 11px; color: var(--bad); }
.by { font-size: 11px; color: var(--ok); }
.spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rejected { margin-top: 18px; } .rejected summary { cursor: pointer; color: var(--muted); }
.rejected .row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 8px; }

/* status colours (cards, pills, calendar) */
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: capitalize; }
.st-brief { --c: var(--muted); --b: var(--cream-deep); }
.st-drafting { --c: var(--info); --b: var(--info-bg); }
.st-pending_approval { --c: var(--warn); --b: var(--warn-bg); }
.st-changes_requested { --c: #7a3e8a; --b: #efe2f3; }
.st-approved, .st-scheduled { --c: var(--maroon); --b: #f3dfe1; }
.st-published { --c: var(--ok); --b: var(--ok-bg); }
.st-failed { --c: var(--bad); --b: var(--bad-bg); }
.st-rejected { --c: #777; --b: #eee; }
.status, .legend span, .ev { color: var(--c); background: var(--b); }
.card { border-left: 4px solid var(--b); }

/* calendar */
.calhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.calhead h1 { min-width: 220px; text-align: center; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.legend span { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 4px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day.other { opacity: .45; }
.day.today { outline: 2px solid var(--gold); }
.day .d { font-size: 12px; font-weight: 700; color: var(--muted); }
.ev { font-size: 12px; padding: 3px 6px; border-radius: 6px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* post page */
.posthead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post { display: grid; grid-template-columns: minmax(280px, 460px) minmax(0, 1fr); gap: 28px; align-items: start; }
.poster { width: 100%; border-radius: 12px; box-shadow: 0 6px 24px #5e162026; display: block; }
.visual { min-width: 0; }
.gallery { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: 0 6px 24px #5e16201a; outline: none; }
.cover { position: relative; display: block; border-radius: 12px; overflow: hidden; }
.cover img { display: block; width: 100%; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track img { flex: 0 0 100%; scroll-snap-align: start; }
.cover .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: #fffdf8e6; color: var(--maroon); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px #0003;
  opacity: 0; transition: opacity .15s; }
.gallery:hover .nav, .gallery:focus-within .nav { opacity: 1; }
@media (hover: none) { .cover .nav { display: none; } }
.cover .nav[hidden] { display: none; }
.cover .prev { left: 10px; } .cover .next { right: 10px; }
.thumbs { --gap: 10px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); gap: var(--gap);
  margin-top: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; position: relative; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs a { position: relative; scroll-snap-align: start; border-radius: 10px; overflow: hidden; aspect-ratio: 5 / 4; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: opacity .15s; }
.thumbs a[data-slide]:not(.on) img { opacity: .55; }
.thumbs a.on { opacity: 1; } .thumbs a.on::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--gold); border-radius: 10px; }
.thumbs span { position: absolute; left: 6px; bottom: 6px; font-size: 10px; background: #000a; color: #fff; padding: 1px 6px; border-radius: 4px; }
.gallery-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px 2px; }
.gallery-foot b { font-size: 16px; color: var(--ink); font-weight: 600; }
.gallery-foot .count { font-size: 13px; color: var(--muted); }
.copy section { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.flags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.flags .flag { font-size: 12px; padding: 3px 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff7e6 !important; border-color: #ecd9a8 !important; }
.actions details { display: inline-block; } .actions details[open] { flex-basis: 100%; }
.actions details form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; align-items: flex-start; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-deep); }
.headline { font-size: 36px; line-height: 1.05; margin: 6px 0 10px; color: var(--maroon); }
.headline span { display: block; } .headline span:nth-child(2) { font-style: italic; }
.cta { display: inline-block; background: var(--gold); color: var(--maroon); font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.caption { background: var(--cream); border-radius: 8px; padding: 10px 12px; }
details.edit { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; }
details.edit summary { cursor: pointer; font-weight: 600; color: var(--maroon); }
details.edit form { margin-top: 14px; }
.regen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.regen span { font-size: 13px; color: var(--muted); }
.timeline { margin-top: 28px; }
.timeline table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; font-size: 13px; }
.timeline td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.timeline tr.bad td { background: #fdf1ee; }
.timeline .at { white-space: nowrap; color: var(--muted); }
.timeline .txt { word-break: break-word; }
.timeline .num { text-align: right; white-space: nowrap; color: var(--muted); }
.kind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--cream-deep); white-space: nowrap; }
.k-audit { background: #f3dfe1; color: var(--maroon); } .k-ai_call { background: var(--info-bg); color: var(--info); }
.k-publish_attempt { background: var(--ok-bg); color: var(--ok); }

@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 8px; padding: 10px 16px; } .who { display: none; }
  main { padding: 16px; }
  .columns { grid-template-columns: 1fr; overflow: visible; }
  .col { min-height: 0; } .col-briefs { order: 9; }
  .post { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; } .dow, .day.other { display: none; } .day { min-height: 0; }
  form.inline { width: 100%; }
}
.login { max-width: 380px; margin: 60px auto; display: flex; flex-direction: column; gap: 14px; }
.top form { margin: 0; }
.top .logout { background: none; border: 0; color: #e9d9c0; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
