/* Prism UI kit — smoky off-black + purple. Shared by the in-page Shadow DOM UI and the extension pages.
   Contrast (WCAG): text 15.5:1, muted 7.2:1, violet text 6.3:1, white on button 5.2:1, borders ≥ 3:1. */
:host, .pz-scope {
  --pz-bg: #131218;
  --pz-surface: #1C1A23;
  --pz-surface-2: #26232F;
  --pz-surface-3: #302C3B;
  --pz-line: rgba(255, 255, 255, 0.09);
  --pz-line-strong: #78718C;
  --pz-text: #F4F2F9;
  --pz-muted: #ABA5BC;
  --pz-violet: #A78BFA;
  --pz-violet-strong: #6D4AFF;
  --pz-violet-hover: #7B5BFF;
  --pz-violet-soft: rgba(139, 108, 255, 0.16);
  --pz-violet-tint: rgba(139, 108, 255, 0.18);
  --pz-glow: 0 0 0 1px rgba(167, 139, 250, 0.35), 0 12px 40px rgba(109, 74, 255, 0.28);
  --pz-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  --pz-ok: #4ADE80;
  --pz-warn: #FBBF24;
  --pz-danger: #F87171;
  --pz-radius: 20px;
  --pz-radius-sm: 14px;
  --pz-radius-xs: 10px;
  --pz-font: "Prism Inter", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pz-display: "Prism Instrument", "Instrument Serif", Georgia, "Times New Roman", serif;
  --pz-motion: 160ms cubic-bezier(.2, .7, .2, 1);
  /* legacy aliases used across components */
  --pz-ink: var(--pz-text);
  --pz-ink-muted: var(--pz-muted);
  --pz-paper: var(--pz-surface);
  --pz-mist: var(--pz-surface-2);
  font-family: var(--pz-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--pz-text);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { :host, .pz-scope { --pz-motion: 0ms; } }
:host([data-reduce-motion]), .pz-scope[data-reduce-motion] { --pz-motion: 0ms; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.pz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: rgba(167, 139, 250, 0.4); }

/* ---------- Buttons ---------- */
.pz-btn {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--pz-radius-sm); cursor: pointer;
  font: 600 15px/1.2 var(--pz-font); color: var(--pz-text); background: var(--pz-surface-2);
  border: 1px solid var(--pz-line); transition: background var(--pz-motion), transform var(--pz-motion), box-shadow var(--pz-motion), border-color var(--pz-motion);
  text-align: center;
}
.pz-btn:hover { background: var(--pz-surface-3); border-color: rgba(255, 255, 255, 0.16); }
.pz-btn:active { transform: scale(0.98); }
.pz-btn:focus-visible, .pz-focus:focus-visible, .pz-input:focus-visible, .pz-choice:focus-within {
  outline: 2px solid #C4B5FD; outline-offset: 3px;
}
.pz-btn[disabled], .pz-btn[aria-disabled=true] { cursor: not-allowed; color: #8B859C; background: transparent; border-style: dashed; border-color: #4A4558; }
.pz-btn--primary { background: linear-gradient(180deg, #7B5BFF 0%, #6D4AFF 100%); color: #FFFFFF; border-color: transparent; box-shadow: 0 6px 20px rgba(109, 74, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.pz-btn--primary:hover { background: linear-gradient(180deg, #876AFF 0%, #7452FF 100%); box-shadow: 0 8px 28px rgba(109, 74, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.pz-btn--quiet { border-color: transparent; background: transparent; color: var(--pz-muted); padding-inline: 10px; }
.pz-btn--quiet:hover { background: var(--pz-surface-2); color: var(--pz-text); }
.pz-btn--danger { color: var(--pz-danger); border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.08); }
.pz-btn--danger:hover { background: rgba(248, 113, 113, 0.16); }
.pz-btn--block { display: flex; width: 100%; }
.pz-btn--small { min-height: 40px; padding: 7px 13px; font-size: 14px; border-radius: var(--pz-radius-xs); }
.pz-icon { width: 20px; height: 20px; flex: none; }

/* ---------- Surfaces ---------- */
.pz-card {
  background: var(--pz-surface); color: var(--pz-text); border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  box-shadow: var(--pz-shadow);
}
.pz-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--pz-muted); letter-spacing: .08em; text-transform: uppercase; }
.pz-muted { color: var(--pz-muted); }
.pz-h { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 650; }
.pz-display { font-family: var(--pz-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.pz-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--pz-radius-sm); background: var(--pz-violet-soft); border: 1px solid rgba(167, 139, 250, 0.28); }
.pz-notice--error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.35); }
.pz-notice--ok { background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.32); }
.pz-notice--warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.32); }

/* ---------- Inputs ---------- */
.pz-input {
  font: 400 16px/1.4 var(--pz-font); color: var(--pz-text); background: var(--pz-bg); border: 1px solid var(--pz-line-strong);
  border-radius: var(--pz-radius-sm); padding: 10px 14px; min-height: 44px; width: 100%;
  transition: border-color var(--pz-motion), box-shadow var(--pz-motion);
}
.pz-input:hover { border-color: #938BA9; }
.pz-input:focus { border-color: var(--pz-violet); box-shadow: 0 0 0 4px rgba(139, 108, 255, 0.2); outline: none; }
.pz-input::placeholder { color: #8B859C; }
select.pz-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--pz-muted) 50%), linear-gradient(135deg, var(--pz-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
select.pz-input option { background: var(--pz-surface); color: var(--pz-text); }
textarea.pz-input { min-height: 96px; resize: vertical; }
.pz-field { display: grid; gap: 6px; }
.pz-field > span:first-child { font-weight: 600; font-size: 15px; }
.pz-hint { font-size: 14px; color: var(--pz-muted); }
.pz-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--pz-radius-sm); border: 1px solid var(--pz-line); background: var(--pz-surface-2); cursor: pointer; transition: border-color var(--pz-motion), background var(--pz-motion); }
.pz-choice:hover { border-color: rgba(255, 255, 255, 0.18); }
.pz-choice input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pz-violet-strong); flex: none; }
.pz-choice[aria-checked=true], .pz-choice:has(input:checked) { border-color: rgba(167, 139, 250, 0.6); background: rgba(139, 108, 255, 0.12); }

/* ---------- Switch ---------- */
.pz-switch { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 58px; padding: 10px 16px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius); cursor: pointer; font: 600 17px/1.2 var(--pz-font); color: var(--pz-text); background: var(--pz-surface-2); transition: border-color var(--pz-motion), box-shadow var(--pz-motion); }
.pz-switch:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 3px; }
.pz-switch[aria-checked=true] { border-color: rgba(167, 139, 250, 0.5); box-shadow: var(--pz-glow); }
.pz-switch__track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #4A4558; flex: none; transition: background var(--pz-motion); }
.pz-switch__thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: left var(--pz-motion); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pz-switch[aria-checked=true] .pz-switch__track { background: var(--pz-violet-strong); }
.pz-switch[aria-checked=true] .pz-switch__thumb { left: 25px; }
.pz-switch__state { font-size: 13px; font-weight: 600; color: var(--pz-muted); margin-right: 10px; }

/* ---------- Style picker ---------- */
.pz-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pz-style { all: unset; box-sizing: border-box; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius-sm); background: var(--pz-surface-2); cursor: pointer; font: 600 13px/1.2 var(--pz-font); color: var(--pz-text); transition: border-color var(--pz-motion), box-shadow var(--pz-motion); }
.pz-style:hover { border-color: rgba(255, 255, 255, 0.2); }
.pz-style:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 2px; }
.pz-style[aria-pressed=true] { border-color: var(--pz-violet); box-shadow: var(--pz-glow); }
.pz-style__swatch { display: flex; height: 20px; border-radius: 7px; overflow: hidden; }
.pz-style__swatch span { flex: 1; }
.pz-style__name { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pz-check { width: 16px; height: 16px; color: var(--pz-violet); flex: none; }

/* ---------- Progress ---------- */
.pz-progress { position: relative; height: 4px; border-radius: 999px; background: var(--pz-surface-3); overflow: hidden; }
.pz-progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--pz-violet), transparent); border-radius: 999px; animation: pz-slide 1.2s ease-in-out infinite; }
@keyframes pz-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .pz-progress::after { animation: none; width: 100%; opacity: .6; } }

/* ---------- Logo ---------- */
.pz-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--pz-text); }
.pz-wordmark { font-family: var(--pz-display); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.pz-logo { width: 28px; height: 28px; flex: none; border-radius: 22%; object-fit: contain; }

/* Talk (dictation) button */
.pz-mic { white-space: nowrap; flex: none; }
.pz-mic--listening { background: #DC2626 !important; border-color: #DC2626 !important; color: #fff !important; animation: pz-mic-pulse 1.2s ease-in-out infinite; }
.pz-mic--writing { opacity: .8; cursor: progress; }
@keyframes pz-mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .55); } 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }
@media (prefers-reduced-motion: reduce) { .pz-mic--listening { animation: none; } }

/* Extension pages (popup, settings, welcome): smoky off-black + purple. Tokens come from prism-ui.css. */
@font-face { font-family: "Prism Atkinson"; src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Prism Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Prism Instrument"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

html { background: #131218; color-scheme: dark; }
body { margin: 0; min-height: 100vh; background:
  radial-gradient(1200px 600px at 85% -10%, rgba(109, 74, 255, 0.22), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(167, 139, 250, 0.10), transparent 60%),
  #131218; }
a { color: var(--pz-violet); text-underline-offset: 3px; }
a:hover { color: #C4B5FD; }
a:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 3px; border-radius: 4px; }
kbd { font: 600 13px var(--pz-font); padding: 2px 8px; border-radius: 8px; background: var(--pz-surface-3); border: 1px solid var(--pz-line); }
h1, h2, h3 { color: var(--pz-text); }

/* ---------- Popup ---------- */
.popup { width: 360px; padding: 12px 14px 10px; display: grid; gap: 8px; background: transparent; }
body:has(.popup) { min-height: 0; background: radial-gradient(420px 260px at 100% 0%, rgba(109, 74, 255, 0.28), transparent 70%), #131218; }
.popup__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 2px; }
.popup__host { font-size: 13px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: var(--pz-surface-2); border: 1px solid var(--pz-line); color: var(--pz-muted); }
.popup .pz-styles { gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.popup .pz-style { padding: 7px 9px; }
.popup .pz-style__swatch { height: 12px; }
.popup .pz-switch { min-height: 48px; }
.popup .pz-choice { padding: 8px 12px; font-size: 14px; }
.popup__style { display: flex; align-items: center; gap: 8px; }
.popup__style-name { flex: 1; font-weight: 600; }
.popup__actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.popup__actions .pz-btn { padding-inline: 10px; }
.popup__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--pz-line); padding-top: 6px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pz-ok); box-shadow: 0 0 10px rgba(74, 222, 128, 0.7); flex: none; }

/* ---------- Settings + welcome ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 40px 28px 80px; display: grid; gap: 32px; }
.page__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.nav { position: sticky; top: 24px; display: grid; gap: 2px; padding: 8px; border-radius: var(--pz-radius); background: rgba(28, 26, 35, 0.7); border: 1px solid var(--pz-line); backdrop-filter: blur(12px); }
.nav a { display: block; padding: 10px 14px; border-radius: var(--pz-radius-xs); color: var(--pz-muted); text-decoration: none; font-weight: 500; font-size: 15px; transition: background var(--pz-motion), color var(--pz-motion); }
.nav a:hover { background: var(--pz-surface-2); color: var(--pz-text); }
.nav a[aria-current=true] { background: var(--pz-violet-soft); color: var(--pz-text); box-shadow: inset 3px 0 0 var(--pz-violet); }
.section { display: grid; gap: 18px; scroll-margin-top: 24px; }
.section h2 { margin: 0; font-family: var(--pz-display); font-style: italic; font-weight: 400; font-size: 38px; letter-spacing: -0.01em; line-height: 1.1; }
.section > p { margin: 0; max-width: 64ch; color: var(--pz-muted); font-size: 16px; }
.group { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius); background: linear-gradient(180deg, rgba(38, 35, 47, 0.75), rgba(28, 26, 35, 0.75)); }
.group h3 { margin: 0; font-size: 17px; font-weight: 600; }
.group .group { background: var(--pz-bg); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.radio-list { display: grid; gap: 8px; }
.style-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.style-card { all: unset; box-sizing: border-box; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius); cursor: pointer; background: var(--pz-surface); transition: border-color var(--pz-motion), box-shadow var(--pz-motion), transform var(--pz-motion); }
.style-card:hover { border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.style-card:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 3px; }
.style-card[aria-pressed=true] { border-color: var(--pz-violet); box-shadow: var(--pz-glow); }
.style-card__name { font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; color: var(--pz-text); }
.style-card__tag { color: var(--pz-muted); font-size: 14px; }
.mini { border-radius: 14px; overflow: hidden; padding: 14px; display: grid; gap: 9px; min-height: 160px; }
.mini__h { font-size: 19px; line-height: 1.15; }
.mini__p { font-size: 13px; line-height: 1.4; }
.mini__row { display: flex; gap: 8px; align-items: center; }
.mini__btn { font-size: 13px; font-weight: 700; padding: 7px 12px; white-space: nowrap; }
.mini__field { flex: 1; height: 30px; }
.facts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fact { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius-sm); background: var(--pz-bg); }
.fact__meta { font-size: 13px; color: var(--pz-muted); }
.candidate { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius-sm); background: var(--pz-bg); }
.candidate input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--pz-violet-strong); margin-top: 12px; }
.evidence { font-size: 13px; color: var(--pz-muted); font-style: italic; }
.import-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.disclaimer { font-size: 13px; color: var(--pz-muted); }
details > summary { color: var(--pz-text); }
table.simple { border-collapse: collapse; width: 100%; font-size: 15px; }
table.simple th, table.simple td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--pz-line); vertical-align: top; }
table.simple th { color: var(--pz-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
pre, code { color: var(--pz-text); }
.save-bar { position: sticky; bottom: 16px; z-index: 2; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-radius: var(--pz-radius); background: rgba(28, 26, 35, 0.9); border: 1px solid var(--pz-line); backdrop-filter: blur(12px); box-shadow: var(--pz-shadow); }

/* Welcome */
.welcome-hero { position: relative; overflow: hidden; display: grid; gap: 18px; padding: 44px; border-radius: 28px; border: 1px solid rgba(167, 139, 250, 0.25);
  background: radial-gradient(700px 360px at 90% 0%, rgba(109, 74, 255, 0.35), transparent 65%), linear-gradient(180deg, #211E2B, #17151E); box-shadow: var(--pz-shadow); }
.welcome-hero h1 { margin: 0; font-family: var(--pz-display); font-style: italic; font-weight: 400; font-size: 64px; line-height: 1; letter-spacing: -0.02em; }
.welcome-hero h1 em { color: var(--pz-violet); }
.welcome-hero p { margin: 0; font-size: 18px; max-width: 60ch; color: #D6D2E2; }
.steps-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps-big--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.step-card { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius); align-content: start; background: var(--pz-surface); }
.step-card b { font-size: 18px; font-weight: 600; }
.step-card span { color: #D6D2E2; }
.step-card .pz-hint { color: var(--pz-muted); }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--pz-violet-soft); color: var(--pz-violet); font-family: var(--pz-display); font-style: italic; font-size: 22px; border: 1px solid rgba(167, 139, 250, 0.35); }
.kbd-icon .pz-icon { width: 16px; height: 16px; }
.kbd-icon { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--pz-surface-3); border: 1px solid var(--pz-line); font-weight: 700; color: var(--pz-text); vertical-align: middle; }
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 26px; border-radius: var(--pz-radius); border: 1px solid rgba(167, 139, 250, 0.3); background: linear-gradient(180deg, rgba(38, 35, 47, 0.85), rgba(28, 26, 35, 0.85)); }
.feature__text p { margin: 0 0 12px; font-size: 17px; color: #D6D2E2; }
.feature__text strong { color: var(--pz-text); }
.feature__demo { position: relative; min-height: 230px; border-radius: 16px; background: #F6F7FB; overflow: hidden; padding: 22px; }
.demo-page { display: grid; gap: 12px; }
.demo-line { display: block; height: 10px; border-radius: 6px; background: #D9DEE8; width: 90%; }
.demo-line--short { width: 60%; }
.demo-cta { justify-self: start; margin: 8px 0; padding: 12px 20px; border-radius: 12px; background: #2754E6; color: #FFF; font-weight: 700; outline: 3px solid #2754E6; outline-offset: 5px; animation: demo-ring 1.8s ease-in-out infinite; }
@keyframes demo-ring { 0%, 100% { outline-offset: 4px; outline-color: #2754E6; } 50% { outline-offset: 10px; outline-color: rgba(39, 84, 230, 0.4); } }
.demo-dock { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border-radius: 999px; background: #1C1A23; color: #F4F2F9; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 24px rgba(109,74,255,.35); border: 1px solid rgba(167,139,250,.45); }
.demo-dock__label { font-size: 10px; letter-spacing: .1em; color: #A78BFA; font-weight: 700; }
.demo-dock__btn { padding: 5px 10px; border-radius: 999px; background: linear-gradient(180deg, #7B5BFF, #6D4AFF); }
@media (prefers-reduced-motion: reduce) { .demo-cta { animation: none; } }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .settings, .grid2, .style-cards, .steps-big, .import-buttons { grid-template-columns: 1fr; }
  .nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .welcome-hero { padding: 28px; }
  .welcome-hero h1 { font-size: 44px; }
}

.demo-sites { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; border-radius: var(--pz-radius-sm); background: rgba(19, 18, 24, 0.55); }
@media (max-width: 700px) { .demo-sites { grid-template-columns: 1fr; } }
.demo-site { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--pz-text); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.demo-site:hover { background: var(--pz-violet-strong); color: #fff; }
.demo-site:hover .demo-site__kind { color: #E9E3FF; }
.demo-site:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 1px; }
.demo-site__kind { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--pz-muted); }

/* Simple settings: one column, big type, the rest behind "More settings" */
.page--simple { max-width: 820px; font-size: 18px; }
.simple-settings { display: grid; gap: 44px; }
.page--simple .pz-field > span:first-child { font-size: 17px; }
.page--simple .pz-input { font-size: 18px; min-height: 48px; }
.stored { margin: 0; display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--pz-bg); border: 1px solid var(--pz-line); }
.stored dt { font-weight: 600; font-size: 14px; color: var(--pz-muted); }
.stored dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.text-size { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.text-size__label { font-weight: 600; margin-right: 6px; }
.text-size__btn { all: unset; box-sizing: border-box; cursor: pointer; padding: 10px 18px; min-height: 48px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--pz-line-strong); color: var(--pz-text); background: var(--pz-surface); }
.text-size__btn[aria-checked=true] { background: var(--pz-violet-strong); border-color: var(--pz-violet-strong); color: #fff; }
.text-size__btn:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 3px; }
.more-settings, .more-about { border: 1px solid var(--pz-line); border-radius: var(--pz-radius); background: var(--pz-surface); }
.more-settings > summary, .more-about > summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; font-size: 18px; color: var(--pz-text); display: flex; align-items: center; justify-content: space-between; }
.more-settings > summary::after, .more-about > summary::after { content: "Show"; font-size: 15px; font-weight: 600; color: var(--pz-violet); }
.more-settings[open] > summary::after, .more-about[open] > summary::after { content: "Hide"; }
.more-settings > summary::-webkit-details-marker, .more-about > summary::-webkit-details-marker { display: none; }
.more-settings__body { display: grid; gap: 44px; padding: 8px 22px 28px; }
.more-about[open] { display: grid; gap: 14px; padding-bottom: 16px; }
.more-about > .group { margin: 0 16px; }
@media (max-width: 600px) { .page--simple .grid2 { grid-template-columns: 1fr; } }
.talk-try { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.talk-try__heard { font-size: 18px; font-weight: 600; }

/* Practice websites panel inside the welcome hero */
.practice { display: grid; gap: 10px; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, rgba(109, 74, 255, 0.38), rgba(109, 74, 255, 0.16)); border: 1px solid rgba(167, 139, 250, 0.55); box-shadow: 0 12px 40px rgba(109, 74, 255, 0.28); }
.practice__title { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--pz-font); font-style: normal; font-size: 18px; font-weight: 700; color: #fff; }
.welcome-hero .practice__hint { font-size: 15px; color: #E3DDF5; }

/* Website: install button and steps */
/* Website header row: logo, Install / How it's built, and the GitHub corner button all start on one line. */
.hero-top { display: grid; grid-template-columns: 1fr auto auto; align-items: start; gap: 10px; }
.hero-top > .pz-brand { min-height: 46px; }
.install-top { font-size: 16px; padding: 12px 22px; }
.hero-actions { display: grid; gap: 10px; }
.hero-end { display: contents; }
.install-shot { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--pz-line); background: #fff; }
.install-steps .step-card > span:not(.step-num):not(.pz-hint) { color: #D6D2E2; font-size: 15px; }
.install-reassure { display: grid; gap: 8px; padding: 16px 20px; border-radius: var(--pz-radius-sm); border: 1px solid var(--pz-line); background: var(--pz-surface); }
.install-reassure p { margin: 0; color: #D6D2E2; max-width: 72ch; }
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 24px; border-top: 1px solid var(--pz-line); font-size: 15px; }
.site-foot a { color: var(--pz-muted); }
.site-foot a:hover { color: var(--pz-text); }
@media (max-width: 760px) {
  .hero-top { grid-template-columns: 1fr auto; }
  .hero-actions { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
}
.gh-btn { width: 46px; height: 46px; padding: 0; display: inline-grid; place-items: center; flex: none;
  background: transparent; border-color: var(--pz-line); color: var(--pz-muted); }
.gh-btn:hover { color: var(--pz-text); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.install-steps { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } /* two across, so the pictures are big enough to follow */
.install-steps .pz-btn { justify-self: start; }
.copy-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-url code { padding: 6px 10px; border-radius: 10px; background: var(--pz-surface-3); color: var(--pz-text); font-size: 14px; }
@media (max-width: 900px) { .install-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .install-steps { grid-template-columns: 1fr; } }

/* First-run language picker */
.lang-pick { min-height: 100vh; align-content: center; gap: 22px; }
.lang-pick h1 { margin: 0; display: flex; align-items: center; gap: 14px; font-family: var(--pz-display); font-style: italic; font-weight: 400; font-size: 56px; }
.lang-pick h1 .pz-icon { width: 40px; height: 40px; color: var(--pz-violet); }
.lang-pick__sub { margin: 0; color: var(--pz-muted); font-size: 17px; }
.lang-pick__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lang-pick__btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; padding: 20px 22px; min-height: 92px; align-content: center; border: 1px solid var(--pz-line); border-radius: var(--pz-radius-sm); background: var(--pz-surface); transition: border-color var(--pz-motion), box-shadow var(--pz-motion), transform var(--pz-motion); }
.lang-pick__btn:hover { border-color: var(--pz-violet); box-shadow: var(--pz-glow); transform: translateY(-2px); }
.lang-pick__btn:focus-visible { outline: 2px solid #C4B5FD; outline-offset: 3px; }
.lang-pick__native { font-size: 26px; font-weight: 600; color: var(--pz-text); }
.lang-pick__english { font-size: 14px; color: var(--pz-muted); }
@media (max-width: 760px) { .lang-pick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lang-pick h1 { font-size: 40px; } }
@media (prefers-reduced-motion: reduce) { .lang-pick__btn { transition: none; } .lang-pick__btn:hover { transform: none; } }

/* Popup: Guide me box */
.guide-box { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--pz-radius-sm); border: 1px solid rgba(167, 139, 250, 0.45); background: var(--pz-violet-soft); }
.guide-box .pz-label { display: flex; align-items: center; gap: 6px; color: var(--pz-text); }
.guide-box__row { display: flex; gap: 6px; align-items: center; }
.guide-box__row .pz-input { flex: 1; min-width: 0; }
.guide-box__goal { width: 100%; resize: none; font-size: 16px; line-height: 1.35; min-height: 0 !important; height: auto; padding-block: 8px; }
.guide-box__start { flex: 1; }
/* Easier to hit for shaky hands: no button in the popup is smaller than 44px. */
.popup .pz-btn--small { min-height: 44px; }
.guide-box__text { margin: 0; font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.guide-box__text .pz-progress { width: 20px; flex: none; }
.guide-box__choices { display: flex; flex-wrap: wrap; gap: 6px; }
