:root {
  --ink: #181a1b;
  --muted: #6f746f;
  --paper: #f4f2eb;
  --card: rgba(255, 255, 252, 0.78);
  --line: rgba(24, 26, 27, 0.13);
  --lime: #d9ff43;
  --lime-dark: #b9df25;
  --coral: #ff765f;
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24, 26, 27, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 26, 27, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

button, textarea, input { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .23;
  pointer-events: none;
}

.ambient-one { top: -200px; left: -120px; background: var(--lime); }
.ambient-two { right: -220px; top: 38%; background: #ff9d8c; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
  border-radius: 10px;
  transform: rotate(-3deg);
}

.brand-mark svg { width: 23px; }

.privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.privacy i, .success i {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: #67b83e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(103, 184, 62, .12);
}

.hero { padding: 78px 0 46px; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #5b6158;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow span { color: var(--coral); font-size: 15px; }

.hero h1 {
  max-width: 830px;
  margin: 0 auto;
  font-size: clamp(43px, 7vw, 76px);
  line-height: .99;
  letter-spacing: -.065em;
}

.hero h1 em {
  position: relative;
  z-index: 0;
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.045em;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -2%;
  right: -3%;
  bottom: 5px;
  height: 23%;
  background: var(--lime);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.hero > p {
  max-width: 610px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.converter {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 30px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(31, 35, 25, .11), 0 2px 8px rgba(31, 35, 25, .05);
  backdrop-filter: blur(16px);
}

.provider-row, .result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.provider-row > .field-label { margin-top: 11px; }

.field-label, .input-label {
  color: #51554f;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.provider-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 555px;
  padding: 4px;
  background: #eae9e2;
  border-radius: 12px;
}

.provider-picker label { cursor: pointer; }
.provider-picker input { position: absolute; opacity: 0; pointer-events: none; }
.provider-picker span {
  display: block;
  padding: 7px 13px;
  color: #747872;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  transition: .2s ease;
}

.provider-picker input:checked + span {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 7px rgba(20, 22, 19, .09);
}

.provider-picker input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.provider-picker .auto-provider span { color: #547020; }
.provider-picker .auto-provider input:checked + span { color: #344710; background: var(--lime); }
.provider-picker .community-provider span { color: #896f68; }
.provider-picker .community-provider input:checked + span { color: #6e3328; }
.provider-picker sup { color: var(--coral); font-size: 10px; line-height: 0; }

.provider-note {
  margin: 7px 2px -8px;
  color: #9a807a;
  font-size: 9px;
  text-align: right;
}

.provider-note sup { color: var(--coral); }

.input-label { display: block; margin: 27px 0 9px; }

.input-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
  padding: 17px 16px;
  background: rgba(247, 247, 242, .9);
  border: 1px solid #d6d5ce;
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap:focus-within {
  background: #fff;
  border-color: #a5a99c;
  box-shadow: 0 0 0 4px rgba(217, 255, 67, .3);
}

.input-wrap.invalid { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 118, 95, .12); }

.link-icon { flex: 0 0 auto; width: 22px; height: 22px; color: #858a82; }
.link-icon svg { width: 100%; }

textarea {
  width: 100%;
  min-height: 23px;
  max-height: 150px;
  padding: 0;
  resize: none;
  overflow-y: auto;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

textarea::placeholder { color: #a1a49e; }

.clear-btn {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #8d918b;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.clear-btn.visible { display: flex; }
.clear-btn:hover { color: var(--ink); background: #ecece6; }

.hint { min-height: 18px; margin: 7px 2px 0; color: #92958f; font-size: 11px; }
.hint.error { color: #d84f3a; }

.result {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  animation: rise .3s ease both;
}

.success { display: inline-flex; align-items: center; gap: 8px; color: #53863b; font-size: 10px; font-weight: 700; }
.success i { width: 6px; height: 6px; }

.output-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 9px 9px 15px;
  background: #202220;
  border-radius: 13px;
}

.output-row code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #dfe6d7;
  font-family: "DM Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--lime);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.copy-btn:hover { background: #e4ff76; }
.copy-btn svg { width: 15px; }

.convert-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 17px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(24, 26, 27, .17);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s, box-shadow .18s;
}

.convert-btn:hover { transform: translateY(-2px); box-shadow: 0 11px 22px rgba(24, 26, 27, .2); }
.convert-btn:active { transform: translateY(0); }
.convert-btn svg { width: 18px; transition: transform .2s; }
.convert-btn:hover svg { transform: translateX(3px); }

.how-it-works { padding: 105px 0 84px; }
.section-heading { display: flex; align-items: baseline; gap: 18px; margin-bottom: 34px; }
.eyebrow-number { color: var(--coral); font-family: "DM Mono", monospace; font-size: 11px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }

.steps {
  display: grid;
  grid-template-columns: 1fr 36px 1fr 36px 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps article { min-height: 190px; padding: 32px 24px 28px 0; }
.steps article + .step-arrow + article { padding-left: 24px; }
.step-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  background: #e7e5dc;
  border: 1px solid rgba(24, 26, 27, .08);
  border-radius: 11px;
  font-family: "DM Mono", monospace;
  font-size: 16px;
}
.steps h3 { margin: 0 0 7px; font-size: 15px; }
.steps p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.step-arrow { color: #a9aca6; font-family: "DM Mono", monospace; text-align: center; }

footer {
  display: flex;
  justify-content: space-between;
  padding: 25px 0 35px;
  color: #979a94;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 24px;
  padding: 11px 18px;
  color: #fff;
  background: var(--ink);
  border-radius: 99px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: .25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.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; }

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

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1080px); }
  .topbar { height: 72px; }
  .privacy { font-size: 0; }
  .privacy::after { content: "Private"; font-size: 11px; }
  .hero { padding: 58px 0 35px; }
  .hero h1 { font-size: clamp(40px, 13vw, 62px); }
  .hero h1 br { display: none; }
  .hero > p { font-size: 14px; }
  .converter { padding: 20px; border-radius: 19px; }
  .provider-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .provider-row > .field-label { margin-top: 0; }
  .provider-picker { width: 100%; }
  .provider-picker label { flex: 1 1 calc(33.333% - 4px); text-align: center; }
  .input-label { margin-top: 22px; }
  .steps { grid-template-columns: 1fr; }
  .steps article, .steps article + .step-arrow + article { min-height: 0; padding: 25px 8px; }
  .steps article + .step-arrow + article { border-top: 1px solid var(--line); }
  .step-arrow { display: none; }
  .step-icon { margin-bottom: 16px; }
  .how-it-works { padding: 78px 0 60px; }
  footer { gap: 20px; }
}

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