@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,560;9..144,640&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --paper: #f4f1ec;
  --card: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e0d8;
  --copper: #c2410c;
  --copper-2: #9a3412;
  --copper-soft: #fff1e7;
  --side-bg: #1c1917;
  --side-ink: #e7e5e4;
  --side-muted: #a8a29e;
  --good: #15803d;
  --good-bg: #dcfce7;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --bad-bg: #fee2e2;
  --bad-ink: #991b1b;
  --info-bg: #e0f2fe;
  --info-ink: #075985;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 8px 24px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 12px 40px rgba(28, 25, 23, 0.12);
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3, .brand span {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; margin: 0.1em 0; }
h2 { margin: 0 0 0.6rem; font-size: 1.25rem; }
h3.subhead { font-family: Outfit, sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 16px 0 8px; }
a { color: var(--copper-2); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0.4rem 0; }

/* ---------- shell / sidebar ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #221e1b 0%, var(--side-bg) 40%);
  color: var(--side-ink);
  padding: 22px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fafaf9;
  font-size: 1.3rem;
  margin-bottom: 28px;
  padding: 0 8px;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; fill: #f59e0b; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--side-muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav a svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav a:hover { background: rgba(255,255,255,.07); color: var(--side-ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--copper); color: #fff; }
.side-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid;
  gap: 4px;
}
.side-foot .org { font-size: 0.8rem; color: var(--side-muted); }
.side-foot .who-name { font-weight: 600; color: var(--side-ink); }
.side-foot form { margin-top: 6px; }
.side-foot button.text { color: var(--side-muted); padding: 0; }
.side-foot button.text:hover { color: #fff; }

.page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(244, 241, 236, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumb { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; font-weight: 560; }
.page-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 72px; flex: 1; }

/* ---------- bare pages (login/signup/landing) ---------- */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 32px 16px;
  background: var(--paper); }
.bare-main { width: min(520px, 100%); }
.bare .hero-wrap, .bare-main .hero { width: 100%; }

/* ---------- shared bits ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 700; color: var(--copper); margin: 0 0 4px; }
.lede { font-size: 1.05rem; max-width: 44rem; color: var(--ink); }
.quiet, .fine { color: var(--muted); }
.fine { font-size: 0.85rem; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.card, .panel, .person-card, .banner, .code-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.narrow { width: min(460px, 100%); padding: 32px; }
.panel, .code-panel, .banner { padding: 20px; margin: 14px 0; }

button, .button {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
button:hover, .button:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
button:active, .button:active { transform: translateY(0); }
button.primary, .button.primary { background: var(--copper); border-color: var(--copper); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--copper-2); border-color: var(--copper-2); }
button.text { border: 0; background: transparent; color: var(--copper-2); padding-inline: 4px; font-weight: 500; }
button.danger { color: var(--bad-ink); }
button:focus-visible, .button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

label { display: grid; gap: 6px; margin: 12px 0; font-size: 0.88rem; font-weight: 500; min-width: 0; }
label > input, label > textarea, label > select { min-width: 0; max-width: 100%; }
input { min-width: 0; }
input, textarea, select {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
  outline: none;
}
select { width: auto; padding: 9px 14px; border-radius: 999px; }
.gen-form, .date-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-form label { margin: 0; display: flex; align-items: center; gap: 8px; }
.date-form input { width: auto; }

.error { background: var(--bad-bg); color: var(--bad-ink); padding: 12px 14px; border-radius: 12px; font-weight: 500; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.banner.warn { background: var(--warn-bg); border-color: #fcd34d; color: var(--warn-ink); }
.banner.warn a { color: var(--warn-ink); font-weight: 600; }
.code-banner { font-family: "Cascadia Code", Consolas, monospace; letter-spacing: .05em; background: var(--copper-soft); border: 1px dashed var(--copper); padding: 14px; border-radius: 12px; text-align: center; font-size: 1.3rem; }

/* Verify OTP boxes */
.verify-card .brand.solo { margin-bottom: 18px; color: var(--ink); }
.verify-card h1 { font-size: 1.5rem; margin-bottom: 8px; }
.verify-card > p { color: var(--muted); margin-bottom: 18px; }
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 22px 0 18px; }
.otp-box {
  width: 46px; height: 56px; text-align: center;
  font-size: 1.5rem; font-weight: 700; font-family: inherit;
  color: var(--ink); background: #fff;
  border: 2px solid #c7d2fe; border-radius: 10px;
  outline: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.otp-box:focus { border-color: var(--blue, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.15); transform: translateY(-2px); }
.otp-box.filled { border-color: var(--blue, #2563eb); background: #eff6ff; }
.verify-submit { width: 100%; }
.verify-card form + form { text-align: center; margin-top: 14px; }
.code-panel ul, .plain { list-style: none; padding: 0; margin: 0; }
.code-panel li, .plain li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.code-panel li:first-child, .plain li:first-child { border-top: 0; }
.code-panel code.pairing-code, .pairing-code {
  font-family: "Cascadia Code", Consolas, monospace; letter-spacing: .05em;
  background: #f5f5f4; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px;
}

/* ---------- dashboard board ---------- */
.ranges { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.ranges a { text-decoration: none; color: var(--ink); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; }
.ranges a[aria-current="page"] { background: var(--ink); color: #fafaf9; }
.board { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.person-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.person-card a { color: inherit; text-decoration: none; display: block; }
.person-card a:hover { text-decoration: none; }
.card-top { display: flex; align-items: center; gap: 8px; padding: 16px 16px 0; }
.rank { font-family: Fraunces, Georgia, serif; font-size: 1.9rem; font-weight: 640; color: var(--copper); }
.pill {
  display: inline-block; background: var(--good-bg); color: var(--good);
  border-radius: 999px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700;
}
.person-card h2 { padding: 4px 16px 0; margin-bottom: 2px; }
.metric { padding: 0 16px; font-size: 1.1rem; font-weight: 600; margin-bottom: 0; }
.quiet-sm { padding: 0 16px; font-size: 0.88rem; }
.thumb { width: calc(100% - 32px); height: 130px; object-fit: cover; border-radius: 12px; background: #1c1917; margin: 12px 16px 0; display: block; }
.thumb.missing { display: grid; place-items: center; color: #a8a29e; background: #292524; font-size: 0.85rem; }
.thumb.tall { width: 100%; height: 300px; margin: 0; border-radius: 0; }
.summary { padding: 10px 16px 16px; color: var(--muted); font-size: 0.9rem; }
.empty { padding: 56px 28px; text-align: center; }
.empty h2 { font-size: 1.5rem; }
.empty .button { margin-top: 12px; }

/* ---------- stats / player ---------- */
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.player-head h2 { margin-bottom: 0; }
.brand.solo { margin-bottom: 18px; color: var(--ink); }
.card.narrow form .primary, .card.narrow button.primary { margin-top: 6px; }

.stats { display: flex; gap: 14px; margin: 12px 0 18px; flex-wrap: wrap; }
.stats article {
  flex: 1; min-width: 160px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; box-shadow: var(--shadow);
}
.stats b { font-family: Fraunces, Georgia, serif; font-size: 1.5rem; font-weight: 640; }
.stats span { color: var(--muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.player img { width: 100%; border-radius: 12px; background: #1c1917; min-height: 240px; object-fit: contain; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.player input[type="range"] { width: 100%; margin-top: 12px; accent-color: var(--copper); }
.player-controls { display: flex; align-items: center; gap: 14px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.emp-block h2 .quiet { font-size: 0.95rem; font-weight: 500; }
.score {
  display: inline-block; min-width: 48px; text-align: center;
  font-family: Fraunces, Georgia, serif; font-size: 1.05rem; font-weight: 640;
  background: var(--good-bg); color: var(--good); border-radius: 10px; padding: 2px 10px;
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line);
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: rgba(194, 65, 12, 0.04); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- flags ---------- */
.flag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flag {
  display: flex; justify-content: space-between; align-items: start; gap: 14px;
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.flag.resolved { opacity: .55; }
.flag-high { border-left: 4px solid #dc2626; }
.flag-medium { border-left: 4px solid #d97706; }
.flag-low { border-left: 4px solid #0284c7; }
.flag .pill { margin-right: 4px; }
.pill-slacking { background: var(--warn-bg); color: var(--warn-ink); }
.pill-content { background: var(--info-bg); color: var(--info-ink); }
.pill-security { background: var(--bad-bg); color: var(--bad-ink); }
.pill-high { background: var(--bad-bg); color: var(--bad-ink); }
.pill-medium { background: var(--warn-bg); color: var(--warn-ink); }
.pill-low { background: var(--info-bg); color: var(--info-ink); }

/* ---------- site grid with favicons ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.site-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-align: center;
}
.site-tile .favicon-wrap { position: relative; width: 34px; height: 34px; }
.site-tile .favicon { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #fff; }
.favicon-fallback {
  display: none; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--copper-soft); color: var(--copper-2);
  font-weight: 700; font-size: 1rem; text-transform: uppercase;
}
.favicon-wrap { position: relative; display: inline-grid; place-items: center; }
.favicon-wrap.fav-sm { width: 22px; height: 22px; flex: none; }
.favicon-wrap.fav-sm .favicon { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; }
.favicon-wrap.fav-sm .favicon-fallback { width: 22px; height: 22px; border-radius: 6px; font-size: 0.7rem; }
.search-main { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.search-main > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-name { font-weight: 600; font-size: 0.85rem; word-break: break-all; }
.site-visits { font-size: 0.75rem; color: var(--muted); }
.site-grid > .site-tile:first-child,
.site-grid > .site-tile.site-top {
  grid-column: span 2;
  padding: 22px 14px;
  background: var(--copper-soft);
  border-color: #f3d9c4;
}
.site-grid > .site-tile:first-child .favicon-wrap,
.site-grid > .site-tile.site-top .favicon-wrap { width: 52px; height: 52px; }
.site-grid > .site-tile:first-child .favicon,
.site-grid > .site-tile:first-child .favicon-fallback,
.site-grid > .site-tile.site-top .favicon,
.site-grid > .site-tile.site-top .favicon-fallback { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 12px; }
.site-grid > .site-tile:first-child .site-name,
.site-grid > .site-tile.site-top .site-name { font-size: 1.05rem; }
.site-grid > .site-tile:first-child .site-visits,
.site-grid > .site-tile.site-top .site-visits { font-size: 0.85rem; color: var(--copper-2); font-weight: 700; }

.site-grid.compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.site-grid.compact > .site-tile:first-child { grid-column: span 1; padding: 12px 8px; background: #fff; border-color: var(--line); }
.site-grid.compact > .site-tile:first-child .favicon-wrap,
.site-grid.compact > .site-tile:first-child .favicon,
.site-grid.compact > .site-tile:first-child .favicon-fallback { width: 34px; height: 34px; font-size: 1rem; }
.site-grid.compact > .site-tile:first-child .site-name { font-size: 0.85rem; }
.row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }

.truncate { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; }
  .brand { margin-bottom: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { padding: 8px 10px; font-size: 0.85rem; }
  .nav a svg { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
  .page-main { width: calc(100% - 32px); padding-top: 20px; }
  .site-grid > .site-tile:first-child, .site-grid > .site-tile.site-top { grid-column: span 1; }
}
@media (max-width: 560px) {
  .stats { display: grid; }
  .page-head { display: grid; align-items: start; }
  input, textarea, select { font-size: 16px; }
}


/* ---------- landing extras ---------- */
.hero { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: center; width: min(1040px, 100%); margin: 24px auto 8px; }
.hero-copy .lede { margin-top: 14px; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.preview { list-style: none; margin: 0; padding: 18px; background: var(--side-bg); color: #f4eadf; border-radius: 22px; display: grid; gap: 10px; box-shadow: var(--shadow-lg); }
.preview li { display: grid; grid-template-columns: auto 1fr 72px; gap: 10px; align-items: center; background: #292524; border-radius: 12px; padding: 10px; }
.preview i { height: 28px; border-radius: 6px; background: linear-gradient(90deg, #fbbf24, #c2410c); display: block; }
.preview b { font-family: Fraunces, Georgia, serif; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; width: min(1040px, 100%); margin: 26px auto 0; }
.features .panel { margin: 0; }
.features h2 { font-size: 1.05rem; }
.features p { font-size: 0.9rem; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28, 25, 23, 0.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(520px, 100%); background: #fff; border-radius: 14px;
  padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.modal h2 { margin-bottom: 8px; }
.modal .terms { margin: 12px 0; padding-left: 20px; color: var(--muted); font-size: 0.9rem; }
.modal .terms li { margin: 6px 0; }
.consent-check { display: flex !important; align-items: center; gap: 10px; margin: 14px 0 4px; cursor: pointer; }
.consent-check input { width: auto; }
.dl-lang-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.dl-lang-row label { color: var(--muted); font-size: 0.85rem; }
.dl-lang-row select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal-actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.modal .fine { margin-top: 14px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; margin-top: 8px; }
}


/* ---------- landing v2 ---------- */
.site-nav {
  width: min(1180px, calc(100% - 48px)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.site-nav .brand { margin-bottom: 0; font-size: 1.25rem; color: var(--ink); }
.site-nav-links { display: flex; align-items: center; gap: 22px; }
.site-nav-links a { color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.site-nav-links a:hover { color: var(--copper-2); text-decoration: none; }
.site-nav-links .button { margin-left: 6px; }

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 -10% auto; height: 90%;
  background: radial-gradient(closest-side, rgba(251, 191, 36, .16), transparent);
  pointer-events: none;
}
.hero-copy { position: relative; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy > *, .hero-visual, .trust-strip, .illus-card, .steps li, .cta-band > * {
  animation: rise .55s ease both;
}
.hero-copy > *:nth-child(2) { animation-delay: .06s; }
.hero-copy > *:nth-child(3) { animation-delay: .12s; }
.hero-copy > *:nth-child(4) { animation-delay: .18s; }
.hero-copy > *:nth-child(5) { animation-delay: .24s; }
.hero-visual { animation-delay: .15s; }
.trust-strip { animation-delay: .3s; }
.illus-card:nth-child(2) { animation-delay: .12s; }
.steps li:nth-child(2) { animation-delay: .08s; }
.steps li:nth-child(3) { animation-delay: .16s; }
.cta-band > *:nth-child(2) { animation-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual, .trust-strip, .illus-card, .steps li, .cta-band > * { animation: none; }
}
.hero-copy h1 em { font-style: italic; color: var(--copper); }
.hero-visual { position: relative; }
.mock-window {
  background: #1c1917; border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08);
  transform: rotate(1.2deg);
}
.mock-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: #292524; border-bottom: 1px solid rgba(255,255,255,.06);
}
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #44403c; display: block; }
.mock-bar i:first-child { background: #f87171; }
.mock-bar i:nth-child(2) { background: #fbbf24; }
.mock-bar i:nth-child(3) { background: #34d399; }
.mock-bar span { margin-left: 8px; color: #a8a29e; font-size: 0.72rem; font-family: Outfit, sans-serif; }
.mock-body { padding: 16px; display: grid; gap: 12px; }
.mock-rank { display: grid; gap: 8px; }
.mock-row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  background: #292524; border-radius: 10px; padding: 9px 12px; color: #e7e5e4;
}
.mock-row b { font-family: Fraunces, Georgia, serif; color: #f59e0b; font-size: 1rem; }
.mock-row span { font-weight: 600; font-size: 0.85rem; }
.mock-row em { font-style: normal; color: #a8a29e; font-size: 0.75rem; }
.mock-row.top { border: 1px solid rgba(245, 158, 11, .35); }
.mock-screen {
  height: 120px; border-radius: 10px; position: relative; overflow: hidden;
  background: #292524;
}
.mock-screen i {
  position: absolute; left: 12px; right: 12px; top: 14px; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.14);
}
.mock-screen i::after {
  content: ""; position: absolute; left: 0; top: 18px; bottom: -26px; width: 46%;
  background: linear-gradient(180deg, rgba(251,191,36,.35), rgba(194,65,12,.15));
  border-radius: 4px;
}
.mock-sites { display: flex; gap: 8px; }
.mock-sites .dot { width: 30px; height: 30px; border-radius: 9px; background: #3f3a36; }
.mock-sites .dot:first-child { background: #c2410c; }
.float-chip {
  position: absolute; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-size: 0.78rem; font-weight: 600;
  box-shadow: var(--shadow); white-space: nowrap;
}
.chip-a { top: -14px; right: 8%; }
.chip-b { bottom: -14px; left: 4%; }

.trust-strip {
  width: min(1040px, 100%); margin: 34px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
}
.trust-strip span {
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.trust-strip span::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--copper);
}

.feature-card { display: flex; flex-direction: column; gap: 4px; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.icon-chip {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--copper-soft); color: var(--copper-2); margin-bottom: 8px;
}
.icon-chip svg { width: 22px; height: 22px; }
.feature-card h2 { font-size: 1.05rem; margin-top: 4px; }
.feature-card p { font-size: 0.9rem; }

.how { width: min(1040px, 100%); margin: 64px auto 0; text-align: center; }
.how h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.steps {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; text-align: left;
}
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps b {
  font-family: Fraunces, Georgia, serif; font-size: 1.6rem; color: var(--copper);
  display: block; margin-bottom: 6px;
}
.steps h3 { margin: 0 0 6px; font-size: 1.02rem; }
.steps p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.cta-band {
  width: min(1040px, 100%); margin: 72px auto 0;
  background: #1c1917;
  color: #fafaf9; border-radius: 16px; padding: 44px 40px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fafaf9; margin-bottom: 6px; }
.cta-band .quiet { color: #d6d3d1; }
.cta-band .downloads { margin: 0; }
.cta-band .button { background: #292524; color: #fafaf9; border-color: #44403c; }
.cta-band .button.primary { background: var(--copper); border-color: var(--copper); color: #fff; }

.site-foot {
  width: min(1040px, 100%); margin: 48px auto 0; padding: 24px 0 40px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.welcome-card { margin: 40px auto; }


/* ---------- illustrations ---------- */
.illustrations {
  width: min(1040px, 100%); margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.illus-card { margin: 0; text-align: center; }
.illus { width: 100%; height: auto; margin-bottom: 10px; }
.illus-card h2 { font-size: 1.1rem; }

/* ---------- help chatbot ---------- */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; padding: 0;
  background: var(--copper); border-color: var(--copper); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.chat-fab svg { width: 24px; height: 24px; }
.chat-fab:hover { background: var(--copper-2); border-color: var(--copper-2); }
.chat-panel {
  position: fixed; right: 22px; bottom: 88px; z-index: 90;
  width: min(340px, calc(100vw - 44px));
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--side-bg); color: #fafaf9;
}
.chat-head button {
  background: transparent; border: 0; color: #d6d3d1; font-size: 1.3rem;
  padding: 0 4px; cursor: pointer; line-height: 1;
}
.chat-msgs { padding: 14px; display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.msg {
  margin: 0; padding: 9px 12px; border-radius: 12px; font-size: 0.88rem; max-width: 88%;
}
.msg.bot { background: var(--paper); border: 1px solid var(--line); justify-self: start; }
.msg.user { background: var(--copper); color: #fff; justify-self: end; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.chat-form button { padding: 8px 14px; }

/* ---------- production polish ---------- */
::selection { background: rgba(194, 65, 12, .18); }
html { scroll-behavior: smooth; }

/* slim, subtle scrollbars */
* { scrollbar-width: thin; scrollbar-color: #d6d3d1 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #a8a29e; }
*::-webkit-scrollbar-track { background: transparent; }

/* page entrance */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-main > *, .bare-main > * { animation: pageIn .4s ease both; }
.page-main > *:nth-child(2), .bare-main > *:nth-child(2) { animation-delay: .05s; }
.page-main > *:nth-child(3), .bare-main > *:nth-child(3) { animation-delay: .1s; }
.page-main > *:nth-child(4), .bare-main > *:nth-child(4) { animation-delay: .15s; }
.page-main > *:nth-child(5), .bare-main > *:nth-child(5) { animation-delay: .2s; }
.page-main > *:nth-child(n+6), .bare-main > *:nth-child(n+6) { animation-delay: .25s; }

/* buttons: richer states */
button, .button { box-shadow: 0 1px 0 rgba(28,25,23,.04); }
button.primary, .button.primary {
  box-shadow: 0 1px 0 rgba(120,40,0,.25), 0 4px 14px rgba(194,65,12,.22);
}
button.primary:hover, .button.primary:hover {
  box-shadow: 0 2px 0 rgba(120,40,0,.25), 0 8px 20px rgba(194,65,12,.28);
}
button.primary:active, .button.primary:active { transform: translateY(0) scale(.985); }
button:disabled, .button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* inputs: smoother focus */
input, textarea, select { transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input:hover, textarea:hover, select:hover { border-color: #d6cfc4; }

/* cards lift on hover where interactive */
.person-card .thumb { transition: transform .35s ease; }
.person-card:hover .thumb { transform: scale(1.03); }
.person-card { overflow: hidden; }
.flag { transition: transform .15s ease, box-shadow .15s ease; }
.flag:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.site-tile { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.site-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d8cfc2; }
.site-tile .favicon { transition: transform .2s ease; }
.site-tile:hover .favicon { transform: scale(1.08); }

/* stats cards subtle entrance already covered; give them hover */
.stats article { transition: transform .15s ease, box-shadow .15s ease; }
.stats article:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* modal open animation */
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-backdrop { animation: backdropIn .18s ease both; }
.modal { animation: modalPop .22s cubic-bezier(.2,.9,.3,1.2) both; }

/* OTP box pop on fill */
@keyframes otpPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
.otp-box.filled { animation: otpPop .22s ease; }
.otp-box { caret-color: var(--copper); }

/* chat panel + fab polish */
@keyframes chatIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-panel { animation: chatIn .2s cubic-bezier(.2,.9,.3,1.15) both; transform-origin: bottom right; }
@keyframes fabPulse {
  0% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(194,65,12,.35); }
  70% { box-shadow: var(--shadow-lg), 0 0 0 12px rgba(194,65,12,0); }
  100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(194,65,12,0); }
}
.chat-fab { animation: fabPulse 2.6s ease-out infinite; }
.chat-fab:hover { animation-play-state: paused; }

/* range slider polish */
.player input[type="range"] { cursor: pointer; }

/* nav active indicator */
.nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* links gentle underline on hover for prose */
.lede a, .quiet a, .fine a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(194,65,12,.35); }
.lede a:hover, .quiet a:hover, .fine a:hover { text-decoration-color: var(--copper); }

/* reduced motion: cover all new animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-main > *, .bare-main > *, .modal-backdrop, .modal, .chat-panel, .otp-box.filled,
  .chat-fab, .person-card .thumb, .site-tile .favicon, .stats article,
  .flag, .site-tile { animation: none !important; transition: none !important; }
  button, .button, .person-card, .feature-card { transition: none !important; }
}

/* ---------- podium medals: top 3 sites & ranks ---------- */
.site-grid > .site-tile.medal-1,
.site-grid > .site-tile.medal-2,
.site-grid > .site-tile.medal-3 {
  padding: 20px 10px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.site-grid > .site-tile.medal-1 { background: linear-gradient(165deg, #fff8dd 0%, #f6df9a 55%, #eec964 100%); border-color: #c9a227; }
.site-grid > .site-tile.medal-2 { background: linear-gradient(165deg, #ffffff 0%, #eceff1 55%, #cfd6da 100%); border-color: #9aa7ad; }
.site-grid > .site-tile.medal-3 { background: linear-gradient(165deg, #fdf0e2 0%, #f2cfa9 55%, #dfa06e 100%); border-color: #a9713d; }
.site-grid > .site-tile.medal-1 .site-name,
.site-grid > .site-tile.medal-2 .site-name,
.site-grid > .site-tile.medal-3 .site-name { font-weight: 800; font-size: 0.95rem; }
.site-grid > .site-tile.medal-1 .site-visits,
.site-grid > .site-tile.medal-2 .site-visits,
.site-grid > .site-tile.medal-3 .site-visits { font-weight: 700; color: #5c4a12; }
.site-grid > .site-tile.medal-2 .site-visits,
.site-grid > .site-tile.medal-3 .site-visits { color: #4c4238; }
.site-grid > .site-tile.medal-1 .favicon-wrap,
.site-grid > .site-tile.medal-2 .favicon-wrap,
.site-grid > .site-tile.medal-3 .favicon-wrap { width: 46px; height: 46px; }
.site-grid > .site-tile.medal-1 .favicon,
.site-grid > .site-tile.medal-1 .favicon-fallback,
.site-grid > .site-tile.medal-2 .favicon,
.site-grid > .site-tile.medal-2 .favicon-fallback,
.site-grid > .site-tile.medal-3 .favicon,
.site-grid > .site-tile.medal-3 .favicon-fallback { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 10px; }
/* compact grids (reports): same medals, beat the first-child compact rules */
.site-grid.compact > .site-tile.medal-1 .favicon-wrap,
.site-grid.compact > .site-tile.medal-2 .favicon-wrap,
.site-grid.compact > .site-tile.medal-3 .favicon-wrap { width: 46px; height: 46px; }
.site-grid.compact > .site-tile.medal-1 .favicon,
.site-grid.compact > .site-tile.medal-1 .favicon-fallback,
.site-grid.compact > .site-tile.medal-2 .favicon,
.site-grid.compact > .site-tile.medal-2 .favicon-fallback,
.site-grid.compact > .site-tile.medal-3 .favicon,
.site-grid.compact > .site-tile.medal-3 .favicon-fallback { width: 46px; height: 46px; font-size: 1.3rem; }

/* leaderboard rank numbers */
.rank.medal-1 { color: #8a6508; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.rank.medal-2 { color: #5d6d7e; }
.rank.medal-3 { color: #8a4b1f; }
.rank.medal-1, .rank.medal-2, .rank.medal-3 { font-weight: 800; }
.site-grid.compact > .site-tile.medal-1 { background: linear-gradient(165deg, #fff8dd 0%, #f6df9a 55%, #eec964 100%); border-color: #c9a227; }
.site-grid.compact > .site-tile.medal-2 { background: linear-gradient(165deg, #ffffff 0%, #eceff1 55%, #cfd6da 100%); border-color: #9aa7ad; }
.site-grid.compact > .site-tile.medal-3 { background: linear-gradient(165deg, #fdf0e2 0%, #f2cfa9 55%, #dfa06e 100%); border-color: #a9713d; }
.flag-hint {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; margin: 0 0 10px;
}

/* ---------- report highlight screenshots ---------- */
.report-shots { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.report-shots figure { margin: 0; width: 150px; }
.report-shots img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; background: #1c1917; display: block; border: 1px solid var(--line); }
.report-shots figcaption { font-size: 0.72rem; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.app-main { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.app-main > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-shot img { width: 90px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 6px 0; }
.flag-actions { display: flex; gap: 8px; align-items: flex-start; }
.shot-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: grid; place-items: center; z-index: 200; }
.shot-lightbox[hidden] { display: none; }
.shot-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.shot-lightbox button { position: absolute; top: 18px; right: 22px; background: #fff; border: 0; border-radius: 999px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }
.report-shots a { display: block; }

/* ---------- production polish layer ---------- */
:root {
  --ease-out: cubic-bezier(.22,.9,.32,1);
}

/* staggered list entrances */
.flag-list li, table tbody tr, .site-grid > *, .person-grid > *, ul.plain > li {
  animation: listIn .45s var(--ease-out) both;
}
.flag-list li:nth-child(2), table tbody tr:nth-child(2), .site-grid > *:nth-child(2), .person-grid > *:nth-child(2), ul.plain > li:nth-child(2) { animation-delay: .04s; }
.flag-list li:nth-child(3), table tbody tr:nth-child(3), .site-grid > *:nth-child(3), .person-grid > *:nth-child(3), ul.plain > li:nth-child(3) { animation-delay: .08s; }
.flag-list li:nth-child(4), table tbody tr:nth-child(4), .site-grid > *:nth-child(4), .person-grid > *:nth-child(4), ul.plain > li:nth-child(4) { animation-delay: .12s; }
.flag-list li:nth-child(n+5), table tbody tr:nth-child(n+5), .site-grid > *:nth-child(n+5), .person-grid > *:nth-child(n+5), ul.plain > li:nth-child(n+5) { animation-delay: .16s; }
@keyframes listIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* panel depth + hover */
.panel {
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.panel:hover { box-shadow: var(--shadow-lg, 0 12px 32px rgba(28,25,23,.10)); }

/* flag rows: accent edge by severity */
.flag { position: relative; border-left: 3px solid transparent; }
.flag-high { border-left-color: #dc2626; }
.flag-medium { border-left-color: #d97706; }
.flag-low { border-left-color: #2563eb; }
.flag.resolved { opacity: .55; }
.flag-open { font-size: .82rem; color: var(--copper-2); white-space: nowrap; align-self: center; }
.flag-open:hover { text-decoration: underline; }
.flag-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* screenshot loading shimmer */
.flag-shot img, .report-shots img, .shot-lightbox img {
  background: linear-gradient(100deg, #e7e5e4 40%, #f5f5f4 50%, #e7e5e4 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.flag-shot img.loaded, .report-shots img.loaded, .shot-lightbox img.loaded { animation: none; background: #1c1917; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* lightbox entrance */
.shot-lightbox { animation: lbIn .18s var(--ease-out); }
.shot-lightbox img { animation: lbImg .22s var(--ease-out) both; }
@keyframes lbIn { from { opacity: 0; } }
@keyframes lbImg { from { opacity: 0; transform: scale(.92); } }

/* nav active indicator */
.side nav a.active { position: relative; }
.side nav a.active::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 3px; background: var(--copper);
  animation: navIn .25s var(--ease-out) both;
}
@keyframes navIn { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* buttons: press feedback */
button:active, .button:active { transform: translateY(0) scale(.98); }

/* inputs focus glow */
input:focus, select:focus, textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(194,65,12,.12);
}

/* pills subtle pop */
.pill { transition: transform .15s var(--ease-out); }
.pill:hover { transform: translateY(-1px); }

/* modal polish */
.modal-card, .confirm-card, [class*="modal"] .card {
  animation: modalIn .22s var(--ease-out) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* link underline sweep */
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* chat panel slide */
.chat-panel { transition: transform .25s var(--ease-out), opacity .2s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* archived day videos */
details.day-video { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
details.day-video summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
details.day-video summary:hover { color: var(--copper-2); }
