/* Synced from website-redesign/sbdt-landing-block.html */
.sbdt-signup-flow {
    --ink: #121212;
    --ink-soft: #3a3a3a;
    --paper: #f3efe6;
    --paper-deep: #e8e2d6;
    --line: #1a1a1a;
    --muted: #5c5c5c;
    --radius-ink: 2px 14px 4px 12px / 12px 3px 14px 4px;
    position: relative;
    isolation: isolate;
    padding: clamp(28px, 5vw, 56px) 16px clamp(64px, 10vw, 110px);
    color: var(--ink);
    background-color: var(--paper);
    font-family: "Source Sans 3", system-ui, sans-serif;
    overflow: clip;
  }

  /* Full-page pencil scratch layers (paper grain + hatch + loose strokes) */
  .sbdt-scratch-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }

  .sbdt-scratch-bg svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.13;
  }

  .sbdt-blueprint-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
    filter: saturate(0.85);
  }

  .sbdt-scratch-bg .sbdt-sketch-layer {
    z-index: 1;
    opacity: 0.08;
  }

  .sbdt-scratch-bg .sbdt-blueprint-stamp {
    position: absolute;
    top: clamp(72px, 10vw, 118px);
    right: clamp(12px, 2.5vw, 36px);
    width: min(250px, 34vw);
    height: auto;
    display: block;
    pointer-events: none;
    opacity: 0.5;
    z-index: 3;
  }

  .sbdt-iot-float-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 2;
  }

  .sbdt-signup-flow::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    mix-blend-mode: multiply;
  }

  .sbdt-signup-flow::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    background:
      radial-gradient(900px 420px at 8% 12%, rgba(0, 0, 0, 0.08), transparent 60%),
      radial-gradient(700px 380px at 92% 8%, rgba(0, 0, 0, 0.07), transparent 55%),
      radial-gradient(800px 500px at 70% 85%, rgba(0, 0, 0, 0.06), transparent 60%);
  }

  .sbdt-packages-wrap {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
  }

  /* --- Top bar: brand lockup + login --- */
  .sbdt-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .sbdt-brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
  }

  .sbdt-logo {
    flex: 0 0 auto;
    width: clamp(65px, 8.75vw, 90px);
    height: clamp(65px, 8.75vw, 90px);
    display: block;
  }

  .sbdt-logo svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .sbdt-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .sbdt-topbar .sbdt-brand-name {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--ink);
  }

  .sbdt-topbar .sbdt-brand-tag {
    margin: 0;
    font-family: "Caveat", cursive;
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink-soft);
  }

  .sbdt-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 6px;
  }

  .sbdt-login-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    text-decoration: none;
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.1);
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .sbdt-login-link.sbdt-wiki-link {
    background: transparent;
  }

  .sbdt-login-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.14);
    color: var(--ink);
    text-decoration: none;
  }

  .sbdt-login-link svg {
    width: 16px;
    height: 16px;
  }

  /* --- Hero (full width) --- */
  .sbdt-hero {
    position: relative;
    width: 100%;
    max-width: none;
    margin-bottom: clamp(36px, 5vw, 56px);
    padding-top: 0;
    z-index: 1;
  }

  .sbdt-hero-copy {
    width: 100%;
  }

  .sbdt-hero-copy h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.35rem, 2.6vw, 1.95rem);
    line-height: 1.25;
    font-weight: 500;
    margin: 0 0 12px;
    max-width: min(100%, 42ch);
    color: var(--ink-soft);
  }

  .sbdt-intro {
    margin: 0 0 18px;
    font-size: 1.05rem;
    color: var(--muted);
    max-width: min(100%, 48ch);
  }

  .sbdt-progress {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    font-family: "Caveat", cursive;
    font-size: 1.25rem;
    color: var(--muted);
  }

  .sbdt-progress a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .sbdt-progress .is-on {
    color: var(--ink);
    font-weight: 700;
  }

  .sbdt-progress i {
    font-style: normal;
    width: 1.35em;
    height: 1.35em;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 0.85em;
    line-height: 1;
  }

  /* --- Vertical sections --- */
  .sbdt-section {
    scroll-margin-top: 24px;
    margin-bottom: clamp(40px, 7vw, 72px);
  }

  .sbdt-section-panel {
    padding: 28px 22px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--line);
    border-radius: var(--radius-ink);
    box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.08);
  }

  .sbdt-section-title {
    font-family: "Fraunces", Georgia, serif;
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  }

  .sbdt-section-lead {
    margin: 0 0 20px;
    color: var(--muted);
    max-width: 52ch;
  }

  /* --- Plan cards --- */
  .sbdt-packages-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
    align-items: stretch !important;
  }

  .sbdt-package-card {
    --card-radius: 20px 34px 18px 30px / 28px 16px 32px 22px;
    position: relative;
    background: rgba(255, 255, 255, 0.62);
    border: none;
    border-radius: var(--card-radius);
    box-shadow:
      0 0 0 1px rgba(18, 18, 18, 0.22),
      0 0 0 2.5px rgba(18, 18, 18, 0.1),
      2px 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  }

  /* Soft pencil outer edge (blurred ink stroke) */
  .sbdt-package-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 2px solid rgba(18, 18, 18, 0.55);
    box-shadow:
      0 0 0 1px rgba(18, 18, 18, 0.12),
      inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    filter: blur(0.55px);
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
  }

  /* Light inner sketch guide — softer dashed line */
  .sbdt-package-card::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1.5px dashed rgba(0, 0, 0, 0.12);
    border-radius: 14px 24px 12px 20px / 20px 12px 22px 14px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
  }

  .sbdt-package-card > * {
    position: relative;
    z-index: 2;
  }

  .sbdt-package-card.is-selected,
  .sbdt-featured.is-selected {
    background: #fff;
    box-shadow:
      0 0 0 1px rgba(18, 18, 18, 0.28),
      0 0 0 3px rgba(18, 18, 18, 0.12),
      3px 6px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }

  .sbdt-package-card .sbdt-popular {
    position: absolute;
    z-index: 3;
    top: 12px;
    left: 14px;
    font-family: "Caveat", cursive;
    font-size: 1.35rem;
    font-weight: 700;
    transform: rotate(-8deg);
    background: #fff;
    padding: 2px 10px;
    border: 1.5px solid rgba(18, 18, 18, 0.55);
    border-radius: 10px 16px 8px 14px / 14px 8px 16px 10px;
    box-shadow: 0 0 0 1px rgba(18, 18, 18, 0.08);
  }

  .sbdt-package-image-wrap {
    padding: 18px 18px 0;
  }

  .sbdt-package-image-box {
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .sbdt-package-image-box img {
    width: 88%;
    max-height: 170px;
    object-fit: contain;
    filter: grayscale(1) contrast(1.08);
    mix-blend-mode: multiply;
  }

  .sbdt-package-body {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
  }

  .sbdt-package-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
  }

  .sbdt-package-top h3 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
  }

  .sbdt-subtitle {
    margin: 4px 0 0;
    font-size: 0.92rem;
    color: var(--muted);
  }

  .sbdt-speed {
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background: #fff;
  }

  .sbdt-description {
    margin: 4px 0 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--ink-soft);
  }

  .sbdt-highlights {
    display: grid;
    gap: 6px;
    margin-top: 6px;
  }

  .sbdt-highlight {
    margin: 0;
    font-size: 0.9rem;
    padding-left: 1.1em;
    position: relative;
  }

  .sbdt-highlight::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-family: "Caveat", cursive;
    font-weight: 700;
  }

  .sbdt-package-footer {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .sbdt-price {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .sbdt-price small {
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.55em;
    font-weight: 600;
    color: var(--muted);
  }

  .sbdt-plan-btn,
  .sbdt-btn-secondary {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  }

  .sbdt-plan-btn {
    background: var(--ink);
    color: #fff;
    border: 2px solid var(--ink);
    box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.15);
  }

  .sbdt-plan-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.18);
  }

  .sbdt-btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
  }

  .sbdt-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .sbdt-muted { color: var(--muted); }

  .sbdt-selected-chip {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    font-size: 0.92rem;
  }

  .sbdt-door-stage {
    position: relative;
    width: 100%;
    margin-top: 8px;
    border: 1.5px dashed rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(244, 241, 234, 0.9));
    display: flex;
    align-items: center;
    padding: 16px;
  }

  .sbdt-door-inner { width: 100%; }

  .sbdt-door-inner input,
  .sbdt-form-field input {
    width: 100%;
    min-height: 48px;
    border: 1.5px solid rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    box-sizing: border-box;
  }

  .sbdt-form-field textarea {
    width: 100%;
    min-height: 120px;
    border: 1.5px solid rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    box-sizing: border-box;
    resize: vertical;
  }

  .sbdt-door-inner input:focus,
  .sbdt-form-field input:focus,
  .sbdt-form-field textarea:focus {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }

  .sbdt-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
  }

  .sbdt-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .sbdt-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .sbdt-form-field label {
    font-size: 0.85rem;
    font-weight: 600;
  }

  .sbdt-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
  }

  .sbdt-status {
    margin-top: 12px;
    font-size: 0.95rem;
  }

  .sbdt-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;
  }

  .sbdt-legal-note {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--muted);
  }

  .sbdt-legal-note a {
    color: var(--ink);
  }

  .sbdt-callback-block {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1.5px dashed rgba(0, 0, 0, 0.25);
  }

  .sbdt-callback-block h3 {
    font-family: "Fraunces", Georgia, serif;
    margin: 0 0 8px;
    font-size: 1.25rem;
  }

  .sbdt-callback-block p {
    margin: 0 0 14px;
    color: var(--muted);
    max-width: 48ch;
  }

  .sbdt-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(18, 18, 18, 0.45);
  }

  .sbdt-modal-overlay.is-open {
    display: flex;
  }

  .sbdt-modal {
    width: min(100%, 440px);
    background: var(--paper);
    border: 2px solid var(--line);
    border-radius: var(--radius-ink);
    box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.15);
    padding: 22px 20px 18px;
    position: relative;
  }

  .sbdt-modal h3 {
    font-family: "Fraunces", Georgia, serif;
    margin: 0 0 6px;
    font-size: 1.35rem;
  }

  .sbdt-modal-lead {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
  }

  .sbdt-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    padding: 4px 8px;
  }

  .sbdt-modal .sbdt-form-grid {
    grid-template-columns: 1fr;
  }

  .sbdt-modal-note {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
  }

  .sbdt-received h3 {
    font-family: "Fraunces", Georgia, serif;
    margin: 0 0 8px;
    font-size: 1.35rem;
  }

  .sbdt-received p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.95rem;
  }

  body.sbdt-modal-open {
    overflow: hidden;
  }

  @media (prefers-reduced-motion: reduce) {
    .sbdt-package-card,
    .sbdt-login-link,
    .sbdt-plan-btn {
      transition: none !important;
    }
  }

  @media (max-width: 980px) {
    .sbdt-packages-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
  }

  @media (max-width: 768px) {
    .sbdt-topbar .sbdt-brand-tag {
      white-space: normal;
    }
    .sbdt-topbar-actions {
      margin-top: 0;
      width: 100%;
      justify-content: flex-start;
    }
    .sbdt-login-link {
      margin-top: 0;
    }
    .sbdt-scratch-bg .sbdt-blueprint-stamp {
      top: clamp(118px, 22vw, 168px);
      right: 10px;
      width: min(210px, 52vw);
      opacity: 0.4;
    }
    .sbdt-packages-grid { grid-template-columns: 1fr !important; }
    .sbdt-form-grid { grid-template-columns: 1fr; }
    .sbdt-package-footer {
      flex-direction: column;
      align-items: stretch;
    }
    .sbdt-plan-btn,
    .sbdt-btn-secondary { width: 100%; }
  }
