/* Base rules from the design's <helmet> block. Everything else is the inline
   styling that ships with the design markup — do not restyle it here. */
body {
  margin: 0;
  background: #ffffff;
  font-family: "Public Sans", system-ui, sans-serif;
}

/* The design uses <span> for every link. Turning them into real <a> elements
   must not change how they look, so anchors inherit their colour instead of
   carrying the usual link colour. */
a {
  color: inherit;
  text-decoration: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid #e4b028;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #e4b028;
  color: #14161a;
  padding: 10px 16px;
  font-weight: 600;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Buttons in the design are <span>s with inline styles; when one has to be a
   real <button> (cookie consent), strip the browser chrome so it matches. */
.as-span {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

/* Disclosure ---------------------------------------------------------------- */
/* The design's "Full comparison" toggle, as a native <details>. */
.disclose > summary {
  list-style: none;
}
.disclose > summary::-webkit-details-marker {
  display: none;
}
.disclose__open,
.disclose[open] .disclose__closed {
  display: none;
}
.disclose[open] .disclose__open {
  display: inline;
}
.disclose[open] .disclose__caret {
  display: inline-block;
  transform: rotate(180deg);
}

/* Auth forms ---------------------------------------------------------------- */
/* The design draws inputs as bordered divs. These rules give real form controls
   the same box so the working page matches the drawing. */
.field {
  width: 100%;
  border: 1px solid rgba(11, 24, 73, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 15px;
  color: #14161a;
  background: #fff;
}
.field::placeholder {
  color: #646a71;
}
.field:focus {
  outline: none;
  border-color: #0b1849;
  box-shadow: 0 0 0 3px rgba(11, 24, 73, 0.12);
}
.field--error {
  border-color: #a02216;
}
.field[readonly] {
  background: #f2f3f5;
  color: #646a71;
}

.btn-primary {
  display: block;
  width: 100%;
  background: #0b1849;
  color: #ebede3;
  border: 0;
  border-radius: 8px;
  padding: 13px;
  text-align: center;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary {
  display: block;
  width: 100%;
  border: 1px solid rgba(11, 24, 73, 0.3);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 15px;
  color: #0b1849;
  background: none;
  cursor: pointer;
}

/* Cookie consent ------------------------------------------------------------ */
/* Layer 1 sits at the bottom of the viewport per the design spec. */
.cookie-layer1 {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 60;
  margin: 0 auto;
  max-width: 720px;
}

dialog.cookie-modal {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  box-shadow: 0 24px 60px rgba(11, 24, 73, 0.3);
}
dialog.cookie-modal::backdrop {
  background: rgba(11, 24, 73, 0.45);
}

/* The design draws the category toggles as pill switches. */
.switch {
  appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  flex: none;
  background: rgba(11, 24, 73, 0.15);
  position: relative;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.switch:checked {
  background: #124d1c;
}
.switch:checked::after {
  left: 21px;
}
.switch:disabled {
  background: rgba(11, 24, 73, 0.25);
  cursor: default;
}

/* Page backdrop ------------------------------------------------------------- */
/* The design is a 1440px canvas; on wider screens the space beside it was bare
   white. This fills it with the brand cream and a fine navy dot grid, and
   lifts the canvas off it with a soft edge. */
body {
  background-color: #EBEDE3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%230B1849' fill-opacity='0.22'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

.shell {
  box-shadow: 0 0 0 1px rgba(11, 24, 73, 0.08), 0 18px 60px rgba(11, 24, 73, 0.10);
}

@media (max-width: 1440px) {
  /* Canvas fills the viewport, so the backdrop is not visible and the edge
     treatment would only add noise. */
  .shell {
    box-shadow: none;
  }
}

/* FAQ accordions ------------------------------------------------------------ */
/* The design draws these as static rows with a + / − sign. As <details> the
   sign has to follow the open state, so CSS supplies it. */
.faq > summary {
  list-style: none;
}
.faq > summary::-webkit-details-marker {
  display: none;
}
.faq__sign::after {
  content: "+";
}
.faq[open] .faq__sign::after {
  content: "−";
}

/* Open and close downwards instead of snapping. ::details-content is the
   browser's own wrapper around everything after the summary, and
   interpolate-size lets a height animate to auto. Browsers without either one
   still open and close, just without the movement. */
:root {
  interpolate-size: allow-keywords;
}
.faq::details-content {
  block-size: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    block-size 260ms ease,
    opacity 200ms ease,
    content-visibility 260ms allow-discrete;
  transition-behavior: allow-discrete;
}
.faq[open]::details-content {
  block-size: auto;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .faq::details-content {
    transition: none;
  }
}

/* Billing period switch ----------------------------------------------------- */
/* Radios rather than spans, so the control is real and keyboard reachable.
   The prices further down the page follow it through :has(). */
.billing__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.billing label {
  cursor: pointer;
  color: #4a5057;
}
.billing__radio:checked + label {
  background: #0b1849;
  color: #ebede3;
}
.billing__radio:focus-visible + label {
  outline: 2px solid #e4b028;
  outline-offset: -2px;
}

.price--year {
  display: none;
}
body:has(#bill-yearly:checked) .price--month {
  display: none;
}
body:has(#bill-yearly:checked) .price--year {
  display: inline;
}

/* Integration category filter ----------------------------------------------- */
/* The design draws the chips as static spans. Radios make them a real control;
   :has() lets the selection hide cards, and any section left with no matching
   card, without script. */
.ifilter__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ifilter label {
  cursor: pointer;
  border: 1px solid rgba(11, 24, 73, 0.14);
  color: #4a5057;
}
.ifilter__radio:checked + label {
  background: #0b1849;
  color: #ebede3;
  border-color: #0b1849;
}
.ifilter__radio:focus-visible + label {
  outline: 2px solid #e4b028;
  outline-offset: 2px;
}

.iempty {
  display: none;
}

body:has(#cat-provider:checked) .icard:not(.cat-provider),
body:has(#cat-payments:checked) .icard:not(.cat-payments),
body:has(#cat-analytics:checked) .icard:not(.cat-analytics),
body:has(#cat-developer:checked) .icard:not(.cat-developer),
body:has(#cat-support:checked) .icard {
  display: none;
}

body:has(#cat-provider:checked) .isection:not(:has(.cat-provider)),
body:has(#cat-payments:checked) .isection:not(:has(.cat-payments)),
body:has(#cat-analytics:checked) .isection:not(:has(.cat-analytics)),
body:has(#cat-developer:checked) .isection:not(:has(.cat-developer)),
body:has(#cat-support:checked) .isection {
  display: none;
}

body:has(#cat-support:checked) .iempty {
  display: block;
}

/* Full wordmark: replaces the mark-plus-text lockup in the header. Masked
   rather than placed as an <img> so the colour follows the background it sits
   on, the same way the small mark works. */
.logo-wordmark {
  display: block;
  flex: none;
  width: 112px;
  height: 32px;
  background-color: #ebede3;
  -webkit-mask: url("/static/img/logo-wordmark.png") center / contain no-repeat;
  mask: url("/static/img/logo-wordmark.png") center / contain no-repeat;
}

/* Reversed for light backgrounds: same artwork, navy instead of cream. */
.logo-wordmark--dark {
  background-color: #0b1849;
}
.logo-wordmark--sm {
  width: 105px;
  height: 30px;
}

/* Blog topic filter --------------------------------------------------------- */
/* Same mechanism as the integrations directory: radios plus :has(), so the
   filter is a real control with no script behind it. */
.bfilter__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bfilter label {
  cursor: pointer;
  border: 1px solid rgba(11, 24, 73, 0.14);
  color: #4a5057;
}
.bfilter__radio:checked + label {
  background: #0b1849;
  color: #ebede3;
  border-color: #0b1849;
}
.bfilter__radio:focus-visible + label {
  outline: 2px solid #e4b028;
  outline-offset: 2px;
}

.bempty {
  display: none;
}
body:has(#topic-pricing:checked) .bcard:not(.cat-pricing),
body:has(#topic-operations:checked) .bcard:not(.cat-operations),
body:has(#topic-pricing:checked) .bcard-empty,
body:has(#topic-operations:checked) .bcard-empty {
  display: none;
}

/* Auth form feedback. Colour is never the only signal: the error carries a
   left rule and the word itself, so it reads the same without colour vision. */
.auth-alert {
  font-size: 14px;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid;
}
.auth-alert--error {
  color: #7A1A10;
  background: #FBEDEB;
  border-color: rgba(160, 34, 22, .34);
  border-left-width: 3px;
}
.auth-alert--notice {
  color: #0B1849;
  background: #F2F2EC;
  border-color: rgba(11, 24, 73, .2);
  border-left-width: 3px;
}

/* The code field is set in the monospace face at a size where six digits are
   comfortable to check against the email. */
.field--code {
  font-family: 'IBM Plex Mono', Menlo, Consolas, monospace;
  font-size: 24px;
  letter-spacing: .34em;
  text-align: center;
  padding-left: 14px;
}
