:root {
  color-scheme: light dark;
  --page: #f4f5f2;
  --surface: #fbfcf9;
  --surface-strong: #e9ece6;
  --ink: #151815;
  --muted: #626962;
  --line: #d3d8d1;
  --accent: #1f7a4d;
  --accent-strong: #155c39;
  --accent-soft: #dceee3;
  --button-bg: #155c39;
  --button-hover: #1f7a4d;
  --error: #a43c34;
  --error-soft: #f6e4e1;
  --shadow: 0 24px 70px rgba(37, 55, 42, 0.11);
  --radius: 8px;
  --font-sans: "Avenir Next", Avenir, "Hiragino Sans", "Yu Gothic", "PingFang SC",
    "Microsoft YaHei", "Apple SD Gothic Neo", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111411;
    --surface: #191d19;
    --surface-strong: #242a24;
    --ink: #edf0eb;
    --muted: #aeb6ae;
    --line: #343b34;
    --accent: #56b881;
    --accent-strong: #73c997;
    --accent-soft: #1d3c2a;
    --button-bg: #256b46;
    --button-hover: #2f7c53;
    --error: #ef8c83;
    --error-soft: #422421;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header,
.site-footer,
.hero,
.platform-hero,
.platform-details,
.platform-faq,
.other-platforms,
.how-it-works,
.responsibility-note,
.legal-page {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
}

.site-nav,
.site-footer nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  min-width: 52px;
  min-height: 38px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary:hover,
.language-menu[open] summary {
  color: var(--ink);
  border-color: var(--accent);
}

.language-menu summary:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.language-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-menu[open] .language-chevron {
  transform: translateY(2px) rotate(225deg);
}

.language-options {
  width: 176px;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.language-options p {
  margin: 4px 8px 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.language-options a {
  min-height: 36px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0 9px;
  color: var(--ink);
  border-radius: calc(var(--radius) - 2px);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.language-flag {
  width: 20px;
  flex: 0 0 20px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}

.language-options a:hover,
.language-options a:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.language-options a[aria-current="true"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

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

.hero {
  min-height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
  gap: clamp(56px, 8vw, 112px);
  align-items: center;
  padding-block: 70px;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 650;
  line-height: 0.98;
}

.hero-intro {
  max-width: 500px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 40px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.platform-list span {
  position: relative;
}

.platform-list span:not(:last-child)::after {
  content: "/";
  position: absolute;
  right: -15px;
  color: var(--line);
}

.download-tool {
  min-height: 500px;
  padding: clamp(26px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-group label {
  font-size: 14px;
  font-weight: 700;
}

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

input[type="url"] {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 15px;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

input[type="url"]::placeholder {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
  opacity: 1;
}

input[type="url"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="url"][aria-invalid="true"] {
  border-color: var(--error);
}

.primary-button,
.secondary-button,
.text-button {
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease,
    transform 100ms ease;
}

.primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #f7faf7;
  background: var(--button-bg);
  border: 1px solid var(--button-bg);
  white-space: nowrap;
}

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: translateY(1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.site-nav a:focus-visible,
.site-footer a:focus-visible,
.back-link:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.secondary-button:hover {
  border-color: var(--accent);
}

.text-button {
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
}

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

.field-help,
.field-error {
  margin: 0;
  font-size: 13px;
}

.field-help {
  color: var(--muted);
}

.field-error {
  color: var(--error);
  font-weight: 650;
}

.empty-state,
.loading-state {
  min-height: 300px;
  display: grid;
  place-content: center;
  justify-items: center;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state p,
.loading-state p {
  max-width: 300px;
  margin: 22px 0 0;
  font-size: 14px;
}

.link-sample {
  width: 172px;
  height: 105px;
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transform: rotate(-2deg);
}

.link-stem {
  width: 110px;
  height: 7px;
  display: block;
  margin-bottom: 11px;
  background: var(--surface-strong);
  border-radius: 3px;
}

.link-stem.short {
  width: 74px;
}

.link-action {
  width: 28px;
  height: 28px;
  position: absolute;
  right: -10px;
  bottom: -10px;
  border: 7px solid var(--accent-soft);
  border-radius: 50%;
  background: var(--accent);
}

.loading-state {
  grid-template-columns: 112px 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
  align-content: center;
  justify-items: stretch;
  text-align: left;
}

.loading-state p {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 2px;
}

.skeleton {
  background: var(--surface-strong);
  border-radius: var(--radius);
}

.thumbnail-skeleton {
  aspect-ratio: 16 / 10;
}

.skeleton-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.line-wide {
  width: 90%;
  height: 17px;
}

.line-short {
  width: 55%;
  height: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    background: linear-gradient(
      100deg,
      var(--surface-strong) 30%,
      var(--accent-soft) 48%,
      var(--surface-strong) 66%
    );
    background-size: 260% 100%;
    animation: skeleton-shift 1.6s ease-in-out infinite;
  }
}

@keyframes skeleton-shift {
  to {
    background-position-x: -130%;
  }
}

.video-preview {
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 24px;
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.video-preview.no-thumbnail {
  grid-template-columns: 1fr;
}

.video-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-strong);
  border-radius: var(--radius);
}

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

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.preview-copy h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0 6px;
  font-size: 20px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.preview-copy > p {
  overflow: hidden;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-button {
  width: 100%;
}

.task-state,
.complete-state,
.task-error-state {
  min-height: 300px;
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.task-state {
  display: grid;
  align-content: center;
}

.task-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.task-heading p {
  margin: 0;
}

#task-status {
  font-size: 18px;
  font-weight: 700;
}

#task-detail,
.task-note {
  color: var(--muted);
  font-size: 13px;
}

#task-percent {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 24px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  margin-top: 24px;
  background: var(--surface-strong);
  border-radius: 4px;
}

.progress-track span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: inherit;
  transition: width 300ms ease;
}

.task-note {
  margin: 12px 0 0;
}

.complete-state {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-content: center;
  align-items: center;
}

.complete-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 27px;
  font-weight: 800;
}

.complete-state h2 {
  margin: 0;
  font-size: 20px;
}

.complete-state p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.complete-state .full-button,
.complete-state .text-button {
  grid-column: 1 / -1;
}

.task-error-state {
  display: grid;
  place-content: center;
  justify-items: start;
}

.task-error-state strong {
  color: var(--error);
  font-size: 20px;
}

.task-error-state p {
  max-width: 400px;
  margin: 8px 0 22px;
  color: var(--muted);
}

.how-it-works {
  padding-block: 110px 90px;
  border-top: 1px solid var(--line);
}

.how-it-works > h2,
.responsibility-note h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.steps {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 0;
  margin-top: 56px;
}

.steps article {
  min-height: 190px;
  padding: 30px;
  border-left: 1px solid var(--line);
}

.steps article:first-child {
  padding-left: 0;
  border-left: 0;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.steps p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
}

.responsibility-note {
  display: grid;
  grid-template-columns: 0.75fr 1fr auto;
  gap: 48px;
  align-items: start;
  padding-block: 84px;
  border-top: 1px solid var(--line);
}

.responsibility-note h2 {
  font-size: 30px;
}

.responsibility-note p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
}

.responsibility-note a,
.back-link,
.contact-email {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 4px;
}

.platform-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
  gap: clamp(56px, 8vw, 112px);
  align-items: center;
  padding-block: 76px 88px;
}

.platform-copy .back-link {
  margin-bottom: 42px;
}

.platform-copy h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(46px, 5vw, 68px);
  line-height: 1.02;
}

.platform-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-block: 78px;
  border-top: 1px solid var(--line);
}

.platform-details h2,
.platform-faq > h2,
.other-platforms h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.platform-details p,
.platform-faq p {
  margin: 0;
  color: var(--muted);
}

.platform-faq {
  padding-block: 84px;
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 42px;
}

.faq-list h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.other-platforms {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  padding-block: 76px;
  border-top: 1px solid var(--line);
}

.other-platforms div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.other-platforms a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 4px;
}

.site-footer {
  min-height: 96px;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-page {
  min-height: calc(100dvh - 165px);
  max-width: 780px;
  padding-block: 76px 110px;
}

.back-link {
  display: inline-block;
  margin-bottom: 46px;
  font-size: 14px;
}

.legal-page h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 68px);
  line-height: 1;
}

.legal-lead {
  max-width: 640px;
  margin: 24px 0 62px;
  color: var(--muted);
  font-size: 20px;
}

.legal-page section {
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.legal-page section h2 {
  margin: 0 0 10px;
  font-size: 19px;
}

.legal-page section p {
  margin: 0;
  color: var(--muted);
}

.legal-updated,
.contact-note {
  margin-top: 44px;
  color: var(--muted);
  font-size: 13px;
}

.contact-page {
  text-align: left;
}

.contact-email {
  display: inline-block;
  font-size: clamp(22px, 4vw, 34px);
  overflow-wrap: anywhere;
}

@media (max-width: 940px) {
  .hero,
  .platform-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 48px;
    padding-block: 64px 86px;
  }

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

  .download-tool {
    width: 100%;
  }

  .platform-copy {
    max-width: 700px;
  }

  .responsibility-note {
    grid-template-columns: 1fr 1.3fr;
  }

  .responsibility-note a {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .site-header,
  .site-footer,
  .hero,
  .platform-hero,
  .platform-details,
  .platform-faq,
  .other-platforms,
  .how-it-works,
  .responsibility-note,
  .legal-page {
    width: min(100% - 32px, 1180px);
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav > a:first-child {
    display: none;
  }

  .site-nav {
    gap: 10px;
  }

  .language-options {
    position: fixed;
    top: 62px;
    right: 16px;
  }

  .hero,
  .platform-hero {
    gap: 38px;
    padding-block: 48px 70px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 64px);
  }

  .platform-copy h1 {
    font-size: clamp(42px, 12vw, 58px);
    overflow-wrap: anywhere;
  }

  .platform-copy .back-link {
    margin-bottom: 32px;
  }

  .hero-intro {
    margin-top: 22px;
    font-size: 16px;
  }

  .platform-list {
    margin-top: 28px;
  }

  .download-tool {
    min-height: 510px;
    padding: 22px 18px;
  }

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

  .empty-state,
  .loading-state,
  .task-state,
  .complete-state,
  .task-error-state {
    min-height: 280px;
  }

  .video-preview {
    grid-template-columns: 1fr;
  }

  .video-preview img {
    aspect-ratio: 16 / 9;
  }

  .loading-state {
    grid-template-columns: 90px 1fr;
  }

  .how-it-works {
    padding-block: 76px 60px;
  }

  .steps {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }

  .steps article,
  .steps article:first-child {
    min-height: auto;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .responsibility-note {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 64px;
  }

  .platform-details,
  .faq-list,
  .other-platforms {
    grid-template-columns: 1fr;
  }

  .platform-details,
  .platform-faq,
  .other-platforms {
    gap: 34px;
    padding-block: 60px;
  }

  .responsibility-note a {
    grid-column: auto;
  }

  .site-footer {
    min-height: 150px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .site-footer nav {
    gap: 20px;
    justify-content: flex-start;
  }

  .legal-page {
    padding-block: 48px 80px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  .legal-lead {
    margin-bottom: 44px;
    font-size: 18px;
  }
}

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