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

:root {
  --bg-base: #0D1117;
  --bg-surface: #161B22;
  --bg-hover: #21262D;
  --border: #30363D;
  --text-primary: #E6EDF3;
  --text-secondary: #ADBAC7;
  --text-muted: #8B949E;
  --accent-teal: #2A9D8F;
  --accent-teal-dim: rgba(42, 157, 143, 0.15);
  --accent-blue: #5B8AC5;
  --accent-blue-dim: rgba(91, 138, 197, 0.15);
  --accent-red: #E04040;
  --accent-red-dim: rgba(224, 64, 64, 0.15);
  --success-green: #2EA043;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Aptos', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}

.logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

.wordmark {
  font-family: 'Aptos Display', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.wordmark .i-accent {
  color: var(--accent-teal);
}

.wordmark .tools {
  color: var(--text-secondary);
  font-weight: 400;
}

.byline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.hero-stat {
  font-size: 0.9375rem;
  color: var(--accent-teal);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

.credibility {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1.25rem;
}

.credibility span {
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.35em 0.9em;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.credibility span.cred-highlight {
  border-color: var(--accent-teal);
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
}

/* Principles Section */
.principles {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  width: 100%;
}

.principles-header {
  font-family: 'Aptos Display', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-teal);
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent-teal);
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.principle {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
}

.principle-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.principle-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Tools Grid */
.tools-section {
  padding: 1rem 1.5rem 3rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.acr-summary {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Tool Cards */
.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-icon-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: cover;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.tool-card.live {
  cursor: pointer;
  border-left: 3px solid var(--accent-red);
}

.tool-card.live:hover {
  background: var(--bg-hover);
  border-color: var(--accent-red);
  box-shadow: 0 0 20px rgba(224, 64, 64, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tool-card.live.expanded {
  background: var(--bg-hover);
  border-color: var(--accent-red);
}

.tool-card.live.expanded:hover {
  transform: none;
}

.tool-card.live:focus-within {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

.tool-card.coming-soon {
  opacity: 0.7;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.tool-card.coming-soon:hover {
  opacity: 0.85;
  background: var(--bg-hover);
}

.tool-card.coming-soon.expanded {
  opacity: 0.85;
  background: var(--bg-hover);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.card-header:focus {
  outline: none;
}

.card-header:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
  border-radius: 4px;
}

.card-header-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.card-title {
  font-family: 'Aptos Display', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
}

.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2em 0.6em;
  border-radius: 9999px;
}

.badge-live {
  background: rgba(224, 64, 64, 0.15);
  color: var(--accent-red);
}

.badge-coming-soon {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Chevron */
.chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.tool-card.expanded .chevron {
  transform: rotate(180deg);
}

/* Expandable Detail Panel */
.card-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.tool-card.expanded .card-detail {
  grid-template-rows: 1fr;
}

.card-detail-inner {
  overflow: hidden;
}

.tool-card.expanded .card-detail-inner {
  padding-top: 1rem;
}

/* Detail Sections */
.detail-section {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.detail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* How to Navigate Steps */
.nav-steps {
  list-style: none;
  counter-reset: nav-step;
  padding: 0;
}

.nav-steps li {
  counter-increment: nav-step;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.25rem 0 0.25rem 1.75rem;
  position: relative;
}

.nav-steps li::before {
  content: counter(nav-step);
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
  font-size: 0.6875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* KPI Badges */
.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kpi-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 9999px;
  background: var(--accent-teal-dim);
  color: var(--accent-teal);
  border: 1px solid rgba(42, 157, 143, 0.3);
  white-space: nowrap;
}

/* Microsoft Product Badges */
.ms-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ms-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 9999px;
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid rgba(91, 138, 197, 0.3);
  white-space: nowrap;
}

/* ACR Badges */
.acr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acr-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 9999px;
  background: rgba(46, 160, 67, 0.12);
  color: var(--success-green);
  border: 1px solid rgba(46, 160, 67, 0.3);
  white-space: nowrap;
}

/* Use Case Text */
.use-case {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Launch Demo Button */
.launch-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.launch-btn:hover {
  background: #c93636;
  box-shadow: 0 2px 8px rgba(224, 64, 64, 0.3);
}

.launch-btn:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

.launch-btn-disabled {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
}

.launch-btn-disabled:hover {
  background: var(--bg-surface);
  box-shadow: none;
}

/* Footer */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-blue);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-logo {
  height: 18px;
  width: auto;
  vertical-align: middle;
  margin-left: 0.35rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer a:hover .footer-logo {
  opacity: 1;
}

.footer-line {
  margin-top: 0.5rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .card-detail {
    transition: none;
  }
  .chevron {
    transition: none;
  }
  .tool-card {
    transition: none;
  }
  .launch-btn {
    transition: none;
  }
}

/* Responsive */
@media (min-width: 640px) {
  .hero {
    padding-top: 6rem;
  }

  .logo {
    width: 180px;
    height: 180px;
  }

  .principles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 639px) {
  .tool-card {
    padding: 1rem;
    gap: 1rem;
  }

  .card-detail-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .detail-section {
    padding: 0.625rem 0;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 8rem;
  }

  .logo {
    width: 200px;
    height: 200px;
  }
}
