:root {
  color-scheme: light;
  --page: oklch(0.975 0.008 152);
  --surface: oklch(0.995 0.004 152);
  --surface-2: oklch(0.94 0.012 152);
  --ink: oklch(0.18 0.035 155);
  --muted: oklch(0.43 0.025 155);
  --line: oklch(0.84 0.018 152);
  --accent: oklch(0.44 0.13 151);
  --accent-dark: oklch(0.38 0.11 151);
  --amber: oklch(0.76 0.16 76);
  --danger: oklch(0.55 0.16 28);
  --shadow: 0 22px 55px color-mix(in oklch, var(--ink) 13%, transparent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface) 90%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  display: block;
}

.navlinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.navlinks a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 58px) 0 54px;
}

.hero {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.08em;
}

main img {
  max-width: 100%;
  height: auto;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.lede {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.metric {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--amber) 28%, transparent);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.tool-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
  margin-bottom: 34px;
}

.tool-form {
  display: grid;
  gap: 18px;
}

.dropzone {
  min-height: 178px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed color-mix(in oklch, var(--accent) 65%, var(--line));
  border-radius: 8px;
  background: color-mix(in oklch, var(--surface-2) 55%, var(--surface));
  cursor: pointer;
  padding: 24px;
}

.dropzone input {
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  position: absolute;
}

.drop-title {
  font-size: 24px;
  font-weight: 800;
}

.drop-copy {
  color: var(--muted);
  font-weight: 700;
}

.options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: min(100%, 260px);
  font-weight: 750;
}

.field.small {
  min-width: 160px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}

input,
select {
  min-height: 46px;
}

textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

.field.wide {
  flex-basis: min(100%, 420px);
}

.adapter-note {
  display: grid;
  gap: 12px;
}

.primary-btn,
.download-link {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: oklch(0.985 0.006 152);
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-btn:hover,
.download-link:hover {
  background: var(--accent-dark);
}

.tool-note,
.status {
  margin: 0;
  color: var(--muted);
}

.preview-image {
  display: block;
  max-width: min(100%, 520px);
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  object-fit: contain;
}

.status[data-state="error"] {
  color: var(--danger);
  font-weight: 800;
}

.content,
.related,
.faq {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.content p {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.7;
}

.related div,
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.related a,
.tool-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  text-decoration: none;
  font-weight: 800;
}

.tool-link {
  min-height: 110px;
  display: grid;
  align-content: space-between;
}

.tool-link small {
  color: var(--muted);
  font-weight: 700;
}

details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  color: var(--muted);
  line-height: 1.65;
}

footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .topbar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .navlinks {
    justify-content: flex-start;
  }

  .metric {
    margin-left: 0;
    margin-top: 8px;
    width: fit-content;
  }

  .options,
  .primary-btn,
  .download-link {
    width: 100%;
  }
}
