:root {
  color-scheme: light;
  --bg: oklch(96% 0.018 86);
  --surface: oklch(98% 0.012 86);
  --surface-soft: oklch(93.5% 0.018 82);
  --ink: oklch(22% 0.017 75);
  --muted: oklch(45% 0.018 75);
  --faint: oklch(86.5% 0.018 82);
  --accent: oklch(56% 0.12 42);
  --accent-strong: oklch(48% 0.13 42);
  --accent-ink: oklch(98% 0.012 86);
  --danger: oklch(46% 0.135 28);
  --success: oklch(42% 0.095 142);
  --focus-ring: oklch(56% 0.12 42 / 0.24);
  --shadow: 0 18px 44px oklch(24% 0.02 75 / 0.1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: oklch(56% 0.12 42 / 0.45);
  text-underline-offset: 0.18em;
  transition:
    color 160ms var(--ease-out),
    text-decoration-color 160ms var(--ease-out);
}

a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

button,
a.button,
textarea {
  min-height: 44px;
  border: 1px solid var(--faint);
  border-radius: 8px;
  padding: 0.72rem 1rem;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

button,
a.button {
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

button:not(:disabled):hover,
a.button:hover {
  border-color: oklch(56% 0.12 42 / 0.38);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px oklch(24% 0.02 75 / 0.08);
}

button:focus-visible,
a.button:focus-visible,
a:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled {
  color: oklch(58% 0.012 75);
  background: var(--surface-soft);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}

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

.site-shell,
.link-shell,
.error-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav,
.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 22px 0;
}

.brand {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 780;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.18fr) minmax(260px, 0.82fr);
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: start;
  padding: clamp(2rem, 6vw, 4.25rem) 0 clamp(2.5rem, 7vw, 5rem);
}

.hero-copy {
  max-width: 470px;
  padding-top: clamp(0.25rem, 1vw, 0.8rem);
}

.converter-panel {
  order: -1;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.7rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.link-panel h1,
.error-panel h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1.08;
}

.lede {
  max-width: 620px;
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.14rem);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.converter-panel {
  border: 1px solid var(--faint);
  border-radius: 12px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.converter-heading h2 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1.12;
}

.converter-heading p {
  margin-bottom: 1.15rem;
  color: var(--muted);
}

.converter-panel form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.field-label,
.checkbox-row {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 720;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: oklch(99% 0.006 86);
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

textarea:focus {
  border-color: oklch(56% 0.12 42 / 0.62);
}

textarea::placeholder {
  color: oklch(57% 0.013 75);
}

.section {
  border-top: 1px solid var(--faint);
  padding: clamp(2.6rem, 6vw, 4rem) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(1.6rem, 4vw, 4rem);
}

.section h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.section-header {
  max-width: 720px;
  margin-bottom: 1.7rem;
}

.section-header h2 {
  max-width: 520px;
}

.section-header p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
}

.usage-section {
  display: grid;
  gap: 0.5rem;
}

.route-list {
  border-top: 1px solid var(--faint);
}

.route-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  border-bottom: 1px solid var(--faint);
  padding: 1rem 0;
}

.route-row strong,
.route-row span {
  display: block;
}

.route-row span {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.route-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.agent-prompt {
  margin-top: 1.7rem;
  border-top: 1px solid var(--faint);
  padding-top: 1rem;
}

.agent-prompt summary {
  width: fit-content;
  min-height: 44px;
  border: 1px solid var(--faint);
  border-radius: 8px;
  padding: 0.62rem 0.85rem;
  color: var(--ink);
  background: var(--surface);
  font-weight: 720;
  cursor: pointer;
  transition:
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.agent-prompt summary:hover {
  border-color: oklch(56% 0.12 42 / 0.38);
  box-shadow: 0 10px 22px oklch(24% 0.02 75 / 0.07);
}

.agent-prompt summary::marker,
.agent-prompt summary::-webkit-details-marker {
  color: var(--muted);
}

.agent-prompt p {
  max-width: 620px;
  margin: 0.9rem 0;
  color: var(--muted);
}

.plain-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  border-bottom: 1px solid var(--faint);
  padding-bottom: 1rem;
}

.plain-list strong {
  display: block;
  margin-bottom: 0.2rem;
}

.code-sample,
.uri-output {
  display: block;
  width: 100%;
  border: 1px solid var(--faint);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.link-shell,
.error-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px 0;
}

.link-panel,
.error-panel {
  width: min(760px, 100%);
  border: 1px solid var(--faint);
  border-radius: 12px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-link {
  display: inline-flex;
  margin-bottom: 1.55rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.status {
  --status-color: var(--muted);
  --status-bg: var(--surface-soft);
  --status-border: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  width: fit-content;
  margin-bottom: 1.05rem;
  border: 1px solid var(--status-border);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  color: var(--status-color);
  background: var(--status-bg);
  font-size: 0.86rem;
  font-weight: 780;
}

.status::before {
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.status[data-state="ready"] {
  --status-color: var(--success);
  --status-bg: oklch(94% 0.035 142);
  --status-border: oklch(82% 0.05 142);
}

.status[data-state="error"] {
  --status-color: var(--danger);
  --status-bg: oklch(94% 0.03 28);
  --status-border: oklch(82% 0.055 28);
}

.status[data-state="neutral"] {
  --status-color: var(--muted);
  --status-bg: var(--surface-soft);
  --status-border: var(--faint);
}

.details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin: 0 0 1.1rem;
}

.details dt {
  color: var(--muted);
  font-weight: 720;
}

.details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.uri-output {
  margin-bottom: 1rem;
}

.fine-print {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-top: 1px solid var(--faint);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--ink);
  font-weight: 780;
}

@media (max-width: 760px) {
  .site-shell,
  .link-shell,
  .error-shell {
    width: min(100% - 24px, 1120px);
  }

  .site-nav,
  .page-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero,
  .section-grid,
  .route-row {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding-top: 1.25rem;
  }

  .hero-copy {
    padding-top: 0;
  }

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

  .actions,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  a.button {
    width: 100%;
  }

  .agent-prompt summary {
    width: 100%;
  }
}

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