:root{
  --bg:#f3f6fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#dbe3ee;

  --brand:#2563eb;
  --brand-strong:#1e3a8a;
  --brand-soft:#eaf2ff;

  --pill:#eef4ff;
  --good-bg:#ecfdf5;
  --good-line:#86efac;

  --next-bg:#fff7ed;
  --next-line:#fdba74;

  --second-bg:#f8fbff;
  --section:#f8fbff;

  --shadow:0 12px 30px rgba(15,23,42,.08);
  --shadow-sm:0 8px 18px rgba(15,23,42,.05);
  --radius:18px;
}
*{box-sizing:border-box;}
.route-hidden{display:none !important;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{color:var(--brand);text-decoration:none;}

.wrap{max-width:1100px;margin:0 auto;padding:14px 14px 36px;}
.shell{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;}
.header{position:relative;padding:4px 18px 7px;border-bottom:1px solid #bfd0ea;background:linear-gradient(180deg, #ffffff, #fbfdff);}
.header-top{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.brand{
  display:grid;
  place-items:center;
  width:100%;
  min-width:0;
  text-align:center;
}
.site-logo-wrap{
  display:grid;
  place-items:center;
  width:100%;
  text-align:center;
}
.brand-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  margin-inline:auto;
}
.site-logo{
  display:block;
  width:min(260px,70vw);
  max-width:100%;
  height:auto;
  margin-inline:auto;
}
.header-controls{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  width:min(520px,100%);
  flex:0 0 auto;
}
.account-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-height:28px;
  margin-bottom:2px;
  font-size:13px;
  font-weight:900;
}
.account-nav form{margin:0;}
.account-nav a,
.account-nav button{
  border:0;
  padding:5px 8px;
  background:transparent;
  color:var(--brand-strong);
  font:inherit;
  cursor:pointer;
}
.account-nav .account-nav-primary{
  border-radius:999px;
  background:var(--brand-soft);
}
.account-nav-authenticated{
  position:absolute;
  top:10px;
  right:18px;
  z-index:10010;
  min-height:0;
  margin:0;
}
.account-menu{position:relative;}
.account-menu-toggle{
  position:relative;
  display:grid;
  place-items:center;
  width:36px;
  height:32px;
  padding:0 !important;
  border:1px solid var(--line) !important;
  border-radius:10px;
  background:#fff !important;
  box-shadow:var(--shadow-sm);
}
.account-menu-notification-dot{
  position:absolute;
  top:-4px;
  right:-4px;
  width:9px;
  height:9px;
  border:2px solid #fff;
  border-radius:50%;
  background:#dc2626;
  box-sizing:content-box;
  pointer-events:none;
}
.account-menu-toggle:hover,
.account-menu-toggle:focus-visible{
  border-color:#9bb4df !important;
  outline:2px solid rgba(37,99,235,.16);
  outline-offset:2px;
}
.account-menu-bars{
  display:flex;
  flex-direction:column;
  gap:3px;
  width:17px;
}
.account-menu-bars span{
  display:block;
  width:100%;
  height:2px;
  border-radius:999px;
  background:var(--brand-strong);
}
.account-menu-panel{
  position:absolute;
  top:calc(100% + 7px);
  right:0;
  z-index:10020;
  width:190px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  box-shadow:0 14px 32px rgba(15,23,42,.16);
}
.account-menu-panel[hidden]{display:none;}
.account-menu-panel a,
.account-menu-panel button{
  display:block;
  width:100%;
  padding:9px 10px;
  border-radius:8px;
  text-align:left;
  white-space:nowrap;
}
.account-menu-panel a:hover,
.account-menu-panel a:focus-visible,
.account-menu-panel button:hover,
.account-menu-panel button:focus-visible{
  outline:none;
  background:var(--brand-soft);
}
.account-menu-panel .account-menu-tracked-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.account-menu-tracked-dot{
  display:block;
  flex:0 0 auto;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#dc2626;
  pointer-events:none;
}
.pp-editor-warning{
  margin-bottom:10px;
  padding:8px 10px;
  border:1px solid #fbbf24;
  border-radius:10px;
  background:#fffbeb;
  color:#92400e;
  font-size:12px;
  font-weight:750;
}
.pp-editor-financials{
  display:flex;
  align-items:center;
  gap:8px 16px;
  flex-wrap:wrap;
  margin-bottom:10px;
  color:#475569;
  font-size:12px;
}
.pp-editor-runner{
  display:flex;
  align-items:center;
  gap:7px;
  margin:5px 0;
  padding:6px 8px;
  border-radius:8px;
  cursor:pointer;
}
.pp-editor-runner:hover{background:#f8fafc;}
.pp-editor-runner.is-nr{
  background:#f1f5f9;
  color:#94a3b8;
  cursor:not-allowed;
}
.pp-editor-runner.is-nr:hover{background:#f1f5f9;}
.pp-editor-runner.is-nr input{cursor:not-allowed;}
.pp-editor-runner-name{min-width:0;}
.pp-editor-runner .nr-badge{margin-left:auto;}
.pp-editor-leg.is-incomplete{border-color:#f59e0b;}
.pp-editor-leg-warning,
.pp-editor-incomplete{
  color:#b45309;
  font-size:11px;
  font-weight:800;
}
.pp-editor-incomplete{margin:-4px 0 10px;}
.site-footer{
  padding:12px 18px 14px;
  border-top:1px solid var(--line);
  background:#fbfdff;
}
.site-footer-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px 18px;
  flex-wrap:wrap;
}
.site-footer-nav a{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.site-footer-nav a:hover,
.site-footer-nav a:focus-visible{
  color:var(--brand-strong);
  text-decoration:underline;
}
.site-footer-copy{
  margin-top:8px;
  color:#94a3b8;
  font-size:10px;
  font-weight:650;
  text-align:center;
}
.header .segmented{
  margin-top:0;
  flex:0 0 auto;
}
.header .nav-search{
  width:100%;
  min-width:0;
  max-width:none;
  flex:0 0 auto;
  margin:8px 0 0;
}
@media (min-width:701px){
  .header-top{gap:3px;}
  .account-nav{min-height:23px;margin-bottom:0;}
  .account-nav a,
  .account-nav button{padding:3px 8px;}
  .header .segmented{
    width:100%;
    justify-content:center;
  }
  .header .nav-search{
    width:100%;
    margin-top:7px;
  }
}
.muted{color:var(--muted);}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:12px;}

.empty-state{
  padding:2px 0 4px;
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
}

.debug-only{display:none;}
body.debug .debug-only{display:block;}

.topnav a,
.segmented a,
.pill{
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
}

.nav-search{
  position:relative;
  min-width:220px;
  max-width:320px;
  flex:1;
}

.nav-search input{
  width:100%;
  border:1px solid var(--line);
  border-radius:999px;
  padding:9px 13px;
  font-weight:850;
  background:#fff;
}

.nav-search-results{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  left:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 12px 30px rgba(15,23,42,.16);
  overflow:hidden;
  max-height:min(70vh, 520px);
  overflow-y:auto;
  z-index:1000;
}

.nav-search-item{
  display:block;
  padding:10px 12px;
  text-decoration:none;
  color:inherit;
  border-bottom:1px solid var(--line);
}

.nav-search-item:last-child{
  border-bottom:0;
}

.nav-search-item:hover{
  background:#f8fbff;
}

.nav-search-name{
  font-weight:950;
}

.nav-search-meta,
.nav-search-empty{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.nav-search-empty{
  padding:10px 12px;
}

.nav-search-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-right:6px;
  border-radius:999px;
  background:var(--brand-soft);
  color:var(--brand-strong);
  font-size:10px;
  font-weight:950;
  vertical-align:1px;
}

.nav-search-footer{
  display:block;
  padding:10px 12px;
  background:#f8fbff;
  color:var(--brand-strong);
  font-size:12px;
  font-weight:950;
  text-decoration:none;
}

.nav-search-footer:hover{
  background:#eef4ff;
}

.section-kicker{
  color:var(--brand-strong);
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.search-page-card{
  margin-top:12px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.search-page-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.search-page-head h1{
  margin:2px 0 2px;
  color:var(--brand-strong);
  font-size:28px;
  line-height:1.05;
  letter-spacing:-.03em;
}

.search-page-head p{
  margin:0;
  color:var(--muted);
  font-weight:800;
}

.search-page-form{
  display:flex;
  gap:8px;
  align-items:center;
  margin:14px 0;
}

.search-page-form input{
  min-width:0;
  flex:1;
  border:1px solid var(--line);
  border-radius:999px;
  padding:11px 14px;
  font-weight:850;
  background:#fff;
}

.search-results-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.search-result-card{
  display:flex;
  gap:10px;
  align-items:flex-start;
  width:100%;
  box-sizing:border-box;
  min-width:0;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:inherit;
  text-decoration:none;
}

.search-result-card:hover{
  background:#f8fbff;
}

.search-result-icon{
  margin-right:0;
  margin-top:1px;
  flex:0 0 auto;
}

.search-result-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:2px;
}

.search-result-copy strong,
.search-result-copy span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.search-result-copy strong{
  color:var(--brand-strong);
  font-size:16px;
  font-weight:950;
}

.search-result-copy span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.search-empty-state{
  padding:10px 2px;
}

.search-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}

.search-page-current{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}

.search-page-nav.disabled{
  color:#94a3b8;
  background:#f8fafc;
  border-color:var(--line);
}

@media(max-width:640px){
  .nav-search{
    order:3;
    min-width:100%;
    max-width:none;
  }

  .search-page-card{
    padding:14px;
    border-radius:20px;
  }

  .search-page-head h1{
    font-size:24px;
  }

  .search-page-form{
    flex-direction:column;
    align-items:stretch;
  }

  .search-page-form .pill{
    justify-content:center;
  }
}

@media(max-width:700px){
  .header-top{
    gap:6px;
  }

  .brand,
  .brand-link{
    max-width:100%;
  }

  .brand{
    width:100%;
    justify-content:center;
  }

  .site-logo-wrap{
    justify-content:center;
  }

  .site-logo{
    width:min(230px,100%);
    max-width:100%;
    height:auto;
    transform:translateX(10px);
  }

  .header-controls{
    width:100%;
    align-self:stretch;
  }

  .account-nav{
    justify-content:center;
    margin-bottom:3px;
  }

  .account-nav-authenticated{
    justify-content:flex-end;
    top:8px;
    right:10px;
  }

  .header .segmented{
    width:100%;
    flex-wrap:wrap;
  }

  .header .nav-search{
    width:100%;
    max-width:none;
    margin:8px 0 0;
  }
}

.auth-card{
  width:min(480px,100%);
  margin:12px auto;
  padding:20px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}
.auth-card h1{
  margin:4px 0 6px;
  color:var(--brand-strong);
  font-size:28px;
  line-height:1.1;
}
.auth-intro{
  margin:0 0 16px;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  line-height:1.45;
}
.auth-form{
  display:flex;
  flex-direction:column;
  gap:13px;
}
.auth-form label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:900;
}
.auth-form input{
  width:100%;
  border:1px solid var(--line);
  border-radius:13px;
  padding:11px 12px;
  background:#fff;
  color:var(--text);
  font:inherit;
}
.auth-form input:focus{
  outline:3px solid rgba(37,99,235,.14);
  border-color:var(--brand);
}
.auth-form small{
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}
.auth-submit.pill{
  justify-content:center;
  width:100%;
  border:0;
  padding:11px 16px;
  background:var(--brand);
  color:#fff;
  font-weight:950;
  cursor:pointer;
}
.auth-error{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #fecaca;
  border-radius:13px;
  background:#fef2f2;
  color:#991b1b;
  font-size:13px;
  font-weight:850;
}
.auth-notice{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #bfdbfe;
  border-radius:13px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:13px;
  font-weight:850;
}
.auth-switch{
  margin:15px 0 0;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
  text-align:center;
}
.account-details{
  margin:0 0 16px;
}
.account-details div{
  padding:10px 0;
  border-top:1px solid var(--line);
}
.account-details dt{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.account-details dd{
  margin:3px 0 0;
  overflow-wrap:anywhere;
  font-weight:850;
}
.account-card form + form{margin-top:12px;}
.auth-legal-note{
  margin:11px 0 0;
  color:var(--muted);
  font-size:11px;
  font-weight:650;
  line-height:1.4;
  text-align:center;
}
.legal-page{
  width:min(760px,100%);
  margin:0 auto;
  padding:4px 0 10px;
}
.legal-page-head{
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.legal-page h1{
  margin:0 0 5px;
  color:var(--brand-strong);
  font-size:30px;
  line-height:1.1;
}
.legal-updated{
  margin:0;
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}
.legal-page-content section{margin-top:18px;}
.legal-page-content h2{
  margin:0 0 6px;
  color:var(--brand-strong);
  font-size:18px;
}
.legal-page-content p,
.legal-page-content li{
  color:#334155;
  font-size:14px;
  line-height:1.6;
}
.legal-page-content p{margin:0;}
.legal-page-content ul{margin:0;padding-left:20px;}
.legal-page-content li + li{margin-top:4px;}
@media(max-width:640px){
  .auth-card{
    margin:8px auto;
    padding:16px;
    border-radius:18px;
  }
  .auth-card h1{font-size:25px;}
  .site-footer{padding:11px 12px 13px;}
  .site-footer-nav{gap:7px 13px;}
  .site-footer-nav a{font-size:11px;}
  .site-footer-copy{margin-top:7px;font-size:9px;}
  .legal-page h1{font-size:26px;}
  .legal-page-content section{margin-top:16px;}
}

.segmented a{
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
  color:var(--muted);
}

.segmented a:visited{
  color:var(--muted);
}

.segmented a.active{
  color:#fff;
}

.segmented a.active:visited{
  color:#fff;
}

.segmented a:active{
  text-decoration:none;
}

.topnav a:focus,
.segmented a:focus,
.pill:focus{
  outline:none;
}

.topnav a:active,
.segmented a:active,
.pill:active{
  text-decoration:none;
}

.topnav a:hover,
.segmented a:hover{
  text-decoration:none;
}

.topnav{
  margin-top:14px;
}

.segmented{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px;
  margin-top:12px;
  background:#f9fbff;
  border:1px solid #dfe8f5;
  border-radius:999px;
  box-shadow:0 2px 8px rgba(15,23,42,.035);
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border:1px solid #d7e1f0;
  border-radius:999px;
  background:#fff;
  font-weight:850;
  color:var(--muted);
  margin-top:0;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
  transition:background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.pill:hover{
  border-color:#b8caea;
  color:var(--brand-strong);
  text-decoration:none;
}

.pill.active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
  box-shadow:0 6px 18px rgba(36,84,230,.24);
}

.content{padding:16px;}
h1{
  margin:0 0 4px;
  font-size:30px;
  font-weight:800;
  letter-spacing:-0.05em;
  line-height:1.05;
  color:var(--brand-strong);
}
h2{
  margin:0 0 10px;
  font-size:28px;
  font-weight:800;
  letter-spacing:-0.04em;
  line-height:1.08;
  color:var(--brand-strong);
}
h3{
  margin:16px 0 10px;
  font-size:20px;
  font-weight:800;
  letter-spacing:-0.03em;
  color:var(--brand-strong);
}
.subline{margin:4px 0 0;color:var(--muted);font-size:14px;line-height:1.3;}
.divider{height:1px;background:var(--line);margin:14px 0;}

table{border-collapse:collapse;width:100%;}
th,td{text-align:left;padding:11px 10px;border-bottom:1px solid #eef2f7;vertical-align:top;}
th{font-weight:900;font-size:12px;color:#334155;letter-spacing:.04em;text-transform:uppercase;}
td{font-size:15px;color:#0f172a;}

.desktop-table table{
  width:100%;
  border-collapse:collapse;
}
.desktop-table th{
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#64748b;
  padding:10px 8px;
  text-align:left;
}
.desktop-table td{
  padding:12px 8px;
  vertical-align:middle;
}
.desktop-table td:nth-child(2){
  width:44px;
}
.desktop-table td:nth-child(3){
  font-weight:700;
}
.desktop-table td:nth-child(5),
.desktop-table td:nth-child(6),
.desktop-table td:nth-child(7),
.desktop-table td:nth-child(8),
.desktop-table td:nth-child(9),
.desktop-table td:nth-child(10),
.desktop-table td:nth-child(13){
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.desktop-table tr{
  border-bottom:1px solid #f1f5f9;
}

.row-winner{background:rgba(34,197,94,.10);}
.row-top{background:rgba(59,130,246,.10);}
.row-2nd{background:rgba(59,130,246,.05);}
.runner-nr{
  opacity:.62;
  background:#f1f5f9 !important;
  color:#64748b;
}
.desktop-table tr.runner-nr td{
  background:#f8fafc;
  color:#64748b;
}
.runner-nr .runner-profile-link,
.runner-nr .runner-name-text{
  color:#475569;
}
.runner-nr .metrics span{
  background:#e5e7eb;
  border-color:#cbd5e1;
  color:#475569;
}
.nr-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#e5e7eb;
  color:#475569;
  font-size:11px;
  font-weight:950;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  vertical-align:middle;
  margin-left:6px;
}

.chip{
  display:inline-block;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  font-size:12px;
  font-weight:900;
  color:#0f172a;
  margin:2px 6px 2px 0;
}
.chip.good{
  border-color:var(--good-line);
  background:var(--good-bg);
  color:#065f46;
}
.chip.next{
  border-color:var(--next-line);
  background:var(--next-bg);
  color:#9a3412;
}
.chip.brand{
  border-color:#c7dbff;
  background:var(--brand-soft);
  color:var(--brand-strong);
}
.chip.place{
  background:#f0fdf4;
  color:#166534;
  border-color:#86efac;
}

.course-profile-badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  background:#fff4d6;
  color:#7a3b00;
  border:1px solid #f0c56a;
  white-space:nowrap;
}

.count-pill,
.race-count,
.pred-count{
  min-width:72px;
  height:28px;
  padding:0 10px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border-radius:999px;
  line-height:1;
  white-space:nowrap;

  font-size:14px;
  font-weight:800;
}

.pill-lg{
  padding:12px 18px;
  font-size:15px;
  font-weight:900;
}

.pill-primary{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.pill-primary:hover{
  background:var(--brand-strong);
  color:#fff;
}

.pill-secondary{
  background:transparent;
  color:var(--brand-strong);
  border:1px solid var(--line);
}

.pill-secondary:hover{
  background:#f1f5f9;
}

/* Admin action buttons */
.toolcard .actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.toolcard .actions .pill,
.toolcard .actions button,
.toolcard .actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand-strong);
  font-weight:900;
  font-size:14px;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:background .15s ease, transform .12s ease, box-shadow .12s ease, border-color .15s ease;
}

.toolcard .actions .pill:hover,
.toolcard .actions button:hover,
.toolcard .actions a:hover{
  background:#f8fbff;
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}

.toolcard .actions .pill:focus,
.toolcard .actions button:focus,
.toolcard .actions a:focus{
  outline:none;
  box-shadow:0 0 0 4px rgba(37,99,235,.15), 0 12px 28px rgba(15,23,42,.08);
}

.toolcard .actions .pill.active,
.toolcard .actions .pill-primary{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.toolcard .actions .pill.active:hover,
.toolcard .actions .pill-primary:hover{
  background:var(--brand-strong);
  color:#fff;
}

.toolcard .actions .pill-secondary{
  background:#fff;
  color:var(--brand-strong);
  border-color:var(--line);
}

.toolcard .actions .pill-secondary:hover{
  background:#f1f5f9;
}

.toolcard .actions .pill-danger{
  background:#fff5f5;
  color:#b91c1c;
  border-color:#fecaca;
}

.toolcard .actions .pill-danger:hover{
  background:#fee2e2;
  color:#991b1b;
}

.toolcard button:disabled{
  opacity:.58;
  cursor:wait;
  transform:none;
}

.placepot-actions{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}

.placepot-actions .pill,
.placepot-actions button,
.placepot-actions a{
  width:100%;
  justify-content:center;
}



.my-picks-fab{
  display:none;
  position:fixed;
  right:16px;
  bottom:18px;
  z-index:9999;
  border:0;
  background:var(--brand);
  color:#fff;
  border-radius:999px;
  padding:11px 15px;
  font-size:14px;
  font-weight:900;
  box-shadow:0 10px 28px rgba(15,23,42,.28);
}

.my-picks-panel{
  display:none;
  position:fixed;
  left:14px;
  right:14px;
  bottom:72px;
  z-index:9999;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 18px 45px rgba(15,23,42,.24);
  padding:14px;
}

.my-picks-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.my-picks-title{
  font-size:16px;
  font-weight:950;
  color:var(--brand-strong);
}

.my-picks-clear{
  border:0;
  background:#f1f5f9;
  color:#334155;
  border-radius:999px;
  padding:7px 11px;
  font-weight:900;
}

.my-pick-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid var(--line);
  padding:10px 0;
}

.my-pick-item.runner-nr{
  padding:10px;
  border-radius:8px;
}

.my-pick-body{
  min-width:0;
}

.my-pick-horse{
  font-weight:950;
  color:var(--text);
}

.my-pick-meta{
  margin-top:3px;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
}

.my-pick-remove{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border:1px solid #dbe3ee;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  font-size:18px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
}

.my-pick-empty{
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  padding:8px 0 2px;
}

.pick-heart{
  display:none;
}

@media (max-width:760px){
  .rcard{
    position:relative;
    padding-right:54px;
  }

  .pick-heart{
    display:inline-flex;
    position:absolute;
    top:12px;
    right:12px;
    width:28px;
    height:28px;
    min-width:28px;
    min-height:28px;
    border:1px solid var(--line);
    border-radius:999px;
    background:#fff;
    color:var(--brand-strong);
    align-items:center;
    justify-content:center;
    padding:0;
    font-size:0;
    line-height:1;
    cursor:pointer;
    box-shadow:0 4px 10px rgba(15,23,42,.10);
    z-index:5;
  }

  .pick-heart::before{
    content:"+";
    font-size:17px;
    line-height:1;
    font-weight:850;
    transform:translateY(-1px);
  }

  .pick-heart.active{
    background:#ecfdf5;
    color:#166534;
    border-color:#86efac;
  }

  .pick-heart.active::before{
    content:"+";
    transform:translateY(-1px) rotate(45deg);
  }

  .pick-heart{
    transition:transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
  }

  .pick-heart:active{
    transform:scale(.88);
  }

  .pick-heart.active{
    animation:pick-pop .22s ease;
  }

  @keyframes pick-pop{
    0%{transform:scale(.85);}
    60%{transform:scale(1.12);}
    100%{transform:scale(1);}
  }
}

/* Desktop */
.meeting-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

.meeting-code-icon{
  width:30px !important;
  height:22px !important;
  flex:0 0 30px !important;
  object-fit:contain;
  display:inline-block;
  margin-left:6px;
  margin-right:4px;
  vertical-align:-4px;
}

/* Latest result only */
.latest-results-drawer {
  margin-top: 12px;
}

.latest-results-drawer summary {
  font-weight: 900;
}

.latest-result-card,
.latest-result-card:hover,
.latest-result-card * {
  text-decoration: none !important;
}

.latest-result-card {
  display: block;
  color: inherit;
  padding: 12px;
  border: 1px solid #d6e0ee;
  border-radius: 14px;
  background: #fff;
}

.race-summary-hot-trainer{
  margin-left:4px;
  padding:2px 5px;
  vertical-align:middle;
}

.summary-hot-trainer-badge{
  flex:0 0 auto;
  padding:2px 6px;
  font-size:10px;
  line-height:1.1;
}

.latest-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 8px;
}

.latest-result-flag {
  flex: 0 0 auto;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  color: #0f2f7f;
  background: #f8fbff;
}

.latest-result-head-main {
  min-width: 0;
  flex: 1;
}

.latest-result-meeting {
  font-size: 15px;
  font-weight: 900;
  color: #0f2f7f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-result-race {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-result-ran {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
}

.latest-result-places {
  display: grid;
  gap: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: #f7f9fc;
}

.latest-result-place {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(46px, auto);
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.latest-result-place + .latest-result-place{
  border-top:1px solid #edf2f7;
}

.latest-result-pos {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
}

.latest-result-horse {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.latest-result-silk {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.latest-result-horse-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-result-sp {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  margin-left: 4px;
}

.latest-pred-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.latest-pred-chip.best {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.latest-model-box {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.latest-model-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.latest-model-label {
  font-weight: 900;
  color: #64748b;
}

.latest-model-name {
  font-weight: 900;
  color: #0f172a;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.latest-result-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.latest-result-nav-btn {
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 900;
  color: #0f2f7f;
}

.latest-result-nav-btn.disabled {
  color: #94a3b8;
  pointer-events: none;
}

.race-title-with-icon{
  display:flex;
  align-items:center;
  gap:8px;
}

.race-title-with-icon .meeting-code-icon{
  width:34px !important;
  height:25px !important;
  flex-basis:34px !important;
}

.pick-price {
  display: inline-block;
  margin-left: 2px;
  font-size: .9em;
  font-weight: 850;
  color: #64748b;
  white-space: nowrap;
}

/* Compact confidence drawer */
.confidence-drawer .inner{
  padding:10px 12px;
}

.confidence-note{
  margin-bottom:8px;
  font-size:13px;
  line-height:1.25;
  font-weight:700;
}

.confidence-drawer .meetblock{
  margin-top:6px;
}

.confidence-drawer .meetdetails summary{
  padding-bottom:6px;
}

.confidence-drawer .time-row{
  padding:8px 8px;
}

.confidence-drawer .time-title{
  font-size:14px;
  line-height:1.2;
}

.confidence-drawer .time-meta{
  margin-top:3px;
  font-size:12px;
  line-height:1.2;
}

.confidence-drawer .time-picks{
  gap:4px;
}

.confidence-drawer .time-pickline .pickname{
  font-size:13px;
}

.confidence-drawer .price-pill,
.confidence-drawer .chip{
  padding:3px 7px;
  font-size:10px;
}

.confidence-drawer .runner-silk{
  width:28px;
  height:21px;
}

@media (max-width: 760px){
  .my-picks-fab.has-picks{
    display:block;
  }

  .my-picks-panel.open{
    display:block;
  }
}

.top-summary-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.top-summary-grid-single{
  grid-template-columns:minmax(0, 1fr);
}

.top-summary-card{
  height:100%;
  border:1px solid #d6e0ee;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  padding:12px 13px;
  box-shadow:0 4px 12px rgba(15,23,42,.045);
}

.top-summary-card:hover{
  background:#fbfcff;
}

.top-summary-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.top-summary-title{
  font-size:14px;
  font-weight:950;
  color:var(--brand-strong);
  line-height:1.15;
}

.top-summary-racename{
  margin-top:5px;
  min-height:34px;
  font-size:13px;
  font-weight:750;
  color:#475569;
  line-height:1.25;
}

.top-summary-pickline{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex-wrap:wrap;
}

.top-summary-pickline .runner-silk{
  width:30px;
  height:22px;
}

.top-summary-pickline .pickname{
  font-size:14px;
}

.today-shortlist{
  margin:12px 0 16px;
  padding:16px 18px 18px;
  border:1px solid #d4deeb;
  border-radius:18px;
  background:linear-gradient(145deg,#fbfdff 0%,#f2f7ff 68%,#fff 100%);
  box-shadow:var(--shadow-sm);
}

.shortlist-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.shortlist-heading h1{
  margin:2px 0 0;
  font-size:27px;
  line-height:1.05;
}

.shortlist-kicker,
.shortlist-label{
  color:var(--brand-strong);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.reserve-badge{
  background:#e2e8f0;
  border-color:#94a3b8;
  color:#334155;
}

.shortlist-heading-note,
.shortlist-rationale,
.shortlist-price{
  color:#64748b;
  font-size:12px;
  font-weight:750;
}

.shortlist-grid{
  display:grid;
  gap:10px;
}

.shortlist-grid-primary{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.shortlist-grid-flagship{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.shortlist-grid-secondary{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-top:10px;
}

.shortlist-card{
  min-width:0;
  border:1px solid rgba(148,163,184,.55);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  padding:12px 13px;
  box-shadow:0 4px 12px rgba(15,23,42,.045);
}

.shortlist-placepot-card{
  grid-column:1 / -1;
}

.home-secondary-drawer{
  margin:12px 0 0;
}

.home-secondary-drawer .result-section-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.home-secondary-count{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  border:1px solid #dbe3ee;
  border-radius:999px;
  padding:3px 9px;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}

.home-secondary-drawer > .inner{
  padding:12px;
}

.home-secondary-drawer[open] > .inner,
.today-shortlist-drawer[open] > .inner,
.selection-builder[open] > .inner,
.latest-results-drawer[open] > .inner{
  animation:home-drawer-reveal .16s ease-out;
}

.racecards-secondary .racecards-day-drawer[open] > .inner{
  animation:home-drawer-reveal .16s ease-out;
}

@keyframes home-drawer-reveal{
  from{opacity:.55;transform:translateY(-3px);}
  to{opacity:1;transform:translateY(0);}
}

.confidence-picks-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.confidence-picks-more{
  margin-top:10px;
}

.confidence-picks-more > summary{
  display:flex;
  justify-content:center;
  border:1px solid #dbe3ee;
  border-radius:999px;
  padding:8px 12px;
  background:#f8fafc;
  color:var(--brand-strong);
  font-size:12px;
  font-weight:900;
  text-align:center;
}

.confidence-picks-grid-more{
  margin-top:10px;
}

.home-secondary-drawer .shortlist-placepot-card,
.home-tracked-runners .shortlist-tracker-card{
  width:100%;
}

.home-tracked-runners{
  min-width:0;
  margin-top:12px;
}

.shortlist-card-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.shortlist-card-link:hover{
  border-color:#93c5fd;
  background:#fff;
  transform:translateY(-1px);
}

.shortlist-race{
  margin-top:8px;
  color:#334155;
  font-size:13px;
  font-weight:900;
}

.shortlist-horse{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  margin-top:8px;
  color:#0f172a;
  font-size:19px;
  font-weight:950;
  line-height:1.12;
}

.shortlist-horse span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.shortlist-horse .runner-silk{
  width:30px;
  height:22px;
  flex:0 0 30px;
}

.shortlist-racename{
  margin-top:6px;
  color:#64748b;
  font-size:12.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.shortlist-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:10px;
}

.shortlist-price{
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  background:#f1f5f9;
  font-size:10px;
}

.shortlist-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.shortlist-context-badge{
  flex:0 0 auto;
  border:1px solid #dbe3ee;
  border-radius:999px;
  padding:2px 7px;
  color:#475569;
  background:#f8fafc;
  font-size:10px;
  font-weight:900;
  letter-spacing:0;
  text-transform:none;
  white-space:nowrap;
}

.shortlist-result{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  flex:0 0 auto;
}

.shortlist-result .pick-price,
.shortlist-result .result-badge,
.shortlist-double-leg .result-badge{
  font-size:10px;
  white-space:nowrap;
}

.shortlist-card-empty{
  border-style:dashed;
  box-shadow:none;
}

.shortlist-empty-title{
  margin-top:10px;
  color:#475569;
  font-weight:900;
}

.shortlist-double-legs,
.shortlist-tracker-list,
.shortlist-placepot-list{
  display:grid;
  gap:7px;
  margin:10px 0;
}

.shortlist-double-leg,
.shortlist-tracker-runner,
.shortlist-placepot-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#334155;
  font-size:12px;
  text-decoration:none;
}

.shortlist-double-leg span,
.shortlist-tracker-runner span,
.shortlist-placepot-line span{
  color:#64748b;
  font-size:11px;
  white-space:nowrap;
}

.shortlist-tracker-count{
  margin-top:8px;
  color:#334155;
  font-size:15px;
  font-weight:950;
}

.shortlist-tracker-link{
  display:inline-block;
  margin-top:2px;
  text-decoration:none;
}

.shortlist-placepot-meeting{
  border-radius:8px;
  box-shadow:none;
}

.shortlist-placepot-meeting.placepot-status-lost{
  border-color:#fecaca;
  background:#fffafa;
}

.shortlist-placepot-meeting.placepot-status-won{
  border-color:#bbf7d0;
  background:#fafffc;
}

.shortlist-placepot-meeting.placepot-status-live{
  border-color:#bfdbfe;
  background:#f8fbff;
}

.shortlist-placepot-meeting summary.shortlist-placepot-line{
  display:grid;
  grid-template-columns:minmax(170px,1fr) minmax(max-content,auto) auto;
  align-items:center;
  gap:6px 12px;
  padding:7px 9px;
}

.shortlist-placepot-course{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.15;
}

.shortlist-placepot-time{
  min-width:0;
  text-align:center;
}

.shortlist-placepot-summary{
  display:flex;
  flex-direction:row;
  align-items:flex-end;
  justify-content:flex-end;
  gap:1px;
  min-width:0;
  text-align:right;
  white-space:nowrap;
}

.shortlist-placepot-count{
  color:#334155;
  font-size:11px;
  line-height:1.1;
  white-space:nowrap;
}

.shortlist-placepot-status{
  line-height:1.1;
}

.selection-builder{
  margin-top:12px;
}

.selection-builder-form{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}

.selection-builder-form > label{
  display:grid;
  gap:4px;
  color:#475569;
  font-size:11px;
  font-weight:850;
}

.selection-builder-form select{
  min-width:0;
  width:100%;
  padding:8px 9px;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  font-weight:750;
}

.selection-builder-options{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:7px 12px;
  font-size:11px;
  color:#475569;
}

.selection-builder-form-actions{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:7px;
}

.selection-builder-form-actions .pill{
  min-height:34px;
  padding:7px 11px;
  font-size:11px;
}

.selection-builder-output{
  margin-top:11px;
}

.selection-builder-results{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.selection-builder-result{
  position:relative;
  display:block;
  min-width:0;
  padding:9px 10px;
  border:1px solid #dbe3ee;
  border-radius:12px;
  background:#fbfdff;
  color:inherit;
  text-decoration:none;
}

.selection-builder-result-main{
  display:block;
  padding-right:38px;
  color:inherit;
  text-decoration:none;
}

.builder-pick-add{
  position:absolute;
  top:8px;
  right:8px;
  min-width:30px;
  height:30px;
  padding:0 8px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:16px;
  font-weight:950;
  cursor:pointer;
}

.builder-pick-add.active{
  border-color:#86efac;
  background:#ecfdf5;
  color:#166534;
  font-size:10px;
}

.selection-builder-output-actions{
  display:flex;
  justify-content:flex-end;
  margin-bottom:7px;
}

.selection-builder-output-actions .pill{
  padding:6px 10px;
  font-size:11px;
}

.selection-builder-race{
  color:var(--brand-strong);
  font-size:12px;
  font-weight:950;
}

.selection-builder-horse{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  margin-top:5px;
  font-size:14px;
}

.selection-builder-horse b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.selection-builder-badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px;
}

.selection-builder-badges .chip,
.selection-builder-badges .price-pill{
  margin:0;
  padding:3px 6px;
  font-size:10px;
}

.selection-builder-fallback,
.selection-builder-formats,
.selection-builder-empty{
  margin-top:7px;
  color:#64748b;
  font-size:11px;
  font-weight:750;
}

@media (max-width:640px){
  .selection-builder-form,
  .selection-builder-results{
    grid-template-columns:minmax(0,1fr);
  }
  .selection-builder-options{gap:6px 10px;}
}

.shortlist-placepot-meeting .placepot-home-list{
  padding:0 9px 7px;
}

.placepot-home-row.shortlist-placepot-leg{
  grid-template-columns:78px minmax(0,1fr) 84px;
}

@media (max-width:520px){
  .shortlist-placepot-meeting summary.shortlist-placepot-line{
    grid-template-columns:minmax(0,1fr) auto;
    gap:4px 8px;
  }

  .shortlist-placepot-course{
    grid-column:1 / -1;
  }

  .shortlist-placepot-time{
    grid-column:1;
    grid-row:2;
    text-align:left;
  }

  .shortlist-placepot-summary{
    grid-column:2;
    grid-row:2;
    flex-direction:row;
    align-items:center;
    gap:5px;
  }

  .shortlist-placepot-count + .shortlist-placepot-status::before{
    content:"\00b7";
    margin-right:5px;
    color:#94a3b8;
  }
}

.racecards-secondary{
  margin-top:18px;
  padding:16px 18px 18px;
  border:1px solid #dbe5f4;
  border-radius:18px;
  background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);
  box-shadow:var(--shadow-sm);
}

.racecards-secondary-heading{
  margin-bottom:12px;
}

.racecards-secondary-title{
  margin:0;
  font-size:21px;
}

.racecards-secondary-note{
  margin:4px 0 10px;
}

.racecards-day-drawer{
  margin-top:10px;
}

.next-race-panel,
.predictions-panel{
  margin-top:12px;
}

.next-race-label-mobile{
  display:none;
}

.next-race-heading{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.home-section-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:1.25em;
  min-width:1.25em;
  color:#64748b;
  font-size:.92em;
  line-height:1;
  opacity:.82;
}

.next-race-runner{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:0 1 auto;
}

.next-race-runner{
  min-width:0;
}

.next-race-runner .pickname{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  display:block;
}

.next-race-title,
.next-race-name,
.top-summary-racename{
  min-width:0;
  max-width:100%;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.next-race-chips{
  display:flex;
  align-items:center;
  gap:6px;
  margin-left:0;
  flex-shrink:0;
}

.top-summary-grid-single .top-summary-card{
  border-color:#d6e0ee;
  background:#fff;
}

.next-race-pickline{
  border-top:1px solid #eef2f7;
  padding-top:10px;
}

@media (max-width: 640px){
  .meeting-code-icon{
    width:24px !important;
    height:18px !important;
    flex-basis:24px !important;
    margin-left:5px;
    margin-right:3px;
  }

  .race-title-with-icon .meeting-code-icon{
    width:28px !important;
    height:21px !important;
    flex-basis:28px !important;
  }

  .latest-result-card {
    padding: 8px;
  }

  .latest-result-head {
    gap: 7px;
    margin-bottom: 6px;
  }

  .latest-result-flag {
    display: none;
  }

  .latest-result-meeting {
    font-size: 13px;
  }

  .latest-result-race {
    font-size: 12px;
  }

  .latest-result-ran {
    font-size: 11px;
  }

  .latest-result-places {
    padding: 6px;
  }

  .latest-result-place {
    grid-template-columns: 32px minmax(0, 1fr) minmax(42px, auto);
    gap: 6px;
  }

  .latest-result-pos,
  .latest-result-sp {
    font-size: 12px;
  }

  .latest-result-silk {
    width: 19px;
    height: 19px;
  }

  .latest-result-horse-name {
    font-size: 12px;
  }

  .latest-pred-chip {
    display: none;
  }

  .latest-model-row {
    grid-template-columns:1fr auto auto;
    gap:6px;
    font-size: 12px;
  }

  .latest-model-label{
    grid-column:1 / -1;
  }

  .toolcard .actions{
    width:100%;
  }

  .toolcard .actions .pill,
  .toolcard .actions button,
  .toolcard .actions a{
    width:100%;
    justify-content:center;
  }
}

.placepot-actions{
  width:100%;
  flex-direction:column;
  align-items:stretch;
}

.placepot-actions .pill{
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  font-weight: 800;
}

.time-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.time-row-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.time-row-link:hover{
  text-decoration:none;
}

.time-row{
  display:grid;
  grid-template-columns:90px minmax(0,1fr) minmax(260px, 360px);
  gap:8px;
  align-items:center;
  padding:8px 8px;
  border-top:1px solid #eef2f7;
}

.time-row:first-child{
  border-top:none;
}

.time-row:hover{
  background:#f8fbff;
  border-radius:12px;
}

.time-col{
  font-size:24px;
  font-weight:950;
  line-height:1;
  color:var(--brand-strong);
  letter-spacing:-0.03em;
}

.time-main{
  min-width:0;
}

.time-title{
  font-size:15px;
  font-weight:900;
  color:var(--text);
  line-height:1.25;
}

.time-meta{
  margin-top:4px;
  font-size:13px;
  color:var(--muted);
  font-weight:700;
  line-height:1.3;
}

.time-picks{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-start;
}

.time-pickline{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.time-pickline{
  margin-bottom:4px;
}

.time-col{
  font-weight:900;
  font-size:32px;
  line-height:1;
}

.horse-history-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.horse-history-link:hover{
  text-decoration:none;
  background:#f8fbff;
  border-radius:12px;
}

.horse-history-row{
  display:grid;
  grid-template-columns:96px minmax(0,1fr) 150px;
  gap:12px;
  align-items:center;
  padding:10px 8px;
  border-top:1px solid #eef2f7;
}

.horse-history-link:first-child .horse-history-row{
  border-top:0;
}

.horse-history-date{
  font-size:13px;
  font-weight:950;
  color:var(--brand-strong);
  line-height:1.15;
  white-space:nowrap;
}

.horse-history-main{
  min-width:0;
}

.horse-history-result{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}

.horse-history-result .horse-history-pillline{
  display:flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
}

.horse-history-result .horse-history-pilllabel{
  font-size:10px;
  font-weight:950;
  color:#64748b;
  letter-spacing:.04em;
  margin:0;
}

@media(max-width:640px){
  .horse-history-row{
    grid-template-columns:1fr;
    gap:5px;
    padding:9px 4px;
  }

  .horse-history-result{
    justify-content:flex-start;
  }
}

.compact-pick-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  line-height:1.15;
}

.compact-pick-row .runner-silk{
  width:30px;
  height:22px;
  margin-right:2px !important;
}

.compact-pick-row .pickname{
  font-size:15px;
  font-weight:950;
  color:var(--text);
  line-height:1.15;
}

.compact-pick-row .edge-extras{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex-wrap:nowrap;
}

.compact-pick-row .pick-price{
  margin-left:0;
  font-size:13px;
  font-weight:850;
  color:var(--muted);
}

.compact-pick-row .chip{
  margin:0;
  padding:4px 8px;
  font-size:11px;
}

.hot-combo-note {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.hot-combo-note .chip {
  margin-right: 6px;
}

.past-row{
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:7px 0;
  border-top:1px solid #eef2f7;
}

.past-row:first-child{
  border-top:none;
}

.past-time{
  font-size:16px;
  font-weight:950;
  line-height:1;
  color:var(--brand-strong);
  letter-spacing:-0.02em;
}

.past-main{
  min-width:0;
}

.past-picks{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.past-pickline{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  line-height:1.1;
}

.past-pickline .chip{
  margin:0;
  padding:3px 8px;
  font-size:10px;
}

.past-pickline .pickname{
  font-size:12px;
  font-weight:950;
  color:var(--text);
  letter-spacing:-0.01em;
}

.race-title{
  font-size:16px;
  font-weight:800;
  line-height:1.25;
  color:#475569;
  margin-top:4px;
  margin-bottom:4px;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.race-meta-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
  align-items:center;
}

.race-meta-chips .chip{
  margin:0;
}

.race-meta-line{
  margin-top:6px;
  color:#64748b;
  font-size:14px;
  font-weight:800;
  line-height:1.35;
}

.race-sort-wrap{
  margin-top:12px;
  margin-bottom:8px;
}

.model-rating-heading{
  display:flex;
  align-items:center;
  gap:5px;
  margin:8px 0 5px;
  color:#334155;
  font-size:12px;
  font-weight:900;
}

.model-rating-info{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#64748b;
  cursor:pointer;
  font-size:13px;
  line-height:1;
}

.model-rating-info:focus-visible{
  outline:2px solid #93c5fd;
  outline-offset:2px;
}

.model-rating-help{
  display:inline-flex;
  position:relative;
}

.model-rating-popover{
  position:fixed;
  z-index:10050;
  width:min(300px, calc(100vw - 24px));
  padding:9px 10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  box-shadow:0 12px 30px rgba(15,23,42,.2);
  color:#334155;
  font-size:12px;
  font-weight:700;
  line-height:1.35;
  text-align:left;
  white-space:normal;
}

.model-rating-popover[hidden]{display:none;}

.model-rating-stars{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:2px 6px;
  border:1px solid #f1d49a;
  border-radius:999px;
  background:#fffaf0;
  color:#d98b00;
  font-size:11px;
  font-weight:950;
  line-height:1.1;
  white-space:nowrap;
}

.model-rating-guide{
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#64748b;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.shortlist-label-row .model-rating-stars{
  margin-left:auto;
}

.race-sort-toggle{
  background:#fff !important;
  border:1px solid #d7e1f0 !important;
  padding:3px !important;
  gap:3px !important;
  border-radius:999px !important;
  box-shadow:none !important;
}

.race-sort-toggle .pill{
  padding:8px 14px !important;
  box-shadow:none !important;
  font-size:14px !important;
}

.race-nav-strip{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  margin:10px 0 14px;
  padding:0 0 2px;
  -ms-overflow-style:none;
  scrollbar-width:none;
}

.race-nav-strip::-webkit-scrollbar{
  display:none;
}

.race-nav-time{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:56px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand-strong);
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  line-height:1;
}

.race-nav-time:hover{
  text-decoration:none;
  background:var(--pill);
}

.race-nav-time.active{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}

.race-head-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:4px;
}

.race-mini-nav{
  display:flex;
  align-items:center;
  gap:8px;
}

.race-mini-nav a{
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  opacity:.8;
  transition:opacity .15s ease, color .15s ease;
}

.race-mini-nav a:hover{
  opacity:1;
  color:var(--brand-strong);
}

.meeting-rank{
  margin-left:6px;
}

.time-row.meeting-top-1,
.time-row.meeting-top-2,
.past-row.meeting-top-1,
.past-row.meeting-top-2{
  background:transparent;
  border-radius:0;
}

.race-list{display:flex;flex-direction:column;gap:10px;}
.race-card{
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  padding:12px 14px;
  box-shadow:var(--shadow-sm);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
  cursor:pointer;
}
.race-card .top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.race-card .title{
  font-size:19px;
  font-weight:950;
  letter-spacing:-0.02em;
  line-height:1.1;
  color:var(--brand-strong);
}
.race-card .subtitle{
  margin-top:6px;
  color:#334155;
  line-height:1.3;
  font-size:14px;
  font-weight:700;
}
.race-card .chips{margin-top:8px;}
.race-card .tp{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed var(--line);
  font-size:13px;
}
.race-card .pickline{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:6px;
}
.race-card .pickline:first-child{margin-top:0;}
.race-card .pickname{font-weight:950;color:var(--text);}
.race-card .pickmeta{color:var(--muted);font-weight:700;}
.race-card:hover{transform:translateY(-1px);box-shadow:0 14px 34px rgba(15,23,42,.10);background:#fbfcff;}
.race-card-link{text-decoration:none;color:inherit;display:block;}
.race-card-link:hover{text-decoration:none;}
.race-card-link:focus{outline:none;}
.race-card-link:focus .race-card{
  box-shadow:0 0 0 4px rgba(37,99,235,.15), 0 12px 30px rgba(15,23,42,.10);
  border-color:#cbd5e1;
}
.race-date-kicker{
  font-size:14px;
  font-weight:700;
  color:var(--brand-strong);
  opacity:.85;
}

.race-name-ellipsis,
.time-title,
.top-summary-racename,
.latest-result-race,
.subtitle{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.horse-profile-card{
  cursor:default;
}

.horse-profile-card:hover{
  transform:none;
}

.horse-profile-head{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-width:0;
}

.horse-profile-text{
  min-width:0;
}

.horse-profile-title{
  display:block;
}

.horse-profile-people{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.horse-profile-actions{
  justify-self:end;
  flex-shrink:0;
}

.tracker-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand-strong);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

.tracker-btn.active{
  background:#fff7ed;
  border-color:#fdba74;
  color:#9a3412;
}

.runner-profile-link,
.runner-profile-link:visited,
.runner-profile-link:hover,
.runner-profile-link:active,
.runner-profile-link:focus{
  color:inherit !important;
  text-decoration:none !important;
  cursor:pointer;
}

.runner-profile-link:hover *{
  text-decoration:none !important;
}

.next-race-pick-label{
  flex:0 0 auto;
  color:var(--brand-strong);
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.inrun-comment{
  margin-top:5px;
  max-width:420px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.inrun-comment summary{
  display:inline-block;
  cursor:pointer;
  color:var(--brand-strong);
  font-size:11px;
  font-weight:850;
  user-select:none;
}

.inrun-comment summary::before{
  content:"+ ";
}

.inrun-comment[open] summary::before{
  content:"- ";
}

.inrun-comment-text{
  margin-top:5px;
  padding:7px 9px;
  border-left:2px solid #cbd8f2;
  border-radius:0 7px 7px 0;
  background:rgba(255,255,255,.58);
}

@media(max-width:640px){
  .horse-profile-head{
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:8px;
  }

  .horse-profile-actions{
    grid-column:1 / -1;
    justify-self:start;
    margin-top:6px;
  }

  .horse-profile-title{
    font-size:21px !important;
    line-height:1.08 !important;
  }

  .horse-profile-people{
    font-size:13px !important;
    line-height:1.2 !important;
    white-space:normal;
  }

  .horse-profile-head .runner-silk{
    width:34px !important;
    height:34px !important;
    margin-right:0 !important;
    flex:0 0 34px !important;
  }
}

@media (max-width:640px){
  .horse-profile-head{
    gap:8px;
  }

  .horse-profile-head .runner-silk{
    width:30px !important;
    height:23px !important;
    margin-right:0 !important;
    flex:0 0 30px !important;
  }

  .horse-profile-title{
    font-size:21px !important;
    line-height:1.08 !important;
  }

  .horse-profile-people{
    font-size:13px !important;
    line-height:1.2 !important;
  }

  .horse-profile-meta{
    margin-top:7px;
    font-size:12px !important;
    line-height:1.25 !important;
  }

  .horse-history-list .time-row{
    grid-template-columns:1fr !important;
  }

  .horse-history-list .time-picks{
    align-items:flex-start !important;
  }

  .horse-history-racename{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

.pickname{
  font-weight:950;
  font-size:16px;
  color:var(--text);
  letter-spacing:-0.01em;
}

.price-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 7px;
  border:1px solid #d6e3ff;
  border-radius:999px;
  background:var(--pill);
  font-size:11px;
  font-weight:900;
  color:var(--brand-strong);
  line-height:1;
  white-space:nowrap;
}

.previous-filter-actions .pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  line-height:1;
}

.previous-filter-form{
  margin:0 0 12px;
}

.previous-filter-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.previous-filter-field{
  flex:1 1 220px;
  min-width:220px;
}

.previous-filter-label{
  margin-bottom:6px;
  font-size:13px;
}

.previous-filter-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.previous-filter-actions .pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:96px;
  padding:10px 14px;
  line-height:1;
  text-decoration:none;
}

.results-date-picker{
  overflow:hidden;
}

.results-date-picker-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.results-date-picker-icon{
  font-size:.9em;
}

.results-date-picker-body{
  padding-top:10px;
}

.results-date-picker-form{
  margin:0;
}

.results-date-picker-form input[type="date"]{
  width:100%;
}

.results-sections{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:12px;
}

.grouped-results-archive,
.results-day-meetings{
  display:grid;
  gap:10px;
}
.results-day-group,
.results-meeting-group{
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.results-day-group > summary,
.results-meeting-group > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 13px;
  cursor:pointer;
  list-style:none;
  font-weight:900;
}
.results-day-meetings{padding:0 10px 10px;}
.results-meeting-summary{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center !important;
  gap:9px !important;
  min-height:54px;
  padding:8px 11px !important;
}
.results-meeting-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  align-items:flex-start;
}
.results-meeting-course{
  display:flex;
  width:100%;
  min-width:0;
  align-items:center;
  gap:6px;
  color:var(--brand-strong);
  font-size:15px;
  font-weight:950;
  line-height:1.1;
}
.results-meeting-course-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.results-meeting-summary .meeting-time-meta{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
  line-height:1;
}
.results-meeting-summary .meeting-code-icon{
  width:22px !important;
  height:16px !important;
  flex:0 0 22px !important;
  margin:0 !important;
}
.results-meeting-trailing{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
}
.results-meeting-summary .chip{
  margin:0;
  padding:4px 7px;
  font-size:10px;
  line-height:1;
  white-space:nowrap;
}
.results-meeting-group[open] > .results-meeting-summary .results-chevron{
  transform:rotate(90deg);
}
.compact-results-list{display:grid;gap:10px;padding:10px;border-top:1px solid var(--line);}
.compact-result-row{
  display:block;
  min-width:0;
  padding:8px;
  color:inherit;
  text-decoration:none;
  border:1px solid #d6e0ee;
  border-radius:14px;
  background:#fff;
}
.compact-result-main{display:block;min-width:0;}
.compact-result-row .latest-result-head{margin-bottom:6px;}
.compact-result-row .latest-result-meeting{display:block;}
.compact-result-row .latest-result-race{display:block;}
.compact-result-row .latest-model-box{display:block;margin-top:7px;padding-top:7px;}
.compact-result-row .latest-model-row{display:grid;}
.compact-results-empty{padding:12px;}

@media (max-width:640px){
  .results-meeting-summary{
    grid-template-columns:minmax(0,1fr) auto !important;
    min-height:50px;
    padding:7px 9px !important;
  }

  .results-meeting-course{
    font-size:14px;
  }
}

.drawer .result-section-summary{
  align-items:center;
  gap:10px;
}

.result-section-copy{
  display:flex;
  flex:1 1 auto;
  min-width:0;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
}

.result-section-eyebrow{
  color:var(--brand-strong);
  font-size:9px;
  font-weight:950;
  letter-spacing:.08em;
  line-height:1.1;
}

.result-section-title{
  color:var(--brand-strong);
  font-size:15px;
  font-weight:950;
  line-height:1.15;
}

.latest-results-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.latest-results-icon{
  font-size:.9em;
}

.shortlist-section-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.selection-builder-section-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
}

.selection-builder-new-badge{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  min-height:18px;
  padding:2px 7px;
  border:1px solid #93c5fd;
  border-radius:999px;
  background:#eff6ff;
  color:var(--brand-strong);
  font-size:9px;
  font-weight:950;
  letter-spacing:.06em;
  line-height:1;
  text-transform:uppercase;
}

.shortlist-section-icon{
  font-size:.9em;
}

.selection-builder-section-icon{
  font-size:.9em;
}

.result-section-subtitle{
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}

.result-section-trailing{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:7px;
}

.results-chevron{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  color:#64748b;
  font-size:22px;
  font-weight:800;
  line-height:1;
  transform:rotate(0deg);
  transition:transform .16s ease;
}

details[open] > .result-section-summary .results-chevron{
  transform:rotate(90deg);
}

.results-sections .results-accordion,
.results-sections .performance-highlights-panel,
.results-sections .previous-placepots-section,
.results-sections .previous-placepots-section > .drawer{
  margin:0;
}

.results-sections .performance-highlights-panel{
  border:1px solid #bfd3ff;
  border-radius:16px;
  background:linear-gradient(180deg,#f7faff 0%,#fff 100%);
  box-shadow:0 8px 22px rgba(30,58,138,.08);
  overflow:visible;
}

.results-sections .performance-highlights-panel > .result-section-summary{
  display:flex;
  padding:13px 14px 7px;
}

.results-sections .performance-highlights-panel > .inner{
  padding:10px 12px 12px;
}

.results-sections .shortlist-performance-panel{
  margin:0;
  border:1px solid #cbd5e1;
  border-radius:16px;
  background:#fff;
  box-shadow:0 6px 18px rgba(15,23,42,.06);
}

.shortlist-performance-panel > .result-section-summary{
  display:flex;
  padding:13px 14px 7px;
}

.shortlist-performance-panel > .inner{
  padding:7px 12px 12px;
}

.shortlist-performance-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.shortlist-performance-card{
  padding:9px 10px;
  box-shadow:none;
}

.shortlist-performance-kpis{
  display:flex;
  flex-wrap:wrap;
  gap:4px 9px;
  margin-top:6px;
  color:#334155;
  font-size:11px;
}

.shortlist-performance-rates,
.shortlist-performance-best{
  margin-top:4px;
  color:#64748b;
  font-size:10px;
  font-weight:750;
}

.shortlist-performance-days{
  display:grid;
  gap:7px;
  margin-top:10px;
}

.shortlist-performance-day{
  padding:8px 9px;
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:#f8fafc;
}

.shortlist-performance-result{
  display:grid;
  grid-template-columns:100px minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  padding-top:5px;
  color:#334155;
  font-size:11px;
}

.shortlist-performance-result span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.shortlist-performance-result > b{white-space:nowrap;}
.shortlist-performance-result.won strong{color:#08783b;}
.shortlist-performance-result.placed strong{color:#1d4ed8;}
.shortlist-performance-result.lost strong{color:#b91c1c;}
.shortlist-performance-result.pending strong,
.shortlist-performance-result.neutral strong{color:#64748b;}

@media (max-width:640px){
  .shortlist-performance-grid{grid-template-columns:minmax(0,1fr);}
  .shortlist-performance-result{grid-template-columns:112px minmax(0,1fr) auto;gap:5px;}
}

.results-sections .performance-highlights{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.results-sections .performance-highlights .shortlist-heading{
  display:none;
}

.results-sections .performance-highlights .shortlist-grid{
  grid-template-columns:1fr;
  gap:7px;
  margin:0;
}

.results-sections .performance-highlight-card{
  display:block;
  padding:10px 11px;
  border-radius:12px;
  box-shadow:none;
}

.performance-highlight-list{
  display:grid;
  gap:0;
  margin-top:5px;
}

.performance-highlight-row{
  display:block;
  min-width:0;
  padding:7px 0;
  border-top:1px solid #e8edf4;
  color:inherit;
  text-decoration:none;
}

.performance-highlight-context{
  min-width:0;
  overflow:hidden;
  color:#334155;
  font-size:12px;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.results-sections .performance-highlight-summary{
  margin:2px 0 0;
  line-height:1.25;
}

.runner-name-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.runner-name-text{
  min-width:0;
}

.draw-sup{
  font-size:0.6em;
  font-weight:700;
  color:var(--muted);
  margin-left:1px;
  vertical-align:super;
}

.last-run-sup{
  font-size:0.62em;
  font-weight:700;
  color:#64748b;
  margin-left:3px;
  vertical-align:super;
}

.runner-summary-line{
  color:var(--muted);
}

.jockey-claim{
  display:inline-block;
  font-size:0.68em;
  line-height:1;
  color:#64748b;
  margin-left:2px;
  transform:translateY(-0.45em);
}

.person-indicator{
  display:inline-block;
  font-size:0.68em;
  line-height:1;
  color:#64748b;
  margin-right:2px;
  transform:translateY(-0.42em);
}

.person-runner-card-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.person-runner-card-link:hover{
  text-decoration:none;
}

.person-runner-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  padding:10px 12px;
  box-shadow:var(--shadow-sm);
}

.person-runner-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.person-runner-time{
  min-width:0;
  font-size:15px;
  font-weight:950;
  color:var(--brand-strong);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.person-runner-time span{
  color:#334155;
}

.person-runner-chips{
  display:flex;
  align-items:center;
  gap:5px;
  flex-shrink:0;
}

.person-runner-main{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}

.person-runner-main .runner-silk{
  width:32px;
  height:24px;
  flex:0 0 32px;
  margin-top:1px;
}

.person-runner-text{
  min-width:0;
  flex:1;
}

.person-runner-name{
  font-size:16px;
  font-weight:950;
  color:var(--text);
  line-height:1.15;
}

.person-runner-race{
  margin-top:3px;
  font-size:13px;
  font-weight:750;
  color:#64748b;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.person-runner-meta{
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  color:#64748b;
  line-height:1.25;
}

.person-profile-section{
  margin-top:12px;
}

.person-profile-section .inner{
  padding:12px;
}

.person-history-horse{
  font-size:14px;
  font-weight:950;
  color:var(--text);
  line-height:1.2;
}

.history-inline-label{
  font-size:11px;
  font-weight:950;
  color:#64748b;
  margin-left:8px;
  margin-right:4px;
  letter-spacing:.02em;
}

.history-inline-label:first-child{
  margin-left:0;
}

.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}

.stat-card{
  border:1px solid var(--border);
  border-radius:18px;
  background:#f8fbff;
  padding:12px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.stat-label{
  font-weight:900;
  color:var(--muted);
  font-size:13px;
}

.stat-value{
  font-size:22px;
  font-weight:950;
  color:var(--brand);
  margin-top:4px;
}

.stat-sub{
  margin-top:3px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

@media (max-width:640px){
  .stat-grid{
    grid-template-columns:1fr;
  }
}

.person-insight-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
}

.person-insight-card{
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  padding:12px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.person-insight-wide{
  grid-column:span 4;
}

.stat-value.small{
  font-size:16px;
  line-height:1.2;
}

@media (max-width:640px){
  .person-insight-grid{
    grid-template-columns:1fr 1fr;
  }

  .person-insight-wide{
    grid-column:span 2;
  }
}

.person-best-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.person-best-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px 12px;
  background:#fff;
}

.person-best-title{
  font-weight:950;
  color:var(--brand);
}

.person-best-meta{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  margin-top:2px;
}

.person-best-rate{
  text-align:right;
  font-weight:950;
  color:var(--brand);
  min-width:54px;
}

.person-best-rate span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}

@media (max-width:640px){
  .person-best-row{
    grid-template-columns:1fr;
  }

  .person-best-rate{
    text-align:left;
  }
}

.person-history-date{
  min-width:96px;
  max-width:96px;
  font-size:12px;
  line-height:1.15;
  white-space:normal;
}

.person-history-date span{
  display:block;
}

.profile-pill-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:3px;
}

.profile-pill-label{
  font-size:10px;
  font-weight:900;
  color:#94a3b8;
  line-height:1;
  letter-spacing:.04em;
}

.person-role-subtitle{
  margin-top:2px;
  font-size:14px;
  font-weight:800;
  color:#64748b;
}

@media(max-width:640px){
  .person-runner-card{
    padding:9px 10px;
  }

  .person-runner-time{
    font-size:14px;
  }

  .person-runner-name{
    font-size:15px;
  }

  .person-runner-race{
    font-size:12px;
  }

  .person-runner-meta{
    font-size:12px;
  }
}

.metrics-card-row{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.metrics-card-row span{
  white-space:nowrap;
  padding:8px 12px;
  font-size:13px;
}

.metrics-card-row .model-rating-stars{
  padding:4px 7px;
  font-size:13px;
  line-height:1;
}

.edge-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.edge-row{
  padding:11px 13px 9px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow:var(--shadow-sm);
}

.edge-row .lhs{
  min-width:0;
}

.edge-row .tt{
  font-size:15px;
  font-weight:950;
  letter-spacing:-0.01em;
  line-height:1.15;
  color:var(--brand-strong);
}

.edge-row:hover{
  background:#fbfcff;
}

.edge-picks{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:6px;
}

.edge-pick{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  line-height:1.25;
}

.edge-pick .chip{
  margin:0;
  padding:4px 9px;
  font-size:11px;
}

.edge-pick .pickname{
  font-size:15px;
  font-weight:950;
  color:var(--text);
  letter-spacing:-0.01em;
}

.edge-extras{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
  padding:10px 0 4px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.hero h1{
  margin:0;
  font-size:26px;
  letter-spacing:-0.04em;
  line-height:1.1;
  color:var(--brand-strong);
}
.hero .meta{
  color:var(--muted);
  font-weight:800;
}
.hero .kpis{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.kpi{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  min-width:120px;
}
.kpi .lbl{
  font-size:12px;
  color:var(--muted);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.kpi .val{
  font-size:18px;
  font-weight:950;
  letter-spacing:-0.02em;
  color:var(--brand-strong);
}

/* Date grouping */
.dayblock{
  margin-top:12px;
}

/* Meeting grouping */
.meetblock{
  margin-top:8px;
}

.drawer .inner .meetblock{
  padding:0 10px 10px;
}

.meetdetails{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}

.meetdetails summary{
  list-style:none;
  padding:0 0 6px;
  cursor:pointer;
  font-weight:950;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  background:transparent;
  border:0;
}

.meetdetails summary::-webkit-details-marker{
  display:none;
}

.meetdetails .inner{
  padding:0;
}

.meeting-title-line{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:950;
  font-size:17px;
  color:var(--brand-strong);
}

.meeting-time-meta{
  margin-top:3px;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  line-height:1.2;
}

.meetmeta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
}

.meetmeta .chip,
.meetmeta .pill,
.meetmeta .result-pill{
  white-space:nowrap;
}

.meetmeta .chip{
  padding:4px 8px;
  font-size:11px;
  margin:0;
}

/* Collapsible drawers */
.drawer{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}

.drawer summary{
  list-style:none;
  padding:13px 14px;
  cursor:pointer;
  font-weight:950;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  background:linear-gradient(180deg, #ffffff, #fbfdff);
  color:var(--brand-strong);
}

.drawer summary::-webkit-details-marker{
  display:none;
}

.drawer .inner{
  padding:12px 14px;
}

.drawer summary + .inner{
  border-top:1px solid var(--line);
}

.drawer .inner .dayblock{
  padding:0;
}

.previous-filter-form{
  padding:0 14px 14px;
}

.drawer .hint{
  color:var(--muted);
  font-weight:800;
  font-size:13px;
  margin-top:-6px;
  padding:0 14px 12px;
}

.all-section{
  margin-top:18px;
  padding:0 14px 14px;
}

.all-section-title{
  margin:0 0 10px;
}

.all-section-inner{
  max-width:100%;
}

/* Nested drawers inside Predictions */
.drawer .drawer{
  margin-top:12px;
  box-shadow:none;
  border-radius:14px;
}

.drawer .drawer summary{
  padding:12px 14px;
  background:#fbfcff;
  font-weight:900;
}

.drawer .drawer .inner{
  padding:10px 12px;
}

/* Meeting race rows */
.meetblock .time-row{
  padding:7px 0;
  margin:0;
  background:transparent;
  border:0;
  border-top:1px solid #eef2f7;
  border-radius:0;
  box-shadow:none;
}

.meetblock .time-row:first-child{
  border-top:0;
}

@media (max-width:640px){
  .drawer summary{
    padding:10px 12px;
  }

  .drawer .inner{
    padding:8px 10px;
  }

  .drawer .inner .meetblock{
    padding:0 4px 6px;
  }

  .meetblock{
    margin-top:4px;
  }

  .meetdetails summary{
    padding:0 0 4px;
    gap:4px;
    flex-direction:column;
    align-items:flex-start;
  }

  .meeting-title-line{
    font-size:14px;
    line-height:1.1;
  }

  .meeting-time-meta{
    margin-top:2px;
    font-size:11px;
    line-height:1.15;
  }

  .meetmeta{
    gap:4px;
  }

  .meetmeta .chip{
    padding:3px 7px;
    font-size:10px;
  }

  .meetblock .time-row{
    padding:4px 0;
    gap:3px;
    margin:0;
  }

  .confidence-drawer .inner{
    padding:8px 10px;
  }

  .confidence-drawer .time-row{
    padding:5px 0;
  }
}

/* Runner cards */
.cards{display:none;gap:12px;flex-direction:column;margin-top:4px;}
.rcard{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 14px;
  background:#fff;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
}
.rcard.winner{border-color:#bfd3ff;background:#eef2ff;}
.rcard .top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.rcard .name{font-size:20px;font-weight:950;letter-spacing:-0.02em;line-height:1.05;color:var(--brand-strong);}
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:#fff;font-weight:950;font-size:12px;white-space:nowrap;}
.badge.good{border-color:var(--good-line);background:var(--good-bg);}
.kv{margin-top:8px;color:var(--muted);font-weight:500;font-size:14px;line-height:1.35;}
.metrics{margin-top:10px;display:flex;gap:10px;flex-wrap:wrap;color:#0f172a;font-weight:900;}
.metrics span{background:var(--pill);border:1px solid #d6e3ff;border-radius:999px;padding:8px 10px;font-size:13px;}
.form-aw,
.form-turf{
  color:inherit;
  font-weight:600;
}

.navrow{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 8px;}
.navrow a{text-decoration:none;}
.navbtn{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 14px;border-radius:14px;border:1px solid var(--line);
  background:#fff;font-weight:950;color:#0f172a;
}
.navbtn:hover{background:var(--pill);text-decoration:none;}

/* Admin */
.toolgrid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:12px;
}
.toolcard{
  grid-column:span 12;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  padding:14px;
}
.toolcard h3{margin:0 0 10px;}
.toolcard .subline{margin-top:0;}

.toolcard details{
  width:100%;
}

.toolcard summary.admin-summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-weight:950;
  color:var(--brand-strong);
  padding:2px 0 6px;
}

.toolcard summary.admin-summary::-webkit-details-marker{
  display:none;
}

.toolcard .admin-summary-main{
  min-width:0;
}

.toolcard .admin-summary-title{
  font-size:20px;
  font-weight:950;
  letter-spacing:-0.02em;
  color:var(--brand-strong);
}

.toolcard .admin-summary-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

.toolcard .admin-summary-icon{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border:1px solid var(--line);
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fbff;
  color:var(--brand-strong);
  font-size:18px;
  font-weight:900;
}

.toolcard details .admin-summary-icon::before{
  content:"+";
}

.toolcard details[open] .admin-summary-icon::before{
  content:"−";
}

.toolcard .admin-body{
  margin-top:12px;
}

.runner-silk{
  width:36px;
  height:26px;
  object-fit:contain;
  display:block;
  border-radius:4px;
  background:transparent;
}

.runner-silk-wrap{
  flex:0 0 auto;
  width:40px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  margin-right:10px;
}

.runner-main{
  min-width:0;
  flex:1 1 auto;
}

/* ===== Placepot Ticket Layout ===== */

.placepot-home-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.placepot-home-meeting{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}

.placepot-home-meeting summary{
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  background:#fbfcff;
}

.placepot-home-meeting summary::-webkit-details-marker{
  display:none;
}

.placepot-home-course{
  font-size:15px;
  font-weight:950;
  color:var(--brand-strong);
  line-height:1.15;
}

.placepot-home-meta{
  margin-top:3px;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  line-height:1.25;
}

.placepot-home-perms{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:4px 8px;
  font-size:11px;
  white-space:nowrap;
}

.placepot-archive-status-won{
  border-color:#86efac !important;
  background:#ecfdf5 !important;
  color:#166534 !important;
}

.placepot-archive-status-lost{
  border-color:#fecaca !important;
  background:#fff1f2 !important;
  color:#991b1b !important;
}

.placepot-archive-status-pending{
  border-color:#bfdbfe !important;
  background:#eff6ff !important;
  color:#1e3a8a !important;
}

.placepot-home-list{
  display:flex;
  flex-direction:column;
  padding:0 12px 10px;
}

.placepot-home-row{
  display:grid;
  grid-template-columns:86px minmax(0,92px) minmax(0,1fr);
  align-items:center;
  gap:4px;
  padding:6px 0;
  border-top:1px solid #eef2f7;
}

.placepot-home-time{
  font-size:12px;
  font-weight:950;
  color:var(--brand-strong);
  letter-spacing:-0.01em;
  white-space:nowrap;
}

.placepot-home-picks{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:nowrap;
  min-width:0;
}

.placepot-home-result-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  min-width:0;
}

.placepot-home-result{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:nowrap;
  min-width:0;
}

.placepot-home-result-label{
  font-size:10px;
  font-weight:800;
  color:var(--muted);
  opacity:.6;
  text-transform:lowercase;
  letter-spacing:.02em;
  white-space:nowrap;
}

.pp-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  padding:1px 0;
  font-size:13px;
  font-weight:900;
  color:var(--text);
  line-height:1.1;
}

.pp-num.match{
  padding:2px 6px;
  border-radius:999px;
  border:1px solid #86efac;
  background:#ecfdf5;
  color:#166534;
}

.pp-num.replacement{
  padding:2px 6px;
  border:1px solid #93a8cc;
  border-radius:999px;
}

.pp-num.match.replacement{
  border-color:#6f8fc2;
}

.pp-dot{
  display:inline-block;
  width:9px;
  height:9px;
  border-radius:999px;
  margin-left:7px;
  vertical-align:middle;
}

.pp-dot-green{
  background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.14);
}

.pp-dot-red{
  background:#ef4444;
  box-shadow:0 0 0 3px rgba(239,68,68,.12);
}

.pp-status-dot{
  display:inline-block;
  width:9px;
  height:9px;
  border-radius:50%;
  margin-right:6px;
  vertical-align:middle;
}

.pp-status-green{
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,.65);
}

.pp-status-red{
  background:#ef4444;
  box-shadow:0 0 6px rgba(239,68,68,.6);
}

.placepot-home-row.miss .placepot-home-result .pp-num{
  color:#64748b;
}

.placepot-home-row-link{
  text-decoration:none;
  color:inherit;
  display:grid;
}

.placepot-home-row-link:hover{
  text-decoration:none;
  background:#f8fbff;
  border-radius:10px;
}

.placepot-home-row-link .placepot-home-time{
  color:var(--brand-strong);
}

.placepot-date-group{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  margin-bottom:10px;
  overflow:hidden;
}

.placepot-date-summary{
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  background:#f8fbff;
  color:var(--brand-strong);
  font-weight:950;
}

.placepot-date-summary::-webkit-details-marker{
  display:none;
}

.placepot-date-group .placepot-home-wrap{
  padding:10px 12px 12px;
}

.placepots-page{
  width:min(900px,100%);
  margin:0 auto;
}
.placepots-page-header{
  margin:0 0 16px;
}
.placepots-page-header h1{
  margin:0;
  color:var(--brand-strong);
}
.placepots-page-header p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:14px;
  font-weight:750;
}
.placepots-page-current{
  margin-bottom:14px;
}
.placepots-page-current h2{
  margin:0 0 9px;
  color:var(--brand-strong);
  font-size:18px;
}
.placepots-page .shortlist-placepot-card{
  grid-column:auto;
  min-width:0;
}
.placepots-page .previous-placepots-section{
  margin-top:14px;
}
.placepots-page-empty{
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  text-align:center;
}
.racecards-home-drawer{
  margin-top:10px;
}
.racecards-home-drawer .racecards-summary-title{
  min-width:0;
}
.racecards-home-drawer[open] > .racecards-summary .results-chevron{
  transform:rotate(90deg);
}

.future-page-sections{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:12px;
}
.future-page-sections > .home-secondary-drawer,
.future-date-sections .dayblock,
.future-date-sections .home-secondary-drawer{
  margin:0;
}
.future-racecards-drawer[open] > .racecards-summary .results-chevron,
.future-date-drawer[open] > .home-section-summary .results-chevron{
  transform:rotate(90deg);
}
.future-page-sections .racecards-day-drawer > .inner,
.future-date-drawer > .inner{
  padding:9px;
}
.future-page-sections .meetblock{
  margin:0 0 8px;
  padding:0 !important;
}
.future-page-sections .meetblock:last-child{
  margin-bottom:0;
}
.future-page-sections .meetdetails{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.future-page-sections .meetdetails > summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:9px;
  padding:10px 11px;
}
.future-page-sections .meeting-title-line{
  min-width:0;
}
.future-page-sections .meetmeta{
  justify-content:flex-end;
  align-self:center;
  flex-wrap:nowrap;
}
.future-page-sections .meetdetails > .inner{
  padding:7px 10px 9px;
  border-top:1px solid var(--line);
}

@media (max-width:767px){
  .future-page-sections{
    gap:10px;
  }
  .future-page-sections > .home-secondary-drawer,
  .future-date-sections .home-secondary-drawer{
    width:100%;
    max-width:100%;
    border-radius:12px !important;
  }
  .future-page-sections > .home-secondary-drawer > summary,
  .future-date-sections .home-secondary-drawer > summary{
    min-height:52px;
    padding:10px 12px !important;
    align-items:center;
    gap:8px;
  }
  .future-page-sections .result-section-title{
    min-width:0;
    font-size:16px;
    line-height:1.1;
  }
  .future-page-sections .home-secondary-count{
    min-height:24px;
    padding:3px 8px;
    font-size:10px;
  }
  .future-page-sections .racecards-day-drawer > .inner,
  .future-date-drawer > .inner{
    padding:7px;
  }
  .future-page-sections .meetdetails > summary{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start !important;
    gap:8px !important;
    padding:10px 11px !important;
  }
  .future-page-sections .meeting-title-line{
    min-width:0;
  }
  .future-page-sections .meetmeta{
    max-width:112px;
    justify-content:flex-end;
    align-self:center;
    flex-wrap:nowrap;
  }
  .future-page-sections .meetmeta .chip{
    max-width:100%;
    white-space:nowrap;
  }
  .future-page-sections .meeting-time-meta{
    white-space:nowrap;
  }
  .future-page-sections .confidence-picks-grid{
    grid-template-columns:minmax(0,1fr);
  }
}

.perf-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
}

.perf-kpi{
  padding:12px 14px;
  border:1px solid #dbe3ee;
  border-radius:12px;
  background:#fff;
}

.perf-kpi.soft{
  background:#f8fbff;
}

.perf-kpi .lbl{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.perf-kpi .val{
  margin-top:4px;
  font-size:22px;
  font-weight:950;
  color:var(--brand-strong);
}

.perf-kpi .val-sm{
  margin-top:4px;
  font-weight:900;
  color:var(--brand-strong);
}

#perfOutput{
  width:100%;
}

#perfOutput .perf-kpis{
  width:100%;
}

#perfOutput table{
  width:100%;
}

@media (min-width: 860px){
  .toolcard.wide{grid-column:span 7;}
}

.input,
.select{
  width:100%;
  padding:14px 14px;
  font-size:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.label{
  color:var(--muted);
  font-weight:900;
  margin-bottom:6px;
  display:block;
}
.formrow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.formcol{flex:1;min-width:220px;}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
.minihelp{color:var(--muted);font-size:12px;margin-top:6px;font-weight:700;}

.result-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.result-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#f8fafc;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  line-height:1;
}

.result-value{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:var(--text);
  font-size:13px;
  font-weight:950;
  line-height:1;
}

.result-sp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #d6e3ff;
  background:var(--pill);
  color:var(--brand-strong);
  font-size:12px;
  font-weight:900;
  line-height:1;
}

@media (max-width: 640px){
  .wrap{padding:12px 10px 28px;}
  .shell{border-radius:18px;}
  .header{padding:6px 12px 8px;}
  .site-logo{width:min(230px,100%);height:auto;}
  .content{padding:12px;}

  h1{font-size:30px;line-height:1.05;margin-bottom:6px;}
  h2{font-size:28px;}
  .subline{font-size:13px;line-height:1.35;}

  .navrow{gap:8px;margin:8px 0 10px;}
  .navbtn{
    padding:10px 12px;
    border-radius:14px;
    font-size:15px;
    min-height:44px;
  }

  .topnav{
    width:100%;
  }

  .segmented{
    display:flex;
    width:100%;
    margin-top:8px;
  }

  .segmented .pill{
    flex:1 1 0;
    min-width:0;
    justify-content:center;
    text-align:center;
    padding:8px 10px;
  }

  .pill{
    padding:9px 12px;
    font-size:13px;
  }

  .chip{
    padding:5px 9px;
    font-size:11px;
    margin:2px 5px 2px 0;
  }

  .chip.brand{
    font-size:12px;
  }

  .hero{
    padding:0 0 2px;
    gap:10px;
  }

  .hero h1{
    font-size:28px;
  }

  .hero .kpis{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:8px;
  }

  .kpi{
    min-width:0;
    padding:9px 10px;
    border-radius:12px;
  }

  .kpi .lbl{
    font-size:11px;
  }

  .kpi .val{
    font-size:17px;
  }

  .race-date-kicker{
    font-size:13px;
  }

  .past-row{
    grid-template-columns:56px minmax(0,1fr);
    gap:8px;
    padding:6px 0;
  }

  .past-time{
    font-size:15px;
  }

  .past-picks{
    gap:3px;
  }

  .past-pickline{
    gap:4px;
    font-size:10px;
  }

  .past-pickline .pickname{
    font-size:12px;
  }

  .race-nav-strip{
    gap:5px;
    margin:8px 0 12px;
    padding:0 0 2px;
  }

  .race-nav-time{
    min-width:46px;
    font-size:11px;
    padding:6px 8px;
  }

  .race-head-row{
    align-items:flex-start;
    gap:6px;
    margin-bottom:2px;
  }

  .race-mini-nav{
    gap:8px;
  }

  .race-mini-nav-btn{
    width:32px;
    height:32px;
    font-size:18px;
  }

  .previous-filter-row{
    gap:10px;
    align-items:stretch;
  }

  .previous-filter-field{
    flex:1 1 100%;
    min-width:0;
  }

  .previous-filter-actions{
    width:100%;
    gap:8px;
  }

  .previous-filter-actions .pill{
    min-width:96px;
    padding:9px 14px;
  }

  .results-priority + .results-sections{
    margin-top:8px;
  }

  .results-priority .latest-results-drawer{
    margin-top:0;
    border-radius:12px !important;
  }

  .results-sections{
    gap:8px;
    margin-top:8px;
  }

  .results-sections .drawer{
    border-radius:12px !important;
  }

  .results-sections > .drawer > summary,
  .results-sections .previous-placepots-section > .drawer > summary{
    min-height:44px;
    padding:9px 11px;
  }

  .results-sections .result-section-title,
  .latest-results-drawer .result-section-title{
    font-size:14px;
  }

  .results-sections .result-section-trailing{
    gap:5px;
  }

  .results-sections .result-section-trailing .chip{
    padding:3px 7px;
    font-size:10px;
  }

  .results-sections > .drawer > .inner,
  .results-sections .previous-placepots-section > .drawer > .inner{
    padding:8px 10px 10px;
  }

  .results-sections .previous-filter-form{
    margin:0 0 8px;
    padding:0;
  }

  .results-sections .results-date-picker-form{
    margin:0;
  }

  .results-sections .previous-filter-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:end;
  }

  .results-sections .previous-filter-field{
    min-width:0;
  }

  .results-sections .previous-filter-label{
    margin-bottom:4px;
    font-size:11px;
  }

  .results-sections .previous-filter-actions{
    width:auto;
    flex-wrap:nowrap;
    gap:5px;
  }

  .results-sections .previous-filter-actions .pill{
    min-width:58px;
    padding:9px 10px;
  }

  .results-sections .results-date-picker .previous-filter-row{
    grid-template-columns:minmax(0,1fr);
  }

  .results-sections .results-date-picker .previous-filter-actions{
    width:100%;
  }

  .results-sections .results-date-picker .previous-filter-actions .pill{
    width:100%;
  }

  .results-sections .dayblock{
    margin-top:6px;
  }

  .results-sections .dayblock > .drawer > summary{
    min-height:42px;
    padding:8px 10px;
    font-size:12px;
  }

  .placepots-page-header{
    margin-bottom:12px;
  }
  .placepots-page-header h1{
    font-size:25px;
  }
  .placepots-page-header p{
    font-size:12px;
  }
  .placepots-page-current h2{
    font-size:16px;
  }

  .results-sections .dayblock > .drawer > .inner{
    padding:7px 8px 8px;
  }

  .results-sections .performance-highlight-card{
    padding:8px 9px;
  }

  .performance-highlight-row{
    padding:6px 0;
  }

  .results-sections .performance-highlight-summary{
    font-size:11px;
  }

  .top-callout,
  .next-callout{
    padding:9px 10px;
    border-radius:13px;
    margin:8px 0;
  }

  .top-callout .chip,
  .next-callout .chip{
    padding:4px 8px;
    font-size:10px;
  }

  .top-callout .muted,
  .next-callout .muted{
    font-size:12px;
    line-height:1.25;
    margin-top:5px;
  }

  .top-summary-grid{
    grid-template-columns:1fr;
    gap:8px;
  }

  .top-summary-card{
    padding:10px 11px;
    border-radius:14px;
  }

  .top-summary-title{
    font-size:14px;
  }

  .top-summary-racename{
    font-size:12px;
  }

  .top-summary-pickline{
    gap:5px;
  }

  .today-shortlist{
    padding:12px;
    border-radius:17px;
  }

  .shortlist-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }

  .shortlist-heading h1{
    font-size:24px;
  }

  .shortlist-grid-primary,
  .shortlist-grid-secondary{
    grid-template-columns:1fr;
  }

  .racecards-secondary{
    padding:12px;
    border-radius:17px;
  }

  .shortlist-card{
    padding:11px;
  }

  .shortlist-horse{
    font-size:16px;
  }

  .placepot-home-wrap{
    gap:8px;
  }

  .placepot-home-meeting{
    border-radius:12px;
  }

  .placepot-home-meeting summary{
    padding:9px 10px;
    gap:8px;
  }

  .placepot-home-course{
    font-size:14px;
  }

  .placepot-home-meta{
    font-size:11px;
  }

  .placepot-home-perms{
    font-size:10px;
    padding:3px 7px;
  }

  .previous-placepots-section .placepot-home-head{
    display:grid;
    grid-template-columns:minmax(115px,1fr) auto;
    align-items:center;
    gap:10px;
  }

  .previous-placepots-section .placepot-home-perms{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    width:max-content;
    max-width:145px;
    min-width:0;
    margin-left:0;
    padding:5px 7px;
    border-radius:11px;
    justify-self:end;
    white-space:normal;
    line-height:1.25;
    text-align:left;
  }

  .previous-placepots-section .placepot-perms-sep{
    display:none;
  }

  .placepot-home-list{
    padding:0 10px 9px;
  }

  .placepot-home-row{
    grid-template-columns:78px minmax(0,74px) minmax(0,1fr);
    gap:3px;
    padding:5px 0;
  }

  .placepot-home-time{
    font-size:11px;
  }

  .placepot-home-picks{
    gap:3px;
  }

  .placepot-home-result-wrap{
    gap:3px;
  }

  .placepot-home-result{
    gap:3px;
  }

  .placepot-home-result-label{
    font-size:9px;
  }

  .placepot-home-result-label{
    display:none;
  }

  .pp-num{
    font-size:12px;
    min-width:18px;
  }

  .meetdetails summary{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  .meetblock .time-row{
    padding:7px 0;
  }

  .drawer .inner .dayblock,
  .drawer .inner .meetblock{
    padding:0 8px 8px;
  }

  .meetblock{
    margin-top:4px;
  }

  .meetdetails summary{
    gap:4px;
    padding-bottom:4px;
  }

  .meeting-title-line{
    font-size:14px;
  }

  .meeting-time-meta{
    margin-top:2px;
    font-size:11px;
    line-height:1.15;
  }

  .meetblock .time-row{
    padding:4px 0;
    gap:2px;
  }
}

@media (max-width:767px){
  .home-priority-sections{
    --section-margin:12px;
    --card-padding:12px;
    --item-gap:8px;
    --small-gap:6px;
    --title-gap:6px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .home-priority-sections .next-race-panel{
    order:1;
    margin:0;
  }

  .home-priority-sections .selection-builder{
    order:3;
    margin:0;
  }

  .home-priority-sections .today-shortlist-drawer{
    order:4;
    margin:0;
  }

  .home-priority-sections .confidence-picks-drawer{
    order:5;
    margin:0;
  }

  .home-priority-sections .placepots-drawer{
    order:6;
    margin:0;
  }

  .home-priority-sections .home-tracked-runners{
    order:7;
    margin:0;
  }

  .home-priority-sections .racecards-home-drawer{
    order:8;
    margin:0;
  }

  .home-priority-sections .today-shortlist{
    margin:0;
    padding:var(--card-padding);
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  .home-priority-sections > .today-shortlist-drawer > .inner{
    padding:0;
  }

  .home-priority-sections > .today-shortlist-drawer .shortlist-heading .shortlist-kicker{
    display:none;
  }

  .home-priority-sections .latest-results-drawer{
    order:2;
    margin:0;
  }

  .home-priority-sections .next-race-panel > .drawer,
  .home-priority-sections > .latest-results-drawer,
  .home-priority-sections > .selection-builder,
  .home-priority-sections > .today-shortlist-drawer,
  .home-priority-sections > .home-secondary-drawer{
    border-radius:12px !important;
  }

  .home-priority-sections .next-race-panel > .drawer > summary,
  .home-priority-sections > .latest-results-drawer > summary,
  .home-priority-sections > .selection-builder > summary,
  .home-priority-sections > .today-shortlist-drawer > summary,
  .home-priority-sections > .home-secondary-drawer > summary{
    min-height:52px;
    padding:10px 12px !important;
    align-items:center;
    gap:8px;
    font-weight:950;
  }

  .home-priority-sections .result-section-title,
  .home-priority-sections .next-race-heading{
    font-size:16px;
    line-height:1.1;
  }

  .home-priority-sections .result-section-subtitle{
    margin-top:1px;
    font-size:11px;
    line-height:1.15;
  }

  .home-priority-sections .results-chevron{
    flex:0 0 auto;
    align-self:center;
  }

  .home-priority-sections .shortlist-heading{
    gap:var(--title-gap);
    margin-bottom:var(--item-gap);
  }

  .home-priority-sections .shortlist-grid{
    gap:var(--item-gap);
  }

  .home-priority-sections .confidence-picks-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .home-priority-sections > .home-secondary-drawer > .inner{
    padding:8px;
  }

  .home-priority-sections > .racecards-home-drawer > .inner{
    padding:7px;
  }

  .home-priority-sections > .racecards-home-drawer .meetblock{
    margin:0 0 7px !important;
    padding:0 !important;
  }

  .home-priority-sections > .racecards-home-drawer .meetblock:last-child{
    margin-bottom:0 !important;
  }

  .home-priority-sections > .racecards-home-drawer .meetdetails{
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }

  .home-priority-sections > .racecards-home-drawer .meetdetails > summary{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start !important;
    gap:8px !important;
    padding:10px 11px !important;
  }

  .home-priority-sections > .racecards-home-drawer .meeting-title-line{
    min-width:0;
  }

  .home-priority-sections > .racecards-home-drawer .meetmeta{
    max-width:150px;
    justify-content:flex-end;
    align-self:center;
  }

  .home-priority-sections > .racecards-home-drawer .meetdetails > .inner{
    padding:7px 10px 9px;
    border-top:1px solid var(--line);
  }

  .home-priority-sections .home-secondary-count{
    min-height:24px;
    padding:3px 8px;
    font-size:10px;
  }

  .home-priority-sections .home-tracked-runners .shortlist-card{
    width:100%;
  }

  .home-priority-sections .shortlist-grid-secondary{
    margin-top:var(--item-gap);
  }

  .home-priority-sections .shortlist-card{
    padding:var(--card-padding);
    border-radius:12px;
  }

  .home-priority-sections .shortlist-race,
  .home-priority-sections .shortlist-horse,
  .home-priority-sections .shortlist-card-footer,
  .home-priority-sections .shortlist-tracker-count{
    margin-top:var(--small-gap);
  }

  .home-priority-sections .shortlist-double-legs,
  .home-priority-sections .shortlist-tracker-list,
  .home-priority-sections .shortlist-placepot-list{
    gap:var(--small-gap);
    margin:var(--item-gap) 0;
  }

  .home-priority-sections + .racecards-secondary,
  .racecards-secondary + .racecards-secondary{
    margin-top:var(--section-margin,12px);
  }

  .home-priority-sections + .racecards-secondary{
    margin-top:10px;
    padding:0 0 8px;
    border-radius:12px;
  }

  .home-priority-sections + .racecards-secondary .racecards-secondary-heading{
    margin:0;
    padding:10px 12px 5px;
  }

  .home-priority-sections + .racecards-secondary .racecards-secondary-title{
    margin-top:1px;
    font-size:16px;
    line-height:1.1;
  }

  .home-priority-sections + .racecards-secondary .racecards-secondary-note{
    margin:2px 0 0;
    font-size:11px;
    line-height:1.15;
  }

  .home-priority-sections + .racecards-secondary .racecards-secondary-heading .shortlist-kicker{
    font-size:10px;
    line-height:1.1;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer{
    margin:3px 8px 0;
    border-radius:12px !important;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer > summary{
    min-height:52px;
    padding:10px 12px !important;
    align-items:center;
    gap:8px;
    font-weight:950;
  }

  .home-priority-sections + .racecards-secondary .racecards-summary-title{
    min-width:0;
    color:var(--brand-strong);
    font-size:15px;
    font-weight:950;
    line-height:1.15;
  }

  .home-priority-sections + .racecards-secondary .racecards-summary-count{
    color:var(--muted);
    font-size:11px;
    font-weight:850;
    line-height:1;
    white-space:nowrap;
  }

  .home-priority-sections + .racecards-secondary .racecards-summary .results-chevron{
    align-self:center;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer[open] > .racecards-summary .results-chevron{
    transform:rotate(90deg);
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer > .inner{
    padding:7px;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetblock{
    margin:0 0 7px !important;
    padding:0 !important;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetblock:last-child{
    margin-bottom:0 !important;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetdetails{
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetdetails > summary{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start !important;
    gap:8px !important;
    padding:10px 11px !important;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meeting-title-line{
    min-width:0;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetmeta{
    max-width:150px;
    justify-content:flex-end;
    align-self:center;
  }

  .home-priority-sections + .racecards-secondary .racecards-day-drawer .meetdetails > .inner{
    padding:7px 10px 9px;
    border-top:1px solid var(--line);
  }

  .next-race-panel .drawer,
  .next-race-panel .top-summary-card{
    border-radius:12px !important;
  }

  .next-race-panel .drawer summary{
    gap:var(--small-gap,6px);
  }

  .next-race-label-desktop{
    display:none;
  }

  .next-race-label-mobile,
  .next-race-icon{
    display:inline-flex;
    align-items:center;
  }

  .next-race-icon{
    font-size:.92em;
  }

  .today-priority-sections{
    display:flex;
    flex-direction:column;
    gap:12px;
  }

  .today-priority-sections .next-race-panel{
    order:1;
    margin:0;
  }

  .today-priority-sections .latest-results-drawer{
    order:2;
    margin:0;
  }

  .today-priority-sections .predictions-panel{
    order:3;
    margin:0;
  }

  .today-priority-sections .today-racecards{
    order:4;
    min-width:0;
  }
}

@media (max-width: 640px){
  .time-row{
    grid-template-columns:1fr;
    gap:4px;
    padding:7px 8px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:var(--shadow-sm);
    margin-bottom:8px;
  }

  .meetblock .time-row{
    background:transparent;
    box-shadow:none;
    border:none;
    border-radius:0;
    padding:8px 0;
    margin-bottom:0;
  }

  .time-col{
    font-size:16px;
    line-height:1;
    margin-bottom:2px;
  }

  .time-title{
    font-size:15px;
    line-height:1.25;
  }

  .time-meta{
    font-size:12px;
    line-height:1.2;
  }

  .time-picks{
    gap:8px;
    margin-top:2px;
    align-items:stretch;
    width:100%;
  }

  .time-pickline{
    display:block;
    width:100%;
    margin:0;
  }

  .time-pickline > div{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    width:100%;
  }

  .time-pickline .runner-silk{
    width:30px;
    height:22px;
  }

  .time-pickline .pickname{
    font-size:14px;
    line-height:1.2;
  }

  .time-pickline .price-pill,
  .time-pickline .chip{
    font-size:11px;
    padding:5px 8px;
  }

  .cards{
    display:flex;
    gap:10px;
    margin-top:4px;
  }

  .desktop-table{
    display:none;
  }
}

@media (max-width: 640px){
  /* ===== Final mobile overrides ===== */

  .wrap{
    padding:10px 6px 26px !important;
  }

  .content{
    padding:10px 8px !important;
    overflow:hidden !important;
  }

  .drawer{
    border-radius:16px !important;
    overflow:hidden !important;
  }

  .drawer summary{
    padding:10px 12px !important;
  }

  .drawer .inner{
    padding:8px 8px !important;
    overflow:hidden !important;
  }

  h1{
    font-size:28px !important;
    line-height:1.05 !important;
  }

  h2{
    font-size:25px !important;
    line-height:1.05 !important;
  }

  /* Top 3 / Best value cards */
  .top-summary-grid{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
  }

  .top-summary-card{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
    padding:9px 10px !important;
    border-radius:14px !important;
  }

  .top-summary-topline{
    min-width:0 !important;
    width:100% !important;
    gap:6px !important;
  }

  .top-summary-title{
    min-width:0 !important;
    max-width:100% !important;
    font-size:15px !important;
    line-height:1.08 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .top-summary-racename{
    min-height:0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin-top:4px !important;
    font-size:12px !important;
    line-height:1.18 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .top-summary-pickline{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    display:flex !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
    gap:6px !important;
    margin-top:8px !important;
    overflow:hidden !important;
  }

  .top-summary-pickline .next-race-runner{
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .top-summary-pickline .next-race-chips{
    flex:0 0 auto !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:4px !important;
    margin-left:auto !important;
    max-width:96px !important;
  }

  .top-summary-pickline.next-race-pickline{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    align-items:center !important;
    gap:5px !important;
    overflow:visible !important;
  }

  .top-summary-pickline.next-race-pickline .next-race-runner{
    width:100% !important;
    max-width:100% !important;
  }

  .top-summary-pickline.next-race-pickline .next-race-chips{
    width:auto !important;
    max-width:none !important;
    margin-left:0 !important;
    justify-self:start !important;
    justify-content:flex-start !important;
  }

  .top-summary-pickline .runner-silk,
  .compact-pick-row .runner-silk,
  .time-pickline .runner-silk{
    width:22px !important;
    height:17px !important;
    flex:0 0 22px !important;
    margin-right:0 !important;
  }

  .top-summary-pickline .pickname{
    display:block !important;
    flex:1 1 auto !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    font-size:13px !important;
    line-height:1.1 !important;
  }

  .top-summary-pickline .price-pill,
  .top-summary-pickline .chip,
  .time-pickline .chip,
  .compact-pick-row .chip,
  .price-pill,
  .past-pickline .chip{
    padding:2px 6px !important;
    font-size:10px !important;
    line-height:1 !important;
    margin:0 !important;
    white-space:nowrap !important;
  }

  /* Meeting blocks */
  .meetblock{
    margin-top:8px !important;
  }

  .meetdetails summary{
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:5px !important;
    padding-bottom:5px !important;
  }

  .meeting-title-line{
    font-size:14px !important;
    line-height:1.1 !important;
  }

  .meeting-time-meta{
    margin-top:3px !important;
    font-size:12px !important;
    font-weight:700 !important;
    line-height:1.25 !important;
  }

  .meetmeta{
    gap:4px !important;
  }

  .meetmeta .chip{
    padding:3px 7px !important;
    font-size:10px !important;
  }

  .meetblock .time-row,
  .confidence-drawer .time-row{
    padding:6px 0 !important;
    gap:3px !important;
  }

  .time-col,
  .past-time{
    font-size:14px !important;
    line-height:1 !important;
  }

  .time-title,
  .past-pickline .pickname,
  .compact-pick-row .pickname{
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    font-size:13px !important;
    line-height:1.14 !important;
    letter-spacing:-0.02em !important;
  }

  .time-meta,
  .past-pickline,
  .compact-pick-row .pick-price,
  .hot-combo-note{
    font-size:11px !important;
    line-height:1.15 !important;
    margin-top:2px !important;
  }

  .time-picks{
    gap:3px !important;
    margin-top:3px !important;
  }

  .compact-pick-row{
    gap:4px !important;
    line-height:1.1 !important;
  }

  .horse-history-row{
    display:grid;
    grid-template-columns:96px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    padding:10px 0;
    border-top:1px solid #eef2f7;
  }
  
  .horse-history-row:first-child{
    border-top:0;
  }
  
  .horse-history-result{
    display:flex;
    align-items:center;
    gap:6px;
    justify-content:flex-end;
    flex-wrap:wrap;
  }
  
  .horse-history-result .history-inline-label{
    margin:0 2px 0 8px;
  }
  
  @media(max-width:640px){
    .horse-history-result{
      justify-content:flex-start;
    }
  }

  /* Racecard runner cards */
  .rcard{
    padding:8px 10px !important;
    border-radius:14px !important;
    margin-bottom:10px !important;
  }

  .rcard .name{
    font-size:18px !important;
    line-height:1.02 !important;
    letter-spacing:-0.03em !important;
  }

  .kv{
    margin-top:4px !important;
    font-size:12px !important;
    line-height:1.2 !important;
  }

  .result-row{
    margin-top:6px !important;
    gap:5px !important;
  }

  .metrics-card-row{
    margin-top:6px !important;
    gap:5px !important;
  }

  .metrics-card-row span{
    padding:5px 8px !important;
    font-size:11px !important;
  }

  .runner-silk{
    width:26px !important;
    height:20px !important;
  }

  .pick-heart{
    width:34px !important;
    height:34px !important;
    top:8px !important;
    right:8px !important;
  }
}
