/* Fluent (WinUI 3) light theme on top of Bootstrap.
   Values are WinUI theme resources (names in comments): https://learn.microsoft.com/windows/apps/design */
:root,
[data-bs-theme="light"] {
  --bs-body-font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Roboto, system-ui, sans-serif;
  --bs-body-font-size: .875rem;                 /* Body 14/20 */
  --bs-body-line-height: 1.4286;
  --bs-body-bg: #f3f3f3;                        /* SolidBackgroundFillColorBase (Mica fallback) */
  --bs-body-bg-rgb: 243, 243, 243;
  --bs-body-color: rgba(0, 0, 0, .894);         /* TextFillColorPrimary */
  --bs-body-color-rgb: 27, 27, 27;
  --bs-heading-color: var(--bs-body-color);
  --bs-emphasis-color: #000;
  --bs-emphasis-color-rgb: 0, 0, 0;
  --bs-secondary-color: rgba(0, 0, 0, .6063);   /* TextFillColorSecondary */
  --bs-primary: #0078d4;                        /* SystemAccentColor (Windows default blue) */
  --bs-primary-rgb: 0, 120, 212;
  --bs-primary-text-emphasis: #004275;          /* SystemAccentColorDark2 = AccentTextFillColorPrimary */
  --bs-link-color: #004275;
  --bs-link-color-rgb: 0, 66, 117;
  --bs-link-hover-color: #002642;               /* SystemAccentColorDark3 */
  --bs-link-hover-color-rgb: 0, 38, 66;
  --bs-border-color: rgba(0, 0, 0, .0578);      /* CardStrokeColorDefault */
  --bs-border-radius: 4px;                      /* ControlCornerRadius */
  --bs-border-radius-lg: 8px;                   /* OverlayCornerRadius */
  --bs-code-color: var(--bs-body-color);

  --fl-card: rgba(255, 255, 255, .7);           /* CardBackgroundFillColorDefault */
  --fl-card-hover: rgba(249, 249, 249, .5);     /* ControlFillColorSecondary */
  --fl-subtle-hover: rgba(0, 0, 0, .0373);      /* SubtleFillColorSecondary */
  --fl-stroke-bottom: rgba(0, 0, 0, .1622);     /* ControlStrokeColorSecondary */
  --fl-shadow-window: 0 8px 16px rgba(0, 0, 0, .14);
  --fl-shadow-dialog: 0 32px 64px rgba(0, 0, 0, .1876), 0 2px 21px rgba(0, 0, 0, .1474);
  --fl-smoke: rgba(0, 0, 0, .3);                /* SmokeFillColorDefault */
}

/* Type ramp: Title large 40/52, Title 28/36, Subtitle 20/28, Body large 18/24, Caption 12/16 */
h1, h2, h3 { font-weight: 600; }
h1 { font-size: 2.5rem; line-height: 3.25rem; text-wrap: balance; }
h2 { font-size: 1.75rem; line-height: 2.25rem; }
h3 { font-size: 1.25rem; line-height: 1.75rem; }
.lead { font-size: 1.125rem; line-height: 1.5rem; font-weight: 400; }
.small, small { font-size: .75rem; line-height: 1rem; }
@media (max-width: 575.98px) { h1 { font-size: 1.75rem; line-height: 2.25rem; } }

/* Fitts: every link or button is at least 44 px tall */
.tap { min-height: 44px; }
a.tap:not(.btn) { display: inline-flex; align-items: center; }

/* Focus visual: a 2 px black outer stroke, same as WinUI */
:focus-visible { outline: 2px solid var(--bs-emphasis-color) !important; outline-offset: 2px; box-shadow: none !important; }
main:focus { outline: none !important; }

/* Lucide swaps <i> for <svg>; reserve the space so nothing jumps */
i[data-lucide], svg.lucide { display: inline-block; width: 1rem; height: 1rem; flex-shrink: 0; stroke-width: 1.5; }

.site-header { border-bottom: 1px solid var(--bs-border-color); }
.nav-link { color: var(--bs-body-color); border-radius: var(--bs-border-radius); display: flex; align-items: center; }
.nav-link:hover, .nav-link:focus { color: var(--bs-body-color); background: var(--fl-subtle-hover); }

/* Buttons: standard (btn-light) and accent (btn-primary) */
.btn { --bs-btn-font-size: .875rem; --bs-btn-line-height: 1.25rem; --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .3125rem; --bs-btn-border-radius: var(--bs-border-radius); }
.btn-lg { --bs-btn-font-size: 1rem; --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .625rem; --bs-btn-border-radius: var(--bs-border-radius); }
.btn-primary {
  --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), .9); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: rgba(var(--bs-primary-rgb), .8); --bs-btn-active-border-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .4);  /* AccentControlElevationBorder */
}
.btn-light {
  --bs-btn-color: var(--bs-body-color); --bs-btn-bg: var(--fl-card); --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-color: var(--bs-body-color); --bs-btn-hover-bg: var(--fl-card-hover); --bs-btn-hover-border-color: var(--bs-border-color);
  --bs-btn-active-color: var(--bs-secondary-color); --bs-btn-active-bg: var(--fl-card-hover); --bs-btn-active-border-color: var(--bs-border-color);
  box-shadow: inset 0 -1px 0 var(--fl-stroke-bottom);  /* ControlElevationBorder */
}
.btn-primary .badge { background: #fff; color: var(--bs-primary-text-emphasis); }
.badge { font-weight: 600; border-radius: var(--bs-border-radius); }

/* Cards: CardBackgroundFillColorDefault + CardStrokeColorDefault, 8 px corners, no shadow */
.card {
  --bs-card-bg: var(--fl-card);
  --bs-card-border-color: var(--bs-border-color);
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
  --bs-card-spacer-y: 1rem;
  --bs-card-spacer-x: 1rem;
}

/* Download: two buttons side by side when there is room */
.downloads { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

/* Screenshots open in the lightbox */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: var(--bs-border-radius); cursor: zoom-in; }
.shot { display: block; width: 100%; height: auto; border-radius: var(--bs-border-radius); border: 1px solid var(--bs-border-color); }
.window .shot { border-radius: var(--bs-border-radius-lg); box-shadow: var(--fl-shadow-window); }

/* Steps: a sequence, so numbered. Thumbnail beside the title on phones, above it from md up. */
.steps { counter-reset: step; }
.step { flex-direction: row; align-items: center; gap: .75rem; padding: .5rem; }
.step .zoom { flex: 0 0 40%; }
.step-title { font-size: .875rem; line-height: 1.25rem; display: flex; align-items: center; gap: .5rem; }
.step-title::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: .75rem;
}
@media (min-width: 768px) {
  .step { flex-direction: column; align-items: stretch; }
  .step-title { padding: .25rem .25rem 0; }
}

/* Sketch of the SmartScreen window */
.smartscreen { background: var(--bs-primary); border-radius: var(--bs-border-radius-lg); }
.cue { outline: 3px solid var(--bs-warning); outline-offset: 4px; border-radius: var(--bs-border-radius); }
.cue-btn { display: inline-block; padding: .3125rem .75rem; border: 1px solid #fff; border-radius: var(--bs-border-radius); }
.cue-num {
  display: inline-grid; place-items: center;
  width: 1.5rem; height: 1.5rem; margin-inline: .75rem;
  border-radius: 50%; background: var(--bs-warning); color: #000;
  font-weight: 600; font-size: .75rem;
}

/* FAQ as WinUI Expanders: 48 px header, chevron on the right */
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 48px; padding: .75rem 1rem;
  list-style: none; cursor: pointer; border-radius: inherit;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--fl-card-hover); }
.faq details[open] > summary { border-bottom: 1px solid var(--bs-border-color); border-end-start-radius: 0; border-end-end-radius: 0; }
.faq details[open] > summary svg { rotate: 180deg; }
.faq details > p { padding: 1rem; margin: 0; }
.faq code { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { .faq summary svg { transition: rotate .167s ease-out; } }

.qr { width: 100%; max-width: 12rem; height: auto; border-radius: var(--bs-border-radius); }
.qr-card { max-width: 15rem; }

/* Lightbox: ContentDialog look, SmokeFillColorDefault behind it */
.lightbox {
  max-width: min(96vw, 1600px); max-height: 92vh; padding: 0;
  border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg);
  background: var(--bs-body-bg); box-shadow: var(--fl-shadow-dialog); overflow: hidden;
}
.lightbox::backdrop { background: var(--fl-smoke); }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .25rem .25rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
.lightbox img { display: block; max-width: 100%; max-height: calc(92vh - 3.5rem); object-fit: contain; margin-inline: auto; }

/* Contrast themes: let the system colors through and keep shapes visible */
@media (forced-colors: active) {
  .step-title::before, .cue-num, .smartscreen, .btn { border: 1px solid CanvasText; }
}
