/* ------------------------------------------------------------------ */
/*  Brand tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  --navy:  #273649;
  --sky:   #61c4c6;
  --aqua:  #5bbc96;
  --blue:  #4892ad;
  --grey:  #dce1e3;
  --steel: #647883;

  /* Contrast-checked variants (WCAG 2.1 AA). --steel-dark clears 4.5:1 on
     the off-white input/output fills where plain --steel lands at 4.48;
     --blue-dark clears 4.5:1 on the tinted output panel. */
  --steel-dark: #5e717b;
  --blue-dark:  #357489;

  --ink:      var(--navy);
  --ink-soft: var(--steel);
  --page-bg:  #f4f7f8;
  --surface:  #ffffff;
  --line:      #e4eaec;   /* decorative dividers only */
  --line-soft: #eef2f4;
  --control:   #8195a0;   /* form-control boundaries: 3.12:1 on #fff, 3.03:1 on the #fbfcfd fill */

  --danger:    #b8432a;
  --danger-bg: #fcf0ec;
  --warn:      #8a6417;
  --warn-bg:   #fdf7e7;

  --font-body:    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Teko", "Poppins", sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --radius:    16px;
  --radius-sm: 10px;

  --shadow-card: 0 1px 2px rgba(39, 54, 73, .04),
                 0 12px 32px -12px rgba(39, 54, 73, .16);
  --shadow-lift: 0 2px 4px rgba(39, 54, 73, .08),
                 0 18px 40px -14px rgba(39, 54, 73, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------------ */
/*  Hero band - masthead and hero as a single mesh-gradient surface    */
/* ------------------------------------------------------------------ */
.hero-band {
  position: relative;
  isolation: isolate;
  padding: 32px 0 112px;
  background: var(--navy);
  overflow: hidden;
}

/* Layered radial blobs = mesh gradient. Blur softens the seams. */
.hero-mesh {
  position: absolute;
  inset: -25% -12%;
  z-index: -2;
  background:
    radial-gradient(44% 70% at 84% 22%,  rgba(97, 196, 198, 1), transparent 68%),
    radial-gradient(34% 52% at 62% 74%,  rgba(91, 188, 150, .82), transparent 66%),
    radial-gradient(40% 58% at 102% 86%, rgba(72, 146, 173, .90), transparent 64%),
    radial-gradient(30% 44% at 46% 2%,   rgba(72, 146, 173, .62), transparent 70%),
    radial-gradient(26% 46% at 16% 96%,  rgba(97, 196, 198, .42), transparent 68%);
  filter: blur(18px) saturate(118%);
}

/* Scrim: keeps the left column dark enough for text, lets the right
   side stay colourful. */
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(96deg,
      rgba(39, 54, 73, .95) 0%,
      rgba(39, 54, 73, .93) 38%,
      rgba(39, 54, 73, .87) 58%,
      rgba(39, 54, 73, .48) 72%,
      rgba(39, 54, 73, .08) 86%,
      rgba(39, 54, 73, 0) 100%),
    linear-gradient(to bottom, transparent 68%, rgba(39, 54, 73, .34) 100%);
}

.hero-inner { position: relative; }

.brand { display: inline-block; text-decoration: none; }

.brand-mark {
  display: block;
  height: 60px;
  width: auto;
}

.hero-copy {
  max-width: 660px;
  margin-top: 46px;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--sky);
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.02em;
  color: #fff;
}

.hero-copy h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
}

/* Hero callout ------------------------------------------------------
   Its own translucent navy surface, so the text contrast no longer
   depends on which part of the mesh happens to sit behind it. */
.hero-callout {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 26px 0 0;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(39, 54, 73, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.45;
  color: rgba(255, 255, 255, .92);
}

.hero-callout a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sky);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(97, 196, 198, .45);
  transition: color .15s ease, border-color .15s ease;
}
.hero-callout a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .7);
}
.hero-callout a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 2px;
}

.callout-arrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .15s ease;
}
.hero-callout a:hover .callout-arrow { transform: translateX(2px); }

/* ------------------------------------------------------------------ */
/*  Layout - cards lift up over the gradient                           */
/* ------------------------------------------------------------------ */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: -64px;
  padding-bottom: 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.form { padding: 10px 30px 26px; }

/* ------------------------------------------------------------------ */
/*  Fields                                                             */
/* ------------------------------------------------------------------ */
.field {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.field:last-of-type { border-bottom: 0; }
.field[hidden] { display: none; }

.q {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.005em;
}

.q-num {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  color: #fff;
  /* Poppins, not Teko: Teko's tall ascender box pushes digits off-centre
     inside a circle this small. */
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 2px 6px -1px rgba(39, 54, 73, .35);
}

.help {
  margin: 8px 0 14px 41px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
}

input[type="text"],
select {
  display: block;
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--control);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23647883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 42px;
  cursor: pointer;
}

input[type="text"]::placeholder { color: var(--steel-dark); font-weight: 300; }

input[type="text"]:hover,
select:hover { border-color: #6f838c; }

input[type="text"]:focus,
select:focus {
  outline: none;
  background: #fff;
  /* Focus ring must reach 3:1 against white; brand sky only manages 2.05:1,
     so the border darkens and the sky glow sits behind it. */
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 4px rgba(97, 196, 198, .34);
}

input.is-error, select.is-error { border-color: #c06a52; background: #fffbfa; }
input.is-error:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 67, 42, .13);
}

/* Inline messages -------------------------------------------------- */
.msg {
  margin-top: 11px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}
.msg[hidden] { display: none; }
.msg.error { background: var(--danger-bg); color: var(--danger); }
.msg.warn  { background: var(--warn-bg);   color: var(--warn); }
.msg.info  { background: #eef7f7;          color: #2d6f70; }

.msg code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 255, 255, .7);
  padding: 2px 6px;
  border-radius: 5px;
}

.msg .fix-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 13px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, .55);
  color: inherit;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.msg .fix-btn:hover { background: #fff; }

/* Auto-source note ------------------------------------------------- */
.note {
  padding: 15px 17px;
  border: 1px solid rgba(91, 188, 150, .3);
  border-left: 3px solid var(--aqua);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f4faf7, #f0f8f4);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.58;
}
.note strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
  font-size: 14px;
}
.note code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(39, 54, 73, .07);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--navy);
}

.form-actions { padding-top: 22px; }

/* ------------------------------------------------------------------ */
/*  Buttons                                                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .14s ease, background .16s ease,
              border-color .16s ease, color .16s ease,
              box-shadow .16s ease, opacity .16s ease;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: linear-gradient(140deg, #31465e, var(--navy));
  color: #fff;
  box-shadow: 0 2px 5px -1px rgba(39, 54, 73, .35);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(39, 54, 73, .45);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary.copied {
  background: linear-gradient(140deg, #6cc9a5, var(--aqua));
  box-shadow: 0 2px 5px -1px rgba(91, 188, 150, .4);
}

.btn-ghost {
  background: #fff;
  border-color: var(--control);
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--blue-dark);
  color: var(--navy);
  background: #f7fdfd;
}

.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

/* ------------------------------------------------------------------ */
/*  Result panel                                                       */
/* ------------------------------------------------------------------ */
.result {
  padding: 28px 30px 30px;
  position: sticky;
  top: 24px;
}

.result-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--navy);
}

.output {
  position: relative;
  padding: 17px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafcfc;
  min-height: 84px;
  display: flex;
  align-items: center;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.output.ready {
  border-color: rgba(97, 196, 198, .55);
  background: linear-gradient(180deg, #f5fbfb, #f0f9f9);
  box-shadow: 0 0 0 4px rgba(97, 196, 198, .10);
}

.output-url {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  letter-spacing: -.01em;
  color: var(--steel-dark);
  word-break: break-all;
}
.output.ready .output-url { color: var(--navy); }
.output.ready .output-url .q-mark { color: var(--steel-dark); }
.output.ready .output-url .key    { color: var(--blue-dark); }
.output.ready .output-url .val    { color: var(--navy); font-weight: 700; }

.output-hint {
  margin: 10px 2px 0;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-soft);
}
.output-hint.is-ready { color: #2f7a62; font-weight: 400; }

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Parameter summary ------------------------------------------------ */
.params {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.params[hidden] { display: none; }

.param {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
}

.param dt { line-height: 1.25; }

.param-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}

.param-key {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--steel);
}

.param dd {
  margin: 0;
  padding: 5px 11px;
  border-radius: 7px;
  background: rgba(97, 196, 198, .15);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-align: right;
  word-break: break-all;
}

/* Fix / todo lists ------------------------------------------------- */
.fixes, .todo {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.fixes[hidden], .todo[hidden] { display: none; }

.fixes h3, .todo h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.fixes ul, .todo ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 300;
}

.fixes li, .todo li {
  padding: 4px 0 4px 22px;
  text-indent: -22px;          /* pulls the marker into the hanging indent */
  color: var(--ink-soft);
  line-height: 1.55;
}

/* The marker is an inline-block on the first line, so the browser aligns
   it against the text's real metrics rather than the taller line box.
   vertical-align: middle centres on the x-height, which reads low next to
   list items that start with a capital; the -0.09em lifts it to the centre
   of the cap band. Both are em-based, so they track the font size. Staying
   inline also keeps <code> chips flowing with the text. */
.fixes li::before,
.todo li::before {
  position: relative;
  top: -0.09em;
}

.fixes li::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin-right: 9px;
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'%3E%3Cpath fill='none' stroke='%235bbc96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.9l2.7 2.7 5.3-6'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
}

.todo li::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin-right: 13px;
  width: 9px;
  height: 9px;
  border: 1.5px solid #9dabb2;
  border-radius: 50%;
}

.fixes li code, .todo li code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(39, 54, 73, .06);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--navy);
}

/* ------------------------------------------------------------------ */
/*  Footer                                                             */
/* ------------------------------------------------------------------ */
.foot {
  padding: 44px 0 40px;
  background: var(--navy);
  color: rgba(255, 255, 255, .72);
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.foot-brand-link { display: inline-block; }

.foot-logo {
  display: block;
  height: 46px;
  width: auto;
}

.foot-legal {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, .62);
}

.foot-contact {
  font-style: normal;
  text-align: right;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
}
.foot-contact p { margin: 0; }
.foot-address { margin-bottom: 10px !important; }

.foot-contact a {
  color: var(--sky);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.foot-contact a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .5);
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .result { position: static; }
  .hero-copy h1 { font-size: 38px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero-band { padding: 24px 0 88px; }
  .brand-mark { height: 44px; }
  .hero-copy { margin-top: 34px; }
  .hero-eyebrow { font-size: 19px; margin-bottom: 10px; }
  .hero-copy h1 { font-size: 32px; }
  .hero-copy h2 { font-size: 16px; }
  /* Wraps to two lines at this width, where a full pill radius reads oddly. */
  .hero-callout { margin-top: 22px; padding: 12px 16px; font-size: 13.5px; border-radius: 14px; }
  .hero-band::before {
    background:
      linear-gradient(170deg, rgba(39, 54, 73, .92) 0%, rgba(39, 54, 73, .88) 62%, rgba(39, 54, 73, .40) 100%),
      linear-gradient(to bottom, transparent 55%, rgba(39, 54, 73, .55) 100%);
  }
  .layout { margin-top: -56px; gap: 18px; }
  .form { padding: 6px 20px 22px; }
  .result { padding: 24px 20px 26px; }
  .result-actions .btn { flex: 1 1 auto; }
  .foot { padding: 34px 0 32px; }
  .foot-inner { flex-direction: column; gap: 26px; }
  .foot-contact { text-align: left; }
  .foot-logo { height: 38px; }
}
