@font-face { font-family: 'InterPV'; src: url('lib/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --font: 'InterPV', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --brand: #EE7731; --brand-2: #E7C171; --brand-ink: #1a0c03; --orange: #E8651A; --gold: #E7C171;
  --grad: linear-gradient(135deg, #F2C477 0%, #F08A3E 52%, #E8651A 100%);
  --amber: #f59e0b; --rose: #f43f5e; --sky: #38bdf8; --violet: #a78bfa; --green: #22c55e;
  --ease: cubic-bezier(.2,.8,.2,1);
  --sidebar: 256px;
  --glow: rgba(232,101,26,.55);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071016; --bg-2: #0a141b; --surface: #0e1a22; --surface-2: #13222c; --surface-3: #1b2f3a;
  --line: rgba(196,214,224,.09); --line-2: rgba(196,214,224,.16);
  --text: #f3f1ec; --text-2: #bfc6cb; --muted: #84919a;
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 10px 30px -12px rgba(0,0,0,.65);
  --glass: rgba(8,15,21,.74);
  --chip: rgba(196,214,224,.08);
  --hero: radial-gradient(1100px 420px at 0% -20%, rgba(232,101,26,.13), transparent 60%), radial-gradient(800px 380px at 100% 0%, rgba(231,193,113,.08), transparent 60%);
  --brand-t: #F08A3E; --gold-t: #E7C171;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f5ef; --bg-2: #f2ede4; --surface: #ffffff; --surface-2: #fbf9f5; --surface-3: #f2eee7;
  --line: rgba(20,37,43,.075); --line-2: rgba(20,37,43,.14);
  --text: #12222a; --text-2: #3b4a52; --muted: #6f7b82;
  --shadow: 0 1px 2px rgba(20,37,43,.05), 0 12px 32px -16px rgba(20,37,43,.16);
  --glass: rgba(255,253,249,.82);
  --chip: rgba(20,37,43,.05);
  --hero: radial-gradient(1100px 420px at 0% -20%, rgba(232,101,26,.10), transparent 60%), radial-gradient(800px 380px at 100% 0%, rgba(231,193,113,.14), transparent 60%);
  --brand-t: #C9530F; --gold-t: #9a6f1f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; overscroll-behavior-y: none; }
.num, .kpi-value, td.n, .money { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 16px; height: 16px; } svg.i.lg { width: 24px; height: 24px; }

/* ---------- shell ---------- */
.app { min-height: 100%; display: flex; background: var(--hero), var(--bg); background-attachment: fixed; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 18px 12px; background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.topbar .t-title { flex: 1; min-width: 0; }
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .t-sub { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .mlogo { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--chip); border: 1px solid var(--line); cursor: pointer; color: var(--text-2); transition: .2s var(--ease); }
.iconbtn:hover { color: var(--text); background: var(--surface-3); }
.content { padding: 18px; max-width: 1280px; margin: 0 auto; }
.tabbar { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 24px; background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 18px; font-size: 10.5px; font-weight: 600; color: var(--muted); cursor: pointer; border: 0; background: none; transition: .25s var(--ease); }
.tab svg.i { width: 22px; height: 22px; }
.tab.on { color: var(--text); background: var(--chip); }
.tab.on svg.i { stroke: url(#pvgrad); color: var(--brand); }

@media (min-width: 1024px) {
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; width: var(--sidebar); flex: none; padding: 20px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 80%, transparent); backdrop-filter: blur(12px); }
  .main { padding-bottom: 40px; }
  .tabbar { display: none; }
  .topbar { padding: 16px 32px; }
  .topbar .mlogo { display: none; }
  .topbar h1 { font-size: 22px; }
  .content { padding: 28px 32px 48px; }
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 22px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 24px -10px var(--glow); }
.brand b { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand span { font-size: 11.5px; color: var(--muted); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 12px 6px; font-weight: 650; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 560; font-size: 14.5px; transition: .2s var(--ease); position: relative; }
.nav a:hover { background: var(--chip); color: var(--text); }
.nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav a.on svg.i { color: var(--brand-t); }
.nav .count { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(244,63,94,.14); color: #fb7185; font-weight: 700; }
.side-foot { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.side-foot b { color: var(--text); }

/* ---------- primitives ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 720px) { .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .md-g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .lg-split { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); } .lg-split-r { grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; position: relative; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.card-h .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.card-h .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--chip); color: var(--brand); }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-title a, .link { color: var(--brand); font-weight: 600; font-size: 13px; cursor: pointer; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; letter-spacing: .01em; }
.pill.ok { background: rgba(34,197,94,.13); color: #4ade80; } [data-theme=light] .pill.ok { color: #15803d; }
.pill.warn { background: rgba(245,158,11,.15); color: #fbbf24; } [data-theme=light] .pill.warn { color: #b45309; }
.pill.bad { background: rgba(244,63,94,.14); color: #fb7185; } [data-theme=light] .pill.bad { color: #be123c; }
.pill.info { background: rgba(56,189,248,.14); color: #7dd3fc; } [data-theme=light] .pill.info { color: #0369a1; }
.pill.vio { background: rgba(167,139,250,.15); color: #c4b5fd; } [data-theme=light] .pill.vio { color: #6d28d9; }
.pill.neutral { background: var(--chip); color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 650; font-size: 14px; cursor: pointer; transition: .2s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: var(--brand-ink); border: 0; box-shadow: 0 10px 24px -10px var(--glow); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: #fb7185; border-color: rgba(244,63,94,.3); background: rgba(244,63,94,.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .sp { flex: 1; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--chip); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.searchbox { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); flex: 1; min-width: 0; }
.searchbox input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- hero + KPIs ---------- */
.hero { border-radius: var(--r-xl); padding: 22px; position: relative; overflow: hidden; background: linear-gradient(145deg, #13232d 0%, #0d1a22 50%, #0a141b 100%); color: #f6f1e9; border: 1px solid rgba(231,193,113,.16); box-shadow: 0 30px 60px -32px rgba(232,101,26,.38); }
[data-theme=light] .hero { background: linear-gradient(145deg, #16303b 0%, #102029 55%, #0b151c 100%); border-color: rgba(20,37,43,.1); }
.hero::after { content: ''; position: absolute; right: -80px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(238,119,49,.30), transparent 65%); pointer-events: none; }
.hero .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #E7C171; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.hero .big { font-size: 38px; font-weight: 800; letter-spacing: -.035em; margin: 6px 0 2px; line-height: 1.05; }
.hero .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: #F6B27C; background: rgba(238,119,49,.16); padding: 3px 9px; border-radius: 99px; }
.hero .delta.neg { color: #fda4af; background: rgba(253,164,175,.12); }
.hero .hero-chart { height: 110px; margin: 12px -6px -8px; position: relative; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.hero-stats div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 10px 12px; }
.hero-stats small { display: block; font-size: 11px; color: #E7C171; opacity: .85; font-weight: 600; }
.hero-stats b { font-size: 16px; letter-spacing: -.02em; }
.kpi { padding: 16px; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi .k-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .kpi-value { font-size: 24px; font-weight: 780; letter-spacing: -.03em; margin-top: 2px; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.tint-g { background: rgba(34,197,94,.14); color: #4ade80; } .tint-a { background: rgba(245,158,11,.14); color: #fbbf24; }
.tint-r { background: rgba(244,63,94,.14); color: #fb7185; } .tint-b { background: rgba(56,189,248,.14); color: #38bdf8; } .tint-v { background: rgba(167,139,250,.15); color: #a78bfa; }
[data-theme=light] .tint-g { color: #16a34a; } [data-theme=light] .tint-a { color: #d97706; } [data-theme=light] .tint-r { color: #e11d48; } [data-theme=light] .tint-b { color: #0284c7; } [data-theme=light] .tint-v { color: #7c3aed; }
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 300px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s; min-width: 0; }
.li:first-child { border-top: 0; }
.li:hover { background: var(--surface-2); }
.li .av { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.li .av svg.i { width: 22px; height: 22px; }
.li .main-t { flex: 1; min-width: 0; }
.li .name { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.li .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.li .end { text-align: right; flex: none; }
.li .end b { display: block; font-size: 15px; letter-spacing: -.01em; }
.li .end small { font-size: 12px; color: var(--muted); }
.rank { width: 22px; font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; flex: none; }
.bar { height: 6px; border-radius: 6px; background: var(--chip); overflow: hidden; margin-top: 7px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.fcbar { position: relative; height: 8px; border-radius: 8px; background: var(--chip); overflow: visible; margin-top: 8px; }
.fcbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; }
.fcbar .tgt { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .55; border-radius: 2px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .n { text-align: right; }

/* ---------- dish detail ---------- */
.dish-hero { display: flex; gap: 16px; align-items: center; }
.dish-hero .av { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none; }
.dish-hero .av svg.i { width: 30px; height: 30px; }
.dish-hero h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; line-height: 1.15; }
.gauge { position: relative; width: 150px; height: 150px; flex: none; margin: 0 auto; }
.gauge .g-c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .g-c b { font-size: 30px; letter-spacing: -.04em; display: block; line-height: 1; }
.gauge .g-c small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat { padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.stat small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { font-size: 19px; letter-spacing: -.02em; display: block; margin-top: 3px; white-space: nowrap; }
.stat .s-f { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 4px 0 12px; }
.stack i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.slider { width: 100%; accent-color: var(--brand-2); height: 28px; }
.sim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sim div { border-radius: 14px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.sim small { font-size: 11px; color: var(--muted); font-weight: 700; display: block; }
.sim b { display: block; font-size: 17px; letter-spacing: -.02em; margin: 2px 0; }
.sim em { font-style: normal; font-size: 12px; color: #4ade80; font-weight: 700; }

/* ---------- menu engineering ---------- */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q { border-radius: 18px; padding: 14px; border: 1px solid var(--line); min-width: 0; }
.q h4 { margin: 0 0 2px; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.q p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.q .qi { font-size: 13px; font-weight: 600; padding: 6px 0; border-top: 1px dashed var(--line-2); display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.q .qi span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q.star { background: linear-gradient(160deg, rgba(34,197,94,.14), transparent 70%); }
.q.plow { background: linear-gradient(160deg, rgba(56,189,248,.13), transparent 70%); }
.q.puzz { background: linear-gradient(160deg, rgba(167,139,250,.14), transparent 70%); }
.q.dog { background: linear-gradient(160deg, rgba(244,63,94,.12), transparent 70%); }

/* ---------- sheets / forms ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(2,6,12,.55); backdrop-filter: blur(4px); opacity: 0; animation: fade .25s var(--ease) forwards; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--bg-2); border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); animation: up .35s var(--ease) forwards; }
.sheet .grab { width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; position: sticky; top: -8px; background: var(--bg-2); padding: 8px 0; z-index: 2; }
.sheet-h h3 { margin: 0; font-size: 18px; flex: 1; letter-spacing: -.02em; }
@media (min-width: 1024px) {
  .sheet { left: auto; top: 0; bottom: 0; right: 0; width: 560px; max-height: none; border-radius: 0; transform: translateX(100%); animation: left .35s var(--ease) forwards; padding: 18px 26px 30px; }
  .sheet .grab { display: none; }
}
@keyframes fade { to { opacity: 1; } } @keyframes up { to { transform: translateY(0); } } @keyframes left { to { transform: translateX(0); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, select.input, textarea.input { height: 44px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); outline: none; width: 100%; min-width: 0; transition: .15s; font-size: 15px; }
textarea.input { height: auto; min-height: 80px; padding: 10px 13px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(238,119,49,.16); }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.lineedit { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(0,1fr) minmax(0,1fr) 36px; gap: 8px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lineedit .input { height: 40px; font-size: 14px; padding: 0 9px; }
.lineedit .lc { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.settings-group { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .sr-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.set-row .sr-t { flex: 1; min-width: 0; } .set-row .sr-t b { font-size: 14.5px; font-weight: 640; display: block; } .set-row .sr-t small { color: var(--muted); font-size: 12px; }
.set-row .input { width: 150px; height: 40px; flex: none; text-align: right; }
.set-row select.input { width: 190px; text-align: left; }
.toast { position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); z-index: 90; background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-weight: 650; font-size: 14px; opacity: 0; transition: .3s var(--ease); display: flex; gap: 8px; align-items: center; pointer-events: none; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 1024px) { .toast { bottom: 30px; } }
.fab { position: fixed; right: 18px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 35; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--grad); color: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 16px 30px -10px var(--glow); cursor: pointer; }
.fab svg.i { width: 26px; height: 26px; stroke-width: 2.3; }
@media (min-width: 1024px) { .fab { display: none; } }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.more-grid a { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; }
.more-grid a small { font-weight: 500; color: var(--muted); font-size: 12px; }
.ring-score { display: flex; align-items: center; gap: 18px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.check-row:first-child { border-top: 0; }
.check-row .cr-n { flex: 1; min-width: 0; }
.check-row .cr-v { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.fade-in { animation: fadein .35s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 719px) { .hide-sm { display: none !important; } } @media (min-width: 720px) { .show-sm-only { display: none !important; } }
.callout { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.22); font-size: 13.5px; }
.callout.good { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.22); }
.callout svg.i { color: var(--amber); } .callout.good svg.i { color: var(--green); }

/* ---------- printable document ---------- */
.doc-paper { background: #fff; color: #0f172a; border-radius: 18px; padding: 28px; box-shadow: var(--shadow); font-size: 13px; }
.doc-paper .dp-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.doc-paper .dp-brand { display: flex; gap: 10px; align-items: center; }
.doc-paper .dp-brand img { width: 40px; height: 40px; border-radius: 10px; }
.doc-paper h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; color: #14252B; text-align: right; }
.doc-paper .dp-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; padding: 14px; border-radius: 12px; background: #f1f5f9; }
.doc-paper .dp-meta small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; font-weight: 700; }
.doc-paper .dp-meta b { font-size: 13px; }
.doc-paper table { width: 100%; border-collapse: collapse; }
.doc-paper th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 8px 6px; border-bottom: 2px solid #14252B; }
.doc-paper td { padding: 9px 6px; border-bottom: 1px solid #e2e8f0; }
.doc-paper .r { text-align: right; font-variant-numeric: tabular-nums; }
.doc-paper .tot { margin-left: auto; width: min(300px, 100%); margin-top: 14px; }
.doc-paper .tot div { display: flex; justify-content: space-between; padding: 5px 6px; }
.doc-paper .tot .grand { background: #14252B; color: #fff; border-radius: 10px; font-weight: 800; font-size: 15px; padding: 10px 12px; margin-top: 6px; }
.doc-paper .dp-foot { margin-top: 22px; font-size: 11.5px; color: #475569; border-top: 1px solid #e2e8f0; padding-top: 12px; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .tabbar, .fab, .no-print, .overlay, .toast { display: none !important; }
  .app { background: #fff !important; display: block; }
  .main { padding: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  .doc-paper { box-shadow: none; border-radius: 0; padding: 0; }
  .print-only-wrap > *:not(.doc-paper) { display: none !important; }
}
.dish-top { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 18px; margin-top: 18px; align-items: center; }
@media (max-width: 480px) { .dish-top { grid-template-columns: 1fr; } .dish-top .gauge { width: 170px; height: 170px; } }
@media (min-width: 1024px) { .live-card { position: sticky; top: 96px; } }
input.mini { width: 58px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 6px; margin-left: 4px; }
.sr-in { display: flex; align-items: center; gap: 6px; flex: none; }
.sr-in .input { width: 104px; }
.sr-in span { font-size: 13px; color: var(--muted); font-weight: 650; min-width: 14px; }
.set-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.set-row.col small { color: var(--muted); font-weight: 600; font-size: 12px; }
.set-row.col .input { width: 100%; text-align: left; }
.set-row select.input { width: 170px; }
@media (max-width: 420px) { .set-row select.input { width: 140px; } .sr-in .input { width: 88px; } }
.chip svg.i { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }
a.card.kpi { display: block; transition: transform .2s var(--ease), border-color .2s; }
a.card.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); }

.kstrip { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 719px) {
  .kstrip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px 14px; padding: 0 18px 4px; }
  .kstrip::-webkit-scrollbar { display: none; }
  .kstrip > .kpi { flex: 0 0 148px; scroll-snap-align: start; padding: 13px; }
  .kstrip .kpi-value { font-size: 21px; }
  .kstrip .k-ico { width: 30px; height: 30px; border-radius: 9px; }
  .kstrip .k-foot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
}
@media (min-width: 720px) { .kstrip { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; } }
.iconbtn.add { background: var(--grad); color: var(--brand-ink); border: 0; box-shadow: 0 8px 20px -8px var(--glow); }
.iconbtn.add svg.i { stroke-width: 2.4; }
.tbl .wide { display: none; } @media (min-width: 480px) { .tbl .wide { display: table-cell; } }
.doc-seg button { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1023px) { .doc-wrap.view-preview .doc-edit { display: none; } .doc-wrap.view-edit .paper-col { display: none; } }
@media (max-width: 600px) { .doc-paper { padding: 20px 16px; border-radius: 16px; } .doc-paper h1 { font-size: 22px; } .doc-paper .dp-meta { grid-template-columns: 1fr 1fr; } .doc-paper .dp-meta > div:first-child { grid-column: 1 / -1; } }
@media print { .doc-wrap .doc-edit { display: none !important; } .doc-wrap .paper-col { display: block !important; } }

@media (min-width: 1024px) { .doc-seg { display: none; } }
.tbl.compact td:first-child { white-space: normal; }
@media (max-width: 479px) { .tbl.compact th, .tbl.compact td { padding: 10px 12px; } }
.hero .eyebrow { white-space: nowrap; }
.hero .seg button { color: rgba(236,253,245,.7); padding: 5px 10px; }
.hero .seg button.on { background: rgba(255,255,255,.92); color: #064e3b; }

/* ---------- VergeKits brand ---------- */
svg.vk { display: block; flex: none; }
.brand { text-decoration: none; padding: 6px 10px 24px; gap: 12px; }
.brand svg.vk { width: 40px; height: 34px; filter: drop-shadow(0 6px 14px rgba(232,101,26,.28)); }
.wordmark { font-size: 21px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--text); }
.wordmark span { color: var(--gold-t); }
.kitname { margin-top: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-t); }
.side-brand { margin-top: 12px; padding: 4px 6px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); font-style: italic; }
.side-brand b { font-style: normal; color: var(--text-2); letter-spacing: .02em; }
.topbar .mlogo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #0b151c; border: 1px solid rgba(231,193,113,.18); box-shadow: 0 8px 18px -10px var(--glow); flex: none; }
.topbar .mlogo svg.vk { width: 22px; height: 19px; }
/* welcome banner, styled after the workbook cover */
.welcome { position: relative; overflow: hidden; border-radius: var(--r-xl); min-height: 300px; background: #0b151c; color: #fff; border: 1px solid rgba(231,193,113,.16); box-shadow: 0 30px 60px -34px rgba(232,101,26,.45); isolation: isolate; }
.welcome .w-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%; z-index: -2; }
.welcome::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,21,28,.15) 0%, rgba(11,21,28,.55) 42%, rgba(11,21,28,.94) 78%, #0b151c 100%); }
.welcome .w-inner { position: relative; min-height: inherit; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 20px; }
.w-kit { display: flex; align-items: center; gap: 12px; margin-bottom: auto; }
.w-tile { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, #F08A3E, #D9580F); color: #fff; box-shadow: 0 10px 24px -8px rgba(232,101,26,.7), inset 0 1px 0 rgba(255,255,255,.25); flex: none; }
.w-tile svg.i { width: 22px; height: 22px; }
.w-kit b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.w-kit b em { font-style: normal; color: #F08A3E; font-size: .78em; letter-spacing: .02em; }
.w-kit small { display: block; font-size: 11.5px; color: rgba(255,255,255,.82); margin-top: 3px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.welcome h2 { margin: 0; font-size: 30px; line-height: 1.04; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.w-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.w-chips a { padding: 6px 13px; border-radius: 99px; border: 1.5px solid #EE7731; background: rgba(11,21,28,.55); color: #fff; font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); transition: .2s var(--ease); }
.w-chips a:hover { background: #EE7731; color: #1a0c03; }
@media (min-width: 720px) {
  .welcome { min-height: 270px; }
  .welcome::before { background: linear-gradient(90deg, #0b151c 0%, rgba(11,21,28,.94) 30%, rgba(11,21,28,.55) 58%, rgba(11,21,28,.08) 100%); }
  .welcome .w-photo { object-position: 70% 45%; }
  .welcome .w-inner { padding: 26px 30px; max-width: 640px; }
  .welcome h2 { font-size: 40px; }
}
/* photo avatars */
.av.photo { padding: 0; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 1px var(--line-2) inset; }
.av.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.li .av.photo { width: 48px; height: 48px; border-radius: 14px; }
.tbl-ph { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex: none; display: block; background: var(--surface-3); }
.card.has-cover { padding-top: 0; overflow: hidden; }
.dish-cover { position: relative; margin: 0 -18px 16px; height: 230px; overflow: hidden; background: #0b151c; isolation: isolate; }
.dish-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.02); }
.dish-cover::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,16,22,0) 30%, rgba(7,16,22,.55) 62%, rgba(7,16,22,.92) 100%); }
.dish-cover .dc-in { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.dish-cover h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.dish-cover .dc-meta { font-size: 13px; color: rgba(255,255,255,.82); margin-top: 5px; }
.pill.glass { background: rgba(11,21,28,.55); color: #fff; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); }
@media (min-width: 1024px) { .dish-cover { height: 280px; margin: 0 -18px 20px; } .dish-cover .dc-in { left: 24px; bottom: 20px; } .dish-cover h2 { font-size: 32px; } }
/* about card */
.about-vk { background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 92%, #EE7731) 0%, var(--surface) 55%); }
.about-vk .ab-top { display: flex; align-items: center; gap: 14px; }
.about-vk .ab-top svg.vk { width: 46px; height: 39px; }
.about-vk .ab-tag { margin: 14px 0 8px; font-size: 18px; font-weight: 800; letter-spacing: -.025em; color: var(--text); }
.about-vk .ab-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.about-vk .ab-foot span:first-child { font-weight: 700; color: var(--text-2); }
.app-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 26px 0 6px; letter-spacing: .02em; }
.app-foot b { color: var(--text-2); }
.doc-paper .dp-mono { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #14252B; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .02em; flex: none; }
/* splash */
#splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(700px 380px at 50% 105%, rgba(232,101,26,.22), transparent 70%), #071016; transition: opacity .45s ease, visibility .45s; }
#splash.gone { opacity: 0; visibility: hidden; }
#splash .sp-in { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; color: #f3f1ec; font-family: var(--font); }
#splash svg { width: 78px; height: 66px; animation: vkpop .9s cubic-bezier(.2,.8,.2,1) both; filter: drop-shadow(0 12px 30px rgba(232,101,26,.35)); }
#splash .sp-wm { font-size: 30px; font-weight: 800; letter-spacing: -.04em; animation: vkup .7s .15s both; }
#splash .sp-wm span { color: #E7C171; }
#splash .sp-kit { font-size: 11.5px; font-weight: 800; letter-spacing: .2em; color: #EE7731; text-transform: uppercase; animation: vkup .7s .25s both; }
#splash .sp-tag { font-size: 13px; color: #9aa6ad; margin-top: 4px; animation: vkup .7s .35s both; }
#splash .sp-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 10px; }
#splash .sp-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #E7C171, #EE7731); animation: vkbar 1s ease-in-out infinite; }
@keyframes vkpop { from { opacity: 0; transform: scale(.7) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vkup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vkbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { #splash * { animation: none !important; } }

.brand .wordmark span { font-size: inherit; color: var(--gold-t); }
@media (min-width: 1024px) { .topbar .mlogo { display: none; } }
.menu-tbl th, .menu-tbl td { padding-left: 10px; padding-right: 10px; }
.menu-tbl td:first-child, .menu-tbl th:first-child { padding-left: 16px; }
@media (max-width: 1399px) { .menu-tbl .xl { display: none; } }
.dish-cover .pill { background: rgba(11,21,28,.6); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dish-cover .pill.ok { color: #86efac; } .dish-cover .pill.info { color: #7dd3fc; } .dish-cover .pill.vio { color: #c4b5fd; } .dish-cover .pill.bad { color: #fda4af; } .dish-cover .pill.glass { color: #fff; }
@media (min-width: 720px) { .welcome .w-photo { object-position: 78% 60%; } }

/* demo mode + licence card */
.demo-banner { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: linear-gradient(135deg, rgba(231,193,113,.18), rgba(238,119,49,.16)); border-bottom: 1px solid rgba(231,193,113,.28); color: var(--text-2); font-size: 13px; font-weight: 600; text-align: center; }
.demo-banner button { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 12.5px; letter-spacing: .02em; color: #1A1405; background: linear-gradient(135deg, #E7C171, #EE7731); border-radius: 999px; padding: 6px 12px; }
#licCard, #licCard.vka-lcard { padding: 14px 16px; }
#licCard .vka-ghost { margin-top: 10px; }


/* Hide Netlify's free-tier "Powered by Netlify" badge (iframe #nl-badge-frame).
   Official off switch: Netlify UI → Project configuration → General → Powered by Netlify badge.
   On the free plan that setting may be locked, and visitor dismissals are not honoured. */
#nl-badge-frame, #nl-hud-frame,
iframe[title="Powered by Netlify"],
iframe[title="Netlify"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: fixed !important;
  overflow: hidden !important;
  z-index: -1 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
}
