/* The client shell: what a customer sees in their panel, and what an admin sees on the business pages (html.flat covers
   both; html.client is the customer, html.biz the business). Loaded after style.css in those modes and under the lunaro theme.
   The Lunaro palette from lunaro.to, Jost headings, Inter body, one warm accent for the one primary action on a screen,
   a flat menu, and a tab bar on phones. The owner can still pick Clean or Slate; this file only sets the lunaro theme's
   colours and the client layout. */
[data-theme=lunaro] { --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --head: "Jost", "Inter", system-ui, sans-serif;
  --bg: #0e1728; --bg2: #121d33; --card: #141f33; --card2: #1a2740; --code: #0b1322; --text: #e6ebf5; --muted: #93a1bd; --line: #1c293f; --line2: #2a3a56;
  --accent: #ffb86b; --accent-soft: #ffd09a; --accent-text: #1a1206; --lilac: #c9d8ff; --ok: #8fe3b4; --bad: #ff8e8e; --warn: #ffd166;
  --logbg: #0b1322; --logtext: #e6ebf5; --series-1: #c9d8ff; --series-tint: color-mix(in srgb, #c9d8ff 22%, transparent);
  --pixel: var(--head); --sans: var(--ui); --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; --r: 0; --shadow: none; color-scheme: dark; }
[data-theme=lunaro] a { color: var(--lilac); } [data-theme=lunaro] a:hover { color: var(--text); }
[data-theme=lunaro] h1, [data-theme=lunaro] h2, [data-theme=lunaro] h3 { font-family: var(--head); font-weight: 500; letter-spacing: 0; }
[data-theme=lunaro] h1 { font-size: 1.7rem; } [data-theme=lunaro] h2 { font-size: 1.2rem; }
[data-theme=lunaro] .btn.primary, [data-theme=lunaro] .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
[data-theme=lunaro] .btn { border-radius: 0; } [data-theme=lunaro] .card { border-radius: 0; border-color: var(--line); background: color-mix(in srgb, var(--card) 92%, transparent); }
[data-theme=lunaro] .kpi-value { color: var(--text); } [data-theme=lunaro] .tile .t-num { color: var(--lilac); }
html[data-theme=lunaro] .status.s-success { color: var(--ok); } [data-theme=lunaro] .status.s-queued { color: var(--warn); } [data-theme=lunaro] .status.s-doing { color: var(--lilac); }
[data-theme=lunaro] .menu a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--lilac) 14%, transparent); }
[data-theme=lunaro] .badge { background: var(--accent); color: var(--accent-text); }

/* ---- the shell ---- */
html.flat .side { padding: 20px 0 14px 16px; }
html.flat .brand { font: 500 1rem var(--ui); gap: 10px; } html.flat .brand-mark { width: 30px; height: auto; flex: none; }
html.flat .menu { gap: 2px; margin-top: 24px; padding-right: 14px; font-size: .95rem; }
html.flat .menu a, html.flat .menu button.link { padding: 9px 12px; border-radius: 0; margin-right: 0; width: auto; gap: 11px; }
html.flat .menu a.sub { margin-left: 22px; padding: 6px 12px; font-size: .88rem; color: var(--muted); }
html.flat .menu a.dim, html.flat .menu button.link.dim { color: var(--muted); } html.flat .menu-gap { flex: 1 1 auto; min-height: 16px; }
html.flat .menu .ni { width: 18px; height: 18px; stroke-width: 1.7; opacity: .75; }
html.flat .side-foot { font: .74rem var(--ui); letter-spacing: 0; border-top-style: solid; gap: 2px; }
html.flat main.wrap { max-width: 960px; padding-top: 34px; }
html.flat .foot { font-family: var(--ui); letter-spacing: 0; }
html.flat .kicker { font: 500 .74rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
html.flat .tabbar { display: none; }

/* ---- the home screen ---- */
html.flat .hello { padding: 26px 24px; }
html.flat .strip { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
html.flat .strip li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 0; border: 1px solid var(--line); background: color-mix(in srgb, var(--card2) 70%, transparent); font-size: .86rem; color: var(--text); }
html.flat .strip li i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
html.flat .strip li.ok i { background: var(--ok); } html.flat .strip li.warn i { background: var(--warn); } html.flat .strip li.bad i { background: var(--bad); }
html.flat .strip li a { color: var(--lilac); }
html.client .owing { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
html.client .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html.client .tile { border-radius: 0; min-height: 120px; padding: 18px 18px 16px; }
html.client .tile .t-title { font: 500 1.12rem/1.3 var(--head); color: var(--text); } html.client .tile .t-sub { font-size: .88rem; }
html.client .tile.primary { background: var(--accent); border-color: var(--accent); } html.client .tile.primary .t-title { color: var(--accent-text); font-size: 1.5rem; } html.client .tile.primary .t-sub { color: color-mix(in srgb, var(--accent-text) 75%, transparent); }
html.client .tile.primary:hover { background: var(--accent-soft); }
html.flat .asks { list-style: none; margin: 0; padding: 0; } html.flat .asks li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
html.flat .asks li:first-child { border-top: 0; } html.flat .asks .what { flex: 1; min-width: 0; } html.flat .asks .what a { color: var(--text); font-weight: 500; }
html.flat .asks .when { font-size: .82rem; color: var(--muted); }
html.flat .f-num { font: 500 1.9rem/1.1 var(--head); color: var(--text); }

/* ---- billing ---- */
html.client .plan-lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-width: 420px; }
html.client .plan-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: .95rem; } html.client .plan-lines li:first-child { border-top: 0; }
html.client .plan-lines li.total { border-top: 1px solid var(--line2); font-weight: 600; }
:is(html.client, html.devshell) .inv { border-top: 1px solid var(--line); padding: 16px 0; } :is(html.client, html.devshell) .inv:first-child { border-top: 0; padding-top: 4px; }
:is(html.client, html.devshell) .inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
:is(html.client, html.devshell) .inv-head strong { font: 500 1.1rem var(--head); } :is(html.client, html.devshell) .inv-sum { font: 500 1.25rem var(--head); white-space: nowrap; }
:is(html.client, html.devshell) ul.inv-lines { list-style: none; margin: 8px 0 0; padding: 0; color: var(--muted); font-size: .9rem; } :is(html.client, html.devshell) ul.inv-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
:is(html.client, html.devshell) .inv-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* ---- requests ---- */
html.client .ask textarea { min-height: 120px; font-size: 1rem; }
html.client .chips .chip { border-radius: 0; }
html.client .timeline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
html.client .timeline b { font-weight: 500; color: var(--text); } html.client .timeline i { width: 18px; height: 1px; background: var(--line2); }
html.client .timeline .on { color: var(--lilac); }

/* ---- tabs (numbers) ---- */
html.flat .tabs { display: flex; gap: 6px; margin: 0 0 16px; } html.flat .tabs a { padding: 8px 14px; border-radius: 0; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
html.flat .tabs a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--lilac) 14%, transparent); border-color: transparent; } html.flat .tabs a:hover { text-decoration: none; color: var(--text); }

/* ---- locked ---- */
html.client .lockedbox .price { font: 500 1.4rem var(--head); margin: 0 0 12px; }

/* ---- phones: a tab bar instead of hunting for the menu ---- */
@media (max-width: 860px) {
  html.flat .topbar { padding: 10px 14px; } html.flat .topbar .brand-mark { width: 24px; } html.flat .menu-btn { display: none; }
  html.flat .top-view { margin-left: auto; font-size: .85rem; color: var(--lilac); padding: 8px 0; }
  html.flat .tabbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line); }
  html.flat .tabbar a, html.flat .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; border: 0; background: none; color: var(--muted); font: 500 .68rem var(--ui); border-radius: 0; cursor: pointer; text-decoration: none; }
  html.flat .tabbar .ni { width: 22px; height: 22px; stroke-width: 1.7; }
  html.flat .tabbar a, html.flat .tabbar button { min-width: 0; } html.flat .tabbar a > span, html.flat .tabbar button > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* enlarged text: labels shorten, never overlap */
  html.flat .tabbar a[aria-current="page"] { color: var(--accent); } html.flat .tabbar .tab-dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  html.flat main.wrap { padding-bottom: 86px; } html.flat .foot { padding-bottom: 96px; }
  html.flat .hello { padding: 20px 16px; } html.client .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } html.client .tile { min-height: 110px; padding: 14px; } html.client .tile.primary { grid-column: 1 / -1; }
  html.client .tile .t-title { font-size: 1rem; } html.client .tile .t-sub { font-size: .8rem; }
  html.flat .side { width: min(320px, 88vw); }
}

/* ---- logging in ---- */
html.flat .login { max-width: 420px; padding: 30px 28px; } html.flat .login-brand { font: 500 1.05rem var(--ui); gap: 10px; margin-bottom: 20px; } html.flat .login-brand .brand-mark { width: 34px; height: auto; }
html.flat .login h1 { font-size: 1.5rem; } html.flat .login .btn.full { margin-top: 6px; min-height: 46px; }
/* web rules: an odd one out takes the full row (the big tile already spans both columns, so it isn't counted) */


/* ---- the business home ---- */
.today-nums { margin-top: 20px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.today-nums .f-num { font-size: 1.5rem; } .f-num.bad { color: var(--bad); } .f-num.warn { color: var(--warn); }
.ok-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }
.attlist { list-style: none; margin: 0; padding: 0; }
.attlist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); } .attlist li:first-child { border-top: 0; }
.attlist li i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); } .attlist li.bad i { background: var(--bad); }
.attlist li > span { flex: 1; min-width: 0; } .attlist strong { font-weight: 500; }
.clientlist { list-style: none; margin: 10px 0 0; padding: 0; }
.clientlist li, .site-row summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.clientlist li:first-child { border-top: 0; }
.c-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); } .c-dot.ok { background: var(--ok); } .c-dot.warn { background: var(--warn); } .c-dot.bad { background: var(--bad); }
.c-name { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .c-name a, .c-name strong { color: var(--text); font-weight: 500; }
.c-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem; justify-content: flex-end; }
.clientlist form { margin: 0; }
.server-line { margin-top: 18px; }
/* the clients page: a closed row per site */
details.site-row { padding: 0 18px; } details.site-row summary { cursor: pointer; list-style: none; padding: 14px 0; border-top: 0; }
details.site-row summary::-webkit-details-marker { display: none; } details.site-row summary::after { content: ""; width: 8px; height: 8px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); margin: 0 6px 4px 4px; flex: none; transition: transform .15s; }
details.site-row[open] summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
details.site-row .site-body { padding: 4px 0 18px; border-top: 1px solid var(--line); margin-top: 0; padding-top: 14px; }
details.site-row .facts { margin-top: 16px; }
@media (max-width: 860px) {
  .today-nums { grid-template-columns: 1fr 1fr; }
  .c-facts { justify-content: flex-start; flex-basis: 100%; }
  .clientlist li, .site-row summary { flex-wrap: wrap; }
}

/* ---- client polish ---- */
html.client .chip span { font-family: var(--ui); font-size: .92rem; }
html.client .tile .t-go { margin-top: auto; padding-top: 10px; font: 500 .9rem var(--ui); color: var(--lilac); }
html.client .tile.primary .t-go { color: var(--accent-text); }
.facts-row.three { display: flex; flex-wrap: wrap; gap: 18px 48px; } .facts-row.three > div { gap: 2px; }
.facts-row.three .f-label:first-child { font: .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* a row of people: on a phone the buttons sit under the name instead of over it */
@media (max-width: 700px) { html.flat .dbrows li > .row.gap { grid-column: 1 / -1; flex-wrap: wrap; } }

/* ---- a product, not a hobby page: tighter everywhere, wider page, plain page headers, dense tables (the flat shell) */
html.flat body { font-size: 14px; }
html.flat main.wrap { max-width: 1320px; padding: 22px 26px 10px; }
html.flat .card { padding: 16px 18px; margin-bottom: 12px; }
html.flat h1 { font-size: 1.45rem; margin: 0; }
html.flat h2 { font-size: 1rem; margin: 0 0 8px; }
html.flat .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
html.flat .card-head h2 { margin: 0; }
html.flat .hello { background: none; border: 0; padding: 0 0 14px; margin-bottom: 6px; }
html.flat .hello::before, html.flat .hello::after { display: none; }
html.flat .hello .kicker { display: none; }
html.flat .hello h1 + .muted, html.flat .hello p.muted { margin: 4px 0 0; font-size: .92rem; }
html.flat .pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 0 0 14px; }
html.flat .pagehead p { margin: 4px 0 0; font-size: .92rem; }
html.flat .eyebrow { font: 500 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
html.flat .att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
html.flat .att { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 0; background: color-mix(in srgb, var(--card) 88%, transparent); font-size: .9rem; }
html.flat .att.bad { border-left-color: var(--bad); } html.flat .att.ok { border-left-color: var(--ok); }
html.flat .att strong { font-weight: 500; padding-right: 44px; } html.flat .att span { color: var(--muted); font-size: .86rem; }
html.flat .att a { position: absolute; top: 10px; right: 12px; font-size: .82rem; }
html.flat .stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
html.flat .stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--text); min-width: 0; }
html.flat .stat:hover { text-decoration: none; border-color: var(--line2); }
html.flat .s-label { font-size: .8rem; color: var(--muted); } html.flat .s-num { font: 500 1.5rem/1.15 var(--head); letter-spacing: -.01em; } html.flat .s-num.bad { color: var(--bad); } html.flat .s-num.warn { color: var(--warn); }
html.flat .s-sub { font-size: .78rem; color: var(--muted); }
html.flat .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } html.flat .two-col .card { min-width: 0; }
html.flat .ctable { width: 100%; border-collapse: collapse; font-size: .9rem; }
html.flat .ctable th { text-align: left; font: 500 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 8px 8px; border-bottom: 1px solid var(--line); }
html.flat .ctable td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
html.flat .ctable tr:first-child td { border-top: 0; } html.flat .ctable thead + tbody tr:first-child td { border-top: 0; }
html.flat .ctable td.right { text-align: right; } html.flat .ctable .nowrap { white-space: nowrap; } html.flat .ctable td.dotcell { width: 14px; padding-right: 0; }
html.flat .ctable form { margin: 0; } html.flat .ctable .status { font-size: .8rem; white-space: nowrap; }
html.flat .empty { margin: 0; font-size: .9rem; }
html.flat .server-line { margin: 4px 0 0; }
html.flat .facts { gap: 10px; } html.flat .facts dd { font-size: .9rem; }
html.flat .deploys li, html.flat .dbrows li { padding: 9px 0; }
html.flat details.site-row summary { padding: 11px 0; } html.flat details.site-row { padding: 0 16px; }
html.flat .tabs { margin-bottom: 12px; } html.flat .tabs a { padding: 6px 12px; font-size: .86rem; }
html.flat label { margin-bottom: 10px; } html.flat input, html.flat select, html.flat textarea { padding: 7px 10px; font-size: 14px; }
html.flat .btn { padding: 6px 13px; font-size: .88rem; min-height: 34px; } html.flat .btn.small-btn { padding: 3px 9px; font-size: .8rem; min-height: 28px; }
html.flat .foot { padding-top: 12px; }
@media (max-width: 1100px) { html.flat .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  html.flat .two-col { grid-template-columns: 1fr; } html.flat .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; } html.flat .att-grid { grid-template-columns: 1fr; }
  html.flat main.wrap { padding: 16px 14px 90px; }
}

html.flat .stat-grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---- colour means something. Orange: the one main action on a screen, and things that are new for you (nav badges, "unread").
   Red: something's wrong. Everything else, counts included, is plain text; status is a dot and a word. */
html.flat .s-num.warn { color: var(--text); }
html.flat .kicker { color: var(--muted); }
html.flat .s-queued, html.client .s-queued, html.flat .s-doing, html.client .s-doing { color: var(--text); }
html.flat .status, html.client .status { display: inline-flex; align-items: center; gap: 6px; font: 500 .8rem var(--ui); text-transform: none; letter-spacing: 0; color: var(--text); }
html.flat .status::before, html.client .status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
html.flat .status::after, html.client .status::after { content: none; }
html.flat .status, html.client .status, html.simple.flat .status, html.simple.client .status { padding: 0; background: none; border-radius: 0; }
html.flat .status.s-success::before, html.client .status.s-success::before, html.client .status.live::before { background: var(--ok); }
html.flat .status.s-doing::before, html.client .status.s-doing::before { background: var(--lilac); }
html.flat .status.s-failed::before, html.client .status.s-failed::before { background: var(--bad); }
html.flat .status.s-building::before { background: var(--warn); }
html.flat .status.s-failed, html.client .status.s-failed { color: var(--bad); }
html.flat .status.s-skipped, html.client .status.s-skipped { color: var(--muted); }
html.flat .status.s-success, html.client .status.s-success, html.client .status.live, html.flat .status.s-queued, html.client .status.s-queued, html.flat .status.s-doing, html.client .status.s-doing { color: var(--text); }
html.flat .btn.on, html.client .btn.on { background: color-mix(in srgb, var(--lilac) 14%, transparent); border-color: var(--line2); color: var(--text); }
html.flat .btn.on:hover, html.client .btn.on:hover { background: color-mix(in srgb, var(--lilac) 20%, transparent); }
html.client .tile .t-num { color: var(--text); } html.client .tile.hot { border-color: var(--accent); } html.client .tile.hot .t-num { color: var(--accent); }
html.client .tabbar a[aria-current="page"], html.flat .tabbar a[aria-current="page"] { color: var(--text); }
html.flat .rowact summary, html.client .rowact summary { font: 500 .8rem var(--ui); color: var(--lilac); }

/* ---- tables of records: text left, money right in lining figures, one action per row, hover to keep your place */
html.flat .ctable th.right { text-align: right; }
html.flat .ctable .amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
html.flat .ctable tbody tr:hover td { background: color-mix(in srgb, var(--lilac) 5%, transparent); }
html.flat .ctable .ph { display: none; }
html.flat .ctable td a:not(.btn) { color: var(--text); font-weight: 500; }
html.flat .ctable .badge { vertical-align: 1px; }
html.flat .rowact.pop { position: relative; } html.flat .rowact.pop summary { list-style: none; white-space: nowrap; }
html.flat .rowact.pop summary::-webkit-details-marker { display: none; }
html.flat .rowact.pop .pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 340px; max-width: min(520px, 90vw); padding: 12px; text-align: left; background: var(--card); border: 1px solid var(--line2); border-radius: 0; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
@media (max-width: 720px) {
  html.flat .ctable.reqs thead, html.flat .ctable.invs thead { display: none; }
  html.flat .ctable.reqs tr, html.flat .ctable.invs tr { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
  html.flat .ctable.reqs tr:first-child, html.flat .ctable.invs tr:first-child { border-top: 0; }
  html.flat .ctable.reqs td, html.flat .ctable.invs td { display: block; padding: 0; border: 0; }
  html.flat .ctable.reqs td:nth-child(3), html.flat .ctable.reqs td:nth-child(5), html.flat .ctable.invs td:nth-child(3), html.flat .ctable.invs td:nth-child(4), html.flat .ctable.invs td:nth-child(5) { display: none; }
  html.flat .ctable.reqs td:nth-child(4), html.flat .ctable.invs td:nth-child(2) { grid-column: 1 / -1; order: -1; margin-bottom: 6px; }
  html.flat .ctable.reqs td:nth-child(6), html.flat .ctable.invs td:nth-child(8) { grid-column: 4; }
  html.flat .ctable.invs td:nth-child(7) { grid-column: 3; text-align: left; }
  html.flat .ctable .ph { display: inline; }
  html.flat .rowact.pop .pop-body { position: fixed; left: 12px; right: 12px; top: auto; bottom: 76px; min-width: 0; max-width: none; }
}
html.client .chip input:checked + span { border-color: var(--lilac); color: var(--text); background: color-mix(in srgb, var(--lilac) 14%, transparent); }

/* ---- quieter chrome: the menu steps back so the page is what you look at; numbers line up; fewer hard lines */
html.flat .menu a, html.flat .menu button.link { color: var(--muted); } html.flat .menu a:hover, html.flat .menu button.link:hover { color: var(--text); }
html.flat .menu a[aria-current="page"] { color: var(--text); } html.flat .menu .ni { opacity: .6; } html.flat .menu a[aria-current="page"] .ni { opacity: .9; }
html.flat .brand-name { color: var(--text); } html.flat .side { border-right: 1px solid var(--line); }
html.flat .s-num, html.flat .ctable, html.flat .f-num, html.flat .kpi-value, html.flat .numline, html.flat .facts dd { font-variant-numeric: tabular-nums; }
html.flat .card .card { border: 0; padding: 0; background: none; }
html.flat .quiet-line { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 0; color: var(--muted); font-size: .9rem; }
html.flat .quiet-line a { color: var(--lilac); }
html.flat .pagehead + .quiet-line { margin-top: 0; }

/* the client home: the status strip is a line, "Next" is one card, the numbers are one line */
html.client .hello .strip { gap: 4px 18px; margin-top: 14px; }
html.client .hello .strip li { padding: 0; border: 0; background: none; font-size: .88rem; color: var(--muted); }
html.client .next .eyebrow { margin: 0 0 6px; } html.client .next h2 { font-size: 1.25rem; }
html.client .next .then { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
html.client .numline { margin: 10px 0 0; font-size: .95rem; color: var(--muted); line-height: 1.7; } html.client .numline b { color: var(--text); font-weight: 500; font-size: 1.15rem; }
html.client .more-line { margin: 4px 0 0; } html.client .more-line a { color: var(--lilac); }
html.client .tiles .tile.primary { grid-column: 1 / -1; }

/* ---- the drawer: a table row opens at the side, the table stays */
html.flat .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); z-index: 60; overflow: auto; padding: 16px 20px 28px; background: var(--bg2); border-left: 1px solid var(--line2); box-shadow: -24px 0 60px rgba(0, 0, 0, .4); }
html.flat .drawer-back { position: fixed; inset: 0; z-index: 59; background: rgba(4, 8, 16, .5); }
html.flat .drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
html.flat .drawer .facts { grid-template-columns: 1fr 1fr; } html.flat .drawer .p-detail, html.flat .drawer .site-body { display: block; }
html.flat tr[data-drawer] { cursor: pointer; } html.flat tr[data-drawer].open td { background: color-mix(in srgb, var(--lilac) 9%, transparent); }
html.flat.drawer-open { overflow: hidden; }
@media (max-width: 720px) { html.flat .drawer { width: 100vw; padding-bottom: 90px; } }

/* ---- rows: comfortable (default) or compact, remembered on this device */
html.flat .density-toggle { font: inherit; padding: 0; text-align: left; color: var(--muted); } html.flat .density-toggle:hover { color: var(--text); }
@media (max-width: 720px) { html.flat .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } html.flat .stat-grid.three .s-num { font-size: 1.2rem; } }
html.dense.flat body { font-size: 13px; }
html.dense.flat .ctable td { padding: 4px 8px; } html.dense.flat .ctable th { padding: 2px 8px 5px; }
html.dense.flat .stat { padding: 8px 12px; gap: 0; } html.dense.flat .s-num { font-size: 1.3rem; }
html.dense.flat .card { padding: 12px 14px; } html.dense.flat .pagehead { margin-bottom: 10px; }
html.dense.flat .deploys li, html.dense.flat .dbrows li { padding: 6px 0; }

/* ---- the client review pass (22 Oct): long site names wrap; orange is only for actions; photo fields show the photo;
   the status strip is only real checks; the rows switch is a business-shell thing */
html.client .brand-name { white-space: normal; overflow-wrap: anywhere; font-size: .8rem; line-height: 1.25; letter-spacing: -.01em; }
html.client .density-toggle { display: none; }
html.flat .tableview summary, html.flat .moreopts summary, html.flat .howto summary, html.flat .faq summary::after, html.flat .jump a:hover, html.flat .posts .pill { color: var(--lilac); }
html.flat .helpsteps li::marker { color: var(--muted); font-family: var(--mono); } html.flat .faq summary:hover { color: var(--lilac); }
html.flat .kpis.three { grid-template-columns: repeat(3, 1fr); } html.flat .kpis.three > :last-child:nth-child(odd) { grid-column: auto; }
@media (max-width: 720px) { html.flat .kpis.three { grid-template-columns: 1fr 1fr; } html.flat .kpis.three > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
html.client .strip-note { margin: 10px 0 0; } html.client .hello .strip li.warn { color: var(--text); }
html.client .tile.locked { border-style: dashed; background: none; } html.client .tile.locked .t-title { color: var(--muted); } html.client .tile.locked .pill { font-size: .68rem; vertical-align: 3px; margin-left: 4px; }
html.client .tile.locked:hover { border-color: var(--lilac); }
.imgfield .imgbox { margin-bottom: 8px; } .imgfield .noimg { display: flex; align-items: center; justify-content: center; width: 220px; max-width: 100%; height: 110px; border: 1px dashed var(--line2); border-radius: 0; color: var(--muted); font-size: .84rem; }
.imgfield .imgbox img { margin-bottom: 0; }
html.flat .searchline input[type=search] { width: 220px; max-width: 100%; }
html.flat .bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 0; background: color-mix(in srgb, var(--lilac) 8%, transparent); }
html.flat .ctable td.tick, html.flat .ctable th.tick { width: 22px; padding-right: 0; } html.flat .ctable .tick input { margin: 0; width: 15px; height: 15px; }
html.flat .ctable.msgs .who { min-width: 0; } html.flat .ctable.msgs .who .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
html.flat .ctable.msgs .what { max-width: 38ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.flat .msg-detail .fields dd { white-space: pre-wrap; }
@media (max-width: 720px) {
  html.flat .ctable.msgs thead { display: none; }
  html.flat .ctable.msgs tr { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
  html.flat .ctable.msgs tr:first-child { border-top: 0; } html.flat .ctable.msgs td { display: block; padding: 0; border: 0; }
  html.flat .ctable.msgs td.who { grid-column: 2 / -1; order: -1; } html.flat .ctable.msgs td.tick { grid-column: 1; order: -1; }
  html.flat .ctable.msgs td.what { grid-column: 1 / -1; white-space: normal; max-width: none; margin: 4px 0 6px; }
  html.flat .ctable.msgs td:nth-child(5) { display: none; } html.flat .ctable.msgs td:last-child { grid-column: 4; }
  html.flat .filters .btn { width: auto; flex: 0 0 auto; }
  html.flat .pagehead .searchline { width: 100%; } html.flat .pagehead .searchline input[type=search] { flex: 1; width: auto; }
}

/* ---- the panel CSS review (23 Oct): one look for the small things that were five looks.
   Fonts are served from here (base.html). Selects and date fields get the panel's styling. Every small-caps label (table
   headers, kickers, fact labels) is one token. Orange stays the one main action; state is a dot and a word or an .on chip.
   The developer shell (my site) follows the same rules under the lunaro theme. */
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2393a1bd' stroke-width='1.5'/%3E%3C/svg%3E"); }
html[data-theme=lunaro] select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px; cursor: pointer; }
html[data-theme=lunaro] select.small-btn, html.flat select.small-btn { display: inline-block; width: auto; margin: 0; min-height: 28px; padding: 3px 26px 3px 9px; font: 500 .8rem var(--ui); color: var(--text); background-color: var(--card); border: 1px solid var(--line2); border-radius: 0; vertical-align: middle; }
[data-theme=lunaro] select.small-btn:hover, html.flat select.small-btn:hover { background-color: var(--card2); }
[data-theme=lunaro] input.small-btn, html.flat input.small-btn { display: inline-block; width: auto; margin: 0; min-height: 28px; padding: 3px 9px; font: .85rem var(--ui); vertical-align: middle; }
[data-theme=lunaro] input[type=date], [data-theme=lunaro] input[type=time] { color-scheme: dark; }
[data-theme=lunaro] input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
[data-theme=lunaro] input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* one small-caps label */
html.flat .ctable th, html.flat .apitable th, html.flat .inv-lines th, html.flat .facts dt, html.flat .fields dt, html.flat .kicker, html.flat .eyebrow, html.flat .facts-row.three .f-label:first-child,
[data-theme=lunaro] .apitable th, [data-theme=lunaro] .facts dt, [data-theme=lunaro] .fields dt, [data-theme=lunaro] .kicker, [data-theme=lunaro] .inv-lines th, [data-theme=lunaro] .rowsfield .rr-head, [data-theme=lunaro] .lv-menu-h {
  font: 500 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
[data-theme=lunaro] .kpi-label, [data-theme=lunaro] .facts-row.three .f-label:first-child { font: .8rem var(--ui); letter-spacing: 0; text-transform: none; color: var(--muted); }
html.flat .facts dd, [data-theme=lunaro] .facts dd { overflow-wrap: anywhere; }

/* cards side by side don't stretch to each other's height */
html.flat .two-col { align-items: start; }

/* page actions keep their size on a phone */
@media (max-width: 860px) {
  html.flat .pagehead .btn, html.flat .pagehead .row .btn { width: auto; flex: 0 0 auto; }
}

/* the Clients table on a phone: a card per site, the facts as labelled lines, nothing lost */
@media (max-width: 860px) {
  html.flat .ctable.clients thead { display: none; }
  html.flat .ctable.clients tr { display: grid; grid-template-columns: 14px 1fr auto; column-gap: 10px; row-gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
  html.flat .ctable.clients tr:first-child { border-top: 0; }
  html.flat .ctable.clients td { display: block; padding: 0; border: 0; }
  html.flat .ctable.clients td:nth-child(1) { grid-column: 1; grid-row: 1; padding-top: 6px; }
  html.flat .ctable.clients td:nth-child(2) { grid-column: 2; grid-row: 1; }
  html.flat .ctable.clients td:last-child { grid-column: 3; grid-row: 1; }
  html.flat .ctable.clients td[data-l] { grid-column: 2 / -1; font-size: .84rem; }
  html.flat .ctable.clients td[data-l]:empty { display: none; }
  html.flat .ctable.clients td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); }
  html.flat .ctable.clients td[data-l] br { display: none; }
  html.flat .ctable.clients td[data-l] .small { font-size: inherit; }
  html.flat .ctable.clients td[data-l] br + .small::before { content: " · "; }
  html.flat .ctable.clients tbody tr:hover td { background: none; }
}

/* the People table on a phone: name, then how they log in, role and sites as lines; emails don't break mid-word */
@media (max-width: 700px) {
  html.flat .people .p-row { grid-template-columns: 22px 1fr; }
  html.flat .people .p-row td:nth-child(3), html.flat .people .p-row td:nth-child(4), html.flat .people .p-row td:nth-child(5) { display: block; grid-column: 2; font-size: .84rem; color: var(--muted); }
  html.flat .people .p-row td:nth-child(3) br { display: none; } html.flat .people .p-row td:nth-child(3) br + .mono::before { content: " · "; }
  html.flat .people .p-row td:nth-child(n+6) { display: none; }
  html.flat .people td { overflow-wrap: normal; word-break: normal; }
}

/* the Clients drawer: links and logins as facts, the switches one row of equal height, the pause form one line */
html.flat .drawer-meta { margin: 0 0 14px; } html.flat .drawer-meta .wide { grid-column: 1 / -1; }
html.flat .switches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; }
html.flat .switches .pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; font: 500 .8rem var(--ui); border-radius: 0; }
html.flat .switches form { margin: 0; }
html.flat .pausebox .inline-form { margin-top: 10px; align-items: flex-end; }
html.flat .pausebox .inline-form label { flex: 1 1 220px; }
html.flat .pausebox .inline-form .btn.small-btn { min-height: 34px; padding: 6px 12px; }
html.flat .drawer .facts { margin: 0; }

/* on/off rows (the vault): a dot and a word, then a plain button */
html.flat .onoff { display: inline-flex; align-items: center; gap: 10px; }

/* the invoice builder's price book: things you can press look pressable */
html.flat .chips.book { gap: 6px; margin: 12px 0 4px; }

/* ---- the developer shell under the lunaro theme: the same rules as the business pages */
html[data-theme=lunaro] .status { display: inline-flex; align-items: center; gap: 6px; font: 500 .8rem var(--ui); text-transform: none; letter-spacing: 0; color: var(--text); padding: 0; background: none; border-radius: 0; }
html[data-theme=lunaro] .status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
html[data-theme=lunaro] .status::after { content: none; }
html[data-theme=lunaro] .status.s-success::before, html[data-theme=lunaro] .status.live::before { background: var(--ok); }
htmlhtml[data-theme=lunaro] .status.s-doing::before { background: var(--lilac); } html[data-theme=lunaro] .status.s-failed::before { background: var(--bad); } html[data-theme=lunaro] .status.s-building::before, html[data-theme=lunaro] .status.s-queued::before { background: var(--warn); }
html[data-theme=lunaro] .status.s-failed { color: var(--bad); } html[data-theme=lunaro] .status.s-skipped { color: var(--muted); }
html[data-theme=lunaro] .status.s-success, html[data-theme=lunaro] .status.s-queued, html[data-theme=lunaro] .status.s-doing, html[data-theme=lunaro] .status.s-building { color: var(--text); }
[data-theme=lunaro] .deploys .meta { font-family: var(--ui); } [data-theme=lunaro] .deploys .meta code:empty { display: none; }
[data-theme=lunaro] .tableview summary, [data-theme=lunaro] .howto summary, [data-theme=lunaro] .moreopts summary, [data-theme=lunaro] .rowact summary, [data-theme=lunaro] main button.link, [data-theme=lunaro] .jump a:hover { color: var(--lilac); }
[data-theme=lunaro] .tableview summary, [data-theme=lunaro] .howto summary, [data-theme=lunaro] .moreopts summary, [data-theme=lunaro] .jump, [data-theme=lunaro] .rowact summary, [data-theme=lunaro] .danger-zone { font-family: var(--ui); }
[data-theme=lunaro] .jump { font-size: .86rem; } [data-theme=lunaro] .helpsteps li::marker { color: var(--muted); }
[data-theme=lunaro] .btn.on { background: color-mix(in srgb, var(--lilac) 14%, transparent); border-color: var(--line2); color: var(--text); }
[data-theme=lunaro] .btn.on:hover { background: color-mix(in srgb, var(--lilac) 20%, transparent); }
[data-theme=lunaro] .pill { font: 500 .74rem var(--ui); border-radius: 0; }
html.flat .changelog > h1:first-child { display: none; }

/* ===== the theme pass (23 Oct): one hover, one focus, stillness, a surface and border scale, radius, a type scale.
   Hover is one surface step up with no movement and no hue. Selected is the lilac tint. Focus is a lilac ring, never
   orange. Pages don't animate in. Borders are translucent white so they sit on any surface. Radius: 6px on controls,
   8px on cards, round on pills. Labels are the sans face at 11px; mono is for code, hashes, paths and keys only. ===== */
[data-theme=lunaro] {
  --surface-0: #0e1728; --surface-1: #141f33; --surface-2: #1a2740; --surface-3: #203050;
  --bg: var(--surface-0); --bg2: var(--surface-1); --card: var(--surface-1); --card2: var(--surface-2); --code: #0b1322;
  --line: color-mix(in srgb, #fff 7%, transparent); --line2: color-mix(in srgb, #fff 13%, transparent);
  --hover: color-mix(in srgb, #fff 4%, transparent); --pressed: color-mix(in srgb, #000 14%, transparent);
  --selected: color-mix(in srgb, var(--lilac) 14%, transparent); --selected-hover: color-mix(in srgb, var(--lilac) 18%, transparent);
  --focus: var(--lilac); --r: 0; --r-card: 0; --r-pill: 0; }
[data-theme=lunaro] ::selection { background: color-mix(in srgb, var(--lilac) 30%, transparent); color: inherit; }

/* surfaces: opaque cards, translucent lines */
[data-theme=lunaro] .card, html.flat .card, html.flat .stat, html.flat .att, html.flat .quiet-line { background: var(--card); }
html.flat .drawer { background: var(--surface-1); border-left-color: var(--line2); }
html.flat .rowact.pop .pop-body, html[data-theme=lunaro] .lv-menu { background: var(--surface-2); }
html[data-theme=lunaro] input, html[data-theme=lunaro] select, html[data-theme=lunaro] textarea { background: var(--surface-0); border-color: var(--line2); }
html.flat .card input, html.flat .card select, html.flat .card textarea, html.flat .drawer input, html.flat .drawer select, html.flat .drawer textarea { background: var(--surface-0); }
html[data-theme=lunaro] .btn, html.simple[data-theme=lunaro] .btn { background: var(--surface-2); border-color: var(--line2); }
html[data-theme=lunaro] select.small-btn, html.flat select.small-btn { background-color: var(--surface-2); }

/* one hover: a step up, nothing moves */
html[data-theme=lunaro] .btn, html[data-theme=lunaro] .menu a, html[data-theme=lunaro] .menu button.link, html[data-theme=lunaro] .tile, html[data-theme=lunaro] .stat, html[data-theme=lunaro] .chip span, html[data-theme=lunaro] .ctable td, html[data-theme=lunaro] .apitable td, html[data-theme=lunaro] .deploys li, html[data-theme=lunaro] .tabs a, html[data-theme=lunaro] .tabbar a, html[data-theme=lunaro] a, html[data-theme=lunaro] summary {
  transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
html[data-theme=lunaro] .btn:hover, html.simple[data-theme=lunaro] .btn:hover { background: color-mix(in srgb, #fff 6%, var(--surface-2)); border-color: var(--line2); color: var(--text); transform: none; }
html[data-theme=lunaro] .btn:active, html.simple[data-theme=lunaro] .btn:active { transform: none; background: color-mix(in srgb, #000 10%, var(--surface-2)); }
html[data-theme=lunaro] .btn.primary, html[data-theme=lunaro] .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
html[data-theme=lunaro] .btn.primary:hover { filter: brightness(1.06); } html[data-theme=lunaro] .btn.primary:active { filter: brightness(.94); background: var(--accent); }
html[data-theme=lunaro] .btn.on, html.flat .btn.on, html.client .btn.on { background: var(--selected); border-color: transparent; }
html[data-theme=lunaro] .btn.on:hover, html.flat .btn.on:hover, html.client .btn.on:hover { background: var(--selected-hover); border-color: transparent; }
html[data-theme=lunaro] .btn.danger:hover { color: var(--bad); }
html[data-theme=lunaro] .menu a:hover, html[data-theme=lunaro] .menu button.link:hover, html.flat .menu a:hover, html.flat .menu button.link:hover { background: var(--hover); color: var(--text); padding-left: 12px; }
html[data-theme=lunaro] .menu a[aria-current="page"], html.flat .menu a[aria-current="page"] { background: var(--selected); color: var(--text); }
html[data-theme=lunaro] .ctable tbody tr:hover td, html.flat .ctable tbody tr:hover td, html[data-theme=lunaro] .apitable tbody tr:hover td, html[data-theme=lunaro] .people .p-row:hover td, html[data-theme=lunaro] .deploys li:hover, html[data-theme=lunaro] .dbrows li:hover { background: var(--hover); }
html.flat tr[data-drawer].open td, html[data-theme=lunaro] tr[data-drawer].open td { background: var(--selected); }
html[data-theme=lunaro] .stat:hover, html.flat .stat:hover { background: color-mix(in srgb, #fff 4%, var(--card)); border-color: var(--line2); }
html[data-theme=lunaro] .tile:hover, html.simple[data-theme=lunaro] .tile:hover { transform: none; border-color: var(--line2); background: color-mix(in srgb, #fff 4%, var(--card)); }
html[data-theme=lunaro] .tile.primary:hover, html.client .tile.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
html[data-theme=lunaro] .tile:hover .pill, html[data-theme=lunaro] .chip:hover span, html[data-theme=lunaro] .btn:hover, html[data-theme=lunaro] .btn:active { transform: none; }
html[data-theme=lunaro] .chip span { border-color: var(--line2); } html[data-theme=lunaro] .chip:hover span { background: var(--hover); }
html[data-theme=lunaro] .chip input:checked + span, html.client .chip input:checked + span { border-color: transparent; color: var(--text); background: var(--selected); }
html[data-theme=lunaro] .tabs a:hover, html.flat .tabs a:hover { background: var(--hover); color: var(--text); }
html[data-theme=lunaro] .tabs a[aria-current="page"], html.flat .tabs a[aria-current="page"] { background: var(--selected); color: var(--text); border-color: transparent; }
html[data-theme=lunaro] .lrow-tools button:hover, html[data-theme=lunaro] .rowsfield .rr-tools button:hover, html[data-theme=lunaro] .ed-toolbar button:hover { border-color: var(--line2); color: var(--text); background: var(--hover); }
html[data-theme=lunaro] .picker-grid img:hover { border-color: var(--lilac); }
html[data-theme=lunaro] .jump a:hover, html[data-theme=lunaro] .faq summary:hover, html[data-theme=lunaro] .brand:hover { color: var(--text); }
html[data-theme=lunaro] .ed-steps a:hover { background: var(--hover); }
html[data-theme=lunaro] a:hover { text-decoration-color: var(--line2); }
html[data-theme=lunaro] .menu a::before, html[data-theme=lunaro] .menu button.link::before { content: none; }

/* one focus: a lilac ring, never orange */
html[data-theme=lunaro] :is(a, button, summary, [tabindex], .btn):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r); }
html[data-theme=lunaro] :is(input, select, textarea):focus, html.simple[data-theme=lunaro] :is(input, select, textarea):focus { outline: 2px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 1px; border-color: var(--focus); }
html[data-theme=lunaro] tr[data-drawer]:focus-visible, html[data-theme=lunaro] .p-row:focus-visible { outline-offset: -2px; }
html[data-theme=lunaro] button.glabel:focus-visible, html[data-theme=lunaro] .chip input:focus-visible + span, html[data-theme=lunaro] .col:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
html[data-theme=lunaro] .tabbar a:focus-visible { outline-offset: -2px; }

/* stillness: nothing animates in; the drawer and toasts fade */
html[data-theme=lunaro] main.wrap > *, html[data-theme=lunaro] main.wrap > * > *, html[data-theme=lunaro] .kpi-value, html[data-theme=lunaro] .flash, html[data-theme=lunaro] .menu a[aria-current="page"], html[data-theme=lunaro] .tile { animation: none !important; }
html[data-theme=lunaro]::view-transition-old(root) { animation: 90ms ease-out both vt-fade-out; } html[data-theme=lunaro]::view-transition-new(root) { animation: 140ms ease-out both vt-fade-in; }
@keyframes vt-fade-out { to { opacity: 0; } } @keyframes vt-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  html.flat .drawer:not([hidden]) { animation: drawer-in .15s ease-out both; } html.flat .drawer-back:not([hidden]) { animation: vt-fade-in .15s ease-out both; }
  @keyframes drawer-in { from { opacity: 0; transform: translateX(10px); } }
}

/* radius: 6 on controls, 8 on cards, round on pills */
[data-theme=lunaro] .btn, html.flat .menu a, html.flat .menu button.link, html.simple[data-theme=lunaro] .menu a, html.simple[data-theme=lunaro] .menu button.link, html.flat .strip li, html.client .chips .chip, html[data-theme=lunaro] .chip span, html.flat .tabs a, html[data-theme=lunaro] .tabs a, html.flat .tabbar a, html.flat .tabbar button, html.flat .bulkbar, .imgfield .noimg, html[data-theme=lunaro] select.small-btn, html.flat select.small-btn, .modes, html[data-theme=lunaro] .rowsfield .rr, html[data-theme=lunaro] .meter, html[data-theme=lunaro] code, html[data-theme=lunaro] .keybox, html[data-theme=lunaro] .repo, html[data-theme=lunaro] .error, html[data-theme=lunaro] .ok-msg, html[data-theme=lunaro] .restore { border-radius: var(--r); }
html[data-theme=lunaro] .rowsfield .rr-tools button, html[data-theme=lunaro] .lrow-tools button { border-radius: 0; }
[data-theme=lunaro] .card, html.flat .card, html.flat .stat, html.flat .att, html.flat .quiet-line, html.client .tile, html[data-theme=lunaro] .tile, html.flat .rowact.pop .pop-body, html[data-theme=lunaro] .login, html[data-theme=lunaro] .hero, html[data-theme=lunaro] pre, html[data-theme=lunaro] .log { border-radius: var(--r-card); }
html[data-theme=lunaro] .pill, html.flat .switches .pill, html[data-theme=lunaro] .badge, html.simple[data-theme=lunaro] .pill, html.simple[data-theme=lunaro] .badge, html[data-theme=lunaro] .sampletag { border-radius: var(--r-pill); }
html[data-theme=lunaro] .pill { padding: 1px 9px; } html[data-theme=lunaro] .badge { padding: 0 7px; }
html.flat .ctable.clients td.dotcell .c-dot, html.flat .c-dot { border-radius: 50%; }

/* type: Jost for the page title, Inter for the rest; weights 500 and 600; labels 11px sans, caps; mono for identifiers only */
html.flat h1, html[data-theme=lunaro] h1 { font: 500 22px/1.25 var(--head); letter-spacing: 0; margin: 0; }
html.flat h2, html[data-theme=lunaro] h2 { font: 600 15px/1.35 var(--ui); letter-spacing: -.005em; }
html.flat h3, html[data-theme=lunaro] h3 { font: 600 13.5px/1.35 var(--ui); }
html.flat .hello h1 { font-size: 22px; } html.client .hello h1 { font-size: 24px; }
html[data-theme=lunaro] strong, html[data-theme=lunaro] b { font-weight: 600; }
html[data-theme=lunaro] .kpi-value, html.simple[data-theme=lunaro] .kpi-value { font: 600 1.7rem/1.15 var(--head); }
html.simple[data-theme=lunaro] .tile .t-num, html.simple[data-theme=lunaro] .f-num { font-weight: 600; }
html.flat .s-num { font-weight: 500; }
html.flat .ctable th, html.flat .apitable th, html.flat .inv-lines th, html.flat .facts dt, html.flat .fields dt, html.flat .kicker, html.flat .eyebrow, html.flat .facts-row.three .f-label:first-child,
[data-theme=lunaro] .apitable th, [data-theme=lunaro] .facts dt, [data-theme=lunaro] .fields dt, [data-theme=lunaro] .kicker, [data-theme=lunaro] .inv-lines th, [data-theme=lunaro] .rowsfield .rr-head, [data-theme=lunaro] .lv-menu-h, html.simple[data-theme=lunaro] .glabel {
  font: 600 11px/1.4 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
html[data-theme=lunaro] .num { font-family: var(--ui); font-variant-numeric: tabular-nums; }
html[data-theme=lunaro] .chart-top, html[data-theme=lunaro] .chart-x, html[data-theme=lunaro] .chart-tip { font-family: var(--ui); }
html[data-theme=lunaro] label { font-family: var(--ui); font-weight: 500; color: var(--text); }
html[data-theme=lunaro] label small, html[data-theme=lunaro] label .muted { font-weight: 400; color: var(--muted); }
html[data-theme=lunaro] .tableview summary, html[data-theme=lunaro] .moreopts summary, html[data-theme=lunaro] .howto summary, html[data-theme=lunaro] .rowact summary, html[data-theme=lunaro] .jump { font-family: var(--ui); }
html[data-theme=lunaro] .flash { font-family: var(--ui); } html[data-theme=lunaro] .flash::before { content: none; }
html[data-theme=lunaro] .side-foot { font: .74rem var(--ui); letter-spacing: 0; }
html[data-theme=lunaro] .deploys .meta code, html[data-theme=lunaro] .people td .mono, html[data-theme=lunaro] .ranked td.path, html[data-theme=lunaro] .keybox, html[data-theme=lunaro] code, html[data-theme=lunaro] pre { font-family: var(--mono); }

/* the confirm dialog (confirm.js): replaces the browser's box with the drawer's look */
html[data-theme=lunaro] dialog.confirm { border: 1px solid var(--line2); border-radius: var(--r-card); background: var(--surface-2); color: var(--text); padding: 20px 22px 18px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
html[data-theme=lunaro] dialog.confirm::backdrop { background: rgba(4, 8, 16, .55); }
html[data-theme=lunaro] dialog.confirm p { margin: 0 0 16px; font-size: .95rem; line-height: 1.55; }
html[data-theme=lunaro] dialog.confirm .row { justify-content: flex-end; gap: 8px; }
html[data-theme=lunaro] dialog.confirm[open] { animation: confirm-in .14s ease-out both; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- the developer shell ("my site") wears the same flat shell as the client and business pages (html.devshell):
   the Lunaro mark, the flat menu with its section labels, the tab bar on phones, the admin banner in the theme's look */
html.devshell .menu { gap: 12px; } html.devshell .menu .group { display: flex; flex-direction: column; gap: 2px; }
html.devshell .glabel, html.simple.devshell .glabel { font: 600 11px/1.4 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px 12px; }
html.devshell button.glabel, html.simple.devshell button.glabel { margin-left: 0; padding: 4px 12px; width: auto; }
html.devshell .glabel .chev { margin-right: 4px; opacity: .6; }
html.devshell .group.closed { margin-bottom: 0; }
html.devshell .menu .group.links { margin-top: auto; }
html.devshell .side-foot { font: .74rem var(--ui); letter-spacing: 0; }
html[data-theme=lunaro] .admin-banner { margin: 12px 14px 0 0; padding: 6px 12px; font: 500 .78rem var(--ui); letter-spacing: 0; text-transform: none; background: var(--selected); border: 0; border-radius: var(--r); color: var(--text); }
html[data-theme=lunaro] .admin-banner:hover { background: var(--selected-hover); }
html.devshell .modes { margin-top: 12px; }
html.devshell main.wrap { max-width: 1120px; }
html.devshell .menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 10px; margin-right: 4px; }
html.devshell .menu a, html.devshell .menu button.link { padding: 7px 12px; }
html.devshell .menu { gap: 10px; }
html[data-theme=lunaro] .design-body .for { font: .84rem var(--ui); color: var(--muted); letter-spacing: 0; }
html[data-theme=lunaro] .bubble .who { font: 500 .78rem var(--ui); color: var(--muted); }

/* every page opens the same way: the title above the content, not in a card. A header's extras (filters, jump links,
   a how-to, a notice, a meter) sit under the title line at full width. */
html.flat .pagehead > .row.between, html.flat .pagehead > .filters, html.flat .pagehead > .jump, html.flat .pagehead > .howto, html.flat .pagehead > .flash, html.flat .pagehead > .restore, html.flat .pagehead > .meter, html.flat .pagehead > .ok-msg, html.flat .pagehead > .error, html.flat .pagehead > p { flex: 1 1 100%; min-width: 0; }
html.flat .pagehead > .row.between { align-items: flex-start; }
html.flat .pagehead > .jump { margin: 2px 0 0; } html.flat .pagehead > .filters { margin-top: 2px; } html.flat .pagehead .howto { margin-top: 2px; }
html.flat .pagehead h1 + p, html.flat .pagehead .muted.small { font-size: .92rem; margin: 4px 0 0; }
html.flat .pagehead .meter { margin-top: 10px; }
html.flat .quiet-line { padding: 12px 18px; }
html.flat .pagehead > .flash, html.flat .pagehead > .ok-msg { margin: 6px 0 0; }
html.flat .pagehead > .wide { flex: 1 1 100%; min-width: 0; }
html.flat .pagehead.ed-head .ed-todo, html.flat .pagehead.ed-head > .row.between + * { flex: 1 1 100%; }
html.flat .pagehead + .tabs { margin-top: 2px; }
/* the home header is a page header, not a card (the surface rule above gave it a card background back) */
html.flat .hello, html.flat .card.hello, html[data-theme=lunaro] .card.hello { background: none; border: 0; border-radius: 0; padding: 0 0 14px; margin-bottom: 6px; }
html.client .hello .strip-note { font-size: .9rem; }

/* ---- the photo viewer (lightbox.js): a photo from a request or a message opens here, not in a new tab */
.lightbox { position: fixed; inset: 0; z-index: 80; overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgba(4, 8, 16, .92); padding: 56px 16px 40px; }
.lightbox[hidden] { display: none; }
.lightbox img { display: block; width: auto; height: auto; min-width: 0; min-height: 0; max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); object-fit: contain; border-radius: var(--r, 0); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox .lb-close { position: absolute; top: 12px; right: 12px; min-height: 36px; padding: 6px 12px; font: 600 .85rem var(--ui, sans-serif); color: var(--text); background: var(--surface-2, #1a2740); border: 1px solid var(--line2); border-radius: var(--r, 0); cursor: pointer; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font: 300 2rem/1 var(--ui, sans-serif); color: var(--text); background: var(--surface-2, #1a2740); border: 1px solid var(--line2); border-radius: 50%; cursor: pointer; }
.lightbox .lb-prev { left: 12px; } .lightbox .lb-next { right: 12px; } .lightbox .lb-prev[hidden], .lightbox .lb-next[hidden] { display: none; }
.lightbox .lb-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: .8rem var(--ui, sans-serif); color: var(--muted); }
.lightbox button:hover { background: color-mix(in srgb, #fff 6%, var(--surface-2, #1a2740)); }
html.lightbox-open { overflow: hidden; }
@media (max-width: 720px) { .lightbox { padding: 56px 8px 36px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 36px; transform: none; width: 40px; height: 40px; } }
/* the logged-work table on a request: a card per entry on phones, like the other record tables */
@media (max-width: 720px) {
  html.flat .ctable.work tr { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
  html.flat .ctable.work tr:first-child { border-top: 0; } html.flat .ctable.work td { display: block; padding: 0; border: 0; white-space: normal; }
  html.flat .ctable.work td:nth-child(3) { grid-column: 1 / -1; } html.flat .ctable.work td:nth-child(3):empty { display: none; }
  html.flat .ctable.work td:nth-child(4) { grid-column: 1 / 3; color: var(--muted); } html.flat .ctable.work td:nth-child(5) { grid-column: 3; text-align: right; } html.flat .ctable.work td:nth-child(6) { grid-column: 1 / -1; text-align: left; }
  html.flat .pagehead .row.gap, html.flat .card > form.row.gap { flex-wrap: wrap; }
}
html.flat .tablewrap { overflow-x: auto; max-width: 100%; }

/* ---- the features pass (23 Oct): what changed lately, previews to approve, the Google post box, the money chart */
html.flat .asks.changes .what { font-size: .92rem; } html.flat .asks.changes li { padding: 9px 0; }
.preview-line { margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gpost { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: var(--r-card, 0); }
.gpost textarea { margin: 0; min-height: 0; font: .95rem/1.5 var(--ui, sans-serif); }
html.flat .chart.money .cols { height: 160px; align-items: flex-end; gap: 8px; padding-bottom: 20px; position: relative; }
html.flat .chart.money .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
html.flat .chart.money .col .x { position: absolute; bottom: -20px; font-size: .72rem; color: var(--muted); }
html.flat .chart.money .bar { max-width: 40px; border-radius: 0; }
html.flat .stat-grid .stat { text-decoration: none; }
#push [data-push-note] { font-size: .86rem; }

/* ---- drawers as boxes: a titled box per subject, a small bar graph, a table of what happened */
html.flat .drawer .box { padding: 14px 16px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-card, 0); background: var(--surface-1); }
html.flat .drawer .box .facts { margin: 0; } html.flat .drawer .box .box-title { margin: 0 0 10px; font: 600 11px/1.4 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
html.flat .drawer .box.who .big { font: 500 1.15rem var(--head); }
html.flat .drawer .box .grid label { margin-bottom: 10px; }
html.flat .spark { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 4px 0 2px; }
html.flat .spark .sp-col { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
html.flat .spark .sp-bar { display: block; width: 100%; background: var(--lilac); opacity: .8; border-radius: 0; }
html.flat .spark .sp-x { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: .66rem; color: var(--muted); }
html.flat .spark:has(.sp-x) { margin-bottom: 18px; }
html.flat .spark.wide { gap: 2px; height: 48px; } html.flat .spark.wide .sp-bar { border-radius: 0; }
html.flat .ctable.acts { margin-top: 10px; font-size: .86rem; } html.flat .ctable.acts td { padding: 6px 6px; }
html.flat .drawer .switches { margin-bottom: 12px; }

html[data-theme=lunaro] textarea { font-family: var(--ui); }
html[data-theme=lunaro] textarea.json, html[data-theme=lunaro] #body, html[data-theme=lunaro] .mono { font-family: var(--mono); }
