

:root{
  --bg: #f5f6f7;
  --card: #ffffff;
  --text: #111111;
  --muted: #5d6470;
  --border: #e3e6ea;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --radius: 16px;
  --radius-sm: 12px;
  --accent: #111111;
  --accent-2: #ffffff;
}

*{ box-sizing: border-box; }

html, body{ height: 100%; overflow-x: hidden; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container{
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.muted{ color: var(--muted); font-size: 13px; }
.error{ color: #b00020; font-size: 14px; }
.toast{
  font-size: 13px;
  color: var(--text);
  background: #eef0f2;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}

a{ color: inherit; text-underline-offset: 3px; }


.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245,246,247,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand-mark{
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: .3px;
}
.brand-text{ display: grid; line-height: 1.1; }
.brand-name{ font-weight: 800; letter-spacing: .3px; }
.brand-tagline{ font-size: 12px; color: var(--muted); }

.nav{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-link{
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav-link:hover{
  background: rgba(17,17,17,.06);
  border-color: rgba(17,17,17,.10);
}
.nav-sep{ color: rgba(0,0,0,.25); }
.nav-cta{
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17,17,17,.12);
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.nav-cta:hover{ background: rgba(255,255,255,.9); }

.nav-user{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-user form{ display: inline; }

.site-footer{
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.site-footer .footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.footer-x{
  text-decoration: none;
}


.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 16px 0;
}
.card-sub{
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fafbfc;
  padding: 14px;
  box-shadow: none;
}
.card-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.h1{ font-size: 40px; margin: 0; letter-spacing: -.3px; }
.h2{ font-size: 24px; margin: 0; letter-spacing: -.2px; }
.pill-row{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
}

.section-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}


button, .btn, .btn-secondary, .btn-small{
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-2);
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.08);
}
.btn:hover{ filter: brightness(0.95); }
.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eef0f2;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
}
.btn-secondary:hover{ background: #e8eaed; }
.btn-small{
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef0f2;
  border: 1px solid var(--border);
}
.actions{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }


label{ display:block; font-size: 14px; margin-bottom: 6px; }
input, select, textarea{
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfd6de;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.2;
  background: #fff;
}
input[type="checkbox"]{ width: auto; }

.field{ display:flex; flex-direction: column; gap: 6px; }

.grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  align-items: end;
}
.grid-2{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: start;
}

@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .grid-2{ grid-template-columns: 1fr; }
  .h1{ font-size: 34px; }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
  .container{ width: calc(100% - 28px); }
}


ul{ list-style:none; margin:0; padding:0; }
li{ margin: 6px 0; }
li label{ display:inline; font-size: 14px; }


.dropdown{ position: relative; width: 100%; }

.dropdown > summary{
  list-style: none;
  cursor: pointer;
  border: 1px solid #cfd6de;
  border-radius: 12px;
  padding: 10px 12px;
  height: 40px;
  display:flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  font-size: 14px;
  user-select: none;
}
.dropdown > summary::-webkit-details-marker{ display:none; }

.dropdown > summary .hint{
  color: var(--muted);
  font-size: 13px;
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.dropdown-panel{
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.10);
  max-height: 260px;
  overflow: auto;
}
.dropdown-panel li{ margin: 8px 0; }
.dropdown-panel input[type="checkbox"]{ margin-right: 8px; }


.table-toolbar{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.table-container{
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  max-height: 560px;
  background: #fff;
}
table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td{
  padding: 10px 10px;
  border-bottom: 1px solid #edf0f2;
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
}
thead th{
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fafbfc;
  border-bottom: 1px solid #e6eaee;
}
tbody tr:nth-child(even){ background: #fcfcfd; }
tbody tr:hover{ background: #f2f4f7; }

.table-center th, .table-center td{ text-align: center; }


.hero-copy{ min-width: 0; }

.hero{
  display: grid;
  gap: 10px;
}

.hero.card{ overflow: hidden; }
.hero-brand{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-actions{ display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.market-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}
@media (max-width: 900px){
  .market-grid{ grid-template-columns: 1fr; }
}
.market-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.market-cover{
  width: 100%;
  height: auto;
  display: block;
  background: #f0f2f4;
}
.market-body{ padding: 14px; }
.market-title{ font-weight: 700; margin: 0 0 6px; }
.market-subtitle{ color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.market-outcomes{ display:flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 0; }
.market-outcomes li{
  margin:0;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: #fafbfc;
}


.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}


.brand-logo{
  width: 38px;
  height: 38px;
  border-radius: 2px;
  display: block;
  object-fit: cover;
}
.brand-text { display: grid; line-height: 1.05; }
.brand-name { font-weight: 800; letter-spacing: 0.2px; }
.brand-tagline { color: var(--muted); font-size: 13px; }

.nav { display: flex; align-items: center; gap: 10px; }
.nav-muted { color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f3f4f6;
  font-size: 12px;
  margin-left: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions > *{ align-self: center; }
.header-actions form{ margin: 0; display: flex; align-items: center; }
.header-actions form button{ align-self: center; }

.auth {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.cta {
  padding: 10px 14px;
  border-radius: 999px;
}


.collapsible > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.collapsible > summary::-webkit-details-marker { display: none; }

.collapsible.more-filters > summary {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  font-size: 14px;
}

.tag-tools > summary {
  margin: 0 0 12px;
}


.filters .grid {
  gap: 10px;
}

.filters label {
  margin-bottom: 5px;
}

.filters .row {
  margin-top: 10px;
}

.compact-pager select,
.compact-pager input {
  width: 110px !important;
  min-width: 110px;
  height: 36px;
}

.compact-pager button {
  height: 36px;
  padding: 0 12px;
}

@media (max-width: 880px) {
  .header-inner { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .header-actions { order: 2; width: 100%; justify-content: space-between; }
}

.dash-split{
  display:flex;
  gap:16px;
  align-items:stretch;

  height: calc(100vh - 120px);
}

.dash-left{
  flex: 0 0 360px;
  min-width: 320px;
  overflow: auto;
  padding-right: 4px;
}

.dash-right{
  flex: 1 1 auto;
  overflow: auto;
  padding-left: 4px;
}


@media (max-width: 980px){
  .dash-split{ flex-direction:column; height:auto; }
  .dash-left, .dash-right{ overflow: visible; padding:0; min-width:0; }
}

.dash-right .table-container{ max-height: none; }

.x-link {
  display: inline-flex;
  align-items: center;
  padding: 2px;
}

.x-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.tag-stack{
  display:flex;
  gap:6px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
}

.tag-frame{
  --tag-color: #cbd5e1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 6px;
  border-radius:2px;
  border:4px solid var(--tag-color);
  background: rgba(17, 24, 39, 0.03);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-color, #999) 30%, transparent);
  color:#111;
  font-size:12px;
  line-height:1.2;
  white-space:nowrap;
}

.tag-frame.empty{
  border-style:dashed;
  color:#666;
  background: transparent;
}




.logout-form{
  margin: 0;
  display: flex;
  align-items: center;
}

.pm-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

@media (max-width: 900px){
  .pm-grid{ grid-template-columns: 1fr; }
}

.pm-card{
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.pm-card:hover{
  border-color: rgba(0,0,0,.18);
}

.pm-cover{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background: #f0f2f4;
}

.pm-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-cover-placeholder{
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: #eef1f5;
}

.pm-body{
  padding: 14px;
  display: grid;
  gap: 10px;
}

.pm-title{
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}

.pm-rotator{
  position: relative;
  min-height: 78px;
}

.pm-outcome-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  display: grid;
  gap: 10px;
}

.pm-outcome-slide.is-active{
  opacity: 1;
  transform: translateY(0);
}

.pm-outcome{
  font-size: 14px;
  font-weight: 650;
  color: rgba(0,0,0,.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-buttons{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pm-btn{
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.pm-btn span,
.pm-btn strong{
  font-size: 15px;
  font-weight: 700;
  opacity: 1;
  letter-spacing: 0.1px;
}

.pm-yes{
  background: #16a34a;
  color: #fff;
}

.pm-no{
  background: #ef4444;
  color: #fff;
}

.pm-footer{
  margin-top: 2px;
}

.pm-linkhint{
  font-size: 13px;
  color: var(--muted);
}

.hero-ticker{
  max-width: 100%;
  margin-top: 14px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  width: 100%;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}
.ticker-viewport{
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  padding: 0 18px;
  min-width: 0;
}
.ticker-track{
  display: inline-flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
  will-change: transform;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ticker-viewport::before,
.ticker-viewport::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  pointer-events: none;
  z-index: 3;
}

.ticker-viewport::before{
  left: 0;
  background: linear-gradient(to right, #fff 70%, rgba(255,255,255,0));
}

.ticker-viewport::after{
  right: 0;
  background: linear-gradient(to left, #fff 70%, rgba(255,255,255,0));
}

.ticker-item{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
}
.ticker-item:hover{ text-decoration: underline; }
.ticker-event{ font-weight: 650; }
.ticker-sep{ color: var(--muted); }
.ticker-outcome{ color: var(--muted); }
.ticker-odds{ font-weight: 650; }


.ticker-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.14);
  color: rgb(22, 163, 74);
  font-weight: 650;
}
.ticker-pill-label{ color: inherit; }
.ticker-pill-odds{ font-weight: 800; color: inherit; }


.site-footer .footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.footer-center--issue{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-26px);
}



.issue-report-btn{
  appearance: none;
  background: transparent;
  border: 1px solid rgba(17,17,17,0.28);
  color: var(--muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.1;
}
.issue-report-btn:hover{
  background: rgba(17,17,17,0.05);
  border-color: rgba(17,17,17,0.35);
  color: var(--text);
}



.issue-modal-backdrop{
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(0,0,0,0.35) !important;
}
.issue-modal-backdrop[hidden]{
  display: none !important;
}

.issue-modal{
  width: min(560px, 100%) !important;
  max-height: 85vh !important;
  overflow: auto !important;
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 50px rgba(0,0,0,0.18) !important;
}

.issue-modal-header{
  position: sticky;
  top: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}
.issue-modal-title{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.issue-modal-close{
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}
.issue-modal-body{
  padding: 12px 14px;
}
.issue-field{ display:block; margin-bottom: 12px; }
.issue-label{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.issue-modal-actions{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.issue-modal-status{ font-size: 12px; }
.issue-modal-buttons{ display:flex; gap: 8px; }
