/* Microsoft 365 Roadmap Tracker Styles */
/* Atea Brand Design System - Official Colors */
/* Following 60-30-10 principle: 60% light grey, 30% Atea grey, 10% Atea green */

:root {
  color-scheme: light;
  
  /* Atea Official Green Palette (accent - 10%) */
  --green-700: #005300;
  --green-600: #006E00;
  --green-500: #008A00;  /* Main Atea Green */
  --green-400: #33A133;
  --green-200: #99D099;
  
  /* Atea Official Grey Palette */
  --grey-800: #1F2325;   /* Titles */
  --grey-700: #2E3438;
  --grey-600: #3E464A;   /* Body text */
  --grey-500: #4D575D;   /* Atea Grey - Logo, secondary */
  --grey-300: #9CA3A7;
  --grey-200: #B8BCBE;
  --grey-100: #DBDDDF;
  --grey-50: #EDEEEE;    /* Atea Light Grey - backgrounds */
  --grey-25: #F7F7F7;
  
  /* Atea Official Teal (links) */
  --teal-700: #054452;
  --teal-600: #075B6D;
  --teal-500: #097288;   /* Links */
  --teal-400: #3A8EA0;
  --teal-200: #9DC7CF;
  
  /* Atea Official Orange (warnings/rolling out) */
  --orange-700: #8E491C;
  --orange-600: #BD6225;
  --orange-500: #EC7A2E;
  --orange-400: #F09558;
  --orange-200: #F7CAAB;
  
  /* Atea Official Red (errors/cancelled) */
  --red-700: #801619;
  --red-600: #AB1D21;
  --red-500: #D62429;
  --red-400: #DE5054;
  --red-200: #EFA7A9;
  
  /* Atea Official Blue */
  --blue-700: #053D6A;
  --blue-600: #07518E;
  --blue-500: #0965B1;
  --blue-400: #3A84C1;
  --blue-200: #9DC1E0;
  
  /* Theme mappings */
  --primary-800: var(--green-700);
  --primary-700: var(--green-600);
  --primary-600: var(--green-500);
  --primary-500: var(--green-400);
  --primary-100: var(--green-200);
  --primary-50: #E8F5E8;
  --primary-rgb: 0, 138, 0;
  
  --surface: rgba(255, 255, 255, 0.98);
  --surface-shadow: 0 24px 52px rgba(77, 87, 93, 0.12);
  --tile-shadow: 0 18px 38px rgba(77, 87, 93, 0.10);
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --transition: 0.2s cubic-bezier(0.19, 1, 0.22, 1);
  
  /* Status colors - Official Atea */
  --status-development: var(--blue-500);
  --status-rolling: var(--orange-500);
  --status-launched: var(--green-500);
  --status-cancelled: var(--red-500);
}

/* ===========================================
   ATEA DARK MODE - True Black Background
   =========================================== */
[data-theme="dark"] {
  color-scheme: dark;
  
  /* Inverted/brightened colors for dark mode */
  --green-700: #33A133;
  --green-600: #4DB84D;
  --green-500: #66CC66;
  --green-400: #99D099;
  --green-200: #005300;
  
  --grey-800: #F7F7F7;
  --grey-700: #EDEEEE;
  --grey-600: #DBDDDF;
  --grey-500: #B8BCBE;
  --grey-300: #4D575D;
  --grey-200: #3E464A;
  --grey-100: #2E3438;
  --grey-50: #1F2325;
  --grey-25: #121416;
  
  --teal-500: #3A8EA0;
  --teal-400: #9DC7CF;
  
  --orange-500: #F09558;
  --red-500: #DE5054;
  --blue-500: #3A84C1;
  
  --primary-rgb: 102, 204, 102;
  
  --surface: rgba(18, 20, 22, 0.98);
  --surface-shadow: 0 24px 52px rgba(0, 0, 0, 0.8);
  --tile-shadow: 0 18px 38px rgba(0, 0, 0, 0.7);
  
  --status-development: var(--blue-500);
  --status-rolling: var(--orange-500);
  --status-launched: var(--green-500);
  --status-cancelled: var(--red-500);
}

/* Dark mode surfaces */
[data-theme="dark"] .card {
  background: var(--surface);
  border: 1px solid var(--panel-border-color, rgba(var(--primary-rgb), 0.15));
}

[data-theme="dark"] input,
[data-theme="dark"] select {
  background: var(--surface-subtle, rgba(31, 35, 37, 0.9));
  border-color: rgba(var(--primary-rgb), 0.2);
  color: var(--text-body, var(--grey-800));
}

[data-theme="dark"] input::placeholder {
  color: var(--grey-500);
}

[data-theme="dark"] .roadmap-table th {
  background: rgba(31, 35, 37, 0.8);
}

[data-theme="dark"] .roadmap-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

/* Dark mode for table container and cells */
[data-theme="dark"] .table-scroll {
  background: rgba(31, 35, 37, 0.6);
}

[data-theme="dark"] .metric-table th {
  background: rgba(18, 20, 22, 0.9);
  color: var(--grey-400);
  border-color: rgba(var(--primary-rgb), 0.1);
}

[data-theme="dark"] .metric-table th,
[data-theme="dark"] .metric-table td {
  border-color: rgba(var(--primary-rgb), 0.08);
}

[data-theme="dark"] .metric-table th[data-sort]:hover {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--green-400);
}

[data-theme="dark"] .metric-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

[data-theme="dark"] .metric-table tbody tr.is-active {
  background: rgba(var(--primary-rgb), 0.12);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.25);
}

[data-theme="dark"] .filter-action-button,
[data-theme="dark"] .section-reset-button {
  background: rgba(31, 35, 37, 0.8);
  border-color: rgba(var(--primary-rgb), 0.2);
}

[data-theme="dark"] .filter-action-button:hover,
[data-theme="dark"] .section-reset-button:hover {
  background: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .hero-link {
  background: rgba(31, 35, 37, 0.9);
  border-color: rgba(var(--primary-rgb), 0.2);
}

[data-theme="dark"] .hero-link:hover {
  background: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .hero-link--official {
  background: var(--green-500);
  color: #fff;
}

[data-theme="dark"] .hero-pill {
  background: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .scope-pill {
  background: rgba(var(--primary-rgb), 0.12);
}

[data-theme="dark"] .detail-panel {
  background: var(--surface);
  border-color: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .upcoming-rollouts {
  background: rgba(31, 35, 37, 0.6);
  border-color: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .upcoming-pill {
  background: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .upcoming-pill.is-active {
  background: var(--green-500);
  color: #fff;
}

/* Dark mode for tag pills (products/platforms columns) */
[data-theme="dark"] .tag-pill {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--grey-400);
}

[data-theme="dark"] .tag-pill--more {
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--grey-500);
}

[data-theme="dark"] .tags-list {
  color: var(--grey-400);
}

/* Dark mode for status badges */
[data-theme="dark"] .status-badge--development {
  background: rgba(38, 114, 181, 0.25);
}

[data-theme="dark"] .status-badge--rolling {
  background: rgba(224, 125, 26, 0.25);
}

[data-theme="dark"] .status-badge--launched {
  background: rgba(var(--primary-rgb), 0.25);
}

[data-theme="dark"] .status-badge--cancelled {
  background: rgba(163, 41, 41, 0.25);
}

/* Dark mode for last-updated pill */
[data-theme="dark"] .last-updated-pill {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--grey-400);
}

[data-theme="dark"] .last-updated-pill span {
  color: var(--green-400);
}

/* Dark mode for detail panel and tooltip */
[data-theme="dark"] .roadmap-detail {
  background: rgba(31, 35, 37, 0.8);
  border-color: rgba(var(--primary-rgb), 0.15);
}

[data-theme="dark"] .preview-tooltip {
  background: rgba(31, 35, 37, 0.98);
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dark mode for status summary */
[data-theme="dark"] .status-indicator {
  color: var(--grey-400);
}

[data-theme="dark"] .status-indicator:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.2);
}

[data-theme="dark"] .status-indicator.is-active {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.3);
  color: var(--grey-300);
}

[data-theme="dark"] .status-squares .square {
  border-color: var(--grey-500);
}

[data-theme="dark"] .status-squares .square.filled {
  background: var(--grey-500);
}

[data-theme="dark"] .status-count {
  color: var(--grey-500);
}

[data-theme="dark"] .status-info {
  color: var(--grey-500);
}

/* Theme toggle button */
.theme-toggle-btn {
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle-btn:hover {
  transform: scale(1.02);
}

.theme-toggle-btn .theme-icon {
  font-size: 1.1em;
}

html {
  scroll-behavior: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Inter var", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--chansen-page-background, var(--grey-25));
  min-height: 100vh;
  color: var(--grey-600);
}

a {
  color: var(--teal-500);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

:where(a, button, input, select, textarea) {
  outline: none;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(var(--primary-rgb), 0.7);
  outline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--primary-600);
}

main {
  width: min(90vw, 2200px);
  max-width: none;
  margin: 0 auto;
  padding: 28px 20px 72px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

main.detail-view-active .list-view-only {
  display: none;
}

/* Page Header */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-hero {
  display: grid;
  gap: 12px;
}

.page-hero__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-hero__subtitle {
  margin: 0;
  color: var(--grey-600);
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  background: var(--surface-panel, rgba(255, 255, 255, 0.96));
  color: var(--primary-700);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 57, 76, 0.08);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.hero-link:hover,
.hero-link:focus-visible {
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 12px 26px rgba(17, 57, 76, 0.12);
  transform: translateY(-1px);
}

.hero-link--official {
  background: var(--primary-700);
  color: #fff;
  border-color: transparent;
}

.hero-link--official:hover,
.hero-link--official:focus-visible {
  background: var(--primary-600);
  color: #fff;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(var(--primary-rgb), 0.16);
  color: var(--primary-700);
  font-weight: 600;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.25);
  width: fit-content;
}

/* Status Summary - vertical layout inside filters */
.status-summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  padding: 20px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status-indicators-vertical {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  max-width: 220px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  font: inherit;
  color: var(--grey-700);
  text-align: left;
}

.status-indicator:hover {
  background: rgba(var(--primary-rgb), 0.06);
  border-color: rgba(var(--primary-rgb), 0.15);
}

.status-indicator.is-active {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.25);
  color: var(--grey-800);
}

.status-squares {
  display: inline-flex;
  gap: 2px;
}

.status-squares .square {
  width: 12px;
  height: 12px;
  border: 2px solid var(--grey-600);
  border-radius: 2px;
  background: transparent;
  transition: all var(--transition);
}

.status-squares .square.filled {
  background: var(--grey-600);
}

/* Status-specific colors */
.status-indicator[data-status-filter="In development"] .square {
  border-color: var(--blue-500);
}
.status-indicator[data-status-filter="In development"] .square.filled {
  background: var(--blue-500);
}

.status-indicator[data-status-filter="Rolling out"] .square {
  border-color: var(--orange-500);
}
.status-indicator[data-status-filter="Rolling out"] .square.filled {
  background: var(--orange-500);
}

.status-indicator[data-status-filter="Launched"] .square {
  border-color: var(--green-500);
}
.status-indicator[data-status-filter="Launched"] .square.filled {
  background: var(--green-500);
}

.status-label {
  font-weight: 600;
  font-size: 0.85rem;
}

.status-count {
  font-weight: 400;
  color: var(--grey-500);
  font-size: 0.85rem;
}

.status-info {
  font-size: 0.9rem;
  color: var(--grey-400);
  cursor: help;
  margin-left: 2px;
  transition: color var(--transition);
}

.status-indicator:hover .status-info {
  color: var(--grey-600);
}

/* Cards */
.card {
  background: var(--surface, rgba(255, 255, 255, 0.96));
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--panel-border-color, rgba(var(--primary-rgb), 0.08));
  box-shadow: var(--surface-shadow);
  position: relative;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--grey-900);
}

.section-heading-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-status {
  font-size: 0.9rem;
  color: var(--grey-500);
}

.filter-status.is-error {
  color: #b30000;
}

/* Filter controls */
.filter-button-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-action-button {
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-700);
  font-weight: 500;
  font-size: 0.80rem;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.filter-action-button:hover {
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 6px 12px rgba(26, 68, 128, 0.10);
}

.section-reset-button {
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-700);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.section-reset-button:hover {
  background: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 10px 18px rgba(26, 68, 128, 0.12);
}

.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-700);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.scope-pill__label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--primary-700);
  opacity: 0.85;
}

/* Last updated pill */
.last-updated-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--grey-600);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: help;
}

.last-updated-pill span {
  color: var(--primary-700);
  font-weight: 600;
}

/* Controls row */
.controls-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.controls-row .inline-field {
  flex: 1;
  min-width: 180px;
}

label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--grey-700);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input, select {
  appearance: none;
  border: 1px solid rgba(26, 68, 128, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--grey-800);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus-visible, select:focus-visible {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

select[multiple] {
  resize: vertical;
}

.hint {
  font-size: 0.82rem;
  color: var(--grey-500);
  font-weight: 400;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-500);
  margin: 0;
}

/* Table */
.table-scroll {
  position: relative;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.98);
  padding: 6px 0 12px;
}

.table-scroll table {
  min-width: 900px;
}

.metric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.metric-table th,
.metric-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.metric-table th {
  font-size: 0.82rem;
  color: var(--grey-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(231, 232, 232, 0.55);
  position: sticky;
  top: 0;
  z-index: 1;
}

.metric-table th[data-sort] {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background var(--transition), color var(--transition);
}

.metric-table th[data-sort]:hover {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary-700);
}

.metric-table th[data-sort]::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.3;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.metric-table th.sort-asc::after {
  opacity: 1;
  border-top: none;
  border-bottom: 5px solid var(--primary-600);
}

.metric-table th.sort-desc::after {
  opacity: 1;
  border-top: 5px solid var(--primary-600);
}

.metric-table tbody tr {
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.metric-table tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.05);
}

.metric-table tbody tr.is-active {
  background: rgba(var(--primary-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.15);
}

.metric-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--development {
  background: rgba(38, 114, 181, 0.12);
  color: var(--status-development);
}

.status-badge--rolling {
  background: rgba(224, 125, 26, 0.12);
  color: var(--status-rolling);
}

.status-badge--launched {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--status-launched);
}

.status-badge--cancelled {
  background: rgba(163, 41, 41, 0.12);
  color: var(--status-cancelled);
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Tags list */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}

.tag-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--grey-700);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.tag-pill--more {
  background: rgba(0, 0, 0, 0.04);
  color: var(--grey-500);
}

/* Load more */
.load-more {
  display: flex;
  justify-content: center;
  margin: 14px 0 0;
}

.load-more__button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.18);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.load-more__button:hover,
.load-more__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(26, 68, 128, 0.2);
}

/* Detail panel */
.roadmap-detail {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--surface-shadow);
  padding: 28px;
}

.detail-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--primary-700);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background var(--transition), box-shadow var(--transition);
}

.detail-back-button:hover {
  background: rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 6px 12px rgba(26, 68, 128, 0.1);
}

.roadmap-detail__content {
  display: grid;
  gap: 18px;
}

.roadmap-detail__header h3 {
  margin: 8px 0 16px;
  font-size: 1.5rem;
  color: var(--grey-900);
  line-height: 1.3;
}

.roadmap-detail__meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0;
}

.roadmap-detail__meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roadmap-detail__meta dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  margin: 0;
}

.roadmap-detail__meta dd {
  margin: 0;
  font-weight: 600;
  color: var(--grey-800);
}

.roadmap-detail__actions {
  margin-top: 16px;
}

.roadmap-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--primary-700);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(26, 68, 128, 0.18);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.roadmap-link-button:hover,
.roadmap-link-button:focus-visible {
  background: var(--primary-600);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(26, 68, 128, 0.22);
}

.roadmap-detail__body {
  padding: 18px 0 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.roadmap-detail__body :where(p, ul, ol) {
  margin: 0 0 1rem;
  color: var(--grey-700);
  line-height: 1.65;
  max-width: 100%;
}

.roadmap-detail__body a {
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.roadmap-detail__body a:hover {
  color: var(--primary-700);
}

/* Tooltip */
.preview-tooltip {
  position: fixed;
  max-width: 480px;
  min-width: 320px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(17, 57, 76, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
}

.preview-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.preview-tooltip__header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--grey-200);
}

.preview-tooltip__title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  color: var(--grey-900);
  line-height: 1.35;
}

.preview-tooltip__body {
  margin: 0;
  color: var(--grey-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

.preview-tooltip__status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--primary-100);
  color: var(--primary-700);
  margin-bottom: 8px;
}

.preview-tooltip__dates {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--grey-700);
}

.preview-tooltip__date strong {
  color: var(--grey-500);
  font-weight: 500;
}

.preview-tooltip__tags {
  font-size: 0.8rem;
  color: var(--grey-600);
  margin-bottom: 10px;
}

.preview-tooltip__tags strong {
  color: var(--grey-500);
  font-weight: 500;
}

.preview-tooltip__desc {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--grey-100);
  color: var(--grey-600);
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* Footer */
.page-footer {
  margin-top: auto;
  padding-top: 32px;
  color: var(--grey-500);
  font-size: 0.92rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-divider {
  color: var(--grey-300);
}

.page-footer a {
  color: var(--primary-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  inset-inline-end: 28px;
  inset-block-end: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--primary-600);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Loading state */
.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--grey-500);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state__title {
  font-size: 1.2rem;
  color: var(--grey-700);
  margin: 0 0 8px;
}

.empty-state__message {
  margin: 0;
  max-width: 400px;
  margin-inline: auto;
}

/* Loading spinner */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
  min-height: 200px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--grey-100);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay__text {
  color: var(--grey-500);
  font-size: 0.95rem;
  margin: 0;
}

/* Upcoming Rollouts Section */
.upcoming-rollouts {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(var(--primary-rgb), 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.upcoming-rollouts__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px;
  margin: -4px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.upcoming-rollouts__header:hover {
  background: rgba(0, 0, 0, 0.03);
}

.upcoming-rollouts__title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--grey-700);
}

.upcoming-rollouts__pills {
  display: flex;
  gap: 6px;
}

.upcoming-pill {
  appearance: none;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--grey-600);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.upcoming-pill:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.upcoming-pill.is-active {
  background: var(--primary-600);
  color: #fff;
  border-color: transparent;
}

.upcoming-rollouts__counts {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.upcoming-count {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.upcoming-count.preview {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.upcoming-count.ga {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.upcoming-rollouts__toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--grey-500);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.upcoming-rollouts__toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
  display: inline-block;
}

.upcoming-rollouts__body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(var(--primary-rgb), 0.08);
}

.upcoming-rollouts__list {
  display: grid;
  gap: 8px;
}

.upcoming-month-group {
  display: grid;
  gap: 4px;
}

.upcoming-month-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* Month filter pills */
.month-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.month-pill {
  appearance: none;
  border: 1px solid rgba(var(--primary-rgb), 0.15);
  background: rgba(255, 255, 255, 0.8);
  color: var(--grey-700);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.month-pill:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.25);
}

.month-pill.is-active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
}

/* Dark mode for month pills */
[data-theme="dark"] .month-filter-pills {
  border-color: rgba(var(--primary-rgb), 0.1);
}

[data-theme="dark"] .month-pill {
  background: rgba(31, 35, 37, 0.6);
  border-color: rgba(var(--primary-rgb), 0.15);
  color: var(--grey-400);
}

[data-theme="dark"] .month-pill:hover {
  background: rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.25);
}

[data-theme="dark"] .month-pill.is-active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
}

.upcoming-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.82rem;
  padding: 4px 0;
}

.upcoming-item__type {
  font-weight: 600;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.upcoming-item__type.preview {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.upcoming-item__type.ga {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.upcoming-item__id {
  font-weight: 600;
  color: var(--grey-700);
  cursor: pointer;
}

.upcoming-item__id:hover {
  color: var(--primary-600);
}

.upcoming-item__title {
  color: var(--grey-600);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Past Rollouts Section - variation */
.past-rollouts {
  background: rgba(120, 80, 0, 0.03);
  border-color: rgba(120, 80, 0, 0.08);
}

.past-rollouts .upcoming-rollouts__body {
  border-color: rgba(120, 80, 0, 0.08);
}

.past-rollouts .upcoming-pill {
  border-color: rgba(120, 80, 0, 0.12);
}

.past-rollouts .upcoming-pill:hover {
  background: rgba(120, 80, 0, 0.06);
}

.past-rollouts .upcoming-pill.is-active {
  background: #b45309;
}

/* Responsive */
@media (max-width: 720px) {
  .back-to-top {
    inset-inline-end: 18px;
    inset-block-end: 18px;
  }
  
  .controls-row {
    flex-direction: column;
  }
  
  .controls-row .inline-field {
    min-width: 100%;
  }
  
  .filter-button-group {
    flex-wrap: wrap;
  }
  
  .table-scroll table {
    min-width: 700px;
  }
  
  .roadmap-detail__meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
