:root {
  color-scheme: light;
  --app-bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --surface-muted: #eef1f5;
  --grid-line: rgba(22, 28, 39, 0.045);
  --ink: #17191f;
  --muted: #656d79;
  --muted-2: #8a93a1;
  --line: #d8dde5;
  --line-strong: #aeb7c5;
  --accent: #315fe6;
  --accent-hover: #244ac0;
  --accent-soft: #eef3ff;
  --success: #147c57;
  --success-soft: #e8f6ef;
  --danger: #b44738;
  --danger-soft: #faece9;
  --warm: #9b6238;
  --shadow: 0 16px 44px rgba(22, 28, 39, 0.08);
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sl-font-sans: var(--sans);
  --sl-border-radius-medium: 8px;
  --sl-border-radius-large: 8px;
  --sl-color-primary-600: var(--accent);
  --sl-color-primary-700: var(--accent-hover);
  --sl-focus-ring-color: color-mix(in srgb, var(--accent) 36%, transparent);
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--app-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--app-bg);
  font-size: 15px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

h1,
h2,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  width: min(1180px, calc(100% - 40px));
  min-width: 0;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup > div {
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
}

h1,
.brand-heading {
  display: block;
  color: var(--ink);
  font-size: 21px;
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-lockup p {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.25;
}

.capture-panel {
  width: min(1180px, calc(100% - 40px));
  margin: 20px auto 14px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.2fr);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.capture-copy {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.capture-copy h2 {
  max-width: 440px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 820;
  letter-spacing: 0;
}

.tool-picker {
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px;
}

.tool-mode {
  min-height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.tool-mode:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.tool-mode.is-active {
  color: var(--accent);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(22, 28, 39, 0.08);
}

.tool-mode:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
}

.capture-form {
  min-width: 0;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.url-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(178px, auto);
  gap: 10px;
}

.url-entry[data-mode="post"],
.url-entry[data-mode="story"],
.url-entry[data-mode="highlight"],
.url-entry[data-mode="profile"] {
  grid-template-columns: minmax(0, 1fr) auto minmax(178px, auto);
}

input[type="url"],
input[type="text"] {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

input::placeholder {
  color: var(--muted-2);
}

input:disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

input:focus-visible,
.transcript-output:focus-visible,
.square-button:focus-visible,
.primary-button:focus-visible,
.profile-filter:focus-visible,
.secondary-button:focus-visible,
.text-link:focus-visible,
.tab:focus-visible,
.tool-mode:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.square-button,
.primary-button,
.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.square-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
}

.square-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.square-button:disabled {
  background: var(--surface-soft);
  color: var(--muted-2);
}

.primary-button {
  min-width: 178px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.secondary-button,
.text-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.secondary-button.is-loading {
  gap: 8px;
  cursor: wait;
}

.secondary-button.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: button-spin 0.75s linear infinite;
}

.text-link {
  color: var(--accent);
}

.text-link:hover {
  color: var(--accent-hover);
}

.primary-button.is-busy {
  position: relative;
  overflow: hidden;
  background: var(--accent-hover);
}

.primary-button.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-hover) 0 34%, #416deb 50%, var(--accent-hover) 66% 100%);
  animation: button-flow 1400ms linear infinite;
}

.primary-button.is-busy > * {
  position: relative;
  z-index: 1;
}

.primary-button.is-busy svg {
  animation: arrow-flight 880ms ease-in-out infinite;
}

@keyframes arrow-flight {
  0%,
  100% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(4px);
  }
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes button-flow {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.status-row {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.status-pill,
.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.status-note {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-note:empty {
  display: none;
}

.status-pill.is-valid {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.is-error {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.is-processing {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.is-complete {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: var(--success-soft);
  color: var(--success);
}

.workspace {
  width: min(1180px, calc(100% - 40px));
  min-height: 0;
  margin: 0 auto 44px;
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.workspace.is-download-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.seo-content {
  width: min(1180px, calc(100% - 40px));
  margin: -8px auto 48px;
  display: grid;
  gap: 14px;
}

.seo-intro {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 24px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.045);
}

.seo-intro h2,
.related-tools h2,
.use-strip h2,
.faq-block h2 {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: 0;
}

.seo-intro p,
.use-strip li,
.faq-block p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.seo-intro h2 + p {
  margin-top: 0;
}

.how-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.04);
}

.how-strip h2,
.download-index h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: 0;
}

.step-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.step-rail li {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-top: 2px;
}

.step-rail sl-badge::part(base),
.use-strip sl-badge::part(base) {
  border: 1px solid color-mix(in srgb, var(--warm) 28%, var(--line));
  background: #fff8f1;
  color: var(--warm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 820;
}

.step-rail strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

.step-rail p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.download-index {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 249, 251, 0.9));
  padding: 24px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.045);
}

.download-index .eyebrow {
  margin-bottom: 8px;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.download-action,
.related-action {
  width: 100%;
}

.download-action::part(base),
.related-action::part(base) {
  width: 100%;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.download-action::part(base) {
  min-height: 62px;
  justify-content: flex-start;
  padding: 10px 14px;
}

.download-action::part(base):hover,
.related-action::part(base):hover {
  border-color: var(--line-strong);
  background: #fbfcfe;
}

.download-action::part(prefix),
.related-action::part(prefix) {
  color: var(--accent);
}

.download-action::part(label) {
  min-width: 0;
  width: 100%;
  text-align: left;
}

.download-action-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.download-action-label strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.download-action-label span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.info-drawers {
  display: grid;
  gap: 10px;
}

.info-drawers sl-details::part(base),
.faq-block sl-details::part(base) {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.info-drawers sl-details::part(header),
.faq-block sl-details::part(header) {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.info-drawers sl-details::part(content),
.faq-block sl-details::part(content) {
  color: var(--muted);
  line-height: 1.6;
}

.info-drawers ul {
  margin: 0;
  padding-left: 22px;
}

.info-drawers li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.info-drawers li + li {
  margin-top: 6px;
}

.related-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.04);
}

.related-tools h2 {
  font-size: 18px;
}

.related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.related-action {
  width: auto;
}

.related-action::part(base) {
  min-height: 38px;
}

.use-strip {
  display: grid;
  grid-template-columns: minmax(190px, 0.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 22px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.04);
}

.use-strip ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.use-strip li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
}

.faq-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 24px 26px 26px;
  box-shadow: 0 10px 28px rgba(22, 28, 39, 0.04);
}

.faq-block h2 {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.legal-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.legal-footer p {
  max-width: 820px;
}

.legal-footer strong {
  color: var(--ink);
}

.legal-links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.legal-footer a,
.legal-home-link,
.legal-document a {
  color: var(--accent);
  font-weight: 780;
  text-decoration: none;
}

.legal-footer a:hover,
.legal-home-link:hover,
.legal-document a:hover {
  text-decoration: underline;
}

.legal-topbar .brand-lockup {
  justify-content: space-between;
}

.brand-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-link > div {
  min-width: 0;
}

.legal-home-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 14px;
  font-size: 13px;
}

.legal-shell {
  width: min(900px, calc(100% - 40px));
  margin: 28px auto 52px;
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 38px;
}

.legal-document h1 {
  font-size: 38px;
  line-height: 1.05;
  font-weight: 820;
  letter-spacing: 0;
}

.legal-date {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}

.legal-document h2 {
  margin-top: 30px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.legal-document .eyebrow {
  margin-bottom: 7px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
}

.legal-document .legal-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.4;
}

.legal-document h2 + p,
.legal-document h2 + ul {
  margin-top: 8px;
}

.legal-document ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.legal-document li + li {
  margin-top: 6px;
}

.legal-document .legal-note {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
}

.preview-stage,
.transcript-desk {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(22, 28, 39, 0.06);
  overflow: hidden;
}

.preview-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.transcript-desk {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 660px;
}

.pane-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.pane-header h2 {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.desk-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desk-actions .square-button {
  width: 40px;
  height: 40px;
}

.phone-frame {
  width: min(calc(100% - 32px), 280px);
  height: min(528px, calc(100vh - 304px));
  min-height: 500px;
  align-self: start;
  justify-self: center;
  margin: 16px;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
}

.phone-chrome {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #252a34;
  background: #171a22;
}

.phone-chrome span {
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: #535b6a;
}

.reel-viewport {
  min-height: 0;
  display: grid;
  place-items: center;
  background: #0d0f14;
  overflow: hidden;
}

.reel-crop {
  --instagram-header-crop: 78px;
  --instagram-embed-width: 354px;
  --instagram-media-scale: 1.18;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  background: #000000;
}

.instagram-media {
  min-width: 0 !important;
  position: relative !important;
  left: 50% !important;
  width: var(--instagram-embed-width) !important;
  max-width: 100% !important;
  height: calc(100% + var(--instagram-header-crop)) !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: #ffffff !important;
  transform: translate(-50%, calc(-1 * var(--instagram-header-crop))) scale(var(--instagram-media-scale));
  transform-origin: top center;
}

.instagram-media iframe,
.reel-crop > iframe.instagram-media {
  width: var(--instagram-embed-width) !important;
  max-width: none !important;
  height: calc(100% + var(--instagram-header-crop)) !important;
  min-height: 0 !important;
  transform-origin: top center;
}

.empty-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  padding: 24px;
  color: #d8dde7;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 30px,
    #0d0f14;
}

.scanline {
  display: none;
}

.poster-glyph {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid #343b49;
  border-radius: 8px;
  background: #171b24;
  color: #8b95a6;
}

.poster-glyph svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.8;
}

.empty-preview p {
  max-width: 220px;
  color: #a2aabb;
  font-size: 13px;
  line-height: 1.4;
}

.transcript-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tabs {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
}

.tab {
  height: 34px;
  min-width: 86px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.tab:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.tab.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.speaker-toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.speaker-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 36px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-muted);
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.toggle-track span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--muted);
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.speaker-toggle input:checked + .toggle-track {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: var(--accent-soft);
}

.speaker-toggle input:checked + .toggle-track span {
  background: var(--accent);
  transform: translateX(14px);
}

.speaker-toggle input:focus-visible + .toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.speaker-toggle:has(input:disabled) {
  cursor: not-allowed;
  color: var(--muted-2);
}

.speaker-toggle:has(input:disabled) .toggle-track {
  border-color: var(--line);
  background: var(--surface-soft);
}

.speaker-toggle:has(input:disabled) .toggle-track span {
  background: var(--muted-2);
}

.transcript-output {
  min-height: 0;
  margin: 18px 20px 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.empty-transcript,
.connector-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.connector-state {
  align-content: center;
  gap: 8px;
}

.connector-state strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.connector-state span {
  max-width: 360px;
}

.processing-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 18px;
  padding: clamp(72px, 12vh, 112px) 32px 32px;
  color: var(--muted);
  text-align: center;
}

.processing-visual {
  position: relative;
  width: min(360px, 100%);
  height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.processing-visual::before,
.processing-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.processing-visual::before {
  top: 46px;
}

.processing-visual::after {
  bottom: 46px;
}

.processing-cursor {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
  animation: processing-scan 1800ms ease-in-out infinite;
}

.processing-wave {
  position: relative;
  z-index: 1;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.processing-wave span {
  width: 10px;
  height: var(--bar-height);
  min-height: 18px;
  border-radius: 999px;
  background: var(--accent);
  transform-origin: center;
  animation: transcript-wave 1100ms ease-in-out infinite;
  animation-delay: calc(var(--bar-index) * 74ms);
}

.processing-copy {
  display: grid;
  gap: 7px;
}

.processing-copy strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.processing-copy span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.processing-steps {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.processing-steps li {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 0 11px;
}

.processing-steps li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
}

@keyframes transcript-wave {
  0%,
  100% {
    transform: scaleY(0.6);
  }

  40% {
    transform: scaleY(1.12);
  }

  68% {
    transform: scaleY(0.78);
  }
}

@keyframes processing-scan {
  0%,
  100% {
    transform: translateX(-150px);
  }

  50% {
    transform: translateX(150px);
  }
}

.transcript-list {
  display: grid;
  margin: 0;
  padding: 0;
}

.segment-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.segment-row:last-child {
  border-bottom: 0;
}

.timecode {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.segment-text {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.speaker-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.plain-text {
  margin: 0;
  padding: 18px;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.65;
}

.frame-sheet-view {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.frame-sheet-view img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.metadata-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.metadata-grid dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.metadata-grid dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.download-result {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  color: var(--muted);
}

.download-result > div:last-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.download-result strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.download-result span {
  font-family: var(--mono);
  font-size: 12px;
}

.download-result-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--success) 42%, var(--line));
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--success);
}

.download-result-icon svg {
  width: 22px;
  height: 22px;
}

.profile-results {
  display: grid;
  gap: 0;
}

.profile-summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 12px 14px;
}

.profile-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.profile-summary span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.profile-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.profile-filter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.profile-filter:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--ink);
}

.profile-filter.is-active {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.profile-filter span:last-child {
  min-width: 22px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 3px 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.profile-filter.is-active span:last-child {
  background: color-mix(in srgb, var(--accent) 14%, #ffffff);
  color: var(--accent-strong);
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 14px;
}

.profile-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-item:last-child {
  border-bottom: 1px solid var(--line);
}

.profile-filter-empty {
  min-height: 150px;
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.profile-filter-empty span {
  max-width: 360px;
  line-height: 1.45;
}

.profile-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
  color: var(--muted);
  text-decoration: none;
}

.profile-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-thumb.is-missing::after {
  content: attr(data-fallback);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
}

.profile-thumb-placeholder {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
}

.profile-media-badge {
  position: absolute;
  left: 9px;
  bottom: 9px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background: rgba(23, 25, 31, 0.72);
  color: #ffffff;
  padding: 4px 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.profile-item-main {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px 12px 0;
}

.profile-item-main strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-item-main span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.profile-url {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-url:hover {
  color: var(--accent);
}

.profile-item-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
}

.profile-item-actions .secondary-button {
  flex: 1;
}

.profile-more-row {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.profile-more-row .secondary-button {
  width: 100%;
  min-height: 42px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(340px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 13px;
  box-shadow: 0 18px 42px rgba(22, 28, 39, 0.2);
  font-size: 13px;
  font-weight: 760;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .capture-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .capture-copy h2 {
    max-width: none;
    font-size: 28px;
  }

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

  .seo-intro,
  .step-rail,
  .download-index,
  .download-actions,
  .use-strip,
  .faq-block {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    height: min(448px, 72vh);
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
  }

  .brand-lockup,
  .capture-panel,
  .workspace,
  .seo-content,
  .legal-footer,
  .legal-shell {
    width: min(100% - 24px, 1180px);
  }

  .legal-topbar .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .legal-home-link {
    align-self: flex-start;
  }

  .legal-footer {
    margin: 0 auto 30px;
    flex-direction: column;
    gap: 12px;
  }

  .legal-links {
    flex-wrap: wrap;
  }

  .legal-shell {
    margin: 18px auto 36px;
  }

  .legal-document {
    padding: 24px 18px;
  }

  .legal-document h1 {
    font-size: 30px;
  }

  .capture-panel {
    margin-top: 14px;
    padding: 16px;
    gap: 18px;
  }

  .seo-content {
    margin: -18px auto 32px;
    gap: 12px;
  }

  .seo-intro,
  .how-strip,
  .download-index,
  .related-tools,
  .use-strip,
  .faq-block {
    padding: 18px;
  }

  .capture-copy h2 {
    font-size: 25px;
  }

  .tool-picker {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .tool-mode {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }

  .url-entry {
    grid-template-columns: minmax(0, 1fr) 46px 46px;
  }

  .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .pane-header {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .desk-actions {
    width: 100%;
  }

  .desk-actions .square-button {
    flex: 1;
  }

  .phone-frame {
    width: min(calc(100% - 24px), 280px);
    min-height: 500px;
    margin: 12px;
  }

  .transcript-desk {
    min-height: 560px;
  }

  .transcript-tools {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 16px;
  }

  .tab {
    min-width: 0;
    flex: 1;
  }

  .transcript-output {
    margin: 14px 16px 16px;
  }

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

  .profile-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .profile-item-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  h1,
  .brand-heading {
    font-size: 19px;
  }

  .brand-lockup p {
    font-size: 12px;
  }

  .segment-row {
    grid-template-columns: 1fr;
  }

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

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

  .profile-item-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: stretch;
  }

  .profile-item-actions .text-link,
  .profile-item-actions .secondary-button {
    width: 100%;
    flex: 0 0 auto;
  }
}
