/* =========================================================
   Testseite – zentrales Stylesheet
   Aufbau: 1) Design-Tokens  2) Basis  3) Layout
           4) Komponenten    5) Utilities  6) Responsive
   ========================================================= */

/* ---------- 1) Design-Tokens ---------- */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --border: #e2e6ee;
  --text: #1b1f2a;
  --text-muted: #5d6577;
  --primary: #3b5bfd;
  --primary-hover: #2c47d6;
  --primary-soft: #e7ecff;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .08);
  --space: 1rem;
  --container: 1120px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --transition: 160ms ease;
}

[data-theme="dark"] {
  --bg: #0f1218;
  --surface: #171b24;
  --surface-2: #1f2430;
  --border: #2b3140;
  --text: #e8ebf2;
  --text-muted: #99a1b3;
  --primary: #6d86ff;
  --primary-hover: #8298ff;
  --primary-soft: #232a44;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ---------- 2) Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* Diagramme füllen ihre Karte; die Höhe setzt charts.js über data-height. */
canvas { display: block; width: 100%; max-width: 100%; }

code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .15em .4em; border-radius: 4px; }
pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto;
}
pre code { background: none; padding: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--primary-soft); color: var(--text); }

/* Sprungmarke für Screenreader/Tastatur */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 3) Layout ---------- */
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); margin: 0; }

.grid { display: grid; gap: 1.25rem; }
/* Ohne min-width:0 dehnen breite Inhalte (z. B. <pre>) die Spalte und damit die Seite. */
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Header + Navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; font-size: .95rem;
}

.nav { margin-left: auto; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5rem .8rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer; font-size: 1.1rem; transition: background var(--transition);
}
.icon-btn:hover { background: var(--surface-2); }

.nav-toggle { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 2.5rem 0 1.5rem; margin-top: 3rem; color: var(--text-muted); font-size: .92rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-footer h4 { color: var(--text); font-size: .95rem; margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 52ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.hero-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; font-family: var(--mono); font-size: .85rem;
}
.hero-card .dots { display: flex; gap: .4rem; margin-bottom: .9rem; }
.hero-card .dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }

/* ---------- 4) Komponenten ---------- */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 550; font-size: .95rem; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover:not(:disabled) { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.05rem; }

/* Karten */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 1.3rem; margin-bottom: 1rem;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.badge-warning { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.badge-danger  { background: color-mix(in srgb, var(--danger) 15%, transparent);  color: var(--danger); }

/* Alerts */
.alert {
  display: flex; gap: .75rem; padding: 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 1rem;
}
.alert-info    { border-left: 4px solid var(--info); }
.alert-success { border-left: 4px solid var(--success); }
.alert-warning { border-left: 4px solid var(--warning); }
.alert-danger  { border-left: 4px solid var(--danger); }
.alert p { margin: 0; }

/* Formulare */
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 550; font-size: .92rem; margin-bottom: .35rem; }
.form-control {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.form-control[aria-invalid="true"] { border-color: var(--danger); }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: .82rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .82rem; color: var(--danger); margin-top: .3rem; min-height: 1.2em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check-row { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .5rem; }
.check-row input { margin-top: .35rem; }
.check-row label { margin: 0; font-weight: 400; }

/* Tabs */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: .25rem; overflow-x: auto; }
.tab {
  padding: .7rem 1rem; background: none; border: none; border-bottom: 2px solid transparent;
  font: inherit; font-weight: 550; color: var(--text-muted); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { padding-top: 1.25rem; }
.tab-panel[hidden] { display: none; }

/* Accordion */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .6rem; background: var(--surface); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem; background: none; border: none; font: inherit; font-weight: 550;
  color: var(--text); text-align: left; cursor: pointer;
}
.accordion-trigger .chev { transition: transform var(--transition); color: var(--text-muted); }
.accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.accordion-content { padding: 0 1.15rem 1.15rem; color: var(--text-muted); }
.accordion-content[hidden] { display: none; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(9, 12, 20, .55); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 1rem; z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  width: min(100%, 520px); max-height: 85vh; overflow-y: auto;
  transform: translateY(12px) scale(.98); transition: transform var(--transition);
}
.modal-backdrop.open .modal { transform: none; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .6rem; }

/* Toasts */
.toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 90;
  display: flex; flex-direction: column; gap: .6rem; max-width: min(360px, calc(100vw - 2rem));
}
.toast {
  display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  animation: toast-in 220ms ease both;
}
.toast.hide { animation: toast-out 180ms ease both; }
.toast-success { border-left-color: var(--success); }
.toast-warning { border-left-color: var(--warning); }
.toast-danger  { border-left-color: var(--danger); }
.toast strong { display: block; font-size: .92rem; }
.toast span { font-size: .88rem; color: var(--text-muted); }
.toast button { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + .35rem); left: 0; min-width: 190px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: .35rem; list-style: none; margin: 0;
}
.dropdown-menu[hidden] { display: none; }
.dropdown-menu button {
  width: 100%; text-align: left; padding: .5rem .7rem; background: none; border: none;
  border-radius: 6px; font: inherit; color: var(--text); cursor: pointer;
}
.dropdown-menu button:hover { background: var(--surface-2); }

/* Tooltip */
.tooltip { position: relative; border-bottom: 1px dashed var(--text-muted); cursor: help; }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: .4rem .6rem; border-radius: 6px;
  font-size: .8rem; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.tooltip:hover::after, .tooltip:focus-visible::after { opacity: 1; }

/* Progress + Meter */
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width 400ms ease; }

/* Tabelle */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table thead th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]::after { content: " ⇅"; color: var(--text-muted); font-size: .8em; }
.data-table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--primary); }
.data-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--primary); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.table-toolbar .form-control { width: auto; min-width: 220px; }
.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 1.25rem; flex-wrap: wrap; }
.pagination button { min-width: 38px; }
.pagination button[aria-current="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Galerie + Lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; position: relative; background: var(--surface-2); }
.gallery .thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 2.5rem; color: #fff; }
.gallery figcaption { padding: .6rem .75rem; font-size: .85rem; color: var(--text-muted); background: var(--surface); }
.lightbox {
  position: fixed; inset: 0; background: rgba(6, 8, 14, .9); z-index: 95;
  display: grid; place-items: center; padding: 1.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { max-width: 720px; width: 100%; text-align: center; color: #fff; }
.lightbox-figure .thumb { aspect-ratio: 16 / 9; border-radius: var(--radius); font-size: 5rem; }
.lightbox button.close { position: absolute; top: 1rem; right: 1rem; }
.lightbox .nav-prev, .lightbox .nav-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav-prev { left: 1rem; } .lightbox .nav-next { right: 1rem; }

/* Slider / Carousel */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.carousel-track { display: flex; transition: transform 400ms ease; }
.carousel-slide { min-width: 100%; max-width: 100%; padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.carousel-slide pre, .carousel-slide p { overflow-wrap: anywhere; }
.carousel-dots { display: flex; gap: .4rem; justify-content: center; padding-bottom: 1rem; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: none; background: var(--border); cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: var(--primary); width: 24px; border-radius: 999px; }

/* Stats / Counter */
.stat { text-align: center; }
.stat .value { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat .label { color: var(--text-muted); font-size: .9rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.6rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding-bottom: 1.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.6rem - 6px); top: .45rem;
  width: 11px; height: 11px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg);
}
.timeline time { font-size: .82rem; color: var(--text-muted); display: block; }

/* Todo-App */
.todo-input-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.todo-input-row .form-control[type="text"], .todo-input-row #todo-text { flex: 1 1 200px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem .25rem;
  border-bottom: 1px solid var(--border);
}
.todo-item:last-child { border-bottom: none; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-muted); }
.todo-text { flex: 1 1 55%; min-width: 0; overflow-wrap: anywhere; }
.todo-filters { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }

/* Skeleton-Loader */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Scroll-Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Scroll-Fortschrittsbalken */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--primary); width: 0; z-index: 60; }

/* Nach-oben-Button */
.to-top {
  position: fixed; bottom: 1.25rem; left: 1.25rem; z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
  background: var(--surface); box-shadow: var(--shadow);
}
.to-top.visible { opacity: 1; pointer-events: auto; }

/* ---------- 5) Utilities ---------- */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 6) Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: .75rem 1rem 1rem; box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform 220ms ease;
  }
  .nav.open { transform: none; }
  .nav ul { flex-direction: column; }
  .nav a { padding: .7rem .8rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .toast-container { left: 1rem; right: 1rem; max-width: none; }
}

@media print {
  .site-header, .site-footer, .to-top, .scroll-progress, .toast-container { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
