:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --border: #dedede;
  --accent: #0b6bcb;
  --accent-text: #ffffff;
  --success-bg: #e7f5ec; --success: #17663a;
  --error-bg: #fdecec;   --error: #a1201b;
  --info-bg: #eaf2fb;    --info: #0b4f94;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416; --surface: #1e1f22; --text: #ececec; --muted: #a0a4a8; --border: #34363a;
    --accent: #5aa7f2; --accent-text: #0b1a2a;
    --success-bg: #12301f; --success: #8fdcaf;
    --error-bg: #3a1716;   --error: #f4a5a1;
    --info-bg: #13253a;    --info: #9cc6f2;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 1.2rem 0 .5rem; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; }
nav a:hover { color: var(--accent); }

.site-footer { margin-top: 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 24px; }
.footer-row p { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.small, small { font-size: .875rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.prose { max-width: 72ch; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-small { padding: 6px 12px; font-size: .9rem; }

label { display: block; font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-weight: 400; }
input[type=range] { padding: 0; }
textarea { resize: vertical; min-height: 180px; margin-top: 12px; }
.stack > * + * { margin-top: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
fieldset { border: 1px dashed var(--border); border-radius: 8px; margin: 14px 0 0; padding: 4px 14px 14px; }
output { font-weight: 400; color: var(--muted); margin-left: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font: inherit; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.counter { text-align: right; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.counter.over { color: var(--error); font-weight: 600; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.result { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.result audio { flex: 1 1 280px; }

.notice { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.notice-success { background: var(--success-bg); color: var(--success); }
.notice-error { background: var(--error-bg); color: var(--error); }
.notice-info { background: var(--info-bg); color: var(--info); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.features .card { margin: 0; }
.features h2 { margin-top: 0; font-size: 1.05rem; }
.lang-list { list-style: none; padding: 0; columns: 3 200px; }
.lang-list li { padding: 3px 0; break-inside: avoid; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; margin: 0; }
.plan ul { padding-left: 18px; flex: 1; }
.plan .price { font-size: 1.6rem; font-weight: 700; margin: 0; }
.plan-featured { border: 2px solid var(--accent); }
.facts { padding-left: 18px; }

.code { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: .85rem; white-space: pre; }
.site { border-top: 1px solid var(--border); padding-top: 8px; margin-bottom: 16px; }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
