/* BrandScan admin: phone first (390 wide), the same pages widen on a laptop. Dark glass look, as the app. */
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url(/fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url(/fonts/figtree-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url(/fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-display: swap; src: url(/fonts/figtree-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 800; font-display: swap; src: url(/fonts/figtree-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #0B0B0D; --ink: #F5F5F7; --soft: #C9C9D1; --muted: #9A9AA3; --faint: #7C7C85;
  --line: rgba(255,255,255,0.12); --card: rgba(255,255,255,0.05); --card-line: rgba(255,255,255,0.10);
  --yellow: #FFD60A; --link: #7DB8FF; --good: #7EE2A0; --red: #EA3228;
  --l0: #7EE2A0; --l1: #FFD60A; --l2: #FF9F0A; --l3: #FF5A4E;
  --glass: rgba(34,34,40,0.72); --glass-line: rgba(255,255,255,0.16);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: 'Figtree', -apple-system, 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse 90% 320px at 10% 0%, rgba(255,214,10,0.11), rgba(0,0,0,0) 70%), radial-gradient(ellipse 80% 280px at 95% 110px, rgba(120,80,200,0.14), rgba(0,0,0,0) 70%), var(--bg);
  background-repeat: no-repeat; }
a { color: var(--link); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }
input::placeholder, textarea::placeholder { color: var(--faint); }

#screen { max-width: 720px; margin: 0 auto; }
.head { padding: 62px 22px 0; display: flex; flex-direction: column; gap: 8px; }
.head.sub { padding-top: 46px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; color: var(--link); text-decoration: none; font-size: 16px; font-weight: 600; background: none; border: 0; padding: 0 6px; cursor: pointer; }
.titlerow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
h1 { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; overflow-wrap: anywhere; }
.lede { margin: 0; font-size: 15px; line-height: 1.45; color: var(--soft); }
main { padding: 24px 16px 140px; display: flex; flex-direction: column; gap: 26px; }
main.withbar { padding-bottom: 210px; }
section.grp { display: flex; flex-direction: column; gap: 10px; }
.grphead { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; gap: 10px; }
h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
h3 { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: var(--soft); }
.note { margin: 0 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.note.top { margin-top: -10px; }

.card { background: var(--card); border: 1px solid var(--card-line); border-radius: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.list { padding: 0 18px; gap: 0; }
.card.publish { background: radial-gradient(ellipse 90% 140% at 0% 0%, rgba(255,214,10,0.20), rgba(255,214,10,0) 70%), var(--card); }
.card.ok { flex-direction: row; align-items: center; background: rgba(126,226,160,0.08); border-color: rgba(126,226,160,0.25); padding: 18px; }
.card.warn { background: rgba(255,159,10,0.08); border-color: rgba(255,159,10,0.3); }
.big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.mid { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.small { font-size: 14px; line-height: 1.45; color: var(--soft); }
.muted { color: var(--muted); }
.okdot { width: 44px; height: 44px; border-radius: 22px; background: rgba(126,226,160,0.16); display: grid; place-items: center; flex-shrink: 0; }
.stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; text-decoration: none; color: var(--ink); width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.row + .row, .row + .rowx, .rowx + .row, .rowx + .rowx { border-top: 0.5px solid var(--line); }
.rowx { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 0; }
.ico { width: 36px; height: 36px; border-radius: 18px; background: rgba(255,255,255,0.08); display: grid; place-items: center; flex-shrink: 0; }
.rt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rt .t { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rt .t.b { font-size: 17px; font-weight: 700; }
.rt .s { font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.rt .d { font-size: 15px; line-height: 1.45; color: var(--soft); overflow-wrap: anywhere; }
.rt .m { font-size: 13px; line-height: 1.4; color: var(--muted); }
.k { width: 110px; flex-shrink: 0; font-size: 14px; color: var(--muted); }
.v { flex: 1; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.badge { min-width: 28px; height: 28px; padding: 0 9px; border-radius: 14px; background: rgba(255,255,255,0.14); color: var(--ink); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge.y { background: var(--yellow); color: #0B0B0D; }
.badge.r { background: var(--red); color: #fff; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.10); color: var(--soft); white-space: nowrap; flex-shrink: 0; }
.pill.y { background: rgba(255,214,10,0.16); color: var(--yellow); }
.pill.r { background: rgba(234,50,40,0.18); color: #FF8A80; }
.pill.g { background: rgba(126,226,160,0.14); color: var(--good); }
.pill.b { background: rgba(125,184,255,0.16); color: var(--link); }
.lvl { font-weight: 800; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 26px; background: rgba(255,255,255,0.10); color: var(--ink); border: 1px solid rgba(255,255,255,0.14); text-decoration: none; font-size: 17px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.btn.p { background: var(--yellow); color: #0B0B0D; border: 0; }
.btn.danger { color: #FF8A80; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 16px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--link); background: none; border: 0; padding: 0; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; align-self: flex-start; }
.iconbtn { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.14); cursor: pointer; flex-shrink: 0; }

.tiles { display: flex; gap: 8px; }
.tile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); text-decoration: none; }
.tile .n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.tile .n.g { color: var(--good); }
.tile .l { font-size: 13px; color: var(--muted); }

/* tab bar and action bar */
#tabs { position: fixed; left: 12px; right: 12px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; display: flex; padding: 4px; border-radius: 32px; background: var(--glass); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 12px 32px rgba(0,0,0,0.45); z-index: 20; }
#tabs a { flex: 1 1 0; min-height: 56px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; }
#tabs a[aria-current="page"] { background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; }
#tabs .tb { position: relative; }
#tabs .dot { position: absolute; top: -5px; left: 15px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#bar { position: fixed; left: 12px; right: 12px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 34px; background: var(--glass); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 12px 32px rgba(0,0,0,0.45); z-index: 21; }
#bar.abovetabs { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
#bar .lab { flex: 1 1 auto; padding-left: 14px; font-size: 16px; font-weight: 700; }
#bar .btn { flex: 1 1 auto; }
#bar .btn.fit { flex: 0 0 auto; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-size: 14px; font-weight: 600; color: var(--soft); }
.field .help { font-size: 13px; color: var(--muted); line-height: 1.4; }
input[type=text], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: var(--ink); font: inherit; font-size: 16px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: none; }
input[type=color] { width: 56px; height: 48px; padding: 4px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); }
input[type=checkbox] { width: 24px; height: 24px; margin: 0; accent-color: var(--yellow); flex-shrink: 0; }
.search { position: relative; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chip { text-decoration: none; flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: var(--soft); font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #0B0B0D; border-color: var(--ink); }
.chip .c { font-weight: 500; opacity: .75; }
.seg { display: flex; padding: 3px; border-radius: 16px; background: rgba(255,255,255,0.06); gap: 3px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 13px; background: transparent; color: var(--soft); font-size: 15px; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,0.18); color: #fff; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 16px; background: rgba(255,255,255,0.18); border: 0; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.err { color: #FF8A80; font-size: 14px; }

/* the brand card as it looks in the app */
.bcard { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; border: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.bcard .bn { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.bcard .bo { font-size: 14px; color: rgba(255,255,255,0.8); }
.bcard .tx { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dots { display: flex; gap: 6px; padding-top: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid currentColor; }
.flagc { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: rgba(255,255,255,0.1); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #D9D9DE; }
.pending { font-size: 13px; color: var(--soft); padding-top: 4px; }

/* steps on Research */
.step { display: flex; align-items: center; gap: 14px; }
.stepn { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; font-weight: 800; border: 2px solid rgba(255,255,255,0.2); color: var(--muted); }
.stepn.on { background: var(--yellow); color: #0B0B0D; border: 0; }
.stepn.done { background: rgba(126,226,160,0.18); border: 0; }
.stept { font-size: 19px; font-weight: 800; color: var(--muted); }
.stept.on { color: var(--ink); }
.stepb { padding-left: 46px; display: flex; flex-direction: column; gap: 12px; }

/* sheet */
#sheetwrap { position: fixed; inset: 0; z-index: 40; }
#sheetback { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
#sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; background: #17171B; border-radius: 26px 26px 0 0; border: 1px solid var(--glass-line); padding: 12px 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; animation: up .3s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { #sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 26px; animation: none; } }
.shtop { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.shtop .mid { font-size: 22px; }

#toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%); z-index: 60; max-width: 340px; padding: 12px 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); font-size: 15px; font-weight: 600; text-align: center; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
#toast.show { transform: translate(-50%, 0); }
#toast.bad { color: #FF8A80; }

/* numbers */
.panel { display: flex; flex-direction: column; gap: 0; padding: 0 18px; }
.mrow { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 0; }
.mrow + .mrow { border-top: 0.5px solid var(--line); }
.mv { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.mv .n { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ch { font-size: 13px; font-weight: 700; }
.ch.up { color: var(--good); } .ch.down { color: #FF8A80; } .ch.same { color: var(--muted); }
.spark { width: 72px; height: 32px; flex-shrink: 0; }
.toggle { border-top: 0.5px solid var(--line); min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--link); font-size: 15px; font-weight: 700; background: none; border-left: 0; border-right: 0; border-bottom: 0; cursor: pointer; }
.detail { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 16px; border-top: 0.5px solid var(--line); }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; padding: 4px 0; }
.kv .r { display: flex; gap: 10px; align-items: baseline; }
.kv .pc { color: var(--muted); font-size: 13px; min-width: 40px; text-align: right; }
.barline { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.barline i { display: block; height: 100%; background: var(--link); border-radius: 4px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
.center { text-align: center; }
.gap8 { display: flex; flex-direction: column; gap: 8px; }
.gap12 { display: flex; flex-direction: column; gap: 12px; }
.inline { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }

@media (min-width: 900px) {
  #screen { max-width: 760px; }
  .head { padding-top: 48px; }
}
