:root { --ink: #172334; --muted: #5d6b81; --line: #dce3ec; --bg: #f3f6fa; --card: #fff; --blue: #1b4ed8; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
.a-logo { font-weight: 800; font-size: 24px; letter-spacing: -1px; text-decoration: none; color: var(--ink); }
.a-logo span { color: #3567e5; } .a-logo small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.a-auth { max-width: 400px; margin: 10vh auto; padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 40px #15294410; }
.a-auth h1 { font-size: 24px; margin: 18px 0 8px; }
.a-form { display: grid; gap: 14px; margin-top: 14px; }
.a-form label, .a-inline label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select { padding: 10px 12px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); font-size: 15px; min-width: 0; }
input:focus, select:focus { outline: 3px solid #bcd0ff; border-color: var(--blue); }
.a-btn { background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.a-btn:disabled { opacity: .55; cursor: default; }
.a-link { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 4px 6px; font-size: 14px; }
.a-link.danger { color: #b42318; }
.a-muted { color: var(--muted); font-size: 14px; } .a-small { font-size: 12px; }
.a-err { color: #b42318; background: #fef3f2; border-radius: 8px; padding: 8px 10px; margin: 0; font-size: 14px; }
.a-ok { color: #067647; background: #ecfdf3; border-radius: 8px; padding: 8px 10px; margin: 0; font-size: 14px; }
.a-warn { color: #93370d; background: #fffaeb; border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.a-top { display: flex; align-items: center; gap: 18px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.a-top nav { display: flex; gap: 14px; } .a-top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.a-me { margin-left: auto; font-size: 13px; color: var(--muted); }
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; padding: 24px; max-width: 1280px; margin: 0 auto; }
.a-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.a-card.wide { grid-column: 1 / -1; }
.a-card h2 { margin: 0 0 12px; font-size: 18px; } .a-card h3 { margin: 22px 0 10px; font-size: 15px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.a-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { padding: 10px 8px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.a-actions { white-space: nowrap; text-align: right; }
.a-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.a-inline strong { align-self: center; }
.a-pair { display: flex; gap: 6px; } .a-pair input { width: 100px; }
.a-check { display: flex !important; align-items: center; gap: 6px; padding-bottom: 10px; }
.a-pill { margin-left: 6px; font-size: 11px; background: #e8eefb; color: var(--blue); border-radius: 999px; padding: 2px 8px; }
.a-status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #eef2f7; color: var(--muted); }
.s-live { background: #ecfdf3; color: #067647; } .s-expired, .s-usedup { background: #fffaeb; color: #93370d; }
.a-dim td { opacity: .65; }
.a-loading { padding: 40px; color: var(--muted); }
@media (max-width: 600px) { .a-grid { padding: 12px; gap: 12px; } .a-top { padding: 12px; } .a-me { margin-left: 0; } .a-card { padding: 16px; } }
.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.a-stat { background: #f6f8fb; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.a-stat span { font-size: 12px; color: var(--muted); font-weight: 600; } .a-stat strong { font-size: 22px; } .a-stat small { font-size: 12px; color: var(--muted); }
.a-meter { position: relative; display: inline-block; min-width: 90px; height: 20px; border-radius: 999px; background: #eef2f7; font-size: 12px; line-height: 20px; text-align: center; overflow: hidden; }
.a-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: #bbf7d0; z-index: 0; } .a-meter.warn i { background: #fde68a; } .a-meter.over i { background: #fecaca; }
.a-meter { isolation: isolate; } .a-meter i { z-index: -1; }
.a-err-text { color: #b42318; }
a.a-btn { display: block; text-align: center; text-decoration: none; }
.a-top nav a.on { color: var(--ink); font-weight: 650; }

/* ---- Plys hub (/admin/plys) ---- */
.h-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 57px); }
.h-side { background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; align-self: start; height: calc(100vh - 57px); }
.h-switch { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.h-switch select { width: 100%; font-weight: 600; }
.h-side nav { display: grid; gap: 2px; }
.h-side nav button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); font-size: 15px; }
.h-side nav button span { display: grid; } .h-side nav button small { font-size: 11px; color: var(--muted); }
.h-side nav button:hover { background: #f1f5fb; }
.h-side nav button.on { background: #e8eefb; color: var(--blue); font-weight: 650; }
.h-side nav em { font-style: normal; font-size: 12px; font-weight: 700; background: #d92d20; color: #fff; border-radius: 999px; padding: 1px 8px; }
.h-side-foot { margin-top: auto; font-size: 12px; color: var(--muted); line-height: 1.5; }
.h-main { padding: 26px clamp(16px, 3vw, 36px) 60px; max-width: 1120px; width: 100%; }
.h-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(135deg, #ffffff, #eef3ff); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin-bottom: 16px; }
.h-hero h1 { margin: 4px 0 10px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; line-height: 1.15; }
.h-eyebrow { margin: 0; font-size: 13px; color: var(--muted); } .h-eyebrow a { color: var(--blue); text-decoration: none; }
.h-plys { display: flex; flex-wrap: wrap; gap: 6px; }
.h-plys span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #eef2f7; color: #94a3b8; }
.h-plys span.on { background: #e3f6ec; color: #067647; font-weight: 600; }
.h-plys span.on::before { content: "● "; font-size: 9px; vertical-align: 1px; }
.h-ring { flex: none; } .h-ring-bg { fill: none; stroke: #e2e8f0; stroke-width: 9; } .h-ring-fg { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .5s; }
.h-ring text { font-size: 24px; font-weight: 800; fill: var(--ink); }
.h-good .h-ring-fg { stroke: #12b76a; } .h-ok .h-ring-fg { stroke: #f79009; } .h-bad .h-ring-fg { stroke: #f04438; }
.h-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.h-kpi { display: grid; gap: 2px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--ink); transition: border-color .15s, transform .15s; }
.h-kpi:hover:not(:disabled) { border-color: #a9bdf5; transform: translateY(-1px); }
.h-kpi b { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; } .h-kpi small { color: var(--muted); font-size: 12px; }
.h-kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.h-kpi.h-alert b { color: #d92d20; } .h-kpi.h-good b { color: #067647; }
.h-h2 { font-size: 17px; margin: 22px 0 10px; }
.h-feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.h-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; border-left: 4px solid #cbd5e1; }
.h-item.h-urgent { border-left-color: #d92d20; }
.h-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.h-item-title { display: block; margin: 8px 0 2px; font-size: 16px; }
.h-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.h-quote { margin: 6px 0 0; color: #334155; font-size: 14px; border-left: 3px solid #e2e8f0; padding-left: 10px; white-space: pre-wrap; }
.h-draft { white-space: pre-wrap; font: inherit; font-size: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }
.h-suggest { margin: 6px 0 0; font-size: 14px; } .h-suggest code { background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }
.h-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.h-sm { padding: 6px 12px !important; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }
a.b-ghost, button.b-ghost { color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; } a.a-btn { text-decoration: none; display: inline-block; }
.h-chip { font-size: 12px; font-weight: 650; border-radius: 999px; padding: 2px 9px; background: #eef2f7; color: #475467; }
.h-chip-booking, .h-chip-order { background: #e8eefb; color: #1b4ed8; } .h-chip-catering { background: #f4ebff; color: #6941c6; }
.h-chip-complaint, .h-chip-urgent { background: #fef3f2; color: #b42318; } .h-chip-dietary { background: #ecfdf3; color: #067647; }
.h-chip-job { background: #fff6ed; color: #c4320a; } .h-chip-partnership { background: #f2f4f7; color: #667085; }
.h-chip-newsletter { background: #f0f9ff; color: #026aa2; } .h-chip-missing { background: #fffaeb; color: #b54708; } .h-chip-seo { background: #eef4ff; color: #3538cd; }
.h-conf { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.h-conf-high { background: #ecfdf3; color: #067647; } .h-conf-medium { background: #fffaeb; color: #b54708; } .h-conf-low { background: #f2f4f7; color: #667085; }
.h-empty { display: grid; gap: 4px; text-align: center; padding: 34px 20px; background: var(--card); border: 1px dashed #cbd5e1; border-radius: 14px; color: var(--muted); }
.h-empty b { color: var(--ink); font-size: 16px; }
.h-checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.h-checks li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.h-checks li p { margin: 2px 0 0; } .h-checks li > div { flex: 1; }
.h-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #fffaeb; color: #b54708; }
.h-checks li.ok .h-tick { background: #ecfdf3; color: #067647; } .h-checks li.ok { opacity: .75; }
.h-pts { font-weight: 700; color: #b54708; font-size: 13px; }
.h-progress { display: flex; height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 6px 0 8px; max-width: 520px; }
.h-progress i { display: block; } .h-progress .live { background: #12b76a; } .h-progress .built { background: #3567e5; } .h-progress .partial { background: #f79009; }
.h-filters { display: grid; gap: 10px; margin-bottom: 8px; } .h-filters input { max-width: 460px; }
.h-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.h-seg button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink); }
.h-seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.h-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.h-ply { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 13px; }
.h-ply header { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .h-ply header strong { font-size: 15px; }
.h-ply p { margin: 0; } .h-replaces { color: var(--muted); font-size: 12px; }
.h-ai { display: flex; gap: 6px; align-items: baseline; color: #3538cd; } .h-ai span { font-size: 10px; font-weight: 800; background: #eef4ff; border-radius: 5px; padding: 1px 5px; }
.h-ply footer { margin-top: auto; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding-top: 6px; border-top: 1px solid #eef2f7; }
.h-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #f2f4f7; color: #667085; white-space: nowrap; }
.h-badge.h-st-live { background: #ecfdf3; color: #067647; } .h-badge.h-st-built { background: #e8eefb; color: #1b4ed8; } .h-badge.h-st-partial { background: #fffaeb; color: #b54708; }
.h-ply.h-st-live, .h-ply.h-st-built { border-color: #bcd0ff; }
.h-embed .l-panel { max-width: none; padding: 0; }
/* Shared with the builder's Inbox / Redirects tabs */
.l-panel h3 { margin: 6px 0 6px; font-size: 16px; } .l-muted { color: var(--muted); font-size: 13px; }
.l-list { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 10px; }
.l-list > li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; } .l-list > li.l-off { opacity: .65; }
.l-head { display: flex; justify-content: space-between; gap: 12px; } .l-dest { font-size: 13px; color: var(--muted); word-break: break-all; margin-top: 2px; }
.l-count { text-align: right; display: grid; font-size: 12px; color: var(--muted); white-space: nowrap; } .l-count b { font-size: 20px; color: var(--ink); }
.l-tag { margin-left: 6px; font-size: 11px; background: #eef2f7; border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.l-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .l-actions .b-ghost { padding: 4px 10px; font-size: 13px; }
.l-actions .b-ghost.on { background: var(--ink); color: #fff; } .l-danger { color: #b42318 !important; }
.l-form { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.l-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.l-form textarea { font: inherit; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 10px; }
.l-row { display: flex; gap: 12px; flex-wrap: wrap; } .l-row > * { flex: 1; min-width: 180px; } .l-err { color: #b42318; font-size: 13px; margin: 0; }
.b-primary { background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 10px 20px; font-weight: 650; cursor: pointer; }
.p-subject { font-weight: 600; margin: 8px 0 0; } .p-message { white-space: pre-wrap; margin: 6px 0 0; font-size: 14px; }
@media (max-width: 760px) {
  .h-shell { grid-template-columns: 1fr; }
  .h-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; }
  .h-side nav { display: flex; overflow-x: auto; } .h-side nav button { white-space: nowrap; } .h-side nav button small, .h-side-foot { display: none; }
  .h-main { padding: 16px; } .h-hero { padding: 16px; } .h-hero .h-ring { width: 72px; height: 72px; }
}
/* PlyAnalytics */
.h-kpi-traffic { position: relative; overflow: hidden; }
.h-spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 6px; }
.h-spark i { flex: 1; background: #a9bdf5; border-radius: 2px 2px 0 0; min-height: 2px; }
.h-insights { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.h-insights li { display: flex; gap: 10px; align-items: baseline; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.h-insights li span { font-size: 11px; flex: none; color: #667085; }
.h-in-good span { color: #12b76a !important; } .h-in-bad span { color: #d92d20 !important; }
.h-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.h-bar { flex: 1; height: 100%; position: relative; }
.h-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px 3px 0 0; }
.h-bar i.v { background: #dbe6ff; } .h-bar i.u { background: #3567e5; left: 22%; right: 22%; }
.h-bar:hover i.v { background: #c3d4ff; }
.h-legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 18px; }
.h-legend span.u, .h-legend span.v { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; } .h-legend span.u { background: #3567e5; } .h-legend span.v { background: #dbe6ff; }
.h-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.h-top { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.h-top h3 { margin: 0 0 10px; font-size: 14px; }
.h-top ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.h-top li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; font-size: 14px; border-radius: 8px; overflow: hidden; }
.h-top li i { position: absolute; inset: 0 auto 0 0; background: #eef3ff; z-index: 0; }
.h-top li span, .h-top li b { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-hero .h-seg { flex: none; }
@media (max-width: 760px) { .h-hero { flex-wrap: wrap; } .h-chart { height: 130px; gap: 1px; padding: 10px; } }
/* Ply2FA */
.a-qrwrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.a-qr { width: 168px; height: 168px; border: 1px solid var(--line); border-radius: 12px; image-rendering: pixelated; shape-rendering: crispEdges; }
.a-secret { display: inline-block; font-size: 15px; letter-spacing: .04em; background: #f1f5f9; border-radius: 8px; padding: 6px 10px; word-break: break-all; }
.a-codes { columns: 2; padding-left: 22px; margin: 12px 0; font-size: 15px; line-height: 1.9; }
.a-btn-quiet { background: #fff; color: #b42318; border: 1.5px solid #fda29b; }
label[hidden] { display: none !important; }
.h-chip-ply { background: #eef4ff; color: #3538cd; }
/* Hub sidebar groups with plain-English descriptions */
.h-navgroup { display: grid; gap: 2px; margin-bottom: 10px; }
.h-navhead { margin: 6px 10px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.h-side nav { overflow-y: auto; }
.h-side nav button small { line-height: 1.3; margin-top: 1px; }
@media (max-width: 760px) { .h-navgroup { display: flex; gap: 2px; margin: 0; } .h-navhead { display: none; } }
.a-ai { display: grid; gap: 12px; padding: 6px 2px; }
.a-ai-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.a-ai-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.a-ai-stats div { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.a-ai-stats span { font-size: 12px; color: var(--muted); }
.a-ai-stats b { font-size: 18px; }
.a-ai-stats small { font-size: 12px; color: var(--muted); }
.a-ai-stats .out { border-color: #fda29b; background: #fef3f2; }
.a-ai-give { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.a-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 650; cursor: pointer; color: var(--ink, #0f172a); }
.a-chip small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.a-chip:disabled { opacity: .55; cursor: default; }
.a-grow { flex: 1 1 240px; }
.a-search { margin-bottom: 10px; align-items: center; }
.a-budget { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.a-budget input { width: 96px; font: inherit; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 8px; }
.a-budget .a-chip { padding: 3px 9px; font-size: 13px; }

/* Anthropic API balance banner + card (colours meet WCAG AA as text on their own backgrounds) */
.a-banner { padding: 10px 24px; font-size: 14px; border-bottom: 1px solid; }
.a-banner.empty { background: #fdecec; color: #7a1414; border-color: #f3b4b4; }
.a-banner.low { background: #fff6e0; color: #6b4300; border-color: #f1d28a; }
.a-banner a { color: inherit; font-weight: 600; }
.a-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; background: #eef2f7; color: #334155; }
.a-pill.ok { background: #e3f4e8; color: #14532d; }
.a-pill.low { background: #fff6e0; color: #6b4300; }
.a-pill.empty { background: #fdecec; color: #7a1414; }
.a-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
