/* The dashboard looks like an iPhone app: grouped background, white rounded cards, her sage
   green as the tint, a tab bar at the bottom on a phone (`.design-system.md` in .superdesign). */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --fill: rgb(118 118 128 / 0.12);
  --text: #000000;
  --muted: rgb(60 60 67 / 0.6);
  --line: rgb(60 60 67 / 0.18);
  --accent: #2f6f5e;
  --accent-text: #ffffff;
  --accent-soft: rgb(47 111 94 / 0.12);
  --red: #ff3b30;
  --green: #34c759;
  --care: #c76a00;
  --warn-bg: #fff6e0;
  --warn-text: #7a5800;
  --error-bg: #ffe9e7;
  --error-text: #b3261e;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  --bar: rgb(249 249 249 / 0.82);
  /* Charts: the stacked chart's four slots, validated for colour blindness on this surface. */
  --chart-1: #2a78d6;
  --chart-2: #eb6834;
  --chart-3: #1baf7a;
  --chart-4: #eda100;
  --chart-grid: #eeeae4;
  --chart-axis: #d3cdc3;
  --delta-up: #006300;
  --delta-down: #b42f2f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --fill: rgb(118 118 128 / 0.24);
    --text: #ffffff;
    --muted: rgb(235 235 245 / 0.6);
    --line: rgb(84 84 88 / 0.65);
    --accent: #6fbfa8;
    --accent-text: #0b1f19;
    --accent-soft: rgb(111 191 168 / 0.16);
    --red: #ff453a;
    --green: #30d158;
    --care: #ff9f0a;
    --warn-bg: #3a2f12;
    --warn-text: #f1d48a;
    --error-bg: #3f1d1a;
    --error-text: #ff9b92;
    --shadow: none;
    --bar: rgb(22 22 24 / 0.82);
    --chart-1: #3987e5;
    --chart-2: #d95926;
    --chart-3: #199e70;
    --chart-4: #c98500;
    --chart-grid: #2e2b27;
    --chart-axis: #45403a;
    --delta-up: #0ca30c;
    --delta-down: #e66767;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
main {
  max-width: 720px; margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-left)) calc(96px + env(safe-area-inset-bottom));
}
.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.icon { display: block; flex: none; }
.muted { color: var(--muted); }
.bad { color: var(--error-text); }
.small { font-size: 13px; }
.center { text-align: center; justify-content: center; }

/* Going from one page to another fades the content, while the bars stay put. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ——— The menus: a tab bar on a phone, a bar at the top on a computer ——— */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--bar); border-top: 0.5px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  view-transition-name: tabbar;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 48px; font-size: 10px; font-weight: 500; color: var(--muted);
}
.tabbar a[aria-current] { color: var(--accent); }
.tab-icon { position: relative; }
.badge-count {
  position: absolute; top: -4px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.topnav { display: none; }
@media (min-width: 900px) {
  .tabbar { display: none; }
  main { padding-bottom: 48px; }
  .topnav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 28px; padding: 0 24px; height: 52px;
    background: var(--bar); border-bottom: 0.5px solid var(--line);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    view-transition-name: topnav;
  }
  .topnav nav { display: flex; gap: 20px; }
  .topnav nav a { color: var(--muted); font-size: 15px; white-space: nowrap; }
  .topnav nav a[aria-current] { color: var(--accent); font-weight: 600; }
}
.pill {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px;
  font-size: 12px; font-weight: 600; text-align: center; background: var(--red); color: #fff;
}
.demo {
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
  background: var(--warn-bg); color: var(--warn-text); vertical-align: middle;
}

/* While a job runs: a slim strip at the top of every page. */
.banner {
  position: sticky; top: 0; z-index: 45;
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 13px;
  background: var(--accent-soft); color: var(--accent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
@media (min-width: 900px) { .banner { top: 52px; } }
.banner[hidden] { display: none; }
.banner.trial { position: static; }
.banner.visit { position: static; }
/* An admin reading a creator's workspace: the server refuses a press, so nothing invites one. */
body[data-readonly] main form[method="post" i] button,
body[data-readonly] main [data-card] button { opacity: 0.4; pointer-events: none; }
body.login { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: 24px 16px; text-align: center; }
body.login main { max-width: 340px; padding: 0; }
body.login h1 { margin: 12px 0 8px; }
body.login p { margin: 0 0 24px; color: var(--muted); }
body.login button { width: 100%; }
.banner.done { background: var(--surface); color: var(--text); }
.banner.done .spinner { display: none; }
.banner a { color: var(--accent); font-weight: 600; }
.banner form { margin-left: auto; }
.banner form[hidden], .banner.done form { display: none; }
.banner button { min-height: 28px; padding: 0 10px; font-size: 13px; background: none; color: var(--accent); font-weight: 600; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }

/* ——— The head of a page: a large title, what it holds, its buttons ——— */
.back { display: inline-flex; align-items: center; gap: 2px; margin: 4px 0 0 -6px; font-size: 17px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 12px 0 12px; }
.page-head > div:first-child { min-width: 0; }
h1 { margin: 0; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.sub strong { font-weight: 400; }
.tools { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.tools form { margin: 0; }
.mini {
  padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.mini.on { background: var(--accent); color: var(--accent-text); }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0;
  font: inherit; font-size: 16px; cursor: pointer;
  background: var(--fill); color: var(--text); text-decoration: none;
}
button.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; border-radius: 99px; }
button.tinted, .button.tinted { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-radius: 99px; }
button.plain { background: none; color: var(--accent); padding: 0 8px; }
button.small { min-height: 32px; padding: 0 12px; font-size: 14px; }
button.quiet { background: none; color: var(--muted); }
.danger, button.danger { color: var(--red); }
button:disabled { cursor: progress; opacity: 0.6; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  min-width: 40px; min-height: 40px; padding: 0; border-radius: 50%;
  background: none; color: var(--accent); cursor: pointer;
}
.icon-button.round { min-width: 44px; min-height: 44px; background: var(--accent-soft); }
.icon-button.end { margin-left: auto; }
.grow { flex: 1; min-width: 0; padding: 0 12px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.actions > button.primary, .actions > .button.grow { flex: 1; }
.actions .menu { margin-left: auto; }
.actions.center { justify-content: center; }

/* ——— Searching and filtering ——— */
.alerts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.alerts li {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  font-size: 14px; background: var(--error-bg); color: var(--error-text);
}
.filters { margin-bottom: 12px; display: grid; gap: 10px; }
.filters .search { display: flex; align-items: center; gap: 8px; }
.filters .search > .segmented { flex: 1; }
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0;
  height: 38px; padding: 0 10px; border-radius: 10px; background: var(--fill); color: var(--muted);
}
.searchbox input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 17px; outline: none;
}
.searchbox input::-webkit-search-decoration { -webkit-appearance: none; }
/* An iOS segmented control: one choice of a few, the chosen one raised. */
.segmented {
  display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill);
  overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented .chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 32px; padding: 0 10px; border-radius: 7px; border: 0; background: none;
  color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.segmented .chip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.segmented .chip.on {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.04);
}
.segmented .chip.on span { color: var(--muted); opacity: 1; }
@media (prefers-color-scheme: dark) { .segmented .chip.on { background: #636366; } }
/* A row of choices that can be more than fit: it scrolls sideways. */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 99px;
  white-space: nowrap; font-size: 14px; color: var(--text); background: var(--surface);
}
.chip span { color: var(--muted); }
.chip.on { background: var(--accent); color: var(--accent-text); }
.chip.on span { color: inherit; opacity: 0.8; }
.count { margin: 0; color: var(--muted); font-size: 13px; }

/* ——— Action sheets: "…" on a card, the filters, *Nouvelle publication* ——— */
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > .sheet { display: none; }
.menu[open] > summary::before {
  content: ""; position: fixed; inset: 0; z-index: 60; cursor: default;
  background: rgb(0 0 0 / 0.35); animation: fade 0.2s ease-out;
}
.menu[open] > .sheet {
  position: fixed; z-index: 61; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  max-width: 440px; max-height: 85dvh; margin: 0 auto; overflow: auto;
  animation: rise 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .menu[open] > .sheet, .menu[open] > summary::before { animation: none; } }
.sheet-group {
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: var(--bar); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
}
.sheet-title {
  margin: 0; padding: 12px 16px; text-align: center; font-size: 13px; color: var(--muted);
  border-bottom: 0.5px solid var(--line);
}
.sheet-item, .sheet-link {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px;
  padding: 0 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--line);
  background: none; color: var(--accent); font-size: 17px; text-align: center;
}
.sheet-item:last-child, .sheet-link:last-child { border-bottom: 0; }
.sheet-item.danger { color: var(--red); }
.sheet-cancel {
  min-height: 56px; border-radius: 14px; background: var(--surface); color: var(--accent);
  font-size: 17px; font-weight: 600;
}
/* The filters in a sheet: one row per field, the value on the right. */
.sheet-group.form label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 16px; border-bottom: 0.5px solid var(--line); font-size: 17px;
}
.sheet-group.form select, .sheet-group.form input {
  max-width: 60%; min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px;
  background: var(--fill); color: var(--text); font: inherit; font-size: 16px;
}

/* ——— Cards ——— */
.card {
  background: var(--surface); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.busy { opacity: 0.55; }
.card.inset { background: var(--surface-2); box-shadow: none; }
.card > header { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 15px; }
.card > header .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card > header time { white-space: nowrap; font-size: 15px; }
.card > header time::before { content: "· "; }
.glyph {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
}
.glyph svg { width: 18px; height: 18px; }
.glyph.youtube { background: #ff0033; }
.glyph.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 55%, #8134af); }
.glyph.facebook { background: #0866ff; }
.context {
  margin: 4px 0 0; font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge, .tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; }
.badge { color: #fff; }
.badge.youtube { background: #ff0033; }
.badge.instagram { background: #c13584; }
.badge.facebook { background: #0866ff; }
.tag { background: var(--fill); color: var(--muted); }
.tag.c-sante, .tag.c-critique { background: var(--warn-bg); color: var(--warn-text); }
.tag.elsewhere, .tag.hidden { background: var(--warn-bg); color: var(--warn-text); }
.tag.ok { background: var(--accent); color: var(--accent-text); }
blockquote {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 4px 16px 16px 16px;
  background: var(--surface-2); font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.note {
  display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; padding: 8px 10px;
  border-radius: 10px; font-size: 14px; background: var(--surface-2); overflow-wrap: anywhere;
}
.note > .icon { margin-top: 1px; }
.note.warn { background: var(--warn-bg); color: var(--warn-text); }
.note.error { background: var(--error-bg); color: var(--error-text); }
.note.care { background: none; padding: 0; color: var(--care); font-weight: 500; }
.note.slip { display: block; background: var(--accent-soft); }
.note.slip p { margin: 0 0 4px; }
.note.slip .label { font-weight: 600; }
.note.slip .actions { margin-top: 8px; }
.note.slip button { min-height: 36px; font-size: 14px; background: var(--surface); }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.footnote { margin: 6px 16px 0; font-size: 13px; color: var(--muted); }
.footnote.center { margin-top: 16px; }

textarea, .field input, .field select, .inline input, .inline select {
  display: block; width: 100%; padding: 10px 12px; border-radius: 12px; resize: vertical;
  border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.4;
}
textarea:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
[data-card] textarea { resize: none; overflow: hidden; min-height: 76px; }
form > textarea:first-of-type, .slip + textarea { margin-top: 10px; }
.card form > textarea[name="text"] { margin-top: 10px; }

/* Her videos, searched from a card. */
.videos { margin-top: 8px; font-size: 14px; }
.videos > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; color: var(--accent); font-weight: 500; padding: 6px 0; }
.videos > summary::-webkit-details-marker { display: none; }
.videos .searchbox { margin: 4px 0 8px; }
.videos p { margin: 4px 0; }
.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.video-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.video-list a { flex: 1 1 100%; overflow-wrap: anywhere; }
.video-list .muted { flex: 1 1 auto; }
.video-list button { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* The private message beside a reply: a switch says whether it leaves with it. */
.dm { margin-top: 10px; border-top: 0.5px solid var(--line); }
.dm .label { display: block; margin: 10px 0 4px; font-size: 15px; font-weight: 600; }
.dm .label span { font-weight: 400; color: var(--muted); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 16px;
}
.dm > textarea { margin-bottom: 2px; }
/* Off, the message does not leave: its box folds away. */
.dm:has([data-dm-send]:not(:checked)) > textarea { display: none; }
input[role="switch"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0;
  width: 51px; height: 31px; border-radius: 99px; background: var(--fill); cursor: pointer;
  transition: background 0.2s;
}
input[role="switch"]::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgb(0 0 0 / 0.15), 0 1px 1px rgb(0 0 0 / 0.16);
  transition: transform 0.2s;
}
input[role="switch"]:checked { background: var(--green); }
input[role="switch"]:checked::before { transform: translateX(20px); }
.dm.by-hand > summary { display: flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 15px; font-weight: 500; }
a.button { min-height: 44px; }

/* A follow-up, with what it continues. */
.thread { margin: 10px 0 0; font-size: 14px; }
.thread .label { margin: 0; color: var(--muted); }
.thread.elsewhere .label { color: var(--warn-text); font-weight: 600; }
.thread .sent { margin-top: 4px; }
.outcome { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.outcome .state { font-weight: 600; }
/* Her reply, as sent: on the right, in her colour. */
.sent {
  margin: 8px 0 0 auto; width: fit-content; max-width: 90%; padding: 10px 12px;
  border-radius: 16px 4px 16px 16px; background: var(--accent-soft);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px;
}
.sent.other { margin-left: 0; border-radius: 4px 16px 16px 16px; background: var(--surface-2); }
/* A model's reply beside hers, in an evaluation's results. */
.sent.draft { background: var(--surface-2); }
.result header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.links { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.pager { display: flex; justify-content: space-between; }

/* A private conversation: the person's messages on the left, hers on the right. */
.chat { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
.bubble {
  max-width: 85%; margin: 0; padding: 8px 12px; border-radius: 18px 18px 18px 4px;
  background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px;
}
.bubble.hers { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--accent); color: var(--accent-text); }
.bubble time { display: block; margin-top: 2px; font-size: 11px; opacity: 0.65; }

/* ——— *Mots-clés* ——— */
.post { display: flex; gap: 12px; align-items: flex-start; }
.post > div { min-width: 0; flex: 1; }
.post .context { margin-top: 0; white-space: normal; }
.post .title {
  margin: 4px 0 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.thumb {
  flex: none; width: 64px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--surface-2);
}
.hook { margin-top: 12px; border-top: 0.5px solid var(--line); }
.hook > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 10px;
  min-height: 44px; font-size: 14px; list-style: none; cursor: pointer;
}
.hook > summary::-webkit-details-marker { display: none; }
.hook > summary > .icon { margin-left: auto; color: var(--muted); transition: transform 0.2s; }
.hook[open] > summary > .icon { transform: rotate(90deg); }
.hook .keywords { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.hook .keywords .tag { background: var(--accent-soft); color: var(--accent); }
.hook .preview {
  flex-basis: 100%; color: var(--muted); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hook[open] .preview { display: none; }
.hook .add { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 15px; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--green); }
.dot.off { background: var(--care); }
form.grouped > .actions + button.plain { display: block; margin: 12px auto 0; }

/* ——— Forms ——— */
.field { display: block; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: none; }
.field > span { font-weight: 400; }
.field input, .field textarea, .field [data-progress], .field button { margin-top: 4px; }
.field input { min-height: 44px; }
/* A model in two fields (`_model_picker.html`): the model, its precision. */
.field select { min-height: 44px; margin-top: 4px; }
.model-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
@media (max-width: 600px) { .model-picker { grid-template-columns: 1fr; } }
.subhead { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.field input[type=file] { padding: 8px 10px; }
/* Safari on iPhone gives a date its own width, wider than the field, and centres it (21 Oct 2026). */
.field input[type=datetime-local], .field input[type=date] {
  -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%;
}
.field input::-webkit-date-and-time-value { text-align: left; }
.field [data-progress] { display: block; font-weight: 400; }
/* The cover a publication will have: a small upright preview. */
.field.cover img {
  display: block; width: 90px; height: auto; max-height: 160px; object-fit: cover;
  margin-top: 6px; border-radius: 8px;
}
.field.cover img[hidden] { display: none; }
.inline { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 12px; }
.inline label { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.inline input, .inline select { min-height: 44px; width: auto; }
.inline input[type=number] { width: 90px; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 15px; }
.checks input { accent-color: var(--accent); width: 18px; height: 18px; vertical-align: -3px; }
.choices { display: grid; gap: 8px; }
.choices button { padding: 10px 14px; text-align: left; justify-content: flex-start; white-space: pre-wrap; height: auto; }
.fold { margin-top: 12px; padding-top: 10px; border-top: 0.5px solid var(--line); }
.fold > summary, .card details > summary { color: var(--accent); font-weight: 500; font-size: 15px; }
details > summary { cursor: pointer; padding: 6px 0; }
.card > .hint { color: var(--warn-text); }
.card .label { margin: 10px 0 0; font-size: 14px; font-weight: 600; }

/* ——— *Publications* ——— */
.targets { list-style: none; margin: 10px 0 0; padding: 0; display: grid; font-size: 15px; }
.targets li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 0.5px solid var(--line); }
.targets li:last-child { border-bottom: 0; }
.targets small { flex-basis: 100%; overflow-wrap: anywhere; }
.targets form { margin-left: auto; }
.targets button { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.meter { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.meter[hidden] { display: none; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 1s linear; }
@media (prefers-reduced-motion: reduce) { .meter > span { transition: none; } }
/* Her photos, each as Instagram will get it, with what the app changed. */
.photos ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.photos li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; }
.photos li > div { min-width: 0; }
.photos li p { margin: 0 0 4px; }
.photos img { flex: none; width: 90px; height: auto; border-radius: 8px; }
.photos .adjusted { color: var(--warn-text); }
.photos .actions { margin-top: 6px; }
.photos .actions button { min-height: 32px; padding: 0 12px; font-size: 14px; }
.best { margin-top: 12px; font-size: 14px; }
.best .label span { font-weight: 400; color: var(--muted); }
.best-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.best-name { min-width: 84px; color: var(--muted); }
.best .chip { min-height: 32px; font: inherit; cursor: pointer; background: var(--accent-soft); color: var(--accent); }
.hours { min-width: 640px; font-size: 12px; text-align: center; }
.hours th, .hours td { padding: 4px 2px; text-align: center; }
.hours th[scope=row] { text-align: left; padding-right: 8px; }
.hours td { background: color-mix(in srgb, var(--accent) calc(var(--score) * 0.5), transparent); }
.hours td.top { font-weight: 700; }

/* A publication: its name and state, the "…" sheet, a row per platform. */
.card[data-publication] > header { align-items: flex-start; }
.card[data-publication] > header .stack { flex: 1; min-width: 0; display: grid; gap: 4px; }
.card[data-publication] > header strong { font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.targets .icon { color: var(--green); }
.fold[data-keep="form"] { border-top: 0; padding-top: 0; }
.fold[data-keep="form"] > summary {
  display: flex; align-items: center; justify-content: center; min-height: 44px; list-style: none;
  border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.fold[data-keep="form"] > summary::-webkit-details-marker { display: none; }
/* Open, the form covers the screen like an iPhone sheet: a bar on top, grouped sections. */
.fold[data-keep="form"][open] > .form-sheet {
  position: fixed; inset: 0; z-index: 70; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); animation: rise 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
body:has(.fold[data-keep="form"][open]) { overflow: hidden; }
.sheet-bar {
  position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 52px; padding: env(safe-area-inset-top) 8px 0;
  background: var(--bar); border-bottom: 0.5px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.sheet-bar > strong { font-size: 17px; }
.sheet-bar > button:first-child { justify-self: start; }
.sheet-bar > button:last-child { justify-self: end; }
.sheet-bar button { font-size: 17px; min-height: 44px; }
.sheet-body {
  max-width: 720px; margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-left)) calc(32px + env(safe-area-inset-bottom));
}
.sheet-body > .group-title { margin-top: 22px; }
.form-group {
  margin: 0 0 8px; padding: 2px 16px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
}
.form-group > .switch-row { border-bottom: 0.5px solid var(--line); gap: 12px; }
.form-group > .switch-row:last-of-type { border-bottom: 0; }
.form-group .field input, .form-group textarea { background: var(--surface-2); }
.form-group > .checks.kinds { flex-direction: column; gap: 4px; margin: 0; padding: 10px 0; }
.form-group > .checks.kinds label { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.form-group > details { border-bottom: 0.5px solid var(--line); }
.form-group > details:last-child { border-bottom: 0; }
.form-group > details > summary { min-height: 44px; display: flex; align-items: center; }
/* An ending, a first comment or the keyword hook of a publication: off, its texts fold away. */
.form-group > .option { padding-bottom: 12px; border-bottom: 0.5px solid var(--line); }
.form-group > .option:last-child { border-bottom: 0; }
.form-group > .option:has(> .switch-row [data-option]:not(:checked)) { padding-bottom: 0; }
.option:has(> .switch-row [data-option]:not(:checked)) > :not(.switch-row) { display: none; }
.option > .switch-row { gap: 12px; padding: 6px 0; }
.form-group + .footnote { margin-bottom: 20px; }
/* One line to start with, like the fields above; the box grows with its text. */
.option textarea { min-height: 44px; }
.option .field textarea, .option .field input { font-weight: 400; }
.option > .switch-row .stack { display: grid; }
.option > .switch-row small { font-size: 13px; }
.with-glyph { display: flex; align-items: center; gap: 12px; min-width: 0; }
.with-glyph .stack { display: grid; }
.with-glyph small { font-size: 13px; }
input[role="switch"]:disabled { opacity: 0.45; cursor: default; }
.actions.stacked { flex-direction: column; align-items: stretch; margin-top: 24px; }
.actions.stacked > button { width: 100%; min-height: 50px; }

/* ——— *Vue d'ensemble* and *Communauté* ——— */
.picker select {
  appearance: none; -webkit-appearance: none; min-height: 32px; padding: 0 28px 0 12px; border: 0; border-radius: 99px;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
}
.kpis { margin: 4px 0 20px; }
.kpis .card { margin: 0; }
.chart figcaption strong { font-size: 17px; }
.table-view > summary { color: var(--accent); font-weight: 500; font-size: 15px; }
.group-head { margin: 0; padding: 14px 16px 6px; font-size: 17px; font-weight: 600; }
a.row { color: var(--text); }
.one-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.lead { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.35; }
.card.lead > .icon { color: var(--accent); margin-top: 2px; }
.card.lead p { margin: 0; }
.theme > header { align-items: flex-start; flex-wrap: wrap; }
.theme h3 { flex: 1; margin: 0; font-size: 17px; line-height: 1.3; min-width: 60%; }
.theme > header .glyph { width: 20px; height: 20px; border-radius: 5px; }
.theme > header .glyph svg { width: 15px; height: 15px; }
.theme > p.muted { margin: 6px 0 0; font-size: 15px; }
.theme blockquote { font-size: 15px; width: fit-content; max-width: 92%; }
.theme blockquote small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.note.idea { background: var(--accent-soft); color: var(--accent); }
.theme .tag.trend { background: var(--accent-soft); color: var(--accent); }
.theme .theme-videos { margin: 8px 0 0; font-size: 15px; }
.theme-all { margin-top: 8px; }
.theme-all blockquote a { color: inherit; }
.gratitude { margin: 0 4px 12px; font-size: 15px; }
.asked-post { display: block; font-size: 13px; }
.group.facts { padding: 12px 16px; margin-bottom: 24px; }
.group.facts form + form { margin-top: 12px; }
.group.facts textarea { width: 100%; }
.group.facts .actions { margin-top: 6px; }
.group.missing { border-left: 4px solid var(--care); margin-bottom: 24px; }
.missing-body { padding: 14px 16px 8px; }
.missing-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 17px; font-weight: 600; color: var(--care); }
.group .row[aria-current] .value { color: var(--accent); }

/* ——— Notifications: what she has to do by hand ——— */
.bell .badge-count { top: 2px; right: 0; }
.card.notice > header .title { flex: 1; min-width: 0; font-size: 17px; line-height: 1.3; }
.card.notice > header { align-items: flex-start; }
.card.notice > p { margin: 8px 0 0; }
.card.notice .actions .button { min-height: 40px; font-size: 15px; }
.push-actions { flex-wrap: wrap; gap: 8px; }
.push-actions button[hidden] { display: none; }
.push-actions:not(:has(button:not([hidden]))) { display: none; }
.group[data-push] { margin-bottom: 8px; }

/* ——— Grouped lists, as in the iPhone's Settings ——— */
section { margin-bottom: 28px; scroll-margin-top: 70px; }
.group-title { margin: 0 16px 6px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
h2 { font-size: 20px; margin: 24px 0 8px; }
.group {
  list-style: none; margin: 0 0 8px; padding: 0; border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.group > li, .group > form, .group > details { border-bottom: 0.5px solid var(--line); margin: 0; }
.group > :last-child { border-bottom: 0; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 16px;
  color: var(--text); font-size: 17px; text-align: left; background: none; border-radius: 0;
}
.group > .row:not(:last-child) { border-bottom: 0.5px solid var(--line); }
/* The people a search of *Messages exclus* found, under the search field. */
[data-people-results] > .row:not(:last-child) { border-bottom: 0.5px solid var(--line); }
.group > form[data-people]:has(+ [data-people-results]:empty) { border-bottom: 0; }
.row > .stack { display: grid; }
/* The row's name takes the room left by its icon and its value. */
.row > span:not(.tile, .glyph, .value, .dot), .row > label:first-child { flex: 1; min-width: 0; }
.row .value { flex: none; max-width: 55%; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .value code { font-size: 13px; }
.row > .icon:last-child { color: var(--muted); opacity: 0.6; }
.row.action { color: var(--accent); justify-content: flex-start; }
.row.action.danger { color: var(--red); }
.row.action .value { margin-left: auto; font-size: 14px; }
.row.bad { color: var(--error-text); }
.row select.value { border: 0; background: none; color: var(--muted); font: inherit; font-size: 17px; text-align-last: right; padding: 0; }
.row .stack { flex: 1; min-width: 0; display: grid; }
.row .stack small { font-size: 13px; overflow-wrap: anywhere; }
.tile {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; color: #fff;
}
.tile.gray { background: #8e8e93; }
.tile.blue { background: #007aff; }
.tile.orange { background: #ff9500; }
.disclosure > summary { list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary > .icon { transition: transform 0.2s; }
.disclosure[open] > summary > .icon { transform: rotate(90deg); }
.disclosure .editor, .disclosure .scroll { padding: 0 16px 14px; }
.admin .group > .editor { padding: 12px 16px 14px; }
.admin .group > .editor input[readonly] { width: 100%; box-sizing: border-box; }
.editor .footnote { margin: 0 0 8px; }
.group .card.inset { margin: 0 0 10px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 0.5px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td small { overflow-wrap: anywhere; }
code { font-size: 0.9em; overflow-wrap: anywhere; }
.job { padding: 12px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; }
.job p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.log {
  margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px;
  max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ——— The overview and the community page ——— */
.periods { margin: 0; flex: 1; }
.overview-filters { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; }
.inline-select { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.inline-select select { min-height: 32px; border: 0; border-radius: 8px; background: var(--fill); color: var(--text); font: inherit; font-size: 15px; padding: 0 8px; }
.lead { font-size: 17px; margin: 8px 0 12px; }
.plain { margin: 6px 0; padding-left: 20px; }
.plain li { margin: 2px 0; }
.theme p { margin: 8px 0 0; }
.theme blockquote { margin: 8px 0 0; font-size: 14px; }
.scroll { overflow-x: auto; }
.scroll table { min-width: 480px; }
td, th { font-variant-numeric: tabular-nums; }
.facts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 15px; }

/* Headline figures: two to a row on a phone, four on a computer. */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.kpi { margin: 0; }
.kpi p { margin: 0; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 2px; letter-spacing: -0.01em; }
.kpi .delta { font-size: 13px; margin-top: 2px; }
.kpi .delta.up { color: var(--delta-up); }
.kpi .delta.down { color: var(--delta-down); }
.kpi .small { margin-top: 4px; }

/* Charts (`static/charts.js`). Marks wear the chart colours; text keeps the text colours. */
.chart { margin: 0 0 12px; }
.chart figcaption, figure.card figcaption { display: grid; gap: 2px; margin-bottom: 6px; }
figure.card { margin: 0 0 12px; }
.chart-empty { margin: 8px 0 4px; padding: 18px 12px; border-radius: 8px; background: var(--surface-2); text-align: center; }
.plot { position: relative; width: 100%; outline-offset: 4px; }
.plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot .grid { stroke: var(--chart-grid); stroke-width: 1; }
.plot .baseline { stroke: var(--chart-axis); stroke-width: 1; }
.plot .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.plot .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
/* Lines by platform wear the platform's slot; the line of all of them together wears the text
   colour, since the accent is too close to the third slot's green. */
.plot .line.s1 { stroke: var(--chart-1); }
.plot .line.s2 { stroke: var(--chart-2); }
.plot .line.s3 { stroke: var(--chart-3); }
.plot .line.sall { stroke: var(--text); stroke-width: 2.5; }
.plot .dot.s1 { fill: var(--chart-1); }
.plot .dot.s2 { fill: var(--chart-2); }
.plot .dot.s3 { fill: var(--chart-3); }
.plot .dot.sall { fill: var(--text); }
.sall { background: var(--text); }
.tip .key.sall { height: 8px; width: 8px; border-radius: 2px; background: var(--text); }
.plot .bar { fill: var(--accent); transition: opacity 0.1s; }
.plot .bar.dim { opacity: 0.45; }
/* A count the platform rounded, waiting for the exact one (YouTube's last days). */
.plot .bar.provisional { fill-opacity: 0.5; }
.plot .cross { stroke: var(--chart-axis); stroke-width: 1; }
/* A figure on a bar keeps the text colour, ringed with the surface so it reads on any fill. */
.plot .figure {
  fill: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; pointer-events: none;
  paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round;
}
.s1 { fill: var(--chart-1); background: var(--chart-1); }
.s2 { fill: var(--chart-2); background: var(--chart-2); }
.s3 { fill: var(--chart-3); background: var(--chart-3); }
.s4 { fill: var(--chart-4); background: var(--chart-4); }
.plot .bar.s1 { fill: var(--chart-1); }
.plot .bar.s2 { fill: var(--chart-2); }
.plot .bar.s3 { fill: var(--chart-3); }
.plot .bar.s4 { fill: var(--chart-4); }
.tip {
  position: absolute; top: 0; z-index: 1; pointer-events: none; min-width: 140px;
  padding: 8px 10px; border-radius: 10px; font-size: 13px;
  background: var(--surface); border: 0.5px solid var(--line); box-shadow: 0 4px 16px rgb(0 0 0 / 0.12);
}
.tip p { margin: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tip .when { color: var(--muted); margin-bottom: 4px; }
.tip strong { font-variant-numeric: tabular-nums; }
.tip .key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--accent); }
.tip .key.s1, .tip .key.s2, .tip .key.s3, .tip .key.s4 { height: 8px; width: 8px; border-radius: 2px; }
.tip .key.s1 { background: var(--chart-1); }
.tip .key.s2 { background: var(--chart-2); }
.tip .key.s3 { background: var(--chart-3); }
.tip .key.s4 { background: var(--chart-4); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; padding: 0; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.table-view { margin-top: 6px; font-size: 14px; }
.table-view table { margin: 4px 0 0; }

/* The app's confirmation (`ask` in app.js): a card in the middle of the dimmed page, as on an
   iPhone, its buttons side by side under a hairline, the one that removes something in red. */
.ask {
  width: min(280px, calc(100vw - 48px)); padding: 0; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--text); text-align: center; overflow: hidden;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); animation: pop 0.18s ease-out;
}
.ask::backdrop { background: rgb(0 0 0 / 0.35); animation: fade 0.18s ease-out; }
.ask p { margin: 0; padding: 20px 18px 18px; font-size: 16px; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.ask-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 0.5px solid var(--line); }
.ask-actions button { min-height: 46px; margin: 0; border: 0; border-radius: 0; background: none; color: var(--accent); font-size: 17px; font-weight: 400; }
.ask-actions button + button { border-left: 0.5px solid var(--line); }
.ask-actions button.strong { font-weight: 600; }
.ask-actions button.danger { color: var(--red); font-weight: 600; }
.ask-actions button:active { background: var(--fill); }
@keyframes pop { from { transform: scale(1.08); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ask, .ask::backdrop { animation: none; } }
