/* Avisame — product landing page. Design tokens + primitives live in tokens.css,
   linked first. This file is marketing layout only. Theme-aware (light + dark). */
:root { --radius: 16px; }
body {
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* --- header --- */
.lp-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.lp-header .container {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px;
}
.lp-brand {
  font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.lp-header nav { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 54px; padding: 15px 28px; font-size: 1.05rem; }

/* --- sections --- */
section { padding: 72px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 .4em; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin: 0 0 .35em; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.6em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 0 0 12px; }

/* --- hero --- */
.hero { padding-top: 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.hero-art { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* --- icon row / icon list (replaces prose bullet lists) --- */
.icon-row { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; padding: 0; margin: 0; }
.icon-row li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; }
.icon-row .icon { color: var(--accent); }
.icon-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.icon-list li { display: flex; align-items: center; gap: 12px; }
.icon-list .icon { color: var(--accent); flex: none; }

/* --- benefit / accessibility cards (icon + caption + <details>) --- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
}

/* --- how-it-works flow --- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.flow-step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: grid; gap: 8px; align-content: start; position: relative;
}
.flow-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 14px; right: 16px;
  color: var(--muted); font-weight: 800; font-size: .9rem;
}
.flow-step h3 { margin: 0; }
.flow-step .cap { color: var(--muted); margin: 0; font-size: .96rem; }

/* --- placement scenes --- */
.scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.scene { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.scene > svg { display: block; width: 100%; height: auto; background: var(--surface-2); }
.scene .cap { padding: 14px 16px; }
.scene .cap strong { display: flex; align-items: center; gap: 8px; }
.scene .cap strong .icon { flex: none; color: var(--accent); }
.scene .cap span { color: var(--muted); font-size: .92rem; }

/* --- detects chips --- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; font-weight: 600;
}
.chip.crit { border-color: var(--danger); color: var(--danger); }

/* "Qué detecta": one tile per sound, the icon big enough to read at a glance. */
.detect-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.detect-tile {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 12px;
  padding: 24px 12px 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.detect-icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.detect-icon .icon { width: 40px; height: 40px; stroke-width: 1.8; }
.detect-name { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.detect-tile.crit { border-color: color-mix(in srgb, var(--danger) 55%, var(--border)); }
.detect-tile.crit .detect-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); }
.detect-badge {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--danger); margin-top: -4px;
}
.detect-note { font-size: .8rem; color: var(--muted); margin-top: -6px; }
@media (max-width: 480px) {
  .detect-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .detect-icon { width: 64px; height: 64px; }
  .detect-icon .icon { width: 34px; height: 34px; }
}

/* --- hardware --- */
.hw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.callout {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-2);
  border-radius: 12px; padding: 14px 18px; color: var(--muted); font-size: .96rem;
}
.callout > summary {
  cursor: pointer; font-weight: 700; color: var(--text); list-style: none;
  display: flex; align-items: center; gap: 8px; min-height: 32px;
}
.callout > summary::-webkit-details-marker { display: none; }
.callout[open] > summary { margin-bottom: 8px; }
.callout p { margin: 0; }
.hw-diagram { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* --- final cta --- */
.cta-final { text-align: center; }
.cta-final .btn-lg { margin: 8px; }

/* --- footer --- */
.lp-footer { padding: 32px 0; color: var(--muted); font-size: .92rem; }
.lp-footer .container { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

/* --- SVG palette classes --- */
.svg-bg { fill: var(--surface-2); }
.svg-panel { fill: var(--surface); }
.svg-ink { stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svg-ink-fill { fill: var(--text); }
.svg-muted { stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; }
.svg-accent { stroke: var(--accent); fill: none; stroke-width: 2.5; stroke-linecap: round; }
.svg-accent-fill { fill: var(--accent); }
.svg-ok-fill { fill: var(--accent-2); }
.svg-danger-fill { fill: var(--danger); }
.svg-label { fill: var(--muted); font: 600 11px system-ui, sans-serif; }
.svg-wire { stroke: var(--accent); stroke-width: 2; fill: none; }
/* Hero (_svg_hero.svg): the timbre → Avisame → phone story, readable at a glance. */
.hero-stroke { stroke: var(--text); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hero-stroke-ink { stroke: var(--accent-ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-wave { stroke-width: 3.5; }
.hero-card { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.hero-title { fill: var(--text); font: 800 24px system-ui, sans-serif; }
.hero-sub { fill: var(--muted); font: 600 14px system-ui, sans-serif; }
.hero-cap { fill: var(--text); font: 700 18px system-ui, sans-serif; }
.hero-num { fill: var(--accent-ink); font: 800 14px system-ui, sans-serif; }

@media (max-width: 900px) {
  .hero-grid, .hw-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-3, .flow, .scenes { grid-template-columns: repeat(2, 1fr); }
  section { padding: 52px 0; }
}
/* One label per button, chosen by width — "Iniciar sesión" and "Crear cuenta"
   side by side do not fit a 360px row, "Ingresar" and "Crear cuenta" do. */
.lbl-short { display: none; }

@media (max-width: 560px) {
  .grid-3, .flow, .scenes { grid-template-columns: 1fr; }
  /* One row, not two: the header is the first thing on the page and it should
     not cost a third of the screen before the headline starts. "Planes" leaves
     it — the page has a whole #planes section and the footer links it — so the
     only things up here are who we are and the two ways in. */
  .lp-header .container { flex-wrap: nowrap; min-height: 0; padding: 8px 14px; gap: 8px; }
  .lp-brand { font-size: 1.02rem; min-width: 0; }
  .lp-brand .brand-word { overflow: hidden; text-overflow: ellipsis; }
  .lp-header nav { gap: 6px; flex-wrap: nowrap; flex: none; }
  /* "Planes" and "Comunidad" both live further down the page and in the
     footer; up here they only push the way in off the edge. */
  .lp-header .lp-link, .lp-header .lp-secondary { display: none; }
  .lp-header nav .btn {
    min-height: 42px; padding: 8px 12px; font-size: .95rem; white-space: nowrap;
  }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}

/* --- nav text link (next to the buttons, lighter than both) --- */
.lp-link {
  color: var(--muted); text-decoration: none; font-weight: 700;
  min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center;
}
.lp-link:hover, .lp-link[aria-current="page"] { color: var(--text); }
.lp-footer a { color: var(--muted); }
.lp-footer a:hover { color: var(--text); }

/* --- /planes/ --- */
.plans-hero { padding: 56px 0 8px; border-bottom: 0; }
.plans-hero h1 { max-width: 22ch; }
.plans-hero .lead { max-width: 640px; }
.plan-current {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; font-weight: 600;
}
.plan-current span { color: var(--muted); font-weight: 500; }
.plans-section { padding-top: 36px; }

.plan-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: stretch;
  max-width: 820px; margin-inline: auto;
}
.plan { display: flex; flex-direction: column; gap: 12px; position: relative; padding: 26px 24px; }
.plan-featured {
  border: 2px solid var(--accent);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--accent) 18%, transparent);
}
.plan-ribbon {
  position: absolute; top: -13px; left: 22px;
  background: var(--accent); color: var(--accent-ink);
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
}
.plan-name { font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.plan-featured .plan-name { color: var(--accent); }
.plan-price {
  font-size: 2.3rem; font-weight: 800; line-height: 1.1; margin: 0;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.plan-price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
/* The header is sticky, so an in-page jump (#como-pagar) would otherwise land
   with the section's title underneath it. */
section[id] { scroll-margin-top: 80px; }
.plan-alt { margin: 0; color: var(--muted); font-size: .96rem; }
.plan-save { color: var(--ok); font-weight: 700; }
.plan-feats { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 10px; align-content: start; flex: 1; }
.plan-feats li { display: flex; gap: 10px; align-items: flex-start; }
.plan-feats .icon { color: var(--accent); flex: none; margin-top: .15em; }
.plan-feats .icon-ok { color: var(--ok); }
.plan-feats .is-off, .plan-feats .is-off .icon { color: var(--muted); }
.plan > .btn { width: 100%; }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.pay-option { display: grid; gap: 12px; align-content: start; }
.pay-option h3 { margin: 0; }
.pay-option .cap { color: var(--muted); margin: 0; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bank-data { margin: 0; display: grid; gap: 8px; }
.bank-data div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.bank-data dt { color: var(--muted); }
.bank-data dd { margin: 0; font-weight: 700; word-break: break-all; text-align: right; }
.bank-data code, .err-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
  background: var(--surface-2); border-radius: 6px; padding: 2px 8px; word-break: break-all;
}
.pay-note { color: var(--muted); margin: 18px 0 0; }
.faq { display: grid; gap: 12px; max-width: 760px; }

/* MercadoPago (instant) next to transfer (by hand): the badge says which is
   which before anyone reads the steps. */
.pay-featured { border: 2px solid var(--accent); }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pay-badge {
  font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.pay-badge.is-fast { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pay-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.pay-steps li::marker { color: var(--accent); font-weight: 800; }
.pay-notice {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-left-width: 4px;
}
.pay-notice.is-ok { border-left-color: var(--ok); }
.pay-notice.is-wait { border-left-color: var(--warn); }
.pay-notice.is-bad { border-left-color: var(--danger); }
.plans-more { text-align: center; margin: 28px 0 0; }

/* Step 1 (the device, bought once) above step 2 (the plan). */
.device-offer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
  padding: 28px; margin: 0 auto 48px; max-width: 980px;
}
.device-art { background: var(--surface-2); border-radius: 12px; padding: 16px; }
.device-info { display: grid; gap: 10px; align-content: start; }
.device-info .eyebrow { margin: 0; }
.device-title { margin: 0; font-size: 1.6rem; }
.device-info .plan-feats { flex: none; }
.device-info .btn { justify-self: start; }
.plans-subhead { text-align: center; margin: 0 0 28px; }
.plans-subhead .eyebrow { margin-bottom: 6px; }
.plans-subhead h2, .plans-subhead h3 { margin: 0; }

.device-svg { display: block; width: 100%; height: auto; }
.dev-shadow { fill: var(--border); opacity: .5; }
.dev-body { fill: var(--surface); stroke: var(--text); stroke-width: 3; }
.dev-face { fill: var(--surface-2); }
.dev-glow { fill: var(--accent); opacity: .18; }
.dev-led { fill: var(--accent); }
.dev-grille { fill: var(--muted); }
.dev-word { font: 800 14px system-ui, sans-serif; fill: var(--muted); letter-spacing: .06em; }
.dev-wave { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; animation: dev-wave 2.4s ease-in-out infinite; }
.dev-wave-2 { animation-delay: .3s; }
.dev-cable { fill: none; stroke: var(--muted); stroke-width: 4; stroke-linecap: round; }
.dev-link { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 4 6; stroke-linecap: round; }
.dev-note { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.dev-bell { fill: var(--accent); }
.dev-note-text { font: 700 11px system-ui, sans-serif; fill: var(--text); }
.dev-vibe { fill: none; stroke: var(--warn); stroke-width: 3; stroke-linecap: round; }
.dev-pulse { transform-box: fill-box; transform-origin: center; animation: dev-pulse 2.4s ease-out infinite; }
@keyframes dev-pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes dev-wave { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .dev-wave, .dev-pulse { animation: none; } }

/* --- 404 / 500 --- */
.err { padding: 40px 0 72px; text-align: center; border-bottom: 0; }
.err .lead { max-width: 560px; margin-inline: auto; }
.err h1 { max-width: 20ch; margin-inline: auto; }
.err-art { max-width: 380px; margin: 0 auto 8px; }
.err-svg { display: block; width: 100%; height: auto; overflow: visible; }
.err-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --border rather than --surface-2: on the light ground surface-2 is within a
   shade of the page and the number vanished. */
.err-bigcode { font: 800 150px/1 system-ui, sans-serif; fill: var(--border); opacity: .55; letter-spacing: -.04em; }
.err-shadow { fill: var(--border); opacity: .6; }
.err-body { fill: var(--surface); stroke: var(--text); stroke-width: 3; }
.err-lens { fill: var(--surface-2); fill-opacity: .7; stroke: var(--text); stroke-width: 4; }
.err-handle { stroke: var(--warn); stroke-width: 10; stroke-linecap: round; }
.err-glint-line { fill: none; stroke: var(--surface); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.err-lens-q { font: 800 30px system-ui, sans-serif; fill: var(--accent); }
.err-cable { fill: none; stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.err-glass { transform-box: view-box; transform-origin: 150px 222px; animation: err-sweep 2.8s ease-in-out infinite; }
@keyframes err-sweep { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.err-thick { stroke-width: 4; }
.err-glint { fill: var(--surface); }
.err-grille { fill: var(--muted); }
.err-drop { fill: var(--accent); opacity: .85; }
.err-dash { stroke-dasharray: 4 6; }
.err-q { font: 800 34px system-ui, sans-serif; fill: var(--accent); }
.err-spark { fill: none; stroke: var(--warn); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.err-smoke circle { fill: var(--muted); opacity: .35; }

.err-bob { transform-box: fill-box; transform-origin: 50% 100%; animation: err-bob 3.2s ease-in-out infinite; }
.err-q, .err-smoke circle { transform-box: fill-box; animation: err-float 2.4s ease-in-out infinite; }
.err-q2, .err-smoke circle:nth-child(2) { animation-delay: .4s; }
.err-q3, .err-smoke circle:nth-child(3) { animation-delay: .8s; }
.err-led { animation: err-blink 1.6s steps(1) infinite; }
@keyframes err-bob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-4px); } }
@keyframes err-float { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-8px); opacity: .45; } }
@keyframes err-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .err-bob, .err-q, .err-smoke circle, .err-led, .err-glass { animation: none; }
}

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .device-offer { grid-template-columns: 1fr; max-width: 520px; padding: 20px; }
  .pay-grid { grid-template-columns: 1fr; }
}

/* --- Accounts: login, sign-up, password reset (avisame/accounts.py) --- */
.auth-wrap { padding: 48px 0 72px; }
.auth-card { max-width: 440px; margin: 0 auto; display: grid; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 1.8rem; line-height: 1.2; }
.auth-lead { color: var(--muted); margin: 0; }
.auth-form { display: grid; gap: 12px; }
.auth-card .field { display: grid; gap: 6px; font-weight: 600; }
.auth-card .field input {
  font: inherit; font-weight: 400; min-height: 48px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
.auth-card .field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.auth-card .btn { width: 100%; }
.auth-card .errorlist { color: var(--danger); margin: 0; padding-left: 1.1em; }
.auth-errors { color: var(--danger); }
.auth-alt { color: var(--muted); margin: 0; text-align: center; }
.auth-hint { color: var(--muted); font-size: .9rem; margin: 0; }
/* "Continuar con Google": white button + the multicolour G, per Google's brand guidelines. */
.btn-google { background: #fff; color: #1f1f1f; border-color: #747775; }
.btn-google:hover { background: #f6f8fa; }
.btn-google .google-g { width: 20px; height: 20px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0; font-size: .9rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Privacy policy, terms and help (views.legal_page): long reading, so a
   narrow measure and generous line height. */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 64px; line-height: 1.65; }
.legal h1 { margin-bottom: .2em; }
.legal h2 { margin-top: 1.8em; }
.legal h3 { margin: 1.2em 0 .3em; font-size: 1.05rem; }
.legal-updated { color: var(--muted); margin-top: 0; }
.legal li { margin-bottom: .35em; }

/* --- Blog (blog.py): the list with its archive, a post (a .legal article), an author --- */
.blog { max-width: 1040px; padding-top: 32px; padding-bottom: 64px; }
.blog-head { max-width: 760px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: start; }
.blog-month { scroll-margin-top: 84px; margin-bottom: 28px; padding: 0; }
.blog-year { scroll-margin-top: 84px; }
.blog-month-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.blog-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.blog-card {
  padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.blog-card:hover { border-color: var(--accent); }
.blog-card time { color: var(--muted); font-size: .9rem; }
.blog-card h3 { margin: .25em 0 .35em; font-size: 1.3rem; line-height: 1.3; }
.blog-card h3 a { color: inherit; text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent); }
.blog-card p { margin: 0 0 .8em; color: var(--muted); }
.blog-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.blog-more { color: var(--accent); font-weight: 600; text-decoration: none; }
.blog-byline { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 600; text-decoration: none; }
.blog-byline:hover span { text-decoration: underline; }
.blog-byline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.blog-post-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); margin: .4em 0 1.2em; }
.blog-archive { position: sticky; top: 84px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.blog-archive h2 { font-size: 1rem; margin: 0 0 8px; }
.blog-archive ul { list-style: none; padding: 0; margin: 0; }
.blog-archive ul ul { margin: 4px 0 10px 12px; }
.blog-archive a { display: block; padding: 4px 0; color: inherit; text-decoration: none; }
.blog-archive a:hover { color: var(--accent); }
.blog-archive-year { font-weight: 700; }
html:has(.blog-archive) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.blog-archive) { scroll-behavior: auto; } }
@media (max-width: 820px) {
  .blog-layout { grid-template-columns: 1fr; gap: 20px; }
  .blog-archive { position: static; order: -1; }
  .blog-archive > ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .blog-archive ul ul { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0 0 4px 0; }
}
.blog-author-card { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-bottom: 32px; }
.blog-author-card img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.blog-author-card > div { flex: 1 1 280px; }
.blog-author-card h1 { margin: 0 0 .2em; }
.blog-author-card .lead { margin-bottom: .6em; }
.blog-author-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.blog-author .blog-list { max-width: 760px; }
.blog-back { margin: 0 0 1em; }
.blog-draft {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem;
  color: var(--warn); border: 1px solid var(--warn);
}
.blog-post .lead { margin-bottom: 1.2em; }
.blog-post table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .98rem; }
.blog-post th, .blog-post td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.blog-post th { color: var(--muted); font-weight: 600; }
.blog-post td.num, .blog-post th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.blog-post td.up { color: var(--ok); font-weight: 700; }
.blog-post td.down { color: var(--warn); font-weight: 700; }
.blog-post .table-wrap { overflow-x: auto; }
.blog-post .blog-note {
  padding: 14px 16px; border-radius: 12px; margin: 1.2em 0;
  background: var(--surface); border: 1px solid var(--border);
}

/* --- the install video, when there is one (16:9, never wider than the text) --- */
.how-video {
  margin: 36px 0 0; max-width: 760px; aspect-ratio: 16 / 9;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.how-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* A note under a section: smaller, quieter, and still readable. */
.note { color: var(--muted); font-size: .95rem; max-width: 760px; margin: 28px 0 0; }

/* --- comparison table ---
   Wide by nature, so it scrolls inside its own box instead of pushing the page
   sideways. On a phone each row becomes a card: a 5-column table at 360px is
   unreadable however small you make the type. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  border-collapse: collapse; width: 100%; min-width: 860px;
  font-size: .95rem; text-align: left;
}
.compare th, .compare td {
  border: 1px solid var(--border); padding: 12px 14px; vertical-align: top;
}
.compare thead th { background: var(--surface-2); font-weight: 800; }
.compare tbody th { background: var(--surface); font-weight: 700; width: 168px; }
.compare td { color: var(--muted); }
/* The Avisame column, marked by a class and not only by colour. */
.compare td.yes { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.compare td.yes::before {
  content: "✓ "; color: var(--accent); font-weight: 800;
}

@media (max-width: 720px) {
  .compare { min-width: 0; display: block; }
  .compare thead { display: none; }
  .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 14px; overflow: hidden;
  }
  .compare th, .compare td { border: 0; border-top: 1px solid var(--border); }
  .compare tbody th { border-top: 0; font-size: 1.05rem; }
  /* Without the header row, each cell has to say which column it came from. */
  .compare td::after {
    content: attr(data-col); display: block; margin-top: 4px;
    font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  }
}

/* --- testimonials (hidden until there are real ones) --- */
.quote { margin: 0; display: grid; gap: 12px; }
.quote blockquote { margin: 0; font-size: 1.05rem; }
.quote blockquote p { margin: 0; }
.quote figcaption { color: var(--muted); font-weight: 700; }

/* --- motion graphic: one doorbell ring, start to finish (_motion_doorbell.html) ---
   A 1600×900 scene. The SVG draws in those units; --u is one scene unit at
   zoom 1 (from the stage's height, so the square stage on a phone crops the
   sides instead of shrinking everything) and --w one unit at the camera's zoom. --fx is the scene x at the
   stage's centre in the wide shot, --s2 the zoom of the middle shot.
   Base styles are the still (reduced motion); the timeline only runs under
   .is-playing, and replay re-adds that class. Times are seconds from the start. */
.mg-section .section-head { margin-bottom: 28px; }
.mg { position: relative; max-width: 1000px; margin: 0 auto; }
.mg-stage {
  --u: calc(100cqh / 900);
  --fx: 800; --s2: 1.8;
  --mg-wall: #1b2634; --mg-floor: #101820; --mg-floorline: #1a2530; --mg-skirt: #0d141c;
  --mg-door: #7b4f33; --mg-door-2: #6b432a; --mg-doorframe: #2c3b4f; --mg-shelf: #3b4d63;
  --mg-pic: #2c3b4f; --mg-pic-bg: #2a4a6e; --mg-pic-hill: #3f7f6a;
  --mg-end: #0b0f14;
  container-type: size;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--mg-wall);
  isolation: isolate;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .mg-stage {
    --mg-wall: #e6edf5; --mg-floor: #c6d1de; --mg-floorline: #b7c4d3; --mg-skirt: #b1bfcf;
    --mg-door: #b97d50; --mg-door-2: #a86d43; --mg-doorframe: #fbfcfe; --mg-shelf: #93a4b8;
    --mg-pic: #fbfcfe; --mg-pic-bg: #bcd9f5; --mg-pic-hill: #6fb59a;
    --mg-end: #f3f6fa;
  }
}
:root[data-theme="light"] .mg-stage {
  --mg-wall: #e6edf5; --mg-floor: #c6d1de; --mg-floorline: #b7c4d3; --mg-skirt: #b1bfcf;
  --mg-door: #b97d50; --mg-door-2: #a86d43; --mg-doorframe: #fbfcfe; --mg-shelf: #93a4b8;
  --mg-pic: #fbfcfe; --mg-pic-bg: #bcd9f5; --mg-pic-hill: #6fb59a;
  --mg-end: #f3f6fa;
}
@media (max-width: 640px) {
  .mg-stage { aspect-ratio: 1 / 1; --fx: 850; --s2: 1.45; }
}

.mg-world {
  --cam-s: 1; --cam-x: var(--fx); --cam-y: 450;
  --w: calc(var(--u) * var(--cam-s));
  position: absolute;
  width: calc(1600 * var(--w)); height: calc(900 * var(--w));
  left: calc(50% - var(--cam-x) * var(--w)); top: calc(50% - var(--cam-y) * var(--w));
}
.mg-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.mg-wall { fill: var(--mg-wall); }
.mg-floor { fill: var(--mg-floor); }
.mg-floorline { stroke: var(--mg-floorline); stroke-width: 3; fill: none; }
.mg-skirt { fill: var(--mg-skirt); }
.mg-pic { fill: var(--mg-pic); }
.mg-pic-bg { fill: var(--mg-pic-bg); }
.mg-pic-hill { fill: var(--mg-pic-hill); }
.mg-pic-sun { fill: #ffd34e; }
.mg-doorframe { fill: var(--mg-doorframe); }
.mg-door { fill: var(--mg-door); }
.mg-door-panel { fill: var(--mg-door-2); }
.mg-knob { fill: #f2c14e; }
.mg-mat { fill: #5b6b7d; }
.mg-bell-plate { fill: #f7f9fc; stroke: #8193a8; stroke-width: 2; }
.mg-bell-btn { fill: #ffd34e; stroke: #b98a12; stroke-width: 2; }
.mg-bellwaves circle, .mg-devrings circle {
  fill: none; stroke: #4ea1ff; stroke-width: 3; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center; opacity: 0;
}
.mg-bellwaves circle { stroke: #ffb020; }
.mg-halo { opacity: .75; }
.mg-devshadow { fill: #000; opacity: .25; }
.mg-shelf { fill: var(--mg-shelf); }
.mg-leaf { fill: #3fae7a; }
.mg-pot { fill: #d9774b; }
.mg-skin { fill: #e8b58f; }
.mg-hair { fill: #3b2a20; }
.mg-eye { fill: #1c2530; }
.mg-jacket { fill: #ff7a59; }
.mg-sleeve { fill: #ec6645; }
.mg-pants { fill: #3a5068; }
.mg-pants-b { fill: #2d4054; }
.mg-shoe { fill: #1c2530; }
.mg-arm { transform: rotate(-102.6deg); }

/* The device: twelve layers make the body's depth, the face sits on top. */
.mg-dev {
  position: absolute; left: calc(1160 * var(--w)); top: calc(446 * var(--w));
  width: calc(110 * var(--w)); height: calc(110 * var(--w));
  perspective: calc(700 * var(--w));
}
.mg-dev-3d { position: absolute; inset: 0; transform-style: preserve-3d; }
.mg-dev-3d > i {
  position: absolute; inset: 0; border-radius: 26%;
  background: linear-gradient(160deg, #2f7cd6, #184c90);
  transform: translateZ(calc(var(--i) * 3 * var(--w)));
}
.mg-dev-front {
  position: absolute; inset: 0; border-radius: 26%; overflow: hidden;
  transform: translateZ(calc(36 * var(--w)));
  background: linear-gradient(150deg, #7cc0ff, #3d8fea 50%, #2a74d2);
  box-shadow: inset 0 calc(3 * var(--w)) calc(4 * var(--w)) rgba(255, 255, 255, .4),
              inset 0 calc(-4 * var(--w)) calc(6 * var(--w)) rgba(0, 30, 80, .35);
  display: grid; place-items: center;
}
.mg-dev-front::before, .mg-dev-front::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
/* the glint that crosses the face as it turns */
.mg-dev-front::before {
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%);
}
/* the whole face lighting up when it hears the bell */
.mg-dev-front::after {
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .9), rgba(160, 210, 255, .2) 70%);
  opacity: 0;
}
.mg-dev-plate {
  position: relative; z-index: 1;
  width: 70%; height: 70%; border-radius: 24%;
  background: linear-gradient(#123763, #0a2141);
  display: grid; justify-items: center; align-content: space-evenly;
}
.mg-dev-led {
  width: calc(17 * var(--w)); height: calc(17 * var(--w)); border-radius: 50%;
  background: #fff; box-shadow: 0 0 calc(24 * var(--w)) calc(10 * var(--w)) #7cc0ff;
}
.mg-dev-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(5 * var(--w)); }
.mg-dev-grille b { width: calc(6 * var(--w)); height: calc(6 * var(--w)); border-radius: 50%; background: #4b82c4; }

/* The phone, over a dimmed room. */
.mg-dim { position: absolute; inset: 0; background: #05080c; opacity: .55; }
.mg-phone {
  position: absolute; top: 8cqmin; left: calc(50% - 20cqmin);
  width: 40cqmin; height: 82cqmin;
}
.mg-phone-body {
  position: absolute; inset: 0; border-radius: 6cqmin; padding: 1.4cqmin;
  background: #0d1117;
  box-shadow: 0 2cqmin 6cqmin rgba(0, 0, 0, .5), inset 0 0 0 .5cqmin #2f3b4a;
}
.mg-phone-screen {
  height: 100%; border-radius: 4.8cqmin; overflow: hidden; position: relative;
  background: linear-gradient(165deg, #3d7de0, #6b4fc8 60%, #2a1f5c);
  color: #fff; padding: 2.2cqmin;
}
.mg-phone-status {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 2.4cqmin; font-weight: 700; padding: 0 1.4cqmin;
}
.mg-phone-dots { display: flex; gap: .6cqmin; }
.mg-phone-dots b { width: 1.2cqmin; height: 1.2cqmin; border-radius: 50%; background: #fff; }
.mg-phone-clock {
  text-align: center; font-size: 11cqmin; font-weight: 300; line-height: 1;
  margin: 5cqmin 0 6cqmin; letter-spacing: -.02em;
}
.mg-note {
  display: flex; gap: 2cqmin; align-items: flex-start;
  background: rgba(255, 255, 255, .94); color: #0d1620;
  border-radius: 3.2cqmin; padding: 2.2cqmin;
  box-shadow: 0 1cqmin 3cqmin rgba(0, 0, 0, .25);
}
.mg-note-icon { width: 7cqmin; height: 7cqmin; flex: none; }
.mg-note-text { display: grid; gap: .3cqmin; line-height: 1.2; min-width: 0; }
.mg-note-app { font-size: 2.2cqmin; font-weight: 700; color: #4a5b6b; letter-spacing: .04em; }
.mg-note-text strong { font-size: 4cqmin; }
.mg-note-text span:last-child { font-size: 3.2cqmin; }
.mg-vibe {
  position: absolute; top: 34%; width: 3cqmin; height: 14cqmin; opacity: 0;
  border: 0 solid #ffb020; border-width: 0 .7cqmin; border-radius: 1cqmin;
}
.mg-vibe-l { left: -7.5cqmin; }
.mg-vibe-r { right: -7.5cqmin; }
@media (max-width: 640px) {
  .mg-phone { top: 4cqmin; left: calc(50% - 26cqmin); width: 52cqmin; height: 86cqmin; }
  .mg-note-icon { width: 9cqmin; height: 9cqmin; }
  .mg-note-app { font-size: 3cqmin; }
  .mg-note-text strong { font-size: 5.6cqmin; }
  .mg-note-text span:last-child { font-size: 4.6cqmin; }
}

/* The closing card. */
.mg-end {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: var(--mg-end);
  display: grid; place-content: center; justify-items: center; gap: 1cqmin; text-align: center;
}
.mg-end-logo {
  display: flex; align-items: center; gap: .3em; color: var(--text);
  font-size: clamp(30px, 11cqmin, 76px);
}
.mg-end-tag { margin: 0; color: var(--muted); font-size: clamp(15px, 4cqmin, 26px); font-weight: 600; }

/* Subtitles: the whole story is told in text as well. */
.mg-subs {
  position: absolute; inset: auto 0 5cqmin; padding: 0 16px;
  display: grid; justify-items: center; pointer-events: none;
}
.mg-sub {
  grid-area: 1 / 1; opacity: 0; text-align: center;
  background: rgba(5, 8, 12, .78); color: #fff; font-weight: 700;
  font-size: clamp(14px, 4cqmin, 24px); line-height: 1.3;
  padding: .3em .8em; border-radius: 8px;
}

.mg-replay {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .92rem; font-weight: 700;
  color: #fff; background: rgba(5, 8, 12, .6); border: 1px solid rgba(255, 255, 255, .25);
}
.mg-replay:hover { background: rgba(5, 8, 12, .85); }

/* --- the timeline --- */
.mg.is-waiting *, .mg.is-waiting .mg-dev-front::before, .mg.is-waiting .mg-dev-front::after {
  animation-play-state: paused !important;
}
.mg.is-playing .mg-world { animation: mg-cam 6.6s linear both; }
.mg.is-playing .mg-dev-3d { animation: mg-dev-turn 2.6s cubic-bezier(.2, .7, .2, 1) both; }
.mg.is-playing .mg-dev-front::before { animation: mg-glint 1.1s ease-in-out .9s both; }
.mg.is-playing .mg-dev-front::after { animation: mg-flash 1.8s linear 9.1s both; }
.mg.is-playing .mg-dev-led { animation: mg-led 1.8s linear 9.1s both; }
.mg.is-playing .mg-halo { animation: mg-flash 1.8s linear 9.1s both; }
.mg.is-playing .mg-devrings circle { animation: mg-ring 1.2s ease-out 9.2s 2; }
.mg.is-playing .mg-devrings circle + circle { animation-delay: 9.6s; }
.mg.is-playing .mg-walker { animation: mg-walk 2.1s cubic-bezier(.35, .4, .35, 1) 5.6s both; }
.mg.is-playing .mg-bob { animation: mg-bob .26s ease-in-out 5.6s 8 alternate; }
.mg.is-playing .mg-leg-f { animation: mg-step .52s ease-in-out 5.6s 4 alternate; }
.mg.is-playing .mg-leg-b { animation: mg-step .52s ease-in-out 5.6s 4 alternate-reverse; }
.mg.is-playing .mg-arm { animation: mg-arm 2.8s ease-out 7.7s both; }
.mg.is-playing .mg-bell-btn { animation: mg-press 1s ease-out 8.1s both; }
.mg.is-playing .mg-bellwaves circle { animation: mg-ring 1.3s ease-out 8.15s; }
.mg.is-playing .mg-bellwaves circle:nth-child(2) { animation-delay: 8.45s; }
.mg.is-playing .mg-bellwaves circle:nth-child(3) { animation-delay: 8.75s; }
.mg.is-playing .mg-dim { animation: mg-fade-dim .6s ease-out 10.7s both; }
.mg.is-playing .mg-phone { animation: mg-phone-in .8s cubic-bezier(.2, .9, .3, 1.08) 10.7s both; }
.mg.is-playing .mg-phone-body { animation: mg-shake .07s linear 11.95s 8 alternate; }
.mg.is-playing .mg-note { animation: mg-note-in .5s cubic-bezier(.2, .9, .3, 1.1) 11.4s both; }
.mg.is-playing .mg-vibe { animation: mg-vibe .56s linear 11.95s both; }
.mg.is-playing .mg-end { animation: mg-fade .7s ease-out 13.9s both; }
.mg.is-playing .mg-end-logo { animation: mg-pop .8s cubic-bezier(.2, .9, .3, 1.2) 14.1s both; }
.mg.is-playing .mg-end-tag { animation: mg-rise .6s ease-out 14.6s both; }
.mg.is-playing .mg-sub { animation: mg-sub var(--d) ease-in-out var(--t) both; }
.mg.is-playing .mg-replay { animation: mg-replay-on .5s ease-out 15s both; }

/* camera: the scene point (--cam-x, --cam-y) at the stage's centre, at zoom
   --cam-s. The world is resized rather than transformed, so the SVG and the
   device are drawn at the zoom they are seen at and stay sharp. */
@property --cam-s { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --cam-x { syntax: "<number>"; inherits: true; initial-value: 800; }
@property --cam-y { syntax: "<number>"; inherits: true; initial-value: 450; }
@keyframes mg-cam {
  0% { --cam-s: 4.6; --cam-x: 1215; --cam-y: 501; }
  36% { --cam-s: 4.2; --cam-x: 1215; --cam-y: 501; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  60% { --cam-s: var(--s2); --cam-x: 980; --cam-y: 500; }
  76% { --cam-s: var(--s2); --cam-x: 980; --cam-y: 500; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  100% { --cam-s: 1; --cam-x: var(--fx); --cam-y: 450; }
}
@keyframes mg-dev-turn {
  from { transform: rotateX(16deg) rotateY(-62deg) rotateZ(-4deg); }
  to { transform: none; }
}
@keyframes mg-glint { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes mg-flash {
  0% { opacity: 0; } 8% { opacity: 1; } 22% { opacity: .15; } 36% { opacity: 1; }
  50% { opacity: .15; } 64% { opacity: 1; } 78% { opacity: .15; } 90%, 100% { opacity: .75; }
}
@keyframes mg-led {
  0% { background: #3d7fc9; box-shadow: 0 0 calc(4 * var(--w)) #1f5fae; }
  8%, 36%, 64%, 90%, 100% { background: #fff; box-shadow: 0 0 calc(24 * var(--w)) calc(10 * var(--w)) #7cc0ff; }
  22%, 50%, 78% { background: #8cc4ff; box-shadow: 0 0 calc(8 * var(--w)) #4ea1ff; }
}
@keyframes mg-ring { from { transform: scale(.04); opacity: .95; } to { transform: scale(1); opacity: 0; } }
@keyframes mg-walk { from { transform: translateX(-760px); } to { transform: none; } }
@keyframes mg-bob { from { transform: none; } to { transform: translateY(-5px); } }
@keyframes mg-step { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
@keyframes mg-arm {
  0% { transform: none; }
  14% { transform: rotate(-102.6deg); }
  18% { transform: rotate(-106deg); }
  24%, 78% { transform: rotate(-102.6deg); }
  100% { transform: none; }
}
@keyframes mg-press { 0%, 100% { fill: #ffd34e; } 10% { fill: #fff6c2; } }
@keyframes mg-fade-dim { from { opacity: 0; } to { opacity: .55; } }
@keyframes mg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mg-phone-in { from { transform: translateY(120cqmin); } to { transform: none; } }
@keyframes mg-note-in { from { transform: translateY(-60%) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mg-shake { from { transform: translateX(-.8cqmin) rotate(-1deg); } to { transform: translateX(.8cqmin) rotate(1deg); } }
@keyframes mg-vibe { 0%, 100% { opacity: 0; } 20%, 80% { opacity: 1; } }
@keyframes mg-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mg-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mg-sub {
  0% { opacity: 0; transform: translateY(6px); }
  12%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes mg-replay-on { to { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } }

@media (prefers-reduced-motion: reduce) {
  .mg.is-playing *, .mg.is-playing .mg-dev-front::before, .mg.is-playing .mg-dev-front::after {
    animation: none !important;
  }
}
