/* ===========================================================
   Scoop — report portal styles  (light + dark themes)
   Theme is controlled by data-theme="light|dark" on <html>.
   Change a token below and it updates everywhere.
   =========================================================== */

:root,
:root[data-theme="light"] {
  --ink:         #241726;   /* header bar background (dark in both themes) */
  --header-text: #ffffff;
  --heading:     #241726;   /* titles on page backgrounds */
  --text:        #2e2733;
  --bg:          #f6f3f8;
  --surface:     #ffffff;
  --surface-alt: #faf7fc;   /* row hover */
  --border:      #ece6f0;
  --muted:       #857c8c;
  --accent:      #e5485e;
  --accent-deep: #c8344a;
  --accent-soft: #fdf0f3;   /* action hover */
  --mint:        #37bd97;
  --info:        #1f9e78;
  --watch:       #b7791f;
  --alert:       #c8344a;
  --radius:      14px;
  --shadow:      0 1px 2px rgba(36,23,38,.06), 0 8px 24px rgba(36,23,38,.05);
}

:root[data-theme="dark"] {
  --ink:         #100d15;
  --header-text: #f3eef7;
  --heading:     #f3eef7;
  --text:        #e9e4ef;
  --bg:          #141019;
  --surface:     #1f1a27;
  --surface-alt: #2a2434;
  --border:      #322b3d;
  --muted:       #a89fb4;
  --accent:      #e5485e;
  --accent-deep: #ff6b7e;
  --accent-soft: #3a2531;
  --mint:        #4cd0aa;
  --info:        #3fc79a;
  --watch:       #d6a23d;
  --alert:       #ff6b6b;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, .brand-name, .page-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -0.01em; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; background: var(--ink); color: var(--header-text);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 64px; height: 64px; display: block; border-radius: 14px; flex: none; object-fit: cover; background: #fff; }
.brand-name { font-size: 24px; font-weight: 800; color: var(--header-text); }
.brand-name .dot { color: var(--accent); }
.bar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px; border: none; cursor: pointer;
  background: rgba(255,255,255,.10); color: var(--header-text);
}
.icon-btn:hover { background: rgba(255,255,255,.20); }
.signout { color: rgba(255,255,255,.82); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.signout:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }

/* ---- layout ---- */
.container { max-width: 880px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-size: 28px; font-weight: 800; margin: 0; color: var(--heading); }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---- primary button ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 10px 16px; border-radius: 10px; white-space: nowrap;
}
.btn:hover { background: var(--accent-deep); text-decoration: none; }

/* ---- folder cards ---- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.card .ic { width: 30px; height: 30px; flex: none; color: var(--accent); }
.card-name { font-weight: 600; font-size: 16px; flex: 1; word-break: break-word; }
.card-go { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---- browse list ---- */
.crumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.crumb .here { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 22px; font-weight: 800; color: var(--heading); word-break: break-word; }
.up-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 500; }
.up-link:hover { color: var(--accent-deep); }

.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; color: var(--text); border-top: 1px solid var(--border); }
.row:first-child { border-top: none; }
.row:hover { background: var(--surface-alt); text-decoration: none; }
.row .ic { width: 24px; height: 24px; flex: none; }
.row.folder .ic { color: var(--accent); }
.row.file   .ic { color: var(--mint); }
.row .nm { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm-link { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.row .nm-link:hover { color: var(--accent-deep); }
.row .chev { color: var(--muted); flex: none; opacity: .5; }
.row-action {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; font-weight: 600; color: var(--accent-deep);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 11px;
  white-space: nowrap; background: var(--surface); cursor: pointer; font-family: inherit;
}
.row-action:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

/* ---- analytics (legacy/optional) ---- */
.insight { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.insight.watch { border-left-color: var(--watch); }
.insight.alert { border-left-color: var(--alert); }
.insight .sev { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--info); }
.insight.watch .sev { color: var(--watch); }
.insight.alert .sev { color: var(--alert); }
.insight .it { font-weight: 700; font-size: 16px; margin: 3px 0 4px; color: var(--heading); }
.insight .de { color: var(--muted); font-size: 14.5px; }

/* ---- empty state ---- */
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px 24px; text-align: center; }
.empty p { margin: 0 0 6px; font-weight: 600; color: var(--text); }
.empty .empty-hint { font-weight: 400; color: var(--muted); font-size: 14px; }

/* ---- highlights popup ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 50; padding: 20px; background: rgba(16,13,21,.55); display: flex; align-items: center; justify-content: center; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; color: var(--heading); }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--heading); }
.modal-frame { border: none; width: 100%; height: 62vh; background: #fff; }

/* ---- mobile ---- */
@media (max-width: 560px) {
  .container { padding: 22px 16px 48px; }
  .page-title { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .brand-mark { width: 52px; height: 52px; }
  .brand-name { font-size: 21px; }
}

/* ---- accessibility ---- */
a:focus-visible, .card:focus-visible, .row:focus-visible, .btn:focus-visible, .icon-btn:focus-visible, .row-action:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* ============================================================
   Landing-page additions (ported from preview)
   ============================================================ */

/* header: name + small meta line under it */
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name { font-size: 23px; line-height: 1.1; }
.brand-meta { font-size: 11.5px; color: rgba(255,255,255,.72); font-weight: 500; margin-top: 2px; }
.brand-meta b { color: #fff; font-weight: 700; }

/* dancing logo */
@keyframes scoopWobble {
  0%,100% { transform: rotate(0deg) scale(1); }
  12% { transform: rotate(-10deg) scale(1.06); }
  26% { transform: rotate(9deg) scale(1.06); }
  40% { transform: rotate(-7deg) scale(1.04); }
  54% { transform: rotate(7deg) scale(1.04); }
  70% { transform: rotate(-4deg) scale(1.02); }
  85% { transform: rotate(3deg) scale(1.01); }
}
.brand-mark { animation: scoopWobble 1.5s ease-in-out infinite; transform-origin: center center; }
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }

/* labeled theme toggle with icon swap */
.icon-btn.labeled { width: auto; padding: 0 13px; gap: 7px; font-size: 13px; font-weight: 600; }
.t-light, .t-dark { display: inline-flex; align-items: center; gap: 7px; }
.t-dark { display: none; }
[data-theme="dark"] .t-dark { display: inline-flex; }
[data-theme="dark"] .t-light { display: none; }

/* section headings */
.section-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 18px; font-weight: 800; color: var(--heading); margin: 6px 0 12px; }

/* file rows: meta date, type-colored icons, action buttons */
.row .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.row.file.xlsx .ic { color: #1f9e78; }
.row.file.pdf  .ic { color: #c8344a; }
.row.file.html .ic { color: #4a78d6; }
.acts { display: inline-flex; gap: 8px; flex: none; }
.row-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
  border-radius: 8px; padding: 6px 12px; white-space: nowrap; cursor: pointer; font-family: inherit;
}
.row-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); text-decoration: none; }
.row-action.dl { color: var(--heading); }
.row-action.dl:hover { background: var(--surface-alt); border-color: var(--muted); }

/* subtle collapsible "My Stores" */
.stores-details { margin-top: 36px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.stores-details > summary { list-style: none; cursor: pointer; padding: 13px 16px; font-size: 14px; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 9px; }
.stores-details > summary::-webkit-details-marker { display: none; }
.stores-details > summary .smeta { color: var(--muted); font-weight: 500; font-size: 13px; }
.stores-details > summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s ease; }
.stores-details[open] > summary .chev { transform: rotate(90deg); }
.stores-body { padding: 2px 16px 16px; }
.stores-brand-row { margin: 10px 0 8px; }
.stores-brand-row .bname { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 15px; color: var(--heading); }
.stores-brand-row .bcount { font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text); font-weight: 500; }
.chip em { color: var(--muted); font-style: normal; font-size: 11px; margin-left: 5px; }

/* site footer (every page) — same color as header */
.site-footer { background: var(--ink); margin-top: 54px; padding: 30px 24px 28px; }
.footer-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.legal { color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.6; }
.legal .l1 { font-weight: 700; color: rgba(255,255,255,.92); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; font-size: 11.5px; }

/* ---- mobile: keep file rows tidy (name on top, actions beneath) ---- */
@media (max-width: 560px) {
  .row.file { flex-wrap: wrap; align-items: center; }
  .row.file .nm { flex: 1 1 auto; min-width: 0; font-size: 14px; }
  .row.file .meta { margin-left: auto; }
  .row.file .acts { flex: 1 0 100%; justify-content: flex-end; margin-top: 8px; }
  .brand-meta { font-size: 10.5px; }
}

/* ---- public welcome / sign-in splash ---- */
.welcome-bg { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1100px 560px at 50% -8%, #3a2230, var(--ink)); }
.welcome-card { background: var(--surface); border-radius: 20px; max-width: 460px; width: 100%;
  padding: 40px 34px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.welcome-logo { width: 84px; height: 84px; border-radius: 18px; object-fit: cover; display: block; margin: 0 auto 16px; transform-origin: center center; animation: scoopWobble 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .welcome-logo { animation: none; } }
.welcome-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 30px; color: var(--heading); margin: 0; }
.welcome-title .dot { color: var(--accent); }
.welcome-sub { color: var(--muted); font-size: 15px; margin: 8px 0 26px; }
.welcome-actions { display: flex; flex-direction: column; gap: 12px; }
.welcome-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 11px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.welcome-btn.primary { background: var(--accent); color: #fff; }
.welcome-btn.primary:hover { background: var(--accent-deep); text-decoration: none; }
.welcome-btn.secondary { background: transparent; color: var(--heading); border: 1px solid var(--border); }
.welcome-btn.secondary:hover { background: var(--surface-alt); text-decoration: none; }
.welcome-note { margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---- "Upload your Monthly P&L" section ---- */
.upload-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.upload-card .up-text { flex: 1 1 240px; }
.upload-card .up-text .up-h { font-weight: 700; color: var(--heading); }
.upload-card .up-text .up-d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.upload-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--mint); color: #06301f;
  font-weight: 700; font-size: 14px; padding: 10px 15px; border-radius: 10px; white-space: nowrap; }
.upload-btn:hover { filter: brightness(.96); text-decoration: none; }

.mt32 { margin-top: 32px; }

/* ===== Dashboard band (group quadrants + store drill-down) ===== */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  padding-left: 12px; padding-bottom: 14px; margin: 4px 0 18px; }
.dash-head .dh1 { font-size: 18px; font-weight: 700; color: var(--heading); }
.dash-head .dh2 { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dash-head .dhu { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.qc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.qc .qh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qc .ql { font-size: 15px; font-weight: 700; color: var(--heading); }
.qc .qs { font-size: 11px; color: var(--muted); text-align: right; }
.qc .qb { font-size: 25px; font-weight: 700; color: var(--heading); line-height: 1.1; }
.qc .qr { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qc .ly { font-size: 12px; color: var(--muted); }
.dpill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--surface-alt); color: var(--muted); }
.dpill.up { background: rgba(29,158,117,.16); color: #1d9e75; }
.dpill.down { background: rgba(226,75,74,.16); color: #e24b4a; }
.qmini { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.qmini > div { flex: 1; }
.qmini .k { display: block; font-size: 11px; color: var(--muted); }
.qmini .v { font-size: 13px; color: var(--heading); }
.qmini .v em { font-style: normal; font-size: 11px; margin-left: 3px; }
.up-t { color: #1d9e75; }
.down-t { color: #e24b4a; }

.hl { background: var(--surface-alt); border-radius: 14px; padding: 16px 18px; }
.hl .hh { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 10px; }
.hl .mv { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.hl .mv .mvg { font-size: 16px; line-height: 1.2; }
.hl .mv .l1 { font-size: 13px; color: var(--heading); }
.hl .mv .l2 { font-size: 12px; color: var(--muted); }

.store-list { margin-top: 2px; }
details.srow { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
details.srow > summary { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; list-style: none; }
details.srow > summary::-webkit-details-marker { display: none; }
details.srow .sname { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.srow .sloc { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
details.srow .sday { font-size: 13px; color: var(--muted); white-space: nowrap; }
details.srow .chev { color: var(--muted); transition: transform .15s; flex: none; }
details.srow[open] .chev { transform: rotate(180deg); }
details.srow .sdet { padding: 0 13px 13px; border-top: 1px solid var(--border); }
.sdgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 11px; }
.sd { background: var(--surface-alt); border-radius: 8px; padding: 9px 10px; }
.sd .k { font-size: 11px; color: var(--muted); }
.sd .v { font-size: 15px; font-weight: 700; color: var(--heading); margin: 2px 0 3px; }
.sd .y { font-size: 11px; font-weight: 700; }

@media (max-width: 560px) {
  .dash-head .dhu { display: none; }
  .sdgrid { grid-template-columns: 1fr; }
}

/* ===== Dashboard tweaks: sales-through banner, per-card movers, responsive store table ===== */
.dash-through { text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 8px 4px; margin: 0 0 14px; }

.qmv { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.qmv .mvrow { display: flex; align-items: baseline; gap: 7px; font-size: 12px; }
.qmv .mvg { font-size: 12px; line-height: 1.2; flex: none; }
.qmv .mvt { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qmv .mvt b { color: var(--heading); font-weight: 600; }
.qmv .mvt em { font-style: normal; font-weight: 700; margin-left: 4px; }
.qmv .muted-note { color: var(--muted); font-size: 11px; }

.stbl { margin-top: 4px; }
.sthead, .strow { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, minmax(96px, 0.55fr)); gap: 10px; align-items: center; }
.sthead { padding: 4px 13px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sthead .h-num { text-align: right; }
.strow { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; }
.strow .stname { font-size: 14px; font-weight: 600; color: var(--heading); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strow .stname .sloc { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.stcell { text-align: right; }
.stcell .stk { display: none; }
.stcell .stnums .stv { display: block; font-size: 14px; font-weight: 700; color: var(--heading); }
.stcell .stnums .sty { display: block; font-size: 11px; font-weight: 700; }

@media (max-width: 560px) {
  .sthead { display: none; }
  .strow { display: block; }
  .strow .stname { display: block; white-space: normal; margin-bottom: 6px; }
  .stcell { display: flex; justify-content: space-between; align-items: baseline; text-align: left; padding: 5px 0; border-top: 1px dashed var(--border); }
  .stcell .stk { display: inline; font-size: 12px; color: var(--muted); }
  .stcell .stnums .stv { display: inline; font-size: 14px; }
  .stcell .stnums .sty { display: inline; margin-left: 8px; font-size: 12px; }
}

/* ===== My Store Performance — collapsible (collapsed by default) ===== */
details.stperf > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 4px 0; }
details.stperf > summary::-webkit-details-marker { display: none; }
details.stperf .stperf-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 18px; font-weight: 800; color: var(--heading); }
details.stperf .stperf-hint { font-size: 12px; color: var(--muted); }
details.stperf .chev { margin-left: auto; color: var(--muted); transition: transform .15s; flex: none; }
details.stperf[open] > summary .chev { transform: rotate(180deg); }
details.stperf .stbl { margin-top: 12px; }

/* ===== My Store Performance — scroll after ~5 rows, sticky column header ===== */
details.stperf .stbl { max-height: 320px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 4px; }
details.stperf .sthead { position: sticky; top: 0; background: var(--bg); z-index: 1; }
@media (max-width: 560px) { details.stperf .stbl { max-height: 60vh; } }

/* ===== Bento dashboard (desktop-first; mobile handled separately) ===== */
.container.home { max-width: 1200px; }
.dash-through { font-size: 15px; font-weight: 800; color: var(--heading); text-transform: none; letter-spacing: .01em; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 4px; margin: 0 0 10px; text-align: center; }
.dash-summary { font-size: 13px; color: var(--muted); margin: 0 0 14px; text-align: center; }
.dash-summary b { color: var(--heading); }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.tile { border: 3px solid var(--accent); border-radius: 16px; background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.tile.soon { border-style: dashed; }
.tile.wide { grid-column: 1 / -1; }
.tile .t-h { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 15px; font-weight: 800; color: var(--heading); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: .04em; }
.tile .t-h .t-sub { font-size: 12px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.tile .badge { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; background: var(--surface-alt); color: var(--muted); padding: 3px 8px; border-radius: 7px; font-weight: 700; }
.tile .badge.hot { background: var(--accent-soft); color: var(--accent-deep); }
.tile .empty { padding: 4px 0; }
.tile .grid { margin-top: 0; }
.up-d2 { font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.kpi3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi .kk { font-size: 12px; color: var(--muted); }
.kpi .kv { font-size: 21px; font-weight: 700; color: var(--heading); line-height: 1.15; margin: 3px 0; }
.kpi .kr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi .kl { font-size: 11px; color: var(--muted); }
.kmv { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.kmv .kmrow { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; }
.kmv .mvg { flex: none; }
.kmv .kmt { color: var(--muted); } .kmv .kmt b { color: var(--heading); font-weight: 600; } .kmv .kmt em { font-style: normal; font-weight: 700; margin-left: 4px; }
.kpi-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: flex-end; }
.kpill { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; border-radius: 11px; padding: 8px 13px; border: 1px solid var(--border); }
.kpill.good { border-color: #37bd97; background: rgba(55,189,151,.10); } .kpill.good .kpv { color: #1d9e75; }
.kpill.bad { border-color: var(--accent); background: var(--accent-soft); } .kpill.bad .kpv { color: var(--accent-deep); }
.kpill .kpl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpill .kpv { font-size: 17px; font-weight: 800; }

.arev { max-height: 230px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 8px; }
.arow { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.arow:last-child { border-bottom: none; }
.arow .ast { color: var(--accent); font-size: 13px; flex: none; letter-spacing: 1px; font-weight: 700; }
.arow .abody { min-width: 0; flex: 1; }
.arow .ah { display: flex; justify-content: space-between; gap: 8px; }
.arow .aloc { font-weight: 700; color: var(--heading); font-size: 13px; }
.arow .aloc .sloc { color: var(--muted); font-weight: 400; font-size: 11px; }
.arow .atm { font-size: 11px; color: var(--muted); flex: none; }
.arow .atx { font-size: 12.5px; color: var(--text); margin: 2px 0 0; }
.aempty { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* store table inside the bento tile: rank column, sortable header, full names, scroll */
.tile .stbl { max-height: 210px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 4px; }
.tile .sthead, .tile .strow { display: grid; grid-template-columns: 26px minmax(0,1.7fr) repeat(3, minmax(64px,.5fr)); gap: 8px; align-items: center; }
.tile .sthead { position: sticky; top: 0; background: var(--surface); z-index: 1; padding: 4px 13px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile .sthead .h-num { text-align: right; cursor: pointer; user-select: none; }
.tile .sthead .h-num:hover { color: var(--heading); }
.tile .sthead .h-num.act { color: var(--accent-deep); }
.tile .strow { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; margin-bottom: 8px; }
.strank { font-size: 12px; font-weight: 800; color: var(--muted); text-align: center; }
.tile .strow .stname { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; overflow: visible; line-height: 1.3; font-size: 14px; font-weight: 600; color: var(--heading); min-width: 0; }
.tile .strow .stname .sloc { margin-left: 0; font-size: 11px; color: var(--muted); font-weight: 400; }
.tile .stcell { text-align: right; }
.tile .stcell .stk { display: none; }
.tile .stcell .stnums .stv { display: block; font-size: 13px; font-weight: 700; color: var(--heading); }
.tile .stcell .stnums .sty { display: block; font-size: 11px; font-weight: 700; }

@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .container.home { max-width: 880px; }
}

/* reviews grouped by location */
.argroup { margin-bottom: 14px; }
.argroup:last-child { margin-bottom: 0; }
.argh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.argh .aloc { font-weight: 800; color: var(--heading); font-size: 13px; }
.argh .aloc .sloc { color: var(--muted); font-weight: 400; font-size: 11px; }
.argh .argn { font-size: 11px; color: var(--muted); flex: none; }
.argroup .arow { border-bottom: none; padding: 7px 0; }
.argroup .arow .abody .atm { margin-top: 2px; }

/* footer Email support button */
.footer-support { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-support .fs-label { font-size: 13px; color: rgba(255,255,255,.66); }
.support-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--accent-deep); text-decoration: none; border: 1px solid var(--accent); background: var(--accent-soft); padding: 8px 14px; border-radius: 10px; }
.support-btn:hover { background: var(--accent); color: #fff; }

/* ===== Mobile app shell (phones only; desktop layout untouched) ===== */
.mob-shell { display: none; }
@media (max-width: 760px) {
  header.topbar, main.home, footer.site-footer, #hl-modal { display: none !important; }
  body { background: var(--bg); }
  .mob-shell { display: block; padding-bottom: 80px; -webkit-font-smoothing: antialiased; }
  .mob-shell .m-hd { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); }
  .mob-shell .m-wm { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 18px; }
  .mob-shell .m-wm .dot { color: var(--accent); }
  .mob-shell .m-hact { display: flex; gap: 8px; }
  .mob-shell .m-ib { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
  .mob-shell .m-pane { display: none; padding: 16px; }
  .mob-shell .m-pane.on { display: block; }
  .mob-shell .m-gname { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 22px; color: var(--heading); border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); padding: 0 0 10px 12px; }
  .mob-shell .m-gmeta { font-size: 12px; color: var(--muted); margin: 6px 0 0 12px; }
  .mob-shell .m-through { font-weight: 800; font-size: 14px; color: var(--heading); text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 9px 0; margin: 14px 0 10px; }
  .mob-shell .m-summary { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 14px; }
  .mob-shell .m-summary b { color: var(--heading); }
  .mob-shell .m-kcard { background: var(--surface); border: 2px solid var(--accent); border-radius: 16px; padding: 15px 16px; margin-bottom: 11px; }
  .mob-shell .m-kk { font-size: 12px; color: var(--muted); }
  .mob-shell .m-kbig { font-size: 28px; font-weight: 800; color: var(--heading); margin: 3px 0 6px; }
  .mob-shell .m-krow { display: flex; align-items: center; gap: 9px; }
  .mob-shell .m-kl { font-size: 12px; color: var(--muted); }
  .mob-shell .m-pill { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 20px; }
  .mob-shell .m-pill.up { color: var(--info); background: rgba(60,199,154,.14); }
  .mob-shell .m-pill.down { color: var(--accent-deep); background: var(--accent-soft); }
  .mob-shell .m-ydot { margin-top: 10px; font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 10px; text-align: center; }
  .mob-shell .m-ydot.good { color: #1d9e75; background: rgba(55,189,151,.12); border: 1px solid var(--mint); }
  .mob-shell .m-ydot.bad { color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent); }
  .mob-shell .m-movers { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 11px 15px; }
  .mob-shell .m-mv { display: flex; gap: 8px; font-size: 13px; padding: 5px 0; align-items: baseline; }
  .mob-shell .m-mv b { color: var(--heading); }
  .mob-shell .m-mv em { font-style: normal; font-weight: 800; margin-left: auto; }
  .mob-shell .m-ptitle { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 18px; color: var(--heading); margin: 2px 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .mob-shell .m-badge { font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent-deep); padding: 3px 9px; border-radius: 8px; }
  .mob-shell .m-seg { display: flex; background: var(--surface-alt); border-radius: 11px; padding: 4px; margin-bottom: 14px; }
  .mob-shell .m-seg button { flex: 1; border: none; background: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 10px; border-radius: 8px; }
  .mob-shell .m-seg button.on { background: var(--accent); color: #fff; }
  .mob-shell .m-scard { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 13px; padding: 12px 14px; margin-bottom: 10px; }
  .mob-shell .m-scard.m-hidden { display: none; }
  .mob-shell .m-sc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
  .mob-shell .m-rk { font-weight: 800; color: var(--muted); font-size: 13px; min-width: 16px; }
  .mob-shell .m-snm { font-weight: 700; color: var(--heading); font-size: 15px; }
  .mob-shell .m-sid { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
  .mob-shell .m-chips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .mob-shell .m-chip { background: var(--surface-alt); border-radius: 9px; padding: 7px 8px; text-align: center; }
  .mob-shell .m-chl { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .mob-shell .m-chv { display: block; font-size: 13px; font-weight: 800; color: var(--heading); margin: 2px 0; }
  .mob-shell .m-chy { display: block; font-size: 11px; font-weight: 700; }
  .mob-shell .m-showall { width: 100%; padding: 14px; border: 1px dashed var(--accent); background: none; color: var(--accent-deep); font-weight: 800; border-radius: 12px; font-size: 14px; }
  .mob-shell .m-rgrp { margin-bottom: 14px; }
  .mob-shell .m-rgh { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 4px; gap: 8px; }
  .mob-shell .m-rgn { font-weight: 800; color: var(--heading); font-size: 14px; }
  .mob-shell .m-rgc { font-size: 11px; color: var(--muted); flex: none; }
  .mob-shell .m-rv { display: flex; gap: 10px; padding: 8px 0; }
  .mob-shell .m-rvs { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 1px; flex: none; }
  .mob-shell .m-rvt { font-size: 13.5px; color: var(--text); }
  .mob-shell .m-rvd { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .mob-shell .m-upcard { background: var(--surface); border: 2px solid var(--accent); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
  .mob-shell .m-uptitle { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 800; font-size: 15px; color: var(--heading); margin-bottom: 8px; }
  .mob-shell .m-upd { font-size: 13px; color: var(--muted); margin-bottom: 13px; }
  .mob-shell .m-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: 12px; font-weight: 800; font-size: 15px; text-decoration: none; border: none; }
  .mob-shell .m-btn.primary { background: var(--accent); color: #fff; }
  .mob-shell .m-btn.ghost { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--accent); }
  .mob-shell .m-sect { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin: 20px 0 8px; }
  .mob-shell .m-frow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
  .mob-shell .m-fic { font-size: 9px; font-weight: 800; padding: 3px 5px; border-radius: 5px; background: var(--surface-alt); color: var(--muted); flex: none; }
  .mob-shell .m-fnm { font-size: 13.5px; color: var(--heading); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mob-shell .m-fdt { font-size: 12px; color: var(--muted); flex: none; }
  .mob-shell .m-fold { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 9px; color: var(--heading); text-decoration: none; }
  .mob-shell .m-fold svg { color: var(--accent); flex: none; }
  .mob-shell .m-fold span:nth-child(2) { flex: 1; font-weight: 600; font-size: 14px; }
  .mob-shell .m-fgo { color: var(--muted); font-size: 20px; }
  .mob-shell .m-empty { font-size: 14px; color: var(--muted); padding: 8px 0; }
  .mob-shell .m-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); display: flex; z-index: 30; }
  .mob-shell .m-tab { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
  .mob-shell .m-tab.on { color: var(--accent); }
  .mob-shell .m-tab svg { width: 23px; height: 23px; }
}
