/* RevoSite dashboard. Colours: revosite.ai (D-55). Layout and responsive behaviour borrowed from the Vytra AlgoLab dashboard
   (colour roles, mono uppercase labels, bordered panels, swipeable nav strip, 4→2 column tiles);
   no code or data wiring from it. One stylesheet for PC, tablet and phone:
   - wide: normal tables inside panels;
   - ≤ 720 px: tables marked .cards become one card per row (labels from data-label),
     nav strips scroll sideways, every tap target is at least 44 px tall. No sideways page scroll. */
/* D-55: the revosite.ai palette (forest, gold, cream), as on the leave-behind PDF. Gold is
   used for lines and highlights, never for small text on cream (too little contrast). */
:root {
  --forest: #1C2B1E;
  --forest-2: #2F5D3A;
  --gold: #C9A84C;
  --cream: #F5EDD8;
  --bg: #FDFAF4;
  --panel: #ffffff;
  --head: #F3EEE0;
  --line: #E6DFC9;
  --fg: #1C2B1E;
  --fg2: #33402F;
  --muted: #6B6650;
  --accent: #2F5D3A;
  --accent-soft: rgba(201, 168, 76, .16);
  --ok: #1F7A45;
  --warn: #9A5B0B;
  --error: #B3261E;
  --wa: #1DA851;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", sans-serif;
  --tap: 44px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111A12;
    --panel: #1C2B1E;
    --head: #16231A;
    --line: #34463A;
    --fg: #F5EDD8;
    --fg2: #E2D9C2;
    --muted: #AFA88F;
    --accent: #C9A84C;
    --accent-soft: rgba(201, 168, 76, .14);
    --ok: #6BCB8B;
    --warn: #E8B04A;
    --error: #FF8A80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg2);
  font: 15px/1.5 var(--sans);
  overflow-x: hidden;
}
a { color: var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 0 22px 48px; }
h1, h2, h3 { color: var(--fg); }
h1 { font-size: 1.45rem; margin: 22px 0 8px; }
h2 { font-size: 1.1rem; margin: 30px 0 10px; }
h3 { font-size: 1rem; margin: 16px 0 4px; }

/* ── top bar (forest, as on revosite.ai) and project nav ── */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 4px 16px;
  padding: 8px 22px; background: var(--forest); border-bottom: 3px solid var(--gold);
}
.top .brand {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.25rem;
  color: var(--cream); text-decoration: none; margin-right: auto;
  min-height: var(--tap); display: flex; align-items: center;
}
.top .brand span { color: var(--gold); }
.top nav, nav.project { display: flex; align-items: center; gap: 6px; }
.top nav a, .top button.link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  border: 1px solid transparent; border-radius: 6px; background: none;
  color: var(--cream); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
.top nav a:hover, .top button.link:hover { border-color: var(--gold); }
.top nav a[aria-current="page"] { border-color: var(--gold); color: var(--gold); }
/* phones get a "Menu" drop-down instead of the row of links (no JavaScript) */
details.menu { display: none; position: relative; }
details.menu > summary {
  list-style: none; cursor: pointer; min-height: var(--tap); display: flex; align-items: center;
  padding: 0 14px; border: 1px solid var(--gold); border-radius: 6px; color: var(--cream); font-weight: 600;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  flex-direction: column; align-items: stretch; gap: 2px; padding: 8px;
  background: var(--forest); border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
details.menu > nav a, details.menu > nav button.link, details.menu > nav form { width: 100%; }
details.menu > nav button.link { justify-content: flex-start; padding: 0 12px; }
nav.project {
  padding: 8px 22px; background: var(--head); border-bottom: 1px solid var(--line);
}
nav.project strong { color: var(--fg); margin-right: 8px; white-space: nowrap; }
nav.project a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  color: var(--fg2); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
}
nav.project a:hover { border-color: var(--forest-2); color: var(--fg); }
nav.project a[aria-current="page"] { border-color: var(--gold); color: var(--fg); background: var(--accent-soft); }
nav.project a.ops { border-style: dashed; }
.inline { display: inline; margin: 0; }

/* ── controls ── */
button, a.button {
  font: inherit; font-weight: 600; padding: 0 18px; min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--forest); border-radius: 6px;
  background: var(--forest); color: var(--cream); cursor: pointer; text-decoration: none;
}
@media (prefers-color-scheme: dark) {
  button, a.button { background: var(--gold); border-color: var(--gold); color: var(--forest); }
}
button.link { background: none; border-color: transparent; color: var(--accent); text-decoration: none; }
a.button.ghost { background: none; color: var(--accent); border-color: var(--line); }
a.button.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
a.small { font-size: 0.85rem; display: inline-flex; align-items: center; min-height: var(--tap); }
input, select, textarea {
  font: inherit; min-height: var(--tap); padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--fg); max-width: 100%;
}
textarea { min-height: 88px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; }
.narrow { max-width: 360px; }
/* Tick boxes and radio buttons sit beside their words; the whole row stays a full tap target. */
input[type="checkbox"], input[type="radio"] {
  min-height: 0; width: 20px; height: 20px; margin: 0; padding: 0; flex: none;
  accent-color: var(--accent);
}
.stack fieldset {
  border: 1px solid var(--line); border-radius: 6px; margin: 0; padding: 6px 14px 8px;
  display: flex; flex-direction: column; gap: 0;
}
.stack fieldset legend { padding: 0 6px; }
.stack fieldset label {
  flex-direction: row; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer;
}
.stack fieldset.verdicts { flex-direction: row; flex-wrap: wrap; gap: 0 28px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 8px 0 12px;
  padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters label {
  display: flex; flex-direction: column; gap: 2px;
  font: 700 0.7rem var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.filters label input, .filters label select { font: 0.95rem var(--sans); letter-spacing: 0; text-transform: none; }
fieldset.verdicts { border: 1px solid var(--line); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
fieldset.verdicts label { min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; }

/* ── figure tiles (KPI style): auto columns on PC, two on phones ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.tile span {
  display: block; margin-bottom: 4px;
  font: 700 0.68rem var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
}
.tile b { font: 700 1.4rem var(--mono); color: var(--fg); }
.tile small { display: block; color: var(--muted); }

/* ── tables inside a bordered panel ── */
.scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th {
  background: var(--head); color: var(--muted); text-align: left; padding: 9px 12px;
  font: 700 0.68rem var(--mono); letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, table tr:hover td { background: var(--accent-soft); }
td.wrap { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 16rem; max-width: 40rem; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

dl.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 8px 0;
  padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; color: var(--fg); }
ul.cards { list-style: none; padding: 0; display: grid; gap: 10px; }
ul.cards li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
ul.evidence { padding-left: 18px; }
ul.evidence li { margin-bottom: 6px; }
.at { font-family: var(--mono); font-variant-numeric: tabular-nums; margin-right: 6px; }
audio { width: 100%; max-width: 480px; }
pre {
  white-space: pre-wrap; overflow-wrap: anywhere; font: 0.8rem var(--mono);
  background: var(--panel); padding: 10px; border: 1px solid var(--line); border-radius: 6px;
}
.draft { white-space: pre-wrap; background: var(--panel); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 6px 6px 0; }
.muted { color: var(--muted); }
.warn { color: var(--warn); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.error { color: var(--error); font-weight: 600; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.tag {
  font: 700 0.65rem var(--mono); letter-spacing: 1px; border: 1px solid var(--warn); color: var(--warn);
  border-radius: 4px; padding: 1px 6px; vertical-align: middle;
}
.pager { display: flex; gap: 12px; }
.pager a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-decoration: none;
}

/* ── tablet ── */
@media (max-width: 1000px) {
  main { padding: 0 16px 40px; }
  .top, nav.project { padding-left: 16px; padding-right: 16px; }
}

/* ── phone ── */
@media (max-width: 720px) {
  body { font-size: 16px; }
  main { padding: 0 12px 32px; }
  h1 { font-size: 1.3rem; margin-top: 16px; }

  /* the main links fold into the Menu drop-down; the project strip swipes sideways */
  .top { padding: 6px 12px; }
  .top nav.wide { display: none; }
  details.menu { display: block; }
  details.menu > nav { display: flex; }
  nav.project {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    max-width: 100%; padding: 8px 12px;
  }
  nav.project a { flex-shrink: 0; }
  .actions > * { flex: 1 1 100%; }

  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 10px 12px; }
  .tile b { font-size: 1.2rem; }

  .filters { flex-direction: column; align-items: stretch; }
  .filters label input, .filters label select { width: 100%; }
  .filters button { width: 100%; }

  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 8px; }

  /* Tables marked .cards: each row becomes a card, each cell "LABEL  value". */
  .scroll:has(table.cards) { background: none; border: none; overflow: visible; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr:first-child:has(th) { display: none; }
  table.cards tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 10px; padding: 4px 14px 10px;
  }
  table.cards td {
    display: block; padding: 4px 0; border: none; white-space: normal; overflow-wrap: anywhere;
    color: var(--fg);
  }
  table.cards td::before {
    content: attr(data-label); display: block;
    font: 700 0.64rem var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  }
  table.cards td:not([data-label])::before, table.cards td[data-label=""]::before { content: none; }
  table.cards td.wrap { grid-column: 1 / -1; min-width: 0; max-width: none; }
  table.cards td.head {
    grid-column: 1 / -1; font-weight: 600; border-bottom: 1px solid var(--line);
    padding: 2px 0 6px; margin-bottom: 4px;
  }
  table.cards td.head::before { content: none; }
  table.cards td[colspan] { grid-column: 1 / -1; }
  /* the main link of a card fills a 44 px tap row */
  table.cards td.head a, table.cards td a.go {
    display: flex; align-items: center; min-height: var(--tap);
  }
  table.cards td:has(a.go) { grid-column: 1 / -1; }
  table.cards td.warn { color: var(--warn); }
  table.cards td.ok { color: var(--ok); }
  table.cards td.muted { color: var(--muted); }
  table.cards tr:hover td { background: none; }
  table.cards td:empty { display: none; }
}

/* ── call page (D-55) ── */
.verdict {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px;
  border-radius: 999px; font: 700 0.8rem var(--sans); border: 1px solid var(--line); color: var(--fg);
}
.verdict.v-hot { background: #B3261E; border-color: #B3261E; color: #fff; }
.verdict.v-warm { background: var(--gold); border-color: var(--gold); color: var(--forest); }
.verdict.v-cold { background: var(--head); }
.verdict.v-junk { background: none; color: var(--muted); }
section.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 16px 14px; margin: 14px 0;
}
section.panel h2 { margin-top: 12px; }
section.panel.next { border-left: 4px solid var(--gold); }
p.summary { font-size: 1.05rem; color: var(--fg); }
p.alert { background: var(--accent-soft); border: 1px solid var(--gold); border-radius: 6px; padding: 10px 12px; color: var(--fg); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
ul.concerns { padding-left: 18px; }
ul.concerns li { margin-bottom: 8px; }
.draft { border-left-color: var(--gold); }

/* D-54: Gujlish / English switch per project (staff) */
form.langmode { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
form.langmode button { min-height: 44px; padding: 0 14px; background: none; color: var(--accent);
  border: 1px solid var(--line); }
form.langmode button.on { background: var(--forest); color: var(--cream); border-color: var(--forest); }
table.compact td.wrapcell { white-space: normal; }

/* D-55 Deploy 2: Morning Brief */
span.small, .muted.small { font-size: 0.85rem; font-weight: 400; }
button.ghost { background: none; color: var(--accent); border-color: var(--line); }
tr.total td { background: var(--head); }
details.spend { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
details.spend > summary {
  cursor: pointer; min-height: var(--tap); display: flex; align-items: center;
  font-weight: 600; color: var(--accent);
}
form.spendform { max-width: 420px; }
form.spendform label { font-weight: 600; color: var(--fg); }
@media (max-width: 720px) {
  form.spendform { max-width: none; }
  form.spendform button { width: 100%; }
  table.cards tr.total { border-color: var(--gold); }
  table.cards tr.total td { background: none; }
}

/* D-55 Deploy 3: Buyers, Team, SAMPLE DATA */
.tag.sample { border-color: var(--gold); color: var(--forest); background: var(--gold); }
.tag.wait { border-color: var(--warn); color: var(--warn); }
nav.switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
nav.switch a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--fg2); text-decoration: none; font-weight: 500;
}
nav.switch a[aria-current="page"] { border-color: var(--gold); background: var(--accent-soft); color: var(--fg); }
.filters label.check {
  flex-direction: row; align-items: center; gap: 8px; min-height: var(--tap);
  font: 0.95rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--fg2);
}
.filters label.check input { min-height: 0; width: 20px; height: 20px; }
ul.cards.buyers li { display: flex; flex-direction: column; gap: 4px; }
ul.cards.buyers .row1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
ul.cards.buyers .row1 .verdict { margin-left: 0; }
ul.cards.buyers a.go { display: inline-flex; align-items: center; min-height: var(--tap); }
.facts-line { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--fg); }
p.scores span { font-family: var(--mono); }
ol.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--gold); }
ol.timeline li { position: relative; padding: 4px 0 14px 16px; }
ol.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 12px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--panel); border: 3px solid var(--gold);
}
ol.timeline .when { font-weight: 600; color: var(--fg); }
ol.timeline .when .verdict { margin-left: 4px; }
ol.timeline p { margin: 4px 0; }
.small { font-size: 0.88rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.callcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--bg); }
.callcard .kicker {
  display: block; font: 700 0.66rem var(--mono); letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.callcard a { display: inline-flex; align-items: center; min-height: var(--tap); }
ul.notes { list-style: none; padding: 0; display: grid; gap: 8px; }
ul.notes li { border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 6px; padding: 8px 12px; }
ul.notes li.done { border-left-color: var(--line); opacity: .7; }
ul.notes li p { margin: 0 0 4px; white-space: pre-wrap; color: var(--fg); }
form.notefrm { max-width: 560px; margin-top: 10px; }
@media (max-width: 720px) {
  form.notefrm { max-width: none; }
  form.notefrm button { width: 100%; }
}
