@layer reset, base, components, pages, responsive;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p,
  dl,
  dd,
  ol,
  ul,
  pre,
  fieldset {
    margin: 0;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  button,
  a,
  label,
  select,
  input[type="range"] {
    -webkit-tap-highlight-color: transparent;
  }

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

@layer base {
  :root {
    color-scheme: light;
    --ink: #101b1e;
    --ink-soft: #3f5054;
    --ink-muted: #59696d;
    --night: #091416;
    --night-2: #102326;
    --paper: #f7f5ef;
    --surface: #ffffff;
    --surface-muted: #eef0ea;
    --line: #d8ddd7;
    --line-dark: #294044;
    --accent: #c84425;
    --accent-dark: #9f2a11;
    --accent-soft: #ffdfd4;
    --mint: #a9e6cf;
    --mint-dark: #54b993;
    --danger: #c43c30;
    --danger-soft: #fff0ed;
    --success: #248064;
    --shadow-sm: 0 1px 2px rgb(9 20 22 / 8%);
    --shadow-md: 0 16px 40px rgb(9 20 22 / 10%);
    --shadow-lg: 0 32px 90px rgb(0 0 0 / 22%);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --font-sans:
      "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  }

  body {
    min-width: 320px;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  code,
  pre {
    font-family: var(--font-mono);
  }

  code {
    font-size: 0.9em;
  }

  :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
    outline-offset: 3px;
  }

  ::selection {
    background: var(--accent-soft);
    color: var(--ink);
  }

  .page-width {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
  }

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

  .skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    transform: translateY(-160%);
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .eyebrow {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .eyebrow-on-dark {
    color: var(--mint);
  }
}

@layer components {
  .site-nav {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: min(1320px, calc(100% - 48px));
    min-height: 76px;
    margin-inline: auto;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 11px;
    color: var(--ink);
    font-size: 0.97rem;
    font-weight: 750;
    letter-spacing: -0.02em;
  }

  .brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    box-shadow: 0 8px 24px rgb(240 100 60 / 25%);
  }

  .brand-mark svg {
    width: 23px;
    fill: none;
    stroke: white;
    stroke-linecap: round;
    stroke-width: 2;
  }

  .brand-name span {
    color: var(--accent);
  }

  .nav-on-dark .brand,
  .hero-shell .brand {
    color: white;
  }

  .nav-context {
    color: var(--ink-muted);
    font-size: 0.86rem;
  }

  .nav-context span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding-inline: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgb(255 255 255 / 58%);
  }

  .nav-links {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 26px;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .nav-links > a:not(.button):hover,
  .nav-links > a[aria-current="page"] {
    color: var(--accent-dark);
  }

  .nav-on-dark .nav-links > a:not(.button),
  .hero-shell .nav-links > a:not(.button) {
    color: #cbd7d7;
  }

  .nav-on-dark .nav-links > a:not(.button):hover,
  .hero-shell .nav-links > a:not(.button):hover {
    color: white;
  }

  .nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-toggle span:not(.sr-only) {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: currentColor;
  }

  .button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 720;
    line-height: 1.2;
    transition:
      transform 150ms ease,
      background 150ms ease,
      border-color 150ms ease,
      color 150ms ease,
      box-shadow 150ms ease;
  }

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

  .button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
  }

  .button-small {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .button-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 26px rgb(240 100 60 / 22%);
  }

  .button-accent:hover:not(:disabled) {
    background: #fa7048;
    box-shadow: 0 14px 32px rgb(240 100 60 / 3%);
  }

  .button-dark {
    background: var(--ink);
    color: white;
  }

  .button-dark:hover:not(:disabled) {
    background: #203034;
  }

  .button-light {
    background: white;
    color: var(--ink);
  }

  .button-outline {
    border-color: var(--line);
    background: transparent;
    color: var(--ink);
  }

  .button-outline:hover:not(:disabled) {
    border-color: var(--ink-muted);
    background: var(--surface);
  }

  .button-ghost-light {
    border-color: rgb(255 255 255 / 24%);
    background: rgb(255 255 255 / 7%);
    color: white;
  }

  .button-ghost-light:hover {
    background: rgb(255 255 255 / 12%);
  }

  .status-pill,
  .service-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
  }

  .status-pill {
    padding: 7px 12px;
    border: 1px solid rgb(255 255 255 / 14%);
    background: rgb(255 255 255 / 7%);
    color: #d6e0e0;
    font-size: 0.78rem;
  }

  .service-chip {
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.72rem;
  }

  .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a3adae;
    box-shadow: 0 0 0 4px rgb(163 173 174 / 13%);
  }

  [data-readiness].is-ready .status-dot {
    background: var(--mint-dark);
    box-shadow: 0 0 0 4px rgb(84 185 147 / 14%);
  }

  [data-readiness].is-unavailable .status-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgb(240 100 60 / 14%);
  }

  .copy-button {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 1;
  }

  .copy-button:hover {
    background: rgb(89 105 109 / 8%);
  }

  .code-window,
  .standalone-code {
    overflow: hidden;
    border: 1px solid #26383d;
    border-radius: var(--radius-md);
    background: #0b1518;
    color: #e5efed;
    box-shadow: var(--shadow-md);
  }

  .code-top {
    display: flex;
    min-height: 45px;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    border-bottom: 1px solid rgb(255 255 255 / 9%);
    color: #9aabaa;
    font-family: var(--font-mono);
    font-size: 0.72rem;
  }

  .code-window pre,
  .standalone-code {
    padding: 20px;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.75;
    white-space: pre;
  }

  .site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    min-height: 126px;
    align-items: center;
    gap: 32px;
  }

  .footer-grid nav {
    display: flex;
    gap: 28px;
    color: var(--ink-soft);
    font-size: 0.88rem;
  }

  .footer-grid nav a:hover {
    color: var(--accent-dark);
  }

  .footer-grid > p {
    justify-self: end;
    color: var(--ink-muted);
    font-size: 0.78rem;
  }
}

@layer pages {
  /* Landing */
  .hero-shell {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    background:
      radial-gradient(
        circle at 78% 15%,
        rgb(240 100 60 / 17%),
        transparent 31%
      ),
      radial-gradient(circle at 18% 76%, rgb(84 185 147 / 9%), transparent 27%),
      var(--night);
    color: white;
  }

  .hero-shell::before {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    mask-image: linear-gradient(to bottom, black 0%, transparent 95%);
    pointer-events: none;
  }

  .hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.9fr);
    min-height: 660px;
    align-items: center;
    gap: clamp(52px, 7vw, 100px);
    padding-block: 70px 92px;
  }

  .hero-copy {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy .eyebrow {
    margin-top: 28px;
  }

  .hero-copy h1 {
    max-width: 780px;
    margin-top: 15px;
    font-size: clamp(3.4rem, 6.1vw, 6rem);
    font-weight: 760;
    letter-spacing: -0.065em;
    line-height: 0.98;
    text-wrap: balance;
  }

  .hero-copy h1 em {
    color: var(--accent);
    font-style: normal;
  }

  .hero-lede {
    max-width: 650px;
    margin-top: 28px;
    color: #b9c7c8;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    line-height: 1.65;
    text-wrap: pretty;
  }

  .hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 34px;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 30px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgb(255 255 255 / 12%);
  }

  .hero-facts div {
    display: grid;
    gap: 3px;
  }

  .hero-facts dt {
    color: #718486;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .hero-facts dd {
    color: #d9e1e1;
    font-size: 0.8rem;
    font-weight: 650;
  }

  .hero-product {
    position: relative;
  }

  .product-window {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 20px;
    background: #102226;
    box-shadow: var(--shadow-lg);
    transform: rotate(1.2deg);
  }

  .window-bar {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid rgb(255 255 255 / 9%);
    color: #8ea1a2;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    text-transform: uppercase;
  }

  .window-state {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--mint);
  }

  .window-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint-dark);
  }

  .audio-card {
    margin: 18px;
    padding: 16px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 12px;
    background: #0b191c;
  }

  .audio-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #6f8587;
    font-family: var(--font-mono);
    font-size: 0.64rem;
  }

  .file-chip {
    color: #cdd9d9;
  }

  .waveform {
    display: flex;
    height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 12px;
  }

  .waveform i {
    width: 3px;
    height: var(--h);
    min-height: 6px;
    border-radius: 99px;
    background: linear-gradient(to top, var(--accent), #ffb19a);
  }

  .transcript-preview {
    padding: 0 20px 22px;
  }

  .preview-label {
    display: flex;
    justify-content: space-between;
    color: #6f8587;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .transcript-preview > p {
    margin-top: 14px;
    color: #f1f5f4;
    font-size: 1.35rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.45;
  }

  .segment-list {
    display: grid;
    gap: 0;
    padding: 14px 0 0;
    list-style: none;
  }

  .segment-list li {
    display: grid;
    grid-template-columns: 74px 1fr;
    padding: 9px 0;
    border-top: 1px solid rgb(255 255 255 / 8%);
    color: #aebcbd;
    font-size: 0.75rem;
  }

  .segment-list time {
    color: var(--mint-dark);
    font-family: var(--font-mono);
    font-size: 0.64rem;
  }

  .hero-orbit {
    position: absolute;
    z-index: 1;
    border: 1px solid rgb(240 100 60 / 21%);
    border-radius: 50%;
  }

  .orbit-one {
    top: -64px;
    right: -70px;
    width: 240px;
    height: 240px;
  }

  .orbit-two {
    bottom: -82px;
    left: -74px;
    width: 180px;
    height: 180px;
    border-color: rgb(169 230 207 / 13%);
  }

  .principles {
    padding-block: 112px 120px;
  }

  .split-heading {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    align-items: end;
    gap: 64px;
  }

  .section-heading h2,
  .workflow-copy h2,
  .quickstart h2 {
    margin-top: 8px;
    font-size: clamp(2.25rem, 4vw, 4.1rem);
    font-weight: 730;
    letter-spacing: -0.05em;
    line-height: 1.05;
    text-wrap: balance;
  }

  .split-heading > p,
  .workflow-copy > p,
  .quickstart-copy > p {
    color: var(--ink-soft);
    font-size: 1.04rem;
    line-height: 1.75;
  }

  .principle-rows {
    margin-top: 62px;
    border-top: 1px solid var(--line);
  }

  .principle-rows article {
    display: grid;
    grid-template-columns: 70px 1.1fr 1.3fr auto;
    align-items: center;
    gap: 28px;
    min-height: 132px;
    padding-block: 26px;
    border-bottom: 1px solid var(--line);
  }

  .principle-number {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.75rem;
  }

  .principle-rows h3 {
    font-size: 1.3rem;
    letter-spacing: -0.025em;
  }

  .principle-rows p {
    color: var(--ink-soft);
    font-size: 0.92rem;
  }

  .principle-tag {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .workflow-section {
    padding-block: 110px;
    background: var(--night);
    color: white;
  }

  .workflow-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    align-items: center;
    gap: clamp(70px, 10vw, 150px);
  }

  .workflow-copy h2 {
    max-width: 570px;
  }

  .workflow-copy > p {
    max-width: 560px;
    margin-top: 24px;
    color: #aebdbd;
  }

  .check-list {
    display: grid;
    gap: 12px;
    margin-top: 30px;
    padding: 0;
    color: #d5dfde;
    font-size: 0.9rem;
    list-style: none;
  }

  .check-list li {
    position: relative;
    padding-left: 26px;
  }

  .check-list li::before {
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 11px;
    height: 6px;
    border-bottom: 2px solid var(--mint);
    border-left: 2px solid var(--mint);
    content: "";
    transform: rotate(-45deg);
  }

  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 34px;
    color: var(--mint);
    font-weight: 700;
  }

  .text-link span {
    transition: transform 150ms ease;
  }

  .text-link:hover span {
    transform: translateX(4px);
  }

  .workflow-steps {
    position: relative;
    display: grid;
    gap: 14px;
  }

  .workflow-steps article {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 18px;
    padding: 23px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-md);
    background: #102225;
  }

  .workflow-steps article > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #375055;
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
  }

  .workflow-steps strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.03rem;
  }

  .workflow-steps p {
    color: #91a5a7;
    font-size: 0.84rem;
  }

  .quickstart {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    align-items: center;
    gap: clamp(60px, 9vw, 130px);
    padding-block: 112px;
  }

  .quickstart-copy > p {
    margin-top: 18px;
  }

  .inline-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
  }

  /* Studio */
  .studio-page {
    min-height: 100vh;
    background:
      linear-gradient(to bottom, rgb(255 255 255 / 45%), transparent 320px),
      var(--paper);
  }

  .app-header,
  .docs-header {
    position: sticky;
    z-index: 50;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgb(247 245 239 / 91%);
    backdrop-filter: blur(14px);
  }

  .studio-main {
    padding-block: 54px 100px;
  }

  .studio-heading {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    align-items: end;
    gap: 70px;
    margin-bottom: 38px;
  }

  .studio-heading h1 {
    max-width: 760px;
    margin-top: 8px;
    font-size: clamp(2.25rem, 4.2vw, 4.4rem);
    font-weight: 740;
    letter-spacing: -0.055em;
    line-height: 1.02;
  }

  .studio-heading > p {
    color: var(--ink-soft);
    font-size: 1rem;
  }

  .studio-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.72fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }

  .workbench-input,
  .workbench-settings {
    padding: clamp(24px, 3vw, 38px);
  }

  .workbench-input {
    min-width: 0;
  }

  .workbench-settings {
    border-left: 1px solid var(--line);
    background: #f0f1eb;
  }

  .panel-heading,
  .panel-heading > div,
  .mini-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .panel-heading > div {
    justify-content: flex-start;
    gap: 12px;
  }

  .panel-heading h2 {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
  }

  .panel-step {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.68rem;
  }

  .panel-note {
    color: var(--ink-muted);
    font-size: 0.75rem;
  }

  .source-switch {
    display: inline-flex;
    gap: 4px;
    margin-top: 28px;
    padding: 4px;
    border-radius: 9px;
    background: var(--surface-muted);
  }

  .source-tab {
    min-width: 96px;
    min-height: 38px;
    padding: 6px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 700;
  }

  .source-tab.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

  #audio-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .source-panel {
    margin-top: 16px;
  }

  .drop-zone {
    display: flex;
    min-height: 275px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 34px;
    border: 1.5px dashed #aab5b0;
    border-radius: var(--radius-md);
    background:
      linear-gradient(rgb(255 255 255 / 65%), rgb(255 255 255 / 65%)),
      repeating-linear-gradient(
        45deg,
        transparent,
        transparent 9px,
        rgb(16 27 30 / 2%) 9px,
        rgb(16 27 30 / 2%) 10px
      );
    cursor: pointer;
    text-align: center;
    transition:
      border-color 150ms ease,
      background 150ms ease,
      transform 150ms ease;
  }

  .drop-zone:hover,
  .drop-zone.is-dragging {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .drop-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 17px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent-dark);
  }

  .drop-icon svg {
    width: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .drop-zone strong {
    font-size: 1.05rem;
  }

  .drop-zone > span:not(.drop-icon):not(.button) {
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 0.82rem;
  }

  .drop-zone .button {
    margin-top: 18px;
    background: var(--surface);
  }

  .record-panel {
    min-height: 275px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #f9faf6;
    text-align: center;
  }

  .record-panel[hidden],
  .source-panel[hidden],
  [hidden] {
    display: none !important;
  }

  .recorder-visual {
    position: relative;
    display: grid;
    width: 118px;
    height: 90px;
    margin: 0 auto;
    place-items: center;
  }

  .record-pulse {
    position: absolute;
    width: 72px;
    height: 72px;
    border: 1px solid var(--line);
    border-radius: 50%;
  }

  .recorder-bars {
    position: relative;
    z-index: 2;
    display: flex;
    height: 44px;
    align-items: center;
    gap: 4px;
  }

  .recorder-bars i {
    width: 3px;
    height: 20%;
    border-radius: 9px;
    background: var(--accent);
  }

  .record-panel.is-recording .recorder-bars i {
    animation: level 720ms ease-in-out infinite alternate;
  }

  .record-panel.is-recording .recorder-bars i:nth-child(2n) {
    animation-delay: -220ms;
  }
  .record-panel.is-recording .recorder-bars i:nth-child(3n) {
    animation-delay: -410ms;
  }
  .record-panel.is-recording .record-pulse {
    animation: pulse 1.5s ease-out infinite;
    border-color: var(--accent);
  }

  @keyframes level {
    to {
      height: 92%;
    }
  }
  @keyframes pulse {
    to {
      width: 104px;
      height: 104px;
      opacity: 0;
    }
  }

  .recorder-copy {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
  }

  .recorder-copy span {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
  }

  .record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
  }

  .record-panel.is-recording .record-dot {
    border-radius: 1px;
  }

  .live-panel {
    min-height: 275px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
      radial-gradient(circle at 100% 0, rgb(84 185 147 / 12%), transparent 42%),
      #f9faf6;
  }

  .live-status {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .live-status time {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }

  .live-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ink-muted);
    box-shadow: 0 0 0 5px rgb(89 105 109 / 10%);
  }

  .live-status-dot[data-state="connecting"],
  .live-status-dot[data-state="processing"] {
    background: #c8821f;
    box-shadow: 0 0 0 5px rgb(200 130 31 / 12%);
  }

  .live-status-dot[data-state="listening"],
  .live-status-dot[data-state="complete"] {
    background: var(--mint-dark);
    box-shadow: 0 0 0 5px rgb(84 185 147 / 14%);
  }

  .live-status-dot[data-state="speech"] {
    animation: pulse-dot 900ms ease-in-out infinite alternate;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgb(200 68 37 / 13%);
  }

  .live-status-dot[data-state="error"] {
    background: var(--danger);
  }

  @keyframes pulse-dot {
    to {
      box-shadow: 0 0 0 9px rgb(200 68 37 / 8%);
    }
  }

  .live-copy {
    margin-top: 20px;
  }

  .live-copy h3 {
    max-width: 620px;
    margin-top: 5px;
    font-size: clamp(1.15rem, 2.3vw, 1.55rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
  }

  .live-copy > p:last-child {
    max-width: 640px;
    margin-top: 8px;
    color: var(--ink-muted);
    font-size: 0.78rem;
  }

  .live-transcript {
    min-height: 86px;
    margin-block: 18px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgb(255 255 255 / 78%);
  }

  .live-transcript p {
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-size: 1.02rem;
    line-height: 1.5;
  }

  .live-panel .button {
    min-width: 210px;
  }

  .live-panel .button .record-dot {
    background: white;
  }

  .live-panel .button.is-live .record-dot {
    border-radius: 1px;
  }

  .source-tab:disabled {
    cursor: not-allowed;
    opacity: 0.58;
  }

  .field-help {
    margin-top: 12px;
    color: var(--ink-muted);
    font-size: 0.72rem;
  }

  .selected-audio {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) minmax(180px, 0.8fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #f8f9f5;
  }

  .selected-file-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .selected-file-icon svg,
  .privacy-note svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }

  .selected-file-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .selected-file-copy strong {
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .selected-file-copy span {
    color: var(--ink-muted);
    font-size: 0.7rem;
  }

  .selected-audio audio {
    width: 100%;
    height: 36px;
  }

  .selected-audio video {
    width: 180px;
    max-height: 104px;
    border-radius: 8px;
    background: #111a17;
    object-fit: contain;
  }

  .icon-button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    font-size: 1.4rem;
  }

  .icon-button:hover {
    background: var(--surface-muted);
    color: var(--danger);
  }

  .request-preview-block {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .mini-heading {
    min-height: 42px;
    padding-inline: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .request-preview-block pre {
    min-height: 88px;
    padding: 14px;
    overflow-x: auto;
    background: #f8f9f5;
    color: var(--ink-soft);
    font-size: 0.7rem;
    line-height: 1.65;
    white-space: pre-wrap;
  }

  .workbench-settings .panel-heading {
    margin-bottom: 26px;
  }

  .field-group {
    padding: 0;
    border: 0;
  }

  .field-group legend,
  .field-label {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
  }

  .field-group legend span,
  .field-label small {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .segmented-control label {
    cursor: pointer;
  }

  .segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .segmented-control label span {
    display: flex;
    min-height: 66px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgb(255 255 255 / 65%);
    color: var(--ink-muted);
    font-size: 0.72rem;
  }

  .segmented-control label b {
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.87rem;
  }

  .segmented-control input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
    box-shadow: inset 0 0 0 1px var(--accent);
  }

  .segmented-control input:focus-visible + span {
    outline: 3px solid color-mix(in srgb, var(--accent) 50%, white);
    outline-offset: 2px;
  }

  .form-field {
    display: block;
    margin-top: 20px;
  }

  .form-field select,
  .form-field textarea,
  .form-field input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgb(255 255 255 / 74%);
    color: var(--ink);
  }

  .form-field textarea {
    min-height: 90px;
    resize: vertical;
  }

  .form-field input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
  }

  .advanced-settings {
    margin-top: 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .advanced-settings summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 750;
    list-style: none;
  }

  .advanced-settings summary::-webkit-details-marker {
    display: none;
  }

  .advanced-settings summary::after {
    color: var(--ink-muted);
    content: "+";
    font-size: 1.1rem;
  }

  .advanced-settings[open] summary::after {
    content: "−";
  }

  .advanced-settings summary span {
    margin-left: auto;
    margin-right: 12px;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
  }

  .advanced-body {
    padding-bottom: 20px;
  }

  .form-message {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .error-message {
    border: 1px solid #efb6ac;
    background: var(--danger-soft);
    color: var(--danger);
  }

  .transcribe-button {
    width: 100%;
    margin-top: 22px;
    justify-content: space-between;
  }

  .transcribe-button.is-loading .button-label::after {
    content: "…";
  }

  .privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 13px;
    color: var(--ink-muted);
    font-size: 0.68rem;
    line-height: 1.5;
  }

  .privacy-note svg {
    width: 15px;
    min-width: 15px;
    margin-top: 2px;
  }

  .subtitle-preview,
  .result-panel {
    margin-top: 28px;
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .subtitle-preview-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
  }

  .subtitle-preview-heading h2 {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    letter-spacing: -0.035em;
  }

  .subtitle-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
    gap: 20px;
  }

  .subtitle-media-frame {
    position: relative;
    display: flex;
    min-height: 230px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #111a17;
  }

  .subtitle-media-frame video {
    width: 100%;
    max-height: 560px;
    background: #080b0a;
  }

  .subtitle-media-frame audio {
    width: calc(100% - 48px);
  }

  .active-caption {
    max-width: min(88%, 760px);
    min-height: 2.6em;
    margin: 22px auto;
    padding: 9px 14px;
    border-radius: 7px;
    background: rgb(0 0 0 / 82%);
    color: white;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
  }

  .subtitle-media-frame.is-video .active-caption {
    position: absolute;
    right: 6%;
    bottom: 46px;
    left: 6%;
    pointer-events: none;
  }

  .active-caption.is-empty {
    opacity: 0;
  }

  .subtitle-cue-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8f9f5;
  }

  .subtitle-cues {
    max-height: 440px;
    padding: 8px;
    overflow-y: auto;
    list-style: none;
  }

  .subtitle-cues li + li {
    border-top: 1px solid var(--line);
  }

  .subtitle-cues button {
    display: grid;
    width: 100%;
    gap: 5px;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
  }

  .subtitle-cues button:hover,
  .subtitle-cues button.is-active {
    background: var(--accent-soft);
  }

  .subtitle-cues button.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .subtitle-cues time {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
  }

  .subtitle-cues span {
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .result-topline,
  .result-topline > div:first-child,
  .result-actions {
    display: flex;
    align-items: center;
  }

  .result-topline {
    justify-content: space-between;
    gap: 20px;
  }

  .result-topline > div:first-child {
    gap: 16px;
  }

  .result-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5f5ee;
    color: var(--success);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
  }

  .result-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
  }

  .result-topline h2 {
    font-size: 1.45rem;
  }

  .result-actions {
    gap: 8px;
  }

  .result-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 40px;
    margin-top: 30px;
  }

  .transcript-output {
    min-height: 160px;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--paper);
  }

  .transcript-output p {
    font-size: clamp(1.25rem, 2.3vw, 2rem);
    font-weight: 620;
    letter-spacing: -0.025em;
    line-height: 1.5;
    white-space: pre-wrap;
  }

  .empty-transcript {
    display: grid;
    min-height: 100px;
    place-items: center;
    color: var(--ink-muted);
    text-align: center;
  }

  .result-meta {
    display: grid;
    align-content: start;
    gap: 0;
  }

  .result-meta div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.76rem;
  }

  .result-meta dt {
    color: var(--ink-muted);
  }

  .result-meta dd {
    font-family: var(--font-mono);
    text-align: right;
  }

  .segments-section {
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .segments-table-wrap,
  .parameter-table-wrap {
    overflow-x: auto;
  }

  .segments-table,
  .parameter-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
  }

  .segments-table th,
  .segments-table td,
  .parameter-table th,
  .parameter-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
  }

  .segments-table th,
  .parameter-table th {
    background: #f6f7f3;
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .segments-table tbody tr:last-child td,
  .parameter-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .segments-table td:nth-child(-n + 3) {
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .raw-response {
    margin-top: 18px;
    border-top: 1px solid var(--line);
  }

  .raw-response summary {
    min-height: 46px;
    padding-top: 13px;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 0.78rem;
  }

  .raw-response pre {
    max-height: 360px;
    padding: 16px;
    overflow: auto;
    border-radius: 9px;
    background: var(--night);
    color: #dce6e5;
    font-size: 0.72rem;
    line-height: 1.65;
  }

  /* Docs */
  .docs-page {
    background: var(--surface);
  }

  .docs-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 780px);
    justify-content: space-between;
    gap: 80px;
  }

  .docs-sidebar {
    position: relative;
  }

  .docs-sidebar-inner {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 130px);
    padding: 10px 0 40px;
    overflow-y: auto;
  }

  .sidebar-label {
    margin: 22px 0 7px;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sidebar-label:first-child {
    margin-top: 0;
  }

  .docs-sidebar nav {
    display: flex;
    flex-direction: column;
  }

  .docs-sidebar a {
    min-height: 35px;
    padding: 5px 10px;
    border-left: 2px solid transparent;
    color: var(--ink-muted);
    font-size: 0.8rem;
  }

  .docs-sidebar a:hover,
  .docs-sidebar a.is-active {
    border-left-color: var(--accent);
    color: var(--ink);
  }

  .docs-content {
    min-width: 0;
    padding: 72px 0 120px;
  }

  .doc-section {
    padding: 70px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 90px;
  }

  .doc-intro {
    padding-top: 20px;
  }

  .doc-intro h1 {
    margin-top: 8px;
    font-size: clamp(2.7rem, 6vw, 5rem);
    font-weight: 740;
    letter-spacing: -0.06em;
    line-height: 1;
  }

  .doc-lede {
    max-width: 720px;
    margin-top: 24px;
    color: var(--ink-soft);
    font-size: 1.15rem;
    line-height: 1.75;
  }

  .reference-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 36px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .reference-facts div {
    display: flex;
    min-width: 0;
    min-height: 88px;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    border-right: 1px solid var(--line);
  }

  .reference-facts div:last-child {
    border-right: 0;
  }

  .reference-facts span {
    margin-bottom: 5px;
    color: var(--ink-muted);
    font-size: 0.68rem;
  }

  .reference-facts code,
  .reference-facts strong {
    overflow: hidden;
    font-size: 0.77rem;
    text-overflow: ellipsis;
  }

  .callout {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: 10px;
    background: var(--accent-soft);
  }

  .callout strong {
    color: var(--accent-dark);
  }

  .callout p {
    margin-top: 4px;
    color: #653b31;
    font-size: 0.87rem;
  }

  .doc-heading {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    margin-bottom: 22px;
  }

  .doc-heading > span {
    padding-top: 5px;
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.68rem;
  }

  .doc-heading h2 {
    margin-top: 3px;
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    letter-spacing: -0.045em;
    line-height: 1.1;
  }

  .doc-section > p {
    margin: 0 0 22px 58px;
    color: var(--ink-soft);
  }

  .doc-section > .code-window,
  .doc-section > .standalone-code,
  .doc-section > .parameter-table-wrap,
  .doc-section > .model-doc-grid,
  .doc-section > .endpoint,
  .doc-section > .error-code-list,
  .doc-section > .architecture-line,
  .doc-section > .doc-list,
  .doc-section > h3 {
    margin-left: 58px;
  }

  .doc-section > h3 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 1rem;
  }

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

  .model-doc-grid article {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .model-doc-grid article > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .language-badge {
    display: grid;
    width: 34px;
    height: 30px;
    place-items: center;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.67rem;
    font-weight: 700;
  }

  .model-doc-grid p {
    min-height: 70px;
    margin-top: 15px;
    color: var(--ink-soft);
    font-size: 0.82rem;
  }

  .model-doc-grid dl div {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 0.7rem;
  }

  .model-doc-grid dt {
    color: var(--ink-muted);
  }

  .endpoint {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .endpoint-title {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .method {
    display: inline-flex;
    min-width: 46px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 750;
  }

  .method-get {
    background: #dff4ea;
    color: #177353;
  }

  .method-post {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .endpoint > p {
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 0.85rem;
  }

  .endpoint pre {
    margin-top: 15px;
    padding: 14px;
    overflow-x: auto;
    border-radius: 7px;
    background: var(--paper);
    font-size: 0.73rem;
  }

  .featured-endpoint {
    border-color: #f0b29f;
    background: #fff9f6;
  }

  .parameter-table-wrap {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .parameter-table td:nth-child(1),
  .parameter-table td:nth-child(2),
  .parameter-table td:nth-child(3) {
    white-space: nowrap;
  }

  .parameter-table td:last-child {
    color: var(--ink-soft);
  }

  .required {
    color: var(--accent-dark);
    font-size: 0.7rem;
    font-weight: 700;
  }

  .doc-section .code-window {
    margin-top: 22px;
  }

  .standalone-code {
    box-shadow: none;
  }

  .error-code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .error-code-list code {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 0.67rem;
  }

  .architecture-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .architecture-line > span,
  .architecture-line > div span {
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--surface-muted);
  }

  .architecture-line i {
    color: var(--accent-dark);
    font-style: normal;
  }

  .architecture-line > div {
    display: flex;
    gap: 5px;
  }

  .doc-list {
    display: grid;
    gap: 10px;
    padding-left: 22px;
    color: var(--ink-soft);
  }

  .docs-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 70px;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--night);
    color: white;
  }

  .docs-next p {
    font-size: 1.05rem;
    font-weight: 680;
  }
}

@layer responsive {
  @media (max-width: 980px) {
    .hero-grid {
      grid-template-columns: 1fr;
      padding-top: 80px;
    }

    .hero-copy {
      max-width: 760px;
    }

    .hero-product {
      width: min(620px, 100%);
      margin: 0 auto;
    }

    .principle-rows article {
      grid-template-columns: 52px 1fr auto;
    }

    .principle-rows article p {
      grid-column: 2 / -1;
    }

    .workflow-grid,
    .quickstart {
      grid-template-columns: 1fr;
    }

    .workflow-copy {
      max-width: 680px;
    }

    .quickstart-copy {
      max-width: 600px;
    }

    .studio-workbench {
      grid-template-columns: 1fr;
    }

    .workbench-settings {
      border-top: 1px solid var(--line);
      border-left: 0;
    }

    .subtitle-layout {
      grid-template-columns: 1fr;
    }

    .docs-layout {
      grid-template-columns: 1fr;
    }

    .docs-sidebar {
      display: none;
    }

    .docs-content {
      width: 100%;
      max-width: 780px;
      margin-inline: auto;
    }
  }

  @media (max-width: 760px) {
    .page-width,
    .site-nav {
      width: min(1180px, calc(100% - 32px));
    }

    .site-nav {
      grid-template-columns: 1fr auto;
      min-height: 66px;
    }

    .nav-context {
      display: none;
    }

    .nav-toggle {
      display: block;
      justify-self: end;
    }

    .nav-links {
      position: absolute;
      top: 60px;
      right: 0;
      display: none;
      width: min(270px, calc(100vw - 32px));
      align-items: stretch;
      flex-direction: column;
      gap: 2px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface);
      box-shadow: var(--shadow-md);
    }

    .nav-links.is-open {
      display: flex;
    }

    .nav-links > a:not(.button),
    .nav-on-dark .nav-links > a:not(.button),
    .hero-shell .nav-links > a:not(.button) {
      display: flex;
      min-height: 44px;
      align-items: center;
      padding-inline: 12px;
      color: var(--ink);
    }

    .hero-shell {
      min-height: auto;
    }

    .hero-grid {
      min-height: 0;
      padding-block: 58px 90px;
    }

    .hero-copy h1 {
      font-size: clamp(3rem, 14vw, 4.9rem);
    }

    .hero-actions,
    .inline-actions {
      width: 100%;
      flex-direction: column;
    }

    .hero-actions .button,
    .inline-actions .button {
      width: 100%;
    }

    .hero-facts {
      grid-template-columns: 1fr 1fr;
    }

    .product-window {
      transform: none;
    }

    .split-heading,
    .studio-heading {
      grid-template-columns: 1fr;
      gap: 22px;
    }

    .principles,
    .workflow-section,
    .quickstart {
      padding-block: 78px;
    }

    .principle-rows {
      margin-top: 42px;
    }

    .principle-rows article {
      grid-template-columns: 36px 1fr;
      gap: 12px;
      padding-block: 22px;
    }

    .principle-rows article p,
    .principle-tag {
      grid-column: 2;
    }

    .principle-tag {
      width: fit-content;
    }

    .workflow-grid {
      gap: 55px;
    }

    .footer-grid {
      grid-template-columns: 1fr;
      justify-items: center;
      padding-block: 34px;
      text-align: center;
    }

    .footer-grid > p {
      justify-self: center;
    }

    .studio-main {
      padding-block: 38px 70px;
    }

    .studio-heading h1 {
      font-size: clamp(2.4rem, 10vw, 3.6rem);
    }

    .workbench-input,
    .workbench-settings,
    .subtitle-preview,
    .result-panel {
      padding: 22px;
    }

    .selected-audio {
      grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .selected-audio audio,
    .selected-audio video {
      grid-column: 1 / -1;
      grid-row: 2;
    }

    .selected-audio video {
      width: 100%;
    }

    .subtitle-preview-heading {
      align-items: flex-start;
      flex-direction: column;
    }

    .result-topline {
      align-items: flex-start;
      flex-direction: column;
    }

    .result-actions {
      width: 100%;
    }

    .result-actions .button {
      flex: 1;
    }

    .result-grid {
      grid-template-columns: 1fr;
      gap: 22px;
    }

    .reference-facts,
    .model-doc-grid {
      grid-template-columns: 1fr;
    }

    .reference-facts div {
      border-right: 0;
      border-bottom: 1px solid var(--line);
    }

    .reference-facts div:last-child {
      border-bottom: 0;
    }

    .doc-section > p,
    .doc-section > .code-window,
    .doc-section > .standalone-code,
    .doc-section > .parameter-table-wrap,
    .doc-section > .model-doc-grid,
    .doc-section > .endpoint,
    .doc-section > .error-code-list,
    .doc-section > .architecture-line,
    .doc-section > .doc-list,
    .doc-section > h3 {
      margin-left: 0;
    }

    .docs-next {
      align-items: stretch;
      flex-direction: column;
    }
  }

  @media (max-width: 480px) {
    .brand-name {
      font-size: 0.88rem;
    }

    .hero-facts {
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .transcript-preview > p {
      font-size: 1.1rem;
    }

    .preview-label span:last-child {
      display: none;
    }

    .workbench-input,
    .workbench-settings,
    .subtitle-preview,
    .result-panel {
      padding: 18px;
    }

    .panel-note {
      display: none;
    }

    .drop-zone {
      min-height: 240px;
      padding: 24px 16px;
    }

    .source-switch {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      width: 100%;
    }

    .source-tab {
      min-width: 0;
    }

    .result-actions {
      flex-direction: column;
    }

    .result-actions .button {
      width: 100%;
    }

    .doc-heading {
      grid-template-columns: 32px 1fr;
    }

    .architecture-line {
      align-items: flex-start;
      flex-direction: column;
    }

    .architecture-line > i {
      transform: rotate(90deg);
    }

    .architecture-line > div {
      flex-direction: column;
    }
  }

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

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