@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  --olive: #53553f; --coal: #23241a; --ink: #2b2b28; --muted: #6b6b63; --line: #e4e2da; --linen: #f3f1e8; --paper: #fff;
  --flame: #e3703b; --good: #2f7a4b; --badc: #b23a2e;
  --meta: #3d6db5; --gads: #53553f; --web: #2f7f86; --seo: #7a5c8f; --gbp: #b5652b; --call: #a8322d; --form: #c28a2c; --fb: #4267b2; --yt: #c4302b; --kit: #4b7d6e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Montserrat, system-ui, sans-serif; color: var(--ink); background: var(--linen); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, select, input, textarea { font: inherit; }

/* ---------- shared controls */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--coal);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c9c6ba; }
.btn.primary { background: var(--flame); border-color: var(--flame); color: #fff; }
.btn.dark { background: var(--olive); border-color: var(--olive); color: #fff; }
select.btn { padding-right: 32px; }
.pill { display: inline-block; white-space: nowrap; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.ready { background: #e3f1e7; color: var(--good); }
.pill.draft { background: #fbe7d9; color: #a4521f; }
.pill.none { background: #eeede8; color: var(--muted); }
.chip { display: inline-block; padding: 3px 8px; margin: 2px 4px 2px 0; border-radius: 5px; background: #eeede8; font-size: 12px; font-weight: 600; color: #4a4a43; }

/* ---------- admin list */
.shell { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.top img { height: 46px; }
.top h1 { font-size: 30px; margin: 18px 0 4px; color: var(--coal); }
.sub { color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.tile .l { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .v { font-size: 30px; font-weight: 800; color: var(--coal); margin-top: 6px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 960px; }
table.list th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px;
  border-bottom: 1px solid var(--line); font-weight: 600; }
table.list td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list td.n, table.list th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.list tr:last-child td { border-bottom: 0; }
.cname { font-weight: 700; color: var(--coal); }
.cdom { font-size: 12px; color: var(--muted); margin-top: 2px; }
.alert { background: #fdf3ea; border: 1px solid #f3d6bf; border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.login { max-width: 360px; margin: 14vh auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.login img { height: 44px; margin-bottom: 20px; }
.login input { width: 100%; padding: 12px 64px 12px 12px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 14px; }
.pwrap { position: relative; }
.eye { position: absolute; right: 6px; top: 14px; background: none; border: 0; color: var(--olive); font-weight: 700; font-size: 13px; padding: 6px 8px; cursor: pointer; }
.err { color: var(--badc); font-size: 14px; min-height: 20px; }

/* ---------- report */
.toolbar { position: sticky; top: 0; z-index: 5; background: rgba(243, 241, 232, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.toolbar .in { max-width: 900px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 120px; font-size: 14px; color: var(--muted); }
.editor { max-width: 900px; margin: 16px auto 0; padding: 0 16px; }
.editor .box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.editor label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.editor input, .editor textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.editor textarea { min-height: 88px; resize: vertical; }
.editor .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.doc { max-width: 900px; margin: 0 auto; padding: 24px 16px 64px; }
.page { background: var(--paper); border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(35,36,26,.06);
  padding: 56px 64px 40px; margin-bottom: 24px; min-height: 1100px; width: 100%; display: flex; flex-direction: column; }
.ph { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.ph img { height: 42px; }
.pf { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.rule { border: 0; border-top: 2px solid var(--coal); margin: 22px 0; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--olive); margin-top: 48px; }
h1.head { font-size: 44px; line-height: 1.08; margin: 12px 0 14px; color: var(--coal); font-weight: 800; letter-spacing: -.01em; }
.lede { font-size: 16px; line-height: 1.6; color: #4a4a43; max-width: 620px; margin: 0; }
h2.sec { display: flex; align-items: center; gap: 12px; font-size: 24px; margin: 0 0 8px; color: var(--coal); font-weight: 700; }
h2.sec i { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }
.secnote { color: #55554e; font-size: 14px; line-height: 1.5; margin: 0 0 16px; max-width: 640px; }
h3.mini { font-size: 14px; font-weight: 700; color: var(--coal); margin: 16px 0 8px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kpi .l { font-size: 14px; font-weight: 600; color: #55554e; }
.kpi .v { font-size: 36px; font-weight: 800; color: var(--coal); line-height: 1.1; margin: 6px 0 4px; letter-spacing: -.01em; }
.kpi .d { font-size: 13px; font-weight: 600; color: #55554e; }
.up { color: var(--good); } .down { color: var(--badc); } .flat { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.hb { display: grid; grid-template-columns: 170px 1fr 48px; gap: 12px; align-items: center; font-size: 14px; margin: 6px 0; }
.hb .bar { height: 14px; border-radius: 2px; min-width: 3px; }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: auto; display: block; }
.axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
ul.know { list-style: none; padding: 0; margin: 4px 0 0; }
ul.know li { position: relative; padding: 0 0 0 22px; margin: 0 0 18px; line-height: 1.6; font-size: 15px; }
ul.know li:last-child { margin-bottom: 0; }
ul.know li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--olive); }
ul.know li b { display: block; color: var(--coal); margin-bottom: 2px; }
.editor .items { display: grid; gap: 8px; }
.editor .items input { font-size: 14px; }
.editor .add { background: none; border: 0; color: var(--olive); font-weight: 700; font-size: 13px; padding: 6px 0; cursor: pointer; }
.callout { background: var(--linen); padding: 16px 18px; border-radius: 4px; font-size: 14px; line-height: 1.55; margin-top: 22px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #55554e; padding: 10px; border-bottom: 2px solid var(--coal); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t .n { text-align: right; font-variant-numeric: tabular-nums; }
.toc { font-size: 13px; margin-top: 28px; color: #55554e; } .toc b { color: var(--coal); }
.block + .block { margin-top: 8px; }
.empty { color: var(--muted); font-size: 14px; }
.msg { max-width: 520px; margin: 18vh auto; text-align: center; color: var(--muted); }
.msg img { height: 46px; margin-bottom: 20px; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .page { padding: 28px 20px; min-height: 0; }
  h1.head { font-size: 32px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 18px; }
  .kpi .v { font-size: 30px; }
  .two { grid-template-columns: 1fr; gap: 8px; }
  .hb { grid-template-columns: 120px 1fr 40px; font-size: 13px; }
  .tablewrap-r { overflow-x: auto; }
  .ph { gap: 12px; } .ph img { height: 32px; } .ph span { font-size: 11px; text-align: right; }
}

@media print {
  @page { size: letter; margin: 0; }
  body { background: #fff; }
  .toolbar, .editor, .noprint { display: none !important; }
  .doc { max-width: none; padding: 0; margin: 0; }
  .page { box-shadow: none; border-radius: 0; margin: 0; width: 8.5in; height: 11in; min-height: 0; padding: .6in .7in .45in;
    page-break-after: always; break-after: page; overflow: hidden; }
  .page:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
