:root {
  --brand: #0f766e;
  --brand-600: #0d6b64;
  --brand-700: #115e59;
  --accent: #f59e0b;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand b { color: var(--brand); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--brand); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 50% -10%, #ccfbf1 0%, rgba(204,251,241,0) 60%), linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%); padding: clamp(36px, 6vw, 72px) 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.1rem); margin-bottom: .35em; }
.lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); color: var(--ink-2); max-width: 720px; margin: 0 auto 28px; }

.dl-form { display: flex; gap: 10px; max-width: 760px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.field { position: relative; flex: 1; display: flex; align-items: center; }
.field input { width: 100%; min-width: 0; height: 52px; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: 0 84px 0 14px; background: transparent; color: var(--ink); }
.field input::placeholder { color: #94a3b8; }
.btn-ghost { position: absolute; right: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: #cbd5e1; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 1.02rem; cursor: pointer; transition: background .15s ease, transform .05s ease; white-space: nowrap; }
.btn-primary:hover { background: var(--brand-700); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.hint { margin: 14px auto 0; font-size: .9rem; color: var(--muted); }

.status { max-width: 760px; margin: 18px auto 0; padding: 12px 16px; border-radius: 12px; font-weight: 500; text-align: left; }
.status.loading { background: #f1f5f9; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.status.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #cbd5e1; border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result */
.result { max-width: 760px; margin: 24px auto 0; display: grid; grid-template-columns: 200px 1fr; gap: 22px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.result.no-thumb { grid-template-columns: 1fr; }
.result-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.result-kicker { margin: 0 0 4px; font-size: .8rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.result-title { font-size: 1.1rem; margin: 0 0 14px; overflow-wrap: anywhere; }
.result-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.result-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.result-item .meta { display: flex; flex-direction: column; min-width: 0; }
.result-item .name { font-weight: 700; }
.result-item .sub { font-size: .85rem; color: var(--muted); }
.btn-dl { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.btn-dl:hover { background: var(--brand-700); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #ecfdf5; color: var(--brand-700); margin-left: 6px; vertical-align: middle; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-600); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Sections */
.section { padding: clamp(44px, 6vw, 72px) 0; }
.section.alt { background: var(--bg-2); }
.section h2 { text-align: center; margin-bottom: 1.1em; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #ccfbf1; color: var(--brand-700); font-weight: 800; margin-bottom: 12px; }
.step p, .card p { color: var(--ink-2); margin: 0; }
.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--brand); margin-bottom: 12px; }
.code-list { padding-left: 1.1em; }
.code-list code { font-size: .92rem; background: #fff; border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; position: relative; padding-right: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 14px; margin: 0; }
.disclaimer { margin-top: 22px; font-size: .9rem; color: var(--muted); text-align: center; }

/* Content pages */
.page { padding: 40px 0 64px; }
.page h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); }
.page h2 { text-align: left; font-size: 1.35rem; margin-top: 1.6em; }
.page p, .page li { color: var(--ink-2); }
.page .updated { color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 40px 0 24px; margin-top: 0; }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: #5eead4; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand p { max-width: 380px; margin-top: 10px; color: #94a3b8; font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-start; }
.footer-links a { color: #e2e8f0; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #5eead4; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 22px; font-size: .92rem; color: #94a3b8; }
.footer-langs a { color: #e2e8f0; text-decoration: none; }
.footer-langs a:hover, .footer-langs a[aria-current] { color: #5eead4; }
.footer-note { border-top: 1px solid #1e293b; margin-top: 26px; padding-top: 18px; font-size: .82rem; color: #94a3b8; }
.footer-note p { margin: 0 0 6px; }

/* Tool pages */
.prose p { color: var(--ink-2); font-size: 1.04rem; line-height: 1.7; margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.tool-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tool-card h3 { color: var(--brand-700); }
.tool-card h3::after { content: "\2192"; margin-inline-start: .4em; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.footer-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: .92rem; color: #94a3b8; }
.footer-tools a { color: #e2e8f0; text-decoration: none; }
.footer-tools a:hover, .footer-tools a[aria-current] { color: #5eead4; }

/* Responsive */
@media (max-width: 860px) {
  .steps, .cards.three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a:first-child { display: none; }
  .dl-form { flex-direction: column; padding: 10px; }
  .field input { height: 50px; }
  .btn-primary { width: 100%; }
  .result { grid-template-columns: 1fr; padding: 14px; }
  .result-media img { aspect-ratio: 16 / 10; max-height: 260px; }
  .result-item { flex-wrap: wrap; }
  .btn-dl { width: 100%; justify-content: center; }
}
