/* Z apps - main stylesheet
   1. Theme colors: the custom properties in the "Themes" part below.
   2. Big background Z: the "Big Z logo" part. Its color palettes are in
      @keyframes z-colors, one block per palette.
   3. Speeds: z-spin (one full turn), z-colors (all palettes, 6 turns). */

@property --z-c1 { syntax: "<color>"; inherits: true; initial-value: #f3f0ff; }
@property --z-c2 { syntax: "<color>"; inherits: true; initial-value: #a99be6; }
@property --z-c3 { syntax: "<color>"; inherits: true; initial-value: #3f3780; }

/* ---------- Themes ---------- */
:root {
  color-scheme: dark;
  --bg: #0d1120;
  --bg-2: #1a1f3a;
  --halo: rgba(126, 112, 230, 0.20);
  --surface: rgba(18, 23, 42, 0.80);
  --surface-2: rgba(28, 34, 60, 0.92);
  --surface-hero: rgba(13, 17, 32, 0.72);
  --border: rgba(178, 188, 240, 0.20);
  --border-strong: rgba(190, 200, 255, 0.42);
  --text: #e8eaf4;
  --muted: #bcc2d8;
  --heading: #f7f5ff;
  --accent: #a8b8ff;
  --accent-2: #d3b6ff;
  --accent-ink: #141a33;
  --link: #b6c8ff;
  --link-hover: #e3d2ff;
  --focus: #ffd479;
  --focus-halo: rgba(255, 212, 121, 0.35);
  --btn-bg: linear-gradient(135deg, #b9c6ff, #d8bcff);
  --btn-text: #141a33;
  --title-gradient: linear-gradient(120deg, #ffffff 10%, #d6caff 45%, #aee0ff 75%, #ffffff 95%);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --blur: blur(14px) saturate(1.15);
  --z-opacity: 0.92;
  --edge: 1px;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eef0f8;
    --bg-2: #dfe4f4;
    --halo: rgba(126, 112, 230, 0.18);
    --surface: rgba(255, 255, 255, 0.84);
    --surface-2: rgba(255, 255, 255, 0.94);
    --surface-hero: rgba(255, 255, 255, 0.76);
    --border: rgba(40, 48, 90, 0.16);
    --border-strong: rgba(40, 48, 90, 0.36);
    --text: #1b2036;
    --muted: #454e6a;
    --heading: #11152e;
    --accent: #3e50c0;
    --accent-2: #6a3cb8;
    --accent-ink: #ffffff;
    --link: #2b41b3;
    --link-hover: #6332b0;
    --focus: #1b46d4;
    --focus-halo: rgba(27, 70, 212, 0.25);
    --btn-bg: linear-gradient(135deg, #3e50c0, #6a3cb8);
    --btn-text: #ffffff;
    --title-gradient: linear-gradient(120deg, #1a2470 10%, #5a2fa6 45%, #13507e 75%, #1a2470 95%);
    --shadow: 0 12px 30px rgba(30, 40, 90, 0.14);
    --z-opacity: 0.8;
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f8;
  --bg-2: #dfe4f4;
  --halo: rgba(126, 112, 230, 0.18);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-2: rgba(255, 255, 255, 0.94);
  --surface-hero: rgba(255, 255, 255, 0.76);
  --border: rgba(40, 48, 90, 0.16);
  --border-strong: rgba(40, 48, 90, 0.36);
  --text: #1b2036;
  --muted: #454e6a;
  --heading: #11152e;
  --accent: #3e50c0;
  --accent-2: #6a3cb8;
  --accent-ink: #ffffff;
  --link: #2b41b3;
  --link-hover: #6332b0;
  --focus: #1b46d4;
  --focus-halo: rgba(27, 70, 212, 0.25);
  --btn-bg: linear-gradient(135deg, #3e50c0, #6a3cb8);
  --btn-text: #ffffff;
  --title-gradient: linear-gradient(120deg, #1a2470 10%, #5a2fa6 45%, #13507e 75%, #1a2470 95%);
  --shadow: 0 12px 30px rgba(30, 40, 90, 0.14);
  --z-opacity: 0.8;
}

/* High contrast, dark */
html[data-contrast="on"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #000000;
  --halo: transparent;
  --surface: #000000;
  --surface-2: #000000;
  --surface-hero: #000000;
  --border: #ffffff;
  --border-strong: #ffffff;
  --text: #ffffff;
  --muted: #ffffff;
  --heading: #ffffff;
  --accent: #ffe14d;
  --accent-2: #ffe14d;
  --accent-ink: #000000;
  --link: #ffe14d;
  --link-hover: #ffffff;
  --focus: #3df2ff;
  --focus-halo: transparent;
  --btn-bg: #ffe14d;
  --btn-text: #000000;
  --title-gradient: none;
  --shadow: none;
  --blur: none;
  --z-opacity: 0.22;
  --edge: 2px;
}

/* High contrast, light */
@media (prefers-color-scheme: light) {
  html[data-contrast="on"]:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #ffffff;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-hero: #ffffff;
    --border: #000000;
    --border-strong: #000000;
    --text: #000000;
    --muted: #000000;
    --heading: #000000;
    --accent: #0030c0;
    --accent-2: #0030c0;
    --accent-ink: #ffffff;
    --link: #0030c0;
    --link-hover: #000000;
    --focus: #c40000;
    --btn-bg: #000000;
    --btn-text: #ffffff;
    --z-opacity: 0.14;
  }
}
html[data-contrast="on"][data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-hero: #ffffff;
  --border: #000000;
  --border-strong: #000000;
  --text: #000000;
  --muted: #000000;
  --heading: #000000;
  --accent: #0030c0;
  --accent-2: #0030c0;
  --accent-ink: #ffffff;
  --link: #0030c0;
  --link-hover: #000000;
  --focus: #c40000;
  --btn-bg: #000000;
  --btn-text: #ffffff;
  --z-opacity: 0.14;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html[data-size="large"] { font-size: 112.5%; }
html[data-size="xlarge"] { font-size: 125%; }
html[data-motion="off"] { scroll-behavior: auto; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3 { color: var(--heading); line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 0.14em; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.wrap { width: min(calc(100% - 2rem), 72rem); margin-inline: auto; }
.site-header, main, .site-footer { position: relative; z-index: 1; }
html:not(.js) .needs-js { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--focus-halo);
}
#main:focus { outline: none; box-shadow: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.8rem 1.3rem;
  border-radius: 0.7rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--btn-text); }

/* ---------- Big Z logo ---------- */
.z-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  perspective: 1800px;
  opacity: var(--z-opacity);
  background: radial-gradient(ellipse 80% 65% at 50% 42%, var(--bg-2), var(--bg) 72%);
  animation: z-colors 180s linear infinite;
}
.z-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.z-defs .s1 { stop-color: var(--z-c1); }
.z-defs .s2 { stop-color: var(--z-c2); }
.z-defs .s3 { stop-color: var(--z-c3); }
.z-halo {
  position: absolute;
  width: min(110vh, 150vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo), transparent);
}
.z-spinner {
  position: relative;
  height: min(80vh, 118vw);
  height: min(80svh, 118vw);
  aspect-ratio: 200 / 240;
  transform-style: preserve-3d;
  transform: rotateX(6deg) rotateY(-16deg);
  animation: z-spin 30s linear infinite;
  will-change: transform;
}
.z-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.z-back { transform: rotateY(180deg); }
.z-groove {
  fill: none;
  stroke: var(--z-c3);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
}
.z-pulse {
  fill: none;
  stroke: var(--z-c1);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 92;
  stroke-dashoffset: 100;
  opacity: 0.95;
  animation: z-pulse 7s linear infinite;
}
.z-sheen { animation: z-sheen 11s ease-in-out infinite; }

@keyframes z-spin {
  from { transform: rotateX(6deg) rotateY(0deg); }
  to { transform: rotateX(6deg) rotateY(360deg); }
}
@keyframes z-pulse { to { stroke-dashoffset: 0; } }
@keyframes z-sheen {
  0%, 55% { transform: translateX(0); }
  85%, 100% { transform: translateX(380px); }
}
/* Six metallic palettes. Each one holds for half a turn, then fades
   into the next during the other half: a new color on every full turn. */
@keyframes z-colors {
  0%, 8.33% { --z-c1: #f3f0ff; --z-c2: #a99be6; --z-c3: #3f3780; }   /* lavender silver */
  16.67%, 25% { --z-c1: #e9fbff; --z-c2: #6db6d8; --z-c3: #1d4a6b; } /* ocean steel */
  33.33%, 41.67% { --z-c1: #fff1ea; --z-c2: #e2a18e; --z-c3: #6e3b3b; } /* rose gold */
  50%, 58.33% { --z-c1: #eafff5; --z-c2: #6fcaa3; --z-c3: #1f5b4b; }  /* emerald */
  66.67%, 75% { --z-c1: #fff8e2; --z-c2: #d8b56a; --z-c3: #6b4e1d; }  /* champagne gold */
  83.33%, 91.67% { --z-c1: #f8ebff; --z-c2: #bb8ddb; --z-c3: #4c2b6c; } /* violet chrome */
  100% { --z-c1: #f3f0ff; --z-c2: #a99be6; --z-c3: #3f3780; }
}

/* Animation off: chosen in Display settings, or the device asks for less motion */
html[data-motion="off"] .z-stage,
html[data-motion="off"] .z-spinner,
html[data-motion="off"] .z-sheen,
html[data-motion="off"] .z-pulse,
html[data-motion="off"] .site-title { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) { scroll-behavior: auto; }
  html:not([data-motion="on"]) .z-stage,
  html:not([data-motion="on"]) .z-spinner,
  html:not([data-motion="on"]) .z-sheen,
  html:not([data-motion="on"]) .z-pulse,
  html:not([data-motion="on"]) .site-title { animation: none; }
}
/* Pause while the tab is hidden */
html.is-hidden .z-stage,
html.is-hidden .z-spinner,
html.is-hidden .z-sheen,
html.is-hidden .z-pulse,
html.is-hidden .site-title { animation-play-state: paused; }

/* ---------- Header ---------- */
.site-header { padding-top: 1rem; }
.header-bar,
.settings-panel,
.hero-card,
.section-head,
.card,
.footer-inner {
  border: var(--edge) solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  padding: 0.55rem 0.8rem;
  background: var(--surface);
  border-radius: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.2rem 0.5rem;
  border-radius: 0.7rem;
  color: var(--heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--heading); }
.brand-mark { width: 1.7rem; height: auto; aspect-ratio: 200 / 240; }
.main-nav { margin-inline-start: auto; }
.settings-toggle[aria-expanded="true"] {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: transparent;
}
.settings-toggle[aria-expanded="true"]:hover { color: var(--btn-text); }
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border: var(--edge) solid transparent;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.main-nav a:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--heading); }

.settings-panel {
  margin-top: 0.75rem;
  padding: 1.25rem;
  background: var(--surface-2);
  border-color: var(--border-strong);
  border-radius: 1.25rem;
}
.settings-panel[hidden] { display: none; }
.panel-title { margin: 0 0 0.2rem; color: var(--heading); font-size: 1.25rem; font-weight: 800; }
.panel-note { color: var(--muted); }
.settings-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0.6rem 1rem 0.9rem;
  border: var(--edge) solid var(--border);
  border-radius: 0.9rem;
}
legend { padding: 0 0.4rem; color: var(--heading); font-weight: 700; }
.choice { display: flex; align-items: center; gap: 0.65rem; min-height: 44px; }
.choice input {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.choice label { flex: 1; padding: 0.3rem 0; cursor: pointer; }
.panel-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: var(--edge) solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--heading);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btn:hover { color: var(--heading); }
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: transparent;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.btn-primary:hover { color: var(--btn-text); }
@media (hover: hover) {
  html[data-motion="on"] .btn:hover { transform: translateY(-2px); }
  .btn:hover { box-shadow: 0 10px 26px -10px var(--accent); }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 14vh, 9rem) 1rem clamp(2.5rem, 9vh, 5.5rem);
  text-align: center;
}
.hero-card {
  display: inline-block;
  width: min(100%, 48rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--surface-hero);
  border-radius: 2rem;
}
.site-title {
  margin: 0;
  color: var(--heading);
  font-size: clamp(3rem, 2rem + 6vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .site-title {
    background-image: var(--title-gradient);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-shine 14s ease-in-out infinite;
  }
  html[data-contrast="on"] .site-title {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--heading);
  }
}
@keyframes title-shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.tagline {
  max-width: 34ch;
  margin: 0.8rem auto 0;
  color: var(--accent-2);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.35;
}
.intro { max-width: 46ch; margin: 1rem auto 0; font-size: 1.125rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.75rem 0 0;
}

/* ---------- Sections and cards ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem;
  padding: 1rem 1.75rem;
  background: var(--surface);
  border-radius: 1.25rem;
  text-align: center;
}
.section-head h2 { margin: 0; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
.section-lead { max-width: 52ch; margin: 0.5rem auto 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-grid { max-width: 58rem; margin-inline: auto; }
.contact-grid { max-width: 54rem; margin-inline: auto; }
.card {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 1.4rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.card p:last-child { margin-bottom: 0; }

/* App cards */
.app-card {
  --app-accent: var(--accent);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 1.5rem auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--app-accent), transparent);
}
.app-card article { display: flex; flex-direction: column; gap: 0.9rem; height: 100%; }
.app-card:hover,
.app-card:focus-within {
  border-color: var(--app-accent);
  box-shadow: 0 18px 40px -18px var(--app-accent), var(--shadow);
}
@media (hover: hover) {
  html[data-motion="on"] .app-card:hover { transform: translateY(-4px); }
}
.app-card h3.app-name { margin: 0; font-size: 1.6rem; }
.app-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem;
  border-radius: 1rem;
  color: var(--heading);
  text-decoration: none;
}
a.app-link:hover { color: var(--heading); }
a.app-link:hover .app-title { text-decoration: underline; text-underline-offset: 0.2em; }
.app-logo-wrap {
  flex: none;
  display: grid;
  place-items: center;
  width: 4.75rem;
  height: 4.75rem;
  padding: 0.35rem;
  border: var(--edge) solid var(--border-strong);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 22px -12px var(--app-accent);
  transition: transform 0.35s;
}
.app-logo { width: 100%; height: 100%; object-fit: contain; border-radius: 0.9rem; }
.app-logo-letter { color: var(--heading); font-size: 2.2rem; font-weight: 900; }
@media (hover: hover) {
  html[data-motion="on"] a.app-link:hover .app-logo-wrap { transform: rotate(-6deg) scale(1.06); }
}
.app-tagline { margin: 0; color: var(--muted); font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.75rem;
  border: var(--edge) solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
}
.badge-status::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--dot, var(--accent));
}
.status-available { --dot: #5fd39a; }
.status-beta { --dot: #ffcf5c; }
.status-release-candidate { --dot: #8fb4ff; }
.status-coming-soon { --dot: #c9a6ff; }
.app-desc { margin: 0; }
.app-features { margin: 0; padding-left: 1.25rem; }
.app-features li { margin-bottom: 0.25rem; }
.app-features li::marker { color: var(--app-accent); }
.app-cta { margin: auto 0 0; padding-top: 0.4rem; }
.app-empty { grid-column: 1 / -1; text-align: center; }

/* Value cards */
.value-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
}
.value-icon .icon { width: 1.75rem; height: 1.75rem; }

/* Contact cards */
.contact-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.btn-mail {
  justify-content: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 1.3rem;
  border-radius: 1.2rem;
  text-align: start;
}
.btn-mail .icon { width: 1.6rem; height: 1.6rem; }
.mail-text { display: flex; flex-direction: column; min-width: 0; }
.mail-label { font-size: 1.15rem; }
.mail-addr { font-weight: 600; opacity: 0.92; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { padding: 1rem 0 2.5rem; }
.footer-inner {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 1.25rem;
  text-align: center;
}
.footer-inner p:last-child { margin-bottom: 0; }
.footer-brand { color: var(--heading); font-weight: 700; }

/* ---------- Status messages ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 50;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1.3rem;
  border: var(--edge) solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--heading);
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 150%);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- High contrast extras ---------- */
html[data-contrast="on"] .app-card::before { display: none; }
html[data-contrast="on"] .main-nav a { text-decoration: underline; }
html[data-contrast="on"] .app-logo-wrap { background: #ffffff; box-shadow: none; }
html[data-contrast="on"] .btn-primary { border-color: var(--border); }

/* ---------- Windows high contrast and other forced colors ---------- */
@media (forced-colors: active) {
  .z-stage { display: none; }
  .header-bar, .settings-panel, .hero-card, .section-head, .card, .footer-inner, .btn, .badge {
    border: 2px solid CanvasText;
  }
  .site-title { background: none; color: CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
  .badge-status::before { background: CanvasText; }
}

/* ---------- Print ---------- */
@media print {
  .z-stage, .settings-toggle, .settings-panel, .skip-link, .toast, .copy-btn { display: none !important; }
  body { background: #ffffff; color: #000000; }
  .header-bar, .hero-card, .section-head, .card, .footer-inner { box-shadow: none; border: 1px solid #000000; background: #ffffff; }
  .site-title { background: none; color: #000000; }
}
