:root {
  --ink: #1f1e1b;
  --muted: #6d6a63;
  --faint: #9a968d;
  --line: #e4e1da;
  --line-soft: #eeebe4;
  --paper: #fdfcfa;
  --paper-warm: #fbfaf7;
  --canvas: #f5f4f0;
  --accent: #3d6a86;
  --accent-dark: #2c5068;
  --accent-soft: #e8eff4;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Golos Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(100%, 1344px);
  min-height: 61px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand span {
  background: linear-gradient(90deg, #1e2a3a 0%, #1f5f8f 55%, #0a84ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand em {
  font-style: normal;
  font-weight: 500;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.main-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.main-nav a.active {
  font-weight: 500;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gift-note {
  color: var(--muted);
  font-size: 13.5px;
}

.button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 600;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button-ghost {
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 999px;
  border-color: var(--line);
  background: #fff;
  font-weight: 500;
}

.button-ghost:hover,
.button-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workspace {
  width: min(100%, 1344px);
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.workspace-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.editor-section,
.voices-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 2.2vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.title-row p {
  flex: 1 1 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.editor-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(31, 30, 27, 0.02);
}

.editor-card textarea {
  display: block;
  width: 100%;
  min-height: 220px;
  padding: 20px 22px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
}

.editor-card textarea::placeholder {
  color: #8f8b83;
  opacity: 1;
}

.editor-card:focus-within {
  border-color: #9bb3c3;
  box-shadow: 0 0 0 3px rgba(61, 106, 134, 0.08);
}

.editor-meta {
  min-height: 43px;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  background: #faf8f4;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.editor-meta span:last-child {
  margin-left: auto;
  text-align: right;
}

.voices-section {
  gap: 16px;
}

.voices-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.voices-toolbar h2,
.content-section > h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.segmented {
  padding: 3px;
  border-radius: 999px;
  background: #ebe8e1;
  display: flex;
  gap: 3px;
}

.segmented button,
.gender-tabs button {
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.segmented button.active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(31, 30, 27, 0.12);
}

.gender-tabs {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

.gender-tabs button {
  padding: 6px 10px;
  border-radius: 8px;
}

.gender-tabs button:hover {
  background: #efede8;
}

.gender-tabs button.active {
  color: var(--ink);
  font-weight: 600;
}

.section-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.voice-card {
  position: relative;
  min-width: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.voice-card:hover {
  border-color: #b9c0c6;
  transform: translateY(-1px);
}

.voice-card.selected {
  border-color: var(--accent);
  background: #f3f7fa;
}

.voice-name {
  padding-right: 24px;
  font-size: 16px;
  font-weight: 600;
}

.voice-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: none;
  place-items: center;
  font-size: 11px;
}

.voice-card.selected .voice-check {
  display: grid;
}

.voice-preview {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-play,
.round-play {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0 0 0 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 10px;
}

.voice-card.selected .voice-play {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.voice-wave {
  height: 22px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}

.voice-wave i {
  width: 3px;
  min-height: 5px;
  border-radius: 2px;
  background: #d4d0c7;
  transform-origin: center;
}

.voice-card.selected .voice-wave i {
  background: #9bb3c3;
}

.voice-card.previewing .voice-wave i {
  animation: pulse-wave 760ms ease-in-out infinite alternate;
}

.voice-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.voice-details {
  width: 100%;
  color: var(--muted);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.voice-rate {
  flex: none;
  white-space: nowrap;
}

.voice-rate strong {
  color: var(--ink);
  font-weight: 500;
}

.voice-rate img {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

@keyframes pulse-wave {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1); }
}

.summary-card {
  position: sticky;
  top: 86px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
}

.selected-voice {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.selected-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-play {
  width: 34px;
  height: 34px;
  border-color: #cfdbe3;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.round-play:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.selected-voice-row strong,
.selected-voice-row small {
  display: block;
}

.selected-voice-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 13px;
}

.summary-section {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-section > strong {
  font-size: 15px;
}

.summary-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.button-muted {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: #ebe8e1;
  color: var(--faint);
}

.button-muted.ready {
  background: var(--accent);
  color: #fff;
}

.button-muted.ready:hover {
  background: var(--accent-dark);
}

.long-note {
  color: #7a5a1f !important;
  font-size: 12px !important;
}

.summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.summary-line.muted {
  color: var(--muted);
  font-size: 14px;
}

.price-line > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.token-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.button-outline {
  width: 100%;
  border-color: var(--accent);
  background: #fff;
  color: var(--accent-dark);
  font-size: 13px;
}

.calculation > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.content-band {
  padding: 56px 32px 72px;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.content-section {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.use-grid,
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-card,
.rate-card,
.example-card,
.step-card,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.info-card {
  padding: 18px 20px;
}

.info-card h3,
.step-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.info-card p,
.step-card p,
.rate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.pricing-layout,
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

.lead-copy {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rate-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rate-card.featured {
  border-color: var(--accent);
  background: #f3f7fa;
}

.rate-card small,
.rate-card > span {
  color: var(--muted);
  font-size: 13px;
}

.rate-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 600;
}

.rate-card strong img {
  width: 22px;
  height: 22px;
}

.example-card {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-card > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.example-card b {
  color: var(--ink);
  white-space: nowrap;
}

.example-card img {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

.example-card .example-total {
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink);
}

.example-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.step-card {
  padding: 18px 20px;
  display: flex;
  gap: 14px;
}

.step-card > span {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-list details {
  padding: 14px 18px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 500;
  list-style-position: outside;
}

.faq-list details p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.support-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer {
  padding: 22px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
  color: var(--muted);
  font-size: 13px;
}

.site-footer > div {
  width: min(100%, 1280px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.site-footer a,
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
}

.site-footer a:hover,
.link-button:hover {
  color: var(--accent-dark);
}

.footer-note {
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border: 1px solid #cfdbe3;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 12px 35px rgba(31, 30, 27, 0.15);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  .gift-note {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 24px;
  }

  .voice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .header-inner {
    gap: 16px;
  }

  .main-nav {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .pricing-layout,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .use-grid,
  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 68px;
  }

  .header-inner {
    min-height: 58px;
    padding: 0 16px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand span {
    font-size: 15px;
  }

  .button-ghost {
    padding: 7px 11px;
    font-size: 12px;
  }

  .workspace {
    padding: 24px 16px 44px;
  }

  .title-row p {
    flex-basis: 100%;
  }

  .editor-card textarea {
    min-height: 190px;
    padding: 16px;
    font-size: 15px;
  }

  .editor-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .editor-meta span:last-child {
    margin-left: 0;
    text-align: left;
  }

  .voices-toolbar {
    align-items: flex-start;
  }

  .voices-toolbar h2 {
    width: 100%;
  }

  .language-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    white-space: nowrap;
  }

  .gender-tabs {
    width: 100%;
    margin-left: 0;
  }

  .voice-grid,
  .use-grid,
  .rate-grid,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .content-band {
    padding: 44px 16px 56px;
    gap: 52px;
  }

  .content-section > h2 {
    font-size: 21px;
  }

  .site-footer {
    padding: 22px 16px;
  }

  .footer-note {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
