/* Material Design 3 — dark color roles (approx. M3 palette) */
:root {
  color-scheme: dark;
  --md-sys-color-primary: #d0bcff;
  --md-sys-color-on-primary: #381e72;
  --md-sys-color-primary-container: #4f378b;
  --md-sys-color-on-primary-container: #eaddff;
  --md-sys-color-secondary: #ccc2dc;
  --md-sys-color-on-secondary: #332d41;
  --md-sys-color-surface: #1c1b1f;
  --md-sys-color-surface-dim: #141218;
  --md-sys-color-surface-bright: #3b383e;
  --md-sys-color-on-surface: #e6e1e5;
  --md-sys-color-on-surface-variant: #cac4d0;
  --md-sys-color-surface-container-lowest: #0f0d13;
  --md-sys-color-surface-container-low: #1d1b20;
  --md-sys-color-surface-container: #211f26;
  --md-sys-color-surface-container-high: #2b2930;
  --md-sys-color-surface-container-highest: #36343b;
  --md-sys-color-outline: #938f99;
  --md-sys-color-outline-variant: #49454f;
  --md-sys-color-inverse-surface: #e6e1e5;
  --md-sys-color-inverse-on-surface: #322f35;
  --md-sys-color-error: #f2b8b5;
  --md-sys-color-on-error: #601410;
  --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
  --md-shape-corner-extra-large: 28px;
  --md-shape-corner-large: 16px;
  --md-shape-corner-medium: 12px;
  --md-shape-corner-full: 9999px;
  --md-state-hover: 0.08;
  --md-state-pressed: 0.12;
  --md-state-focus: 0.12;
  --md-max-width: 1120px;
  --md-font: "Roboto", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--md-font);
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: 0.015em;
  background: var(--md-sys-color-surface-dim);
  color: var(--md-sys-color-on-surface);
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: var(--md-shape-corner-medium);
  outline: 2px solid var(--md-sys-color-primary);
}

/* Top app bar (M3) */
.md-top-app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 8px 16px 8px 12px;
  background: rgba(33, 31, 38, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-sys-elevation-1);
}

.md-top-app-bar__start {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.md-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.md-brand__name {
  font-size: 1.25rem;
  font-weight: 500;
}

.md-brand__tld {
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface-variant);
}

.md-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.md-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--md-shape-corner-full);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  overflow: hidden;
}

.md-nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-sys-color-on-surface);
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: inherit;
  pointer-events: none;
}

.md-nav a:hover::after {
  opacity: var(--md-state-hover);
}

.md-nav a[aria-current="page"] {
  color: var(--md-sys-color-on-secondary);
  background: var(--md-sys-color-secondary);
}

.md-nav a[aria-current="page"]::after {
  display: none;
}

@media (max-width: 720px) {
  .md-top-app-bar {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 12px;
  }

  .md-nav {
    justify-content: flex-start;
  }
}

/* Main */
.md-main {
  padding-bottom: 48px;
}

.md-wrap {
  width: min(100% - 32px, var(--md-max-width));
  margin-inline: auto;
}

/* Hero */
.md-hero {
  padding: 40px 0 28px;
}

.md-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: var(--md-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-2);
  font-size: 28px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-display {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

.md-headline {
  margin: 0 0 8px;
  font-size: clamp(1.375rem, 2.8vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
}

.md-body-lg {
  margin: 0 0 24px;
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant);
}

.md-body-lg strong {
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
}

.md-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons (M3 filled + tonal + text) */
.md-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: var(--md-shape-corner-full);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}

.md-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.md-btn:hover::after {
  opacity: var(--md-state-hover);
}

.md-btn:active::after {
  opacity: var(--md-state-pressed);
}

.md-btn--filled {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.md-btn--tonal {
  background: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
}

.md-btn--outlined {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
  padding-inline: 22px;
}

.md-btn--outlined::after {
  color: var(--md-sys-color-primary);
}

/* Sections */
.md-section {
  padding: 28px 0;
}

.md-section--surface {
  background: var(--md-sys-color-surface);
  border-block: 1px solid var(--md-sys-color-outline-variant);
}

.md-section-title {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.md-section-sub {
  margin: 0 0 24px;
  max-width: 72ch;
  color: var(--md-sys-color-on-surface-variant);
}

/* Cards (elevated) */
.md-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 840px) {
  .md-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.md-card {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: var(--md-shape-corner-large);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  box-shadow: var(--md-sys-elevation-1);
  border: 1px solid rgba(73, 69, 79, 0.65);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.md-card:hover {
  box-shadow: var(--md-sys-elevation-2);
  transform: translateY(-1px);
}

.md-card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 500;
}

.md-card__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
}

.md-card__text + .md-card__text {
  margin-top: 8px;
}

.md-card__meta {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--md-sys-color-outline);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* List */
.md-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--md-shape-corner-large);
  overflow: hidden;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-sys-elevation-1);
}

.md-list__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.md-list__item:last-child {
  border-bottom: none;
}

.md-list__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-primary);
  font-size: 22px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-list__title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.md-list__desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.45;
}

/* Chips (assist) */
.md-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.md-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--md-shape-corner-full);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--md-sys-color-outline-variant);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.md-chip:hover {
  background: #3f3d45;
  color: var(--md-sys-color-on-surface);
}

/* Banner / disclaimer */
.md-banner {
  margin-top: 8px;
  padding: 16px 20px;
  border-radius: var(--md-shape-corner-large);
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
  line-height: 1.55;
}

.md-banner--warn {
  border-color: #6b5658;
  background: rgba(96, 20, 16, 0.22);
}

/* Breadcrumb */
.md-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
}

.md-breadcrumb a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
}

.md-breadcrumb a:hover {
  text-decoration: underline;
}

/* Footer */
.md-footer {
  margin-top: 32px;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface-container-low);
}

.md-footer__inner {
  width: min(100% - 32px, var(--md-max-width));
  margin-inline: auto;
}

.md-footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--md-sys-color-on-surface-variant);
}

.md-footer p + p {
  margin-top: 6px;
}

/* Page title block */
.md-page-head {
  padding: 24px 0 8px;
}

.md-title-large {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 500;
}

.md-prose {
  max-width: 72ch;
}

.md-prose p {
  margin: 0 0 14px;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.md-prose h2 {
  margin: 28px 0 10px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}

.md-prose ul {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  color: var(--md-sys-color-on-surface-variant);
}

.md-prose li + li {
  margin-top: 6px;
}
