/* V5L: Home-only bridge. Legacy DOM classes remain the behavior contract. */
.atlas-v5-home {
  --background: var(--atlas-v5-background);
  --surface: var(--atlas-v5-surface-solid);
  --surface-2: var(--atlas-v5-secondary-surface);
  --text: var(--atlas-v5-text);
  --muted: var(--atlas-v5-muted);
  --line: var(--atlas-v5-border);
  --success: var(--atlas-v5-success-text);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.atlas-v5-home .topbar {
  max-width: var(--atlas-v5-layout-header);
  padding: 20px 16px;
  gap: 20px;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
}
.atlas-v5-home .brand { min-width: 0; gap: 12px; flex: 0 1 auto; }
.atlas-v5-home .brand-logo { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; filter: none; }
.atlas-v5-home .brand-line { flex-wrap: wrap; gap: 6px 10px; }
.atlas-v5-home .brand h1 { color: var(--atlas-v5-primary); font-size: 1.05rem; white-space: normal; line-height: 1.3; }
.atlas-v5-home .brand p { font-size: .75rem; color: var(--atlas-v5-muted); }
.atlas-v5-home .version { padding: 4px 7px; color: var(--atlas-v5-primary); background: var(--atlas-v5-badge-surface); font-size: .7rem; }
.atlas-v5-home .service-status { width: 100%; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--atlas-v5-radius-control); }
.atlas-v5-home .service-status div { padding: 10px 14px; background: var(--atlas-v5-surface); border-bottom: 0; border-right: 1px solid var(--atlas-v5-border); }
.atlas-v5-home .service-status div:last-child { border-right: 0; }
.atlas-v5-home .service-status strong { color: var(--atlas-v5-primary); font-size: .75rem; }
.atlas-v5-home .service-status span { color: var(--atlas-v5-success-text); font-size: .75rem; margin-top: 2px; }
.atlas-v5-home .main-nav {
  max-width: var(--atlas-v5-layout-header);
  margin-inline: auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  background: transparent;
}
.atlas-v5-home .main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--atlas-v5-control-min-height);
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--atlas-v5-radius-control);
  color: var(--atlas-v5-muted);
  background: transparent;
  font-size: .8125rem;
  font-weight: 650;
}
.atlas-v5-home .main-nav a.active { color: var(--atlas-v5-primary); background: var(--atlas-v5-badge-surface); border-color: var(--atlas-v5-border); }
.atlas-v5-home .main-nav a:hover { color: var(--atlas-v5-primary); background: var(--atlas-v5-hover-surface); border-color: var(--atlas-v5-border); }
.atlas-v5-home .main-nav .admin-nav-button { margin-left: 0; box-shadow: none; }
.atlas-v5-home .container { width: min(var(--atlas-v5-layout-content), calc(100% - 32px)); padding: 28px 0; }
.atlas-v5-home .dashboard-head { flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 24px; }
.atlas-v5-home .dashboard-head h2 { font-size: var(--atlas-v5-font-title); }
.atlas-v5-home .dashboard-head p { color: var(--atlas-v5-muted); font-size: .875rem; }
.atlas-v5-home .eyebrow { color: var(--atlas-v5-muted); font-size: .7rem; }
.atlas-v5-home .update-area {
  align-items: flex-start;
  gap: 3px;
  padding: 12px 16px;
  border: 1px solid var(--atlas-v5-border);
  border-radius: var(--atlas-v5-radius-control);
  background: var(--atlas-v5-surface);
}
.atlas-v5-home .update-area strong { color: var(--atlas-v5-success-text); font-size: .8125rem; }
.atlas-v5-home .manual-note { color: var(--atlas-v5-muted); font-size: .75rem; }
.atlas-v5-home .grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.atlas-v5-home .card {
  min-height: 0;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--atlas-v5-card-border);
  border-top: 3px solid var(--atlas-v5-accent);
  border-radius: var(--atlas-v5-radius-card);
  background: var(--atlas-v5-surface);
  box-shadow: var(--atlas-v5-shadow-card);
}
.atlas-v5-home .card-header { flex-wrap: wrap; align-items: center; gap: 8px; }
.atlas-v5-home .card h3 { color: var(--atlas-v5-primary); font-size: var(--atlas-v5-font-section); font-weight: 750; }
.atlas-v5-home .premium-badge {
  color: var(--atlas-v5-notice-text);
  background: var(--atlas-v5-notice-surface);
  border: 1px solid var(--atlas-v5-notice-border);
  border-radius: var(--atlas-v5-radius-sm);
  padding: 4px 7px;
  font-size: .625rem;
  letter-spacing: .025em;
}
.atlas-v5-home .contest-label { color: var(--atlas-v5-muted); font-size: .8125rem; margin: 16px 0 8px; font-weight: 500; }
.atlas-v5-home .draw-label,
.atlas-v5-home .extra-label { color: var(--atlas-v5-text); font-size: .75rem; }
.atlas-v5-home .dozens { gap: 6px; margin: 8px 0 16px; }
.atlas-v5-home .dozens span,
.atlas-v5-home .super-sete-column span {
  width: 32px;
  height: 32px;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border-radius: var(--atlas-v5-radius-sm);
  color: var(--atlas-v5-chip-text);
  background: var(--atlas-v5-chip-surface);
  box-shadow: inset 0 -2px var(--atlas-v5-accent);
  font-size: .8125rem;
  font-weight: 650;
}
.atlas-v5-home .dozens.clovers span { color: var(--atlas-v5-primary); background: var(--atlas-v5-badge-surface); border: 1px solid var(--atlas-v5-control-border); }
.atlas-v5-home .super-sete-columns { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 12px 0 20px; }
.atlas-v5-home .super-sete-column { min-width: 0; }
.atlas-v5-home .super-sete-column small { color: var(--atlas-v5-muted); }
.atlas-v5-home .month { color: var(--atlas-v5-muted); font-size: .8125rem; }
.atlas-v5-home .month strong { max-width: 100%; margin: 4px 0; color: var(--atlas-v5-primary); background: var(--atlas-v5-badge-surface); border-radius: var(--atlas-v5-radius-sm); }
.atlas-v5-home .next-contest { margin: 0 0 16px; padding: 8px 10px; color: var(--atlas-v5-muted); background: var(--atlas-v5-secondary-surface); }
.atlas-v5-home .empty-state { color: var(--atlas-v5-muted); font-size: .875rem; }
.atlas-v5-home .card-link { margin-top: auto; min-height: 44px; padding: 12px; font-size: .8125rem; font-weight: 650; border-radius: var(--atlas-v5-radius-control); }
.atlas-v5-home .inline-result { color: var(--atlas-v5-muted); background: var(--atlas-v5-secondary-surface); }
.atlas-v5-home .summary-strip { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; padding: 0; border: 0; background: transparent; }
.atlas-v5-home .summary-strip div { min-width: 0; padding: 16px; border: 1px solid var(--atlas-v5-card-border); border-radius: var(--atlas-v5-radius-group); background: var(--atlas-v5-surface); overflow-wrap: anywhere; }
.atlas-v5-home .summary-strip small,
.atlas-v5-home .summary-strip span { color: var(--atlas-v5-muted); font-size: .75rem; }
.atlas-v5-home .summary-strip strong { color: var(--atlas-v5-primary); font-size: 1.125rem; }
.atlas-v5-home .summary-strip .ok { color: var(--atlas-v5-success-text); }
.atlas-v5-home .premium-modal { padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.atlas-v5-home .premium-modal-backdrop { background: #173d6680; backdrop-filter: blur(5px); }
.atlas-v5-home .premium-modal-panel {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid var(--atlas-v5-border);
  background: var(--atlas-v5-surface-solid);
  color: var(--atlas-v5-text);
  border-radius: var(--atlas-v5-radius-card);
  box-shadow: 0 20px 60px #173d6633;
}
.atlas-v5-home .premium-modal-panel > .eyebrow { padding-right: 44px; }
.atlas-v5-home .premium-modal-panel h2 { color: var(--atlas-v5-primary); font-size: 1.5rem; line-height: 1.3; padding-right: 20px; }
.atlas-v5-home .premium-modal-panel p,
.atlas-v5-home .premium-modal-panel li { font-size: .875rem; }
.atlas-v5-home .premium-modal-panel ul { padding-left: 20px; }
.atlas-v5-home .premium-modal-close { display: grid; place-items: center; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: var(--atlas-v5-radius-control); color: var(--atlas-v5-primary); background: var(--atlas-v5-secondary-surface); }
.atlas-v5-home .premium-modal-close:hover { background: var(--atlas-v5-hover-surface); }
.atlas-v5-home .billing-status { padding: 12px; border: 1px solid var(--atlas-v5-border); border-radius: var(--atlas-v5-radius-control); color: var(--atlas-v5-muted); background: var(--atlas-v5-secondary-surface); overflow-wrap: anywhere; }
.atlas-v5-home .billing-status[data-state="success"] { color: var(--atlas-v5-success-text); background: var(--atlas-v5-success-surface); border-color: var(--atlas-v5-success-border); }
.atlas-v5-home .billing-status[data-state="pending"] { color: var(--atlas-v5-notice-text); background: var(--atlas-v5-notice-surface); border-color: var(--atlas-v5-notice-border); }
.atlas-v5-home .billing-status[data-state="error"] { color: var(--atlas-v5-error-text); background: var(--atlas-v5-error-surface); border-color: var(--atlas-v5-error-border); }
.atlas-v5-home .premium-actions button { margin: 0; }
.atlas-v5-home footer { width: min(var(--atlas-v5-layout-content), calc(100% - 32px)); flex-wrap: wrap; padding: 8px 0 calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--atlas-v5-muted); font-size: .75rem; }
.atlas-v5-home .footer-link { color: var(--atlas-v5-primary); text-decoration: underline; text-underline-offset: 3px; }
.atlas-v5-home :focus-visible { outline: var(--atlas-v5-focus-width) solid var(--atlas-v5-focus-color); outline-offset: var(--atlas-v5-focus-offset); }
@media (min-width: 768px) {
  .atlas-v5-home .topbar { padding: 24px; }
  .atlas-v5-home .brand h1 { font-size: 1.25rem; }
  .atlas-v5-home .brand p { font-size: .8125rem; }
  .atlas-v5-home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-v5-home .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-v5-home .container { padding-top: 32px; }
}
@media (min-width: 1024px) {
  .atlas-v5-home .topbar { flex-direction: row; align-items: center; }
  .atlas-v5-home .service-status { width: 320px; }
  .atlas-v5-home .main-nav { padding-inline: 24px; }
  .atlas-v5-home .main-nav .admin-nav-button { margin-left: auto; }
  .atlas-v5-home .dashboard-head { flex-direction: row; align-items: center; }
  .atlas-v5-home .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .atlas-v5-home .summary-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-v5-home-document { scroll-behavior: auto; }
}
/* V5N.1: compact navigation cards; complete results remain in native disclosures. */
.atlas-v5-home-document:has(.web-topbar-actions) { scroll-behavior: auto; }
.atlas-v5-home .topbar:has(.web-topbar-actions) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.atlas-v5-home .web-topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; max-width: 100%; }
.atlas-v5-home .web-topbar-actions .atlas-v5-button { min-height: 44px; max-width: 100%; margin: 0; flex-shrink: 0; }
.atlas-v5-home .web-topbar-actions button { white-space: normal; overflow-wrap: anywhere; }
.atlas-v5-home .web-topbar-actions button:disabled { cursor: not-allowed; }
.atlas-v5-home .web-topbar-status { flex-basis: 100%; min-width: 0; color: var(--atlas-v5-muted); font-size: .75rem; text-align: right; overflow-wrap: anywhere; }
.atlas-v5-home .web-topbar-status:empty { display: none; }
.atlas-v5-home .topbar [data-web-account-access] {
  flex: 0 1 auto;
  width: fit-content;
  max-width: min(220px, 100%);
  min-width: 0;
  align-self: center;
  padding: 8px 12px;
  white-space: nowrap;
}
.atlas-v5-home .topbar [data-web-account-access] > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1024px) {
  .atlas-v5-home .topbar:has(.web-topbar-actions) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .atlas-v5-home .web-topbar-actions { grid-column: 1 / -1; width: 100%; }
  .atlas-v5-home .topbar [data-web-account-access] {
    flex: 0 1 220px;
    width: 220px;
    max-width: min(220px, 20vw);
    min-height: 44px;
    align-self: center;
    padding: 6px 12px;
  }
  @media (min-width: 1200px) {
    .atlas-v5-home .topbar:has(.web-topbar-actions) { grid-template-columns: minmax(0, 1fr) minmax(0, 320px) minmax(0, 420px); }
    .atlas-v5-home .web-topbar-actions { grid-column: auto; }
  }
}
.atlas-v5-home .card { padding: 16px; }
.atlas-v5-home .card-header { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
.atlas-v5-home .modality-icon { display: block; width: 40px; height: 40px; object-fit: contain; }
.atlas-v5-home .card h3 { margin: 0; font-size: 1.0625rem; line-height: 1.3; overflow-wrap: anywhere; }
.atlas-v5-home .access-badge { padding: 4px 7px; border: 1px solid var(--atlas-v5-success-border); border-radius: var(--atlas-v5-radius-sm); color: var(--atlas-v5-success-text); background: var(--atlas-v5-success-surface); font-size: .625rem; font-weight: 800; letter-spacing: .025em; }
.atlas-v5-home .access-badge-premium { display: none; color: var(--atlas-v5-notice-text); background: var(--atlas-v5-notice-surface); border-color: var(--atlas-v5-notice-border); }
.atlas-v5-home[data-premium="true"] .access-badge-premium { display: inline-block; }
.atlas-v5-home .card-meta { margin: 12px 0; }
.atlas-v5-home .card .contest-label { margin: 0 0 3px; color: var(--atlas-v5-text); }
.atlas-v5-home .card .next-contest { margin: 0; padding: 0; border: 0; background: transparent; font-size: .8125rem; }
.atlas-v5-home .card .next-contest span { white-space: nowrap; }
.atlas-v5-home .card-link { padding: 10px; }
.atlas-v5-home .official-results { margin-top: 28px; scroll-margin-top: 16px; }
.atlas-v5-home .official-results h2 { margin: 0 0 4px; color: var(--atlas-v5-primary); font-size: var(--atlas-v5-font-section); }
.atlas-v5-home .official-results > p { margin: 0 0 12px; color: var(--atlas-v5-muted); font-size: .8125rem; }
.atlas-v5-home .official-result { margin-top: 8px; border: 1px solid var(--atlas-v5-card-border); border-left: 3px solid var(--atlas-v5-accent); border-radius: var(--atlas-v5-radius-control); background: var(--atlas-v5-surface); }
.atlas-v5-home .official-result summary { min-height: 44px; padding: 12px; color: var(--atlas-v5-primary); font-size: .875rem; font-weight: 650; cursor: pointer; overflow-wrap: anywhere; }
.atlas-v5-home .official-result summary span { float: right; padding-left: 8px; color: var(--atlas-v5-muted); font-size: .75rem; font-weight: 500; }
.atlas-v5-home .official-result-body { padding: 0 16px 16px; }
.atlas-v5-home .official-result-body .contest-label { margin-top: 4px; }
.atlas-v5-home .footer-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 767px) {
  .atlas-v5-home .topbar { padding: 12px 16px 8px; gap: 8px; }
  .atlas-v5-home .brand { gap: 10px; }
  .atlas-v5-home .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
  .atlas-v5-home .brand p { display: none; }
  .atlas-v5-home .brand-line { gap: 4px 8px; }
  .atlas-v5-home .version { padding: 2px 5px; font-size: .625rem; }
  .atlas-v5-home .service-status { display: flex; gap: 12px; border: 0; border-radius: 0; }
  .atlas-v5-home .service-status div { display: flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; }
  .atlas-v5-home .service-status strong { font-size: .625rem; font-weight: 500; color: var(--atlas-v5-muted); }
  .atlas-v5-home .service-status span { margin: 0; font-size: .625rem; }
  .atlas-v5-home .main-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px 16px; gap: 2px; }
  .atlas-v5-home .main-nav a { padding: 7px 4px; font-size: .75rem; }
  .atlas-v5-home .container { padding-top: 16px; }
  .atlas-v5-home .dashboard-head { gap: 6px; margin-bottom: 14px; }
  .atlas-v5-home .dashboard-head .eyebrow,
  .atlas-v5-home .dashboard-head p,
  .atlas-v5-home .update-area .manual-note { display: none; }
  .atlas-v5-home .dashboard-head h2 { margin: 0; font-size: 1.5rem; }
  .atlas-v5-home .update-area { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .atlas-v5-home .update-area strong { font-size: .75rem; }
  .atlas-v5-home .grid { gap: 12px; }
}
