:root {
  color-scheme: dark;
  --bg: #02090b;
  --surface: rgba(12, 26, 32, 0.74);
  --surface-solid: #0b1a20;
  --surface-soft: #10262d;
  --line: rgba(152, 229, 244, 0.18);
  --line-strong: rgba(152, 229, 244, 0.36);
  --text: #eef8fa;
  --muted: #9db3ba;
  --muted-strong: #c4d5d9;
  --glass-fill: rgba(255, 255, 255, 0.055);
  --glass-edge: rgba(214, 250, 255, 0.3);
  --glass-highlight: rgba(255, 255, 255, 0.34);
  --glass-shadow: rgba(0, 0, 0, 0.12);
  --accent: #42c9df;
  --accent-strong: #7be5f6;
  --danger: #ff7b87;
  --ok: #78d6b1;
  --radius: 999px;
  --panel-radius: 34px;
  --max: 1320px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7fbfc;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #fbfdfe;
  --surface-soft: #e7f3f6;
  --line: rgba(10, 83, 98, 0.16);
  --line-strong: rgba(10, 83, 98, 0.32);
  --text: #09242b;
  --muted: #587077;
  --muted-strong: #314b52;
  --glass-fill: rgba(255, 255, 255, 0.26);
  --glass-edge: rgba(14, 108, 124, 0.2);
  --glass-highlight: rgba(255, 255, 255, 0.7);
  --glass-shadow: rgba(10, 83, 98, 0.14);
  --accent: #1597ad;
  --accent-strong: #0c7386;
  --danger: #b42332;
  --ok: #0c7a55;
}

* {
  box-sizing: border-box;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Avenir Next", "SF Pro Display", "Segoe UI", Arial, sans-serif;
  background: var(--bg) url("./assets/bg-dark.svg?v=20260618-2") center / cover no-repeat fixed;
  color: var(--text);
  overflow-x: hidden;
}

.liquid-shader-defs {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

html[data-theme="light"] body {
  background: var(--bg) url("./assets/bg-light.svg") center / cover no-repeat fixed;
}

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

button,
input {
  font: inherit;
}

button,
select,
input {
  outline: none;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
.liquid-glass:focus-visible,
.language-select:focus-within,
.input-row:focus-within {
  outline: 2px solid rgba(123, 229, 246, 0.48);
  outline-offset: 3px;
}

.liquid-glass {
  --liquid-radius: 999px;
  --liquid-backdrop-filter: blur(18px) saturate(1.32);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  clip-path: inset(0 round var(--liquid-radius));
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.liquid_glass-material {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--liquid-radius);
  pointer-events: none;
  -webkit-backdrop-filter: var(--liquid-backdrop-filter);
  backdrop-filter: var(--liquid-backdrop-filter);
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateZ(0);
}

html[data-theme="light"] .liquid_glass-material {
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(3, 62, 74, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 8px 18px rgba(3, 62, 74, 0.1);
}

.liquid-glass:hover .liquid_glass-material {
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    inset 0 1px 0 var(--glass-highlight),
    0 10px 22px var(--glass-shadow);
}

.page-shell {
  width: min(100%, var(--max));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: max-content;
  font-weight: 750;
  letter-spacing: 0.01em;
  padding: 8px 14px 8px 9px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

.brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  object-position: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -8px 18px rgba(4, 17, 22, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.theme-toggle,
.language-select {
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted-strong);
  --glass-blur: 22px;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .language-select {
  background: transparent;
}

.theme-toggle {
  min-width: 72px;
  padding: 0 13px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 13px;
}

.language-select span {
  color: var(--muted);
}

.language-select select {
  border: 0;
  color: var(--text);
  background: transparent;
  outline: none;
  cursor: pointer;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 0 28px;
}

.hero-copy {
  width: min(100%, 880px);
  max-width: 880px;
  text-align: center;
  padding: 20px 0 10px;
  --glass-blur: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-kicker,
.panel-label {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-family: "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
}

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

h1 {
  margin: 0 auto 14px;
  max-width: 720px;
  font-size: clamp(36px, 4.7vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 auto 26px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.55;
}

.parser-form {
  width: min(100%, 760px);
  margin: 0 auto;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 8px;
  padding: 7px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

.input-row input {
  min-width: 0;
  height: 54px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 22px;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

html[data-theme="light"] .input-row input {
  background: transparent;
}

.input-row input::placeholder {
  color: #7d9399;
}

.input-row input:focus {
  box-shadow: none;
  background: transparent;
}

.input-row button,
.download-actions a {
  height: 54px;
  border: 1px solid rgba(123, 229, 246, 0.42);
  border-radius: var(--radius);
  color: #041116;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  cursor: pointer;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 18px rgba(66, 201, 223, 0.14);
  transition: transform 160ms ease, filter 160ms ease;
}

html[data-theme="light"] .input-row button,
html[data-theme="light"] .download-actions a {
  color: #f5fafb;
  background: linear-gradient(180deg, #1597ad, #0b6f82);
}

.input-row button:hover,
.download-actions a:hover {
  filter: brightness(1.07);
}

.input-row button:active,
.download-actions a:active {
  transform: translateY(1px);
}

.form-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.form-message.is-error {
  color: var(--danger);
}

.form-message.is-ok {
  color: var(--ok);
}

.platform-strip {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.platform-strip span {
  border: 0;
  border-radius: var(--radius);
  padding: 8px 13px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 12px;
}

.platform-section,
.faq-section {
  padding-top: 54px;
}

.platform-directory {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.86fr;
  gap: 12px;
}

.platform-group {
  min-height: 132px;
  padding: 22px;
  border-radius: var(--panel-radius);
  --liquid-radius: var(--panel-radius);
}

.platform-group-featured .liquid_glass-material {
  background: rgba(66, 201, 223, 0.1);
}

.platform-group h3 {
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.35;
}

.platform-group p {
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
}

.liquid-panel {
  position: relative;
  border: 0;
  border-radius: var(--panel-radius);
  background: transparent;
  box-shadow: none;
}

.compact-panel {
  padding: 22px;
}

.result-panel h2 {
  margin: 0;
  font-size: 20px;
}

.result-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-summary img {
  width: 96px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(127, 219, 234, 0.08);
}

.result-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-actions a {
  min-width: 122px;
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
}

.download-actions a[aria-busy="true"] {
  cursor: wait;
  filter: saturate(0.55);
  opacity: 0.68;
  pointer-events: none;
}

.result-placeholder {
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.input-row button:disabled {
  cursor: wait;
  filter: saturate(0.5);
  opacity: 0.62;
}

.guide-section {
  margin-top: 0;
  padding-top: 54px;
  padding-bottom: 22px;
}

.section-heading {
  max-width: 560px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.12;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.step-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1.05fr;
  gap: 12px;
}

.step-grid article,
.platform-strip span {
  border: 0;
  background: transparent;
}

.step-grid article {
  min-height: 148px;
  padding: 26px 24px 22px;
  border-radius: 32px;
}

.platform-strip span {
  border-radius: var(--radius);
}

.step-grid article:nth-child(2) {
  margin-top: 0;
}

.step-grid article span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent-strong);
  font-family: "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-size: 11px;
}

.step-grid h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.32;
}

.step-grid p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.faq-section {
  padding-bottom: 42px;
}

.faq-list {
  max-width: 920px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 19px 42px 19px 0;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 17px;
  right: 4px;
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list p {
  max-width: 720px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.site-footer {
  margin-top: auto;
  padding: 14px 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 920px) {
  .page-shell {
    padding: 20px 16px 0;
  }

  .site-header {
    height: auto;
    min-height: 64px;
  }

  .header-actions {
    flex: 1;
    width: 100%;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 18px;
  }

  .result-panel {
    grid-template-columns: 1fr;
  }

  .step-grid article:nth-child(2) {
    margin-top: 0;
  }

  .platform-directory {
    grid-template-columns: 1fr 1fr;
  }

  .platform-group-featured {
    grid-column: 1 / -1;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 12px;
  }
}

@media (max-width: 720px) {
  .step-grid,
  .platform-directory {
    grid-template-columns: 1fr;
  }

  .platform-group-featured {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 18px;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .control-group {
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(34px, 10.5vw, 48px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 6px;
    padding: 6px;
  }

  .input-row button {
    width: 104px;
    height: 48px;
    font-size: 14px;
  }

  .input-row input {
    height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }

  .download-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .download-actions a {
    width: 100%;
  }

  .guide-section {
    margin-top: 0;
    padding-top: 42px;
  }

  .platform-section,
  .faq-section {
    padding-top: 42px;
  }

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