:root {
  --ink: #0c0c10;
  --ink-2: #4a4a55;
  --muted: #6e6e7a;
  --faint: #9a9aa5;
  --line: #d5d5dc;
  --line-soft: #e8e8ec;
  --hair: #f1f1f4;
  --surface: #fafafb;
  --link: #0a2fd4;
  --good: #0e7a5f;
  --bad: #b3261e;
  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar { height: 64px; border-bottom: 1px solid var(--line-soft); background: #fff; }
.topbar-inner {
  max-width: calc(1296px + 2 * var(--gutter));
  padding: 0 var(--gutter);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.brand { font-size: 15px; font-weight: 600; letter-spacing: -0.15px; white-space: nowrap; }
.nav { display: flex; gap: 28px; margin-left: 27px; }
.nav-link { font-size: 13px; color: var(--muted); white-space: nowrap; }
.nav-link.is-active { color: var(--ink); font-weight: 600; }
.nav-link.is-soon { cursor: default; }
.topsearch {
  margin-left: auto;
  position: relative;
  width: 420px;
  max-width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
}
.topsearch:focus-within { border-color: var(--ink); }
.topsearch input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 13.5px;
}
.topsearch input::placeholder { color: var(--faint); }
.topsearch input::-webkit-search-cancel-button { display: none; }
.signin {
  margin-left: 20px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
}

/* ── Page ────────────────────────────────────────────── */
.page {
  max-width: calc(1296px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 96px;
}
.page-title { margin: 0 0 28px; font-size: 30px; font-weight: 600; letter-spacing: -0.66px; line-height: 37px; }
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 40px; align-items: start; }
.filters-toggle {
  display: none;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* ── Sidebar ─────────────────────────────────────────── */
.side-head {
  height: 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.side-head-label { font-size: 11px; letter-spacing: 0.99px; text-transform: uppercase; color: var(--muted); padding-top: 1px; }
.link-btn { color: var(--link); font-size: 12px; }
.link-btn:hover { text-decoration: underline; }

.fsec { position: relative; }
.fsec + .fsec { border-top: 1px solid var(--hair); }
.fsec-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 0;
  text-align: left;
}
.fsec-head-first { padding-top: 26px; }
.fsec + .fsec .fsec-head { padding-top: 22px; }
.fsec-title { font-size: 12px; font-weight: 600; letter-spacing: 0.72px; text-transform: uppercase; }
.fsec-icon { position: relative; width: 13px; height: 13px; flex: none; }
.fsec-icon::before, .fsec-icon::after {
  content: '';
  position: absolute;
  background: var(--muted);
  border-radius: 1px;
}
.fsec-icon::before { left: 2.5px; top: 5.75px; width: 8px; height: 1.5px; }
.fsec-icon::after { left: 5.75px; top: 2.5px; width: 1.5px; height: 8px; }
.fsec-head[aria-expanded="true"] .fsec-icon::after { display: none; }
.fsec.collapsed .fsec-body { display: none; }
.fsec-body { padding-top: 14px; padding-bottom: 26px; }
.fsec.collapsed .fsec-head { padding-bottom: 26px; }
.fsec[data-sec="category"] .fsec-body { padding-bottom: 19px; }

.find {
  position: relative;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}
.find:focus-within, .find.open { border-color: var(--ink); }
.find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; }
.find input::placeholder { color: var(--faint); }

.checks { margin-top: 7px; }
.check {
  display: flex;
  align-items: center;
  height: 31px;
  cursor: pointer;
  user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.box {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  flex: none;
}
.box img { display: none; }
.check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .box img { display: block; }
.check input:focus-visible + .box { outline: 2px solid var(--link); outline-offset: 2px; }
.check-label { margin-left: 10px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-count { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-left: 8px; }
.show-all { display: block; margin-top: 7px; }

/* category dropdown */
.dropdown {
  position: absolute;
  z-index: 20;
  left: -1px;
  top: calc(100% + 7px);
  width: 300px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 15px rgba(12, 12, 16, 0.13);
  padding: 13px 13px 10px;
}
.drop-label { font-size: 10.5px; letter-spacing: 0.735px; text-transform: uppercase; color: var(--faint); }
.drop-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 6px; margin-top: 11px; }
.gtab {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}
.gtab.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.gtab:disabled { color: var(--faint); cursor: default; }
.drop-rule { height: 1px; background: var(--hair); margin: 12px 0 0; }
.drop-list { max-height: 260px; overflow: auto; padding-top: 2px; }
.drop-list .check { height: 29px; }
.drop-empty { padding: 14px 0 6px; color: var(--muted); }

/* numeric filters */
.num-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14.5px 14px; padding-top: 16px; }
.nf label { display: block; font-size: 10.5px; line-height: 13px; letter-spacing: 0.578px; text-transform: uppercase; color: var(--muted); }
.nf-box {
  position: relative;
  margin-top: 6px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
}
.nf-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  padding: 0 28px 0 10px;
  font-size: 13.5px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.nf-box input::-webkit-outer-spin-button, .nf-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nf-box input::placeholder { color: var(--faint); }
.nf-box.set, .nf-box:focus-within { border-color: var(--ink); }
.nf-box.set input { font-weight: 600; }
.stepper { position: absolute; right: 8px; top: 10px; width: 11px; height: 14px; }
.stepper button { position: absolute; left: -4px; right: -4px; height: 7px; }
.stepper button.up { top: -3px; }
.stepper button.dn { bottom: -3px; }
.stepper img { position: absolute; inset: 0; pointer-events: none; }

/* ── Results ─────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.chip img { width: 10px; height: 10px; }
.count { margin: 0 0 16px; color: var(--muted); min-height: 16px; }

.table-wrap { overflow-x: auto; }
.table { min-width: 720px; }
.thead, .trow {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 52px 84px 84px 76px 68px 78px 87px 78px 96px;
  align-items: center;
}
.thead { height: 24px; border-bottom: 1px solid var(--line); align-items: start; }
.th {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.525px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  height: 13px;
}
.th:first-child { justify-content: flex-start; text-align: left; }
.th.sorted { color: var(--ink); }
.th img { width: 10px; height: 10px; }
.th img.asc { transform: rotate(180deg); }
.trow { height: 49px; border-bottom: 1px solid var(--hair); color: inherit; }
.trow:hover { background: var(--surface); }
.td { text-align: right; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.td.scheme { text-align: left; display: flex; align-items: center; gap: 11px; font-weight: 400; min-width: 0; padding-right: 12px; }
.scheme-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.td.score { font-size: 15.5px; letter-spacing: -0.31px; }
.td.reg { font-weight: 400; color: var(--ink-2); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.na { color: var(--faint); font-weight: 400; }

.empty { padding: 48px 0; color: var(--muted); }
.empty .link-btn { font-size: 13px; }

.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; gap: 16px; flex-wrap: wrap; }
.pager-info { color: var(--muted); }
.pager-btns { display: flex; gap: 8px; }
.pbtn {
  min-width: 60px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
}
.pbtn:hover { border-color: var(--line); }
.pbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pbtn.gap { border: 0; min-width: 24px; padding: 0; cursor: default; }
.footnote { margin: 28px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.5; max-width: 760px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .layout { grid-template-columns: 260px minmax(0, 1fr); column-gap: 28px; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .topbar { height: auto; padding: 10px 0; }
  .topbar-inner { flex-wrap: wrap; row-gap: 10px; }
  .nav { display: none; }
  .topsearch { margin-left: 0; width: 100%; order: 3; }
  .signin { margin-left: auto; height: 36px; }
  .account { margin-left: auto; }
  .account-menu { width: min(280px, calc(100vw - 32px)); }
  .page { padding-top: 24px; }
  .page-title { font-size: 26px; margin-bottom: 18px; }
  .filters-toggle { display: inline-block; }
  .layout { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .sidebar { display: none; }
  .sidebar.open { display: block; }
  .dropdown { width: 100%; }
}

/* ── Account (signed-in header) ─────────────────────── */
.account { position: relative; margin-left: 16px; }
.avatar-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.avatar-btn:focus-visible, .modal-close:focus-visible, .modal-cta:focus-visible, .account-out:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 18px); z-index: 30;
  width: 280px; background: #fff; border: 1px solid var(--line);
  filter: drop-shadow(0 12px 16px rgba(12, 12, 16, 0.12));
}
.account-who { padding: 18px 20px 16px; border-bottom: 1px solid var(--line-soft); min-height: 75px; }
.account-name { font-size: 14px; font-weight: 600; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-email { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-out { display: block; width: 100%; height: 44px; padding: 0 20px; text-align: left; font-size: 14px; }
.account-out:hover { background: var(--surface); }

/* ── Sign-in modal ──────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 12, 16, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.modal {
  position: relative; width: 440px; max-width: 100%;
  background: #fff; border: 1px solid var(--line);
  padding: 32px;
}
.modal-title { margin: 0; padding-right: 44px; font-size: 21px; font-weight: 600; line-height: 26.5px; letter-spacing: -0.315px; }
.modal-close { position: absolute; top: 22px; right: 22px; width: 44px; height: 44px; }
.modal-close::before, .modal-close::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 1.5px; background: var(--ink); border-radius: 1px;
}
.modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.modal-body { margin: 27px 0 0; font-size: 14px; line-height: 22.5px; color: var(--ink-2); }
.modal-alert {
  margin-top: 19px; padding: 12px 14px;
  background: #fff4ec; border: 1px solid #f2c9a8;
  color: #7a3410; font-size: 13.5px; line-height: 20.5px;
}
/* "Continue with Google" follows Google's branding guidelines (light theme): white fill, 1px #747775 stroke,
   #1F1F1F Google Sans Medium 14/20, standard 20px G, 12px / 10px / 12px padding. Disabled dimming mirrors Google's own sample. */
.modal-cta {
  margin-top: 20px; width: 100%; height: 48px;
  border: 1px solid #747775; background: #fff; color: #1f1f1f;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 12px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px;
}
.modal-cta:hover:not(:disabled) { background: #f2f2f2; }
.modal-cta:disabled { cursor: default; border-color: rgba(31, 31, 31, 0.12); }
.modal-cta:disabled img, .modal-cta:disabled span { opacity: 0.38; }
.modal-cta img { width: 20px; height: 20px; flex: none; }
.modal-fine { margin: 20px 0 0; font-size: 12.5px; line-height: 19.5px; color: var(--muted); }
.modal-fine a { color: var(--link); text-decoration: underline; }

/* Success state: same card, status block centred inside it */
.modal.is-success { min-height: 333.5px; }
.modal-status {
  position: absolute; left: 32px; top: 54px; width: 374px; height: 245.5px;
  padding: 0 8px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  text-align: center;
}
.modal-status img { width: 56px; height: 56px; flex: none; }
.modal-status-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.modal-status .modal-title { padding: 0; }
.modal-signed { margin: 0; font-size: 14px; line-height: 22.4px; color: var(--ink-2); overflow-wrap: anywhere; }
.modal-note { margin: 0; padding-top: 4px; font-size: 13.5px; line-height: 20.9px; color: var(--ink-2); }
.modal-note:empty { display: none; }

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 60;
  width: 400px; max-width: calc(100% - 32px);
  background: var(--ink); padding: 13px 20px 14px;
  filter: drop-shadow(0 12px 16px rgba(12, 12, 16, 0.2));
  font-size: 14px; line-height: 21px;
}
.toast-title { color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.toast-sub { color: #c9c9d1; }
