:root {
      --ink: #0d1117;
      --teal: #0ba37f;
      --teal2: #07876a;
      --teal-l: #e0f5ef;
      --sand: #f5f2ec;
      --muted: #6b7280;
      --border: #e4e0d8;
      --white: #ffffff;
      --warn: #f59e0b;
      --r-lg: 14px;
      --r-xl: 24px;
      --r-pill: 999px;
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    html {
      min-height: 100%;
    }

    body {
      font-family: "DM Sans", sans-serif;
      background: var(--white);
      color: var(--ink);
      font-size: 16px;
      line-height: 1.6;
      overflow-x: hidden;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    h1,
    h2,
    h3,
    h4,
    .brand, .brand-foot {
      font-family: "Syne", sans-serif;
    }

    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 5vw;
      min-height: 64px;
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
    }

    .brand {
      font-size: 22px;
      font-weight: 800;
      color: var(--ink);
      letter-spacing: -0.5px;
      text-decoration: none;
    }

    .brand-foot{
      font-size: 22px;
      font-weight: 800;
      color: var(--white);
      letter-spacing: -0.5px;
      text-decoration: none;
    }

    .brand-foot span {
      color: var(--teal);
    }

    .brand span {
      color: var(--teal);
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 22px;
      list-style: none;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    /* Hamburger button — hidden on desktop, revealed at ≤900px */
    .nav-toggle {
      display: none;
      background: transparent;
      border: 0;
      padding: 10px 8px;
      cursor: pointer;
      width: 40px;
      height: 40px;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
    }

    .nav-toggle span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--ink);
      border-radius: 2px;
      transition: transform 0.22s ease, opacity 0.18s ease;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
      opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    /* Hide marketing anchors on tablets so the auth/profile group has room. */
    @media (max-width: 1100px) {
      .nav-links .nav-secondary {
        display: none;
      }
    }

    .nav-links a {
      font-size: 14px;
      font-weight: 500;
      color: var(--muted);
      text-decoration: none;
      transition: color 0.2s;
    }

    .nav-links a:hover {
      color: var(--ink);
    }

    .nav-cta {
      background: var(--ink) !important;
      color: var(--white) !important;
      padding: 8px 20px !important;
      border-radius: var(--r-pill);
    }

    .nav-cta:hover {
      background: var(--teal) !important;
    }

    .hero {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 60px;
      padding: 120px 5vw 80px;
      background: var(--sand);
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: "";
      position: absolute;
      top: -200px;
      right: -200px;
      width: 700px;
      height: 700px;
      background: radial-gradient(circle, rgba(11, 163, 127, 0.08) 0%, transparent 70%);
      pointer-events: none;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--teal-l);
      color: var(--teal2);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 6px 14px;
      border-radius: var(--r-pill);
      margin-bottom: 24px;
    }

    .hero-badge::before {
      content: "";
      width: 6px;
      height: 6px;
      background: var(--teal);
      border-radius: 50%;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%,
      100% {
        opacity: 1;
        transform: scale(1);
      }
      50% {
        opacity: 0.5;
        transform: scale(0.8);
      }
    }

    .hero h1 {
      font-size: clamp(38px, 4.5vw, 62px);
      font-weight: 800;
      line-height: 1.08;
      letter-spacing: -2px;
      margin-bottom: 24px;
    }

    .hero h1 em {
      font-style: normal;
      color: var(--teal);
    }

    .hero-sub {
      font-size: 18px;
      color: var(--muted);
      font-weight: 300;
      max-width: 480px;
      margin-bottom: 40px;
      line-height: 1.7;
    }

    .hero-actions {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 48px;
    }

    .btn-primary {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--teal);
      color: var(--white);
      font-family: "Syne", sans-serif;
      font-size: 15px;
      font-weight: 700;
      padding: 14px 28px;
      border-radius: var(--r-pill);
      border: none;
      cursor: pointer;
      text-decoration: none;
      transition: background 0.2s, transform 0.15s;
    }

    .btn-primary:hover {
      background: var(--teal2);
      transform: translateY(-1px);
    }

    .btn-secondary {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: transparent;
      color: var(--ink);
      font-family: "Syne", sans-serif;
      font-size: 15px;
      font-weight: 700;
      padding: 14px 28px;
      border-radius: var(--r-pill);
      border: 1.5px solid var(--border);
      cursor: pointer;
      text-decoration: none;
      transition: border-color 0.2s, transform 0.15s;
    }

    .btn-secondary:hover {
      border-color: var(--ink);
      transform: translateY(-1px);
    }

    .hero-proof {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .hero-proof-item {
      font-size: 13px;
      color: var(--muted);
    }

    .hero-sep {
      width: 1px;
      height: 16px;
      background: var(--border);
    }

    .hero-visual {
      display: flex;
      flex-direction: column;
      gap: 16px;
      animation: floatIn 0.8s ease-out 0.3s both;
    }

    @keyframes floatIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .route-card {
      background: var(--white);
      border-radius: var(--r-xl);
      border: 1px solid var(--border);
      padding: 24px;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    }

    .route-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }

    .route-card-header span {
      font-family: "Syne", sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .status-badge {
      background: var(--teal-l);
      color: var(--teal2);
      font-size: 11px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: var(--r-pill);
    }

    .route-line {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
    }

    .city-block {
      flex: 1;
    }

    .city-name {
      font-family: "Syne", sans-serif;
      font-size: 20px;
      font-weight: 700;
    }

    .city-date {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
    }

    .route-arrow-line {
      width: 60px;
      height: 1px;
      background: linear-gradient(90deg, var(--border), var(--teal));
    }

    .route-tag {
      background: var(--sand);
      color: var(--ink);
      font-size: 12px;
      font-weight: 500;
      padding: 5px 12px;
      border-radius: var(--r-pill);
    }

    .vs-badge {
      background: var(--warn);
      color: #fff;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: var(--r-pill);
      margin-left: 6px;
      vertical-align: middle;
    }

    .saving-banner {
      background: linear-gradient(135deg, var(--ink) 0%, #1a2744 100%);
      border-radius: var(--r-lg);
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .saving-amount {
      font-family: "Syne", sans-serif;
      font-size: 22px;
      font-weight: 800;
      color: var(--teal);
    }

    section {
      padding: 96px 5vw;
    }

    .section-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--teal);
      margin-bottom: 16px;
    }

    .section-label::before {
      content: "";
      width: 20px;
      height: 1.5px;
      background: var(--teal);
    }

    .section-title {
      font-size: clamp(28px, 3.5vw, 44px);
      font-weight: 800;
      letter-spacing: -1.5px;
      line-height: 1.1;
      margin-bottom: 16px;
    }

    .section-sub {
      font-size: 17px;
      color: var(--muted);
      font-weight: 300;
      max-width: 540px;
      line-height: 1.7;
    }

    .problem {
      background: var(--white);
    }

    .problem-grid {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 24px;
      margin-top: 60px;
    }

    .problem-card {
      border: 1px solid var(--border);
      border-radius: var(--r-xl);
      padding: 32px;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s, transform 0.2s;
    }

    .problem-card:hover {
      border-color: var(--ink);
      transform: translateY(-2px);
    }

    .problem-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
    }

    .problem-card.red::before {
      background: #ef4444;
    }

    .problem-card.amber::before {
      background: var(--warn);
    }

    .problem-card.teal::before {
      background: var(--teal);
    }

    .problem-icon {
      width: 48px;
      height: 48px;
      border-radius: var(--r-lg);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 20px;
      font-size: 22px;
    }

    .problem-icon.red {
      background: #fef2f2;
    }

    .problem-icon.amber {
      background: #fffbeb;
    }

    .problem-icon.teal {
      background: var(--teal-l);
    }

    .problem-card h3 {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 10px;
      letter-spacing: -0.3px;
    }

    .problem-card p {
      font-size: 14px;
      color: var(--muted);
      line-height: 1.6;
    }

    .price-tag {
      display: inline-block;
      margin-top: 16px;
      background: #fef2f2;
      color: #dc2626;
      font-family: "Syne", sans-serif;
      font-size: 20px;
      font-weight: 800;
      padding: 6px 14px;
      border-radius: var(--r-lg);
    }

    .how {
      background: var(--sand);
    }

    .how-steps {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0;
      margin-top: 64px;
      position: relative;
    }

    .how-steps::before {
      content: "";
      position: absolute;
      top: 28px;
      left: 15%;
      width: 70%;
      height: 1px;
      background: var(--border);
      z-index: 0;
    }

    .step {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 0 20px;
      position: relative;
      z-index: 1;
    }

    .step-num {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: var(--white);
      border: 1.5px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: "Syne", sans-serif;
      font-size: 18px;
      font-weight: 800;
      margin-bottom: 20px;
      transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

    .step:hover .step-num {
      background: var(--teal);
      border-color: var(--teal);
      color: var(--white);
    }

    .step h3 {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .step p {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.6;
    }

    .features {
      background: var(--white);
    }

    .features-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      margin-top: 56px;
    }

    .feature-card {
      border: 1px solid var(--border);
      border-radius: var(--r-xl);
      padding: 36px;
      transition: border-color 0.2s, transform 0.2s;
    }

    .feature-card:hover {
      border-color: var(--teal);
      transform: translateY(-2px);
    }

    .feature-card.highlight {
      background: var(--ink);
      border-color: var(--ink);
    }

    .feature-icon {
      font-size: 28px;
      margin-bottom: 16px;
    }

    .feature-card h3 {
      font-size: 20px;
      font-weight: 700;
      letter-spacing: -0.5px;
      margin-bottom: 10px;
    }

    .feature-card.highlight h3 {
      color: var(--white);
    }

    .feature-card p {
      font-size: 14px;
      color: var(--muted);
      line-height: 1.7;
    }

    .feature-card.highlight p {
      color: rgba(255, 255, 255, 0.6);
    }

    .form-section {
      background: var(--sand);
    }

    .form-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 32px;
      background: var(--border);
      padding: 4px;
      border-radius: var(--r-pill);
      width: fit-content;
      max-width: 100%;
    }

    @media (max-width: 600px) {
      .form-tabs {
        width: 100%;
      }

      .form-tabs .tab-btn {
        flex: 1 1 0;
        padding: 10px 12px;
        font-size: 13px;
        text-align: center;
      }
    }

    .tab-btn {
      font-family: "Syne", sans-serif;
      font-size: 14px;
      font-weight: 600;
      padding: 10px 24px;
      border-radius: var(--r-pill);
      border: none;
      cursor: pointer;
      background: transparent;
      color: var(--muted);
      transition: all 0.2s;
    }

    .tab-btn.active {
      background: var(--white);
      color: var(--ink);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .form-wrapper {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 60px;
      align-items: start;
    }

    .form-card {
      background: var(--white);
      border-radius: var(--r-xl);
      border: 1px solid var(--border);
      padding: 40px;
      box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
    }

    .form-card h3 {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }

    .form-desc {
      font-size: 14px;
      color: var(--muted);
      margin-bottom: 28px;
    }

    .form-group {
      margin-bottom: 18px;
    }

    label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
      width: 100%;
      padding: 12px 16px;
      border: 1.5px solid var(--border);
      border-radius: var(--r-lg);
      font-family: "DM Sans", sans-serif;
      font-size: 16px; /* >= 16px keeps iOS Safari from zooming on focus */
      color: var(--ink);
      background: var(--white);
      outline: none;
      transition: border-color 0.2s;
      appearance: none;
      -webkit-appearance: none;
    }

    /* Custom dropdown arrow for selects (compensates for appearance: none) */
    select {
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
      background-repeat: no-repeat;
      background-position: right 14px center;
      background-size: 12px 8px;
      padding-right: 38px;
      cursor: pointer;
    }

    /* Native date picker indicator (Chromium): tint to match brand */
    input[type="date"]::-webkit-calendar-picker-indicator {
      cursor: pointer;
      opacity: 0.55;
      filter: invert(33%) sepia(98%) saturate(420%) hue-rotate(120deg);
    }

    input[type="file"] {
      font-family: "DM Sans", sans-serif;
      font-size: 14px;
      color: var(--muted);
      width: 100%;
    }

    input[type="file"]::-webkit-file-upload-button,
    input[type="file"]::file-selector-button {
      font-family: "Syne", sans-serif;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
      background: var(--sand);
      border: 1px solid var(--border);
      border-radius: var(--r-pill);
      padding: 8px 16px;
      margin-right: 12px;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }

    input[type="file"]::-webkit-file-upload-button:hover,
    input[type="file"]::file-selector-button:hover {
      background: var(--teal-l);
      border-color: var(--teal);
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--teal);
    }

    .input-error {
      border-color: #ef4444 !important;
    }

    textarea {
      resize: vertical;
      min-height: 90px;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .form-submit {
      width: 100%;
      padding: 14px;
      background: var(--teal);
      color: var(--white);
      font-family: "Syne", sans-serif;
      font-size: 15px;
      font-weight: 700;
      border: none;
      border-radius: var(--r-pill);
      cursor: pointer;
      transition: background 0.2s, transform 0.15s;
      margin-top: 8px;
    }

    .form-submit:hover {
      background: var(--teal2);
      transform: translateY(-1px);
    }

    .form-note {
      text-align: center;
      font-size: 12px;
      color: var(--muted);
      margin-top: 12px;
    }

    .form-side-info {
      padding-top: 8px;
    }

    .form-side-info h3 {
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -1px;
      margin-bottom: 12px;
      line-height: 1.15;
    }

    .form-side-info > p {
      font-size: 16px;
      color: var(--muted);
      font-weight: 300;
      line-height: 1.7;
      margin-bottom: 36px;
    }

    .info-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      list-style: none;
    }

    .info-list li {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      font-size: 14px;
      color: var(--muted);
      line-height: 1.5;
    }

    .info-list-icon {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: var(--teal-l);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .beta-banner {
      background: var(--ink);
      padding: 64px 5vw;
      text-align: center;
    }

    .beta-banner h2 {
      font-size: clamp(28px, 3vw, 42px);
      font-weight: 800;
      color: var(--white);
      letter-spacing: -1.5px;
      margin-bottom: 12px;
    }

    .beta-banner > p {
      font-size: 16px;
      color: rgba(255, 255, 255, 0.55);
      max-width: 480px;
      margin: 0 auto 32px;
      line-height: 1.7;
    }

    .beta-input-row {
      display: flex;
      gap: 10px;
      max-width: 440px;
      margin: 0 auto;
    }

    .beta-input-row input {
      flex: 1;
      padding: 13px 18px;
      border-radius: var(--r-pill);
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.07);
      font-family: "DM Sans", sans-serif;
      font-size: 15px;
      color: var(--white);
      outline: none;
      transition: border-color 0.2s;
    }

    .beta-input-row input::placeholder {
      color: rgba(255, 255, 255, 0.35);
    }

    .beta-input-row input:focus {
      border-color: var(--teal);
    }

    .beta-input-row button {
      background: var(--teal);
      color: var(--white);
      font-family: "Syne", sans-serif;
      font-size: 14px;
      font-weight: 700;
      padding: 13px 24px;
      border: none;
      border-radius: var(--r-pill);
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.2s;
    }

    .beta-input-row button:hover {
      background: var(--teal2);
    }

    .beta-meta {
      margin-top: 16px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.35);
    }

    footer {
      background: var(--ink);
      border-top: 1px solid var(--border);
      padding: 40px 5vw;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      margin-top: auto; /* Sticky footer: pushed to viewport bottom when content is short */
      width: 100%;
    }

    .footer-links {
      display: flex;
      gap: 24px;
      list-style: none;
    }

    .footer-links a {
      font-size: 13px;
      color: rgba(255, 255, 255, 0.55);
      text-decoration: none;
      transition: color 0.2s;
    }

    .footer-links a:hover {
      color: var(--teal);
    }

    .footer-copy {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.45);
    }

    .success-msg {
      display: none;
      text-align: center;
      padding: 32px;
    }

    .check-circle {
      width: 56px;
      height: 56px;
      background: var(--teal-l);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      margin: 0 auto 16px;
    }

    .success-msg h4 {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .success-msg p {
      font-size: 14px;
      color: var(--muted);
    }

    .fade-up {
      opacity: 0;
      transform: translateY(24px);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .fade-up.visible {
      opacity: 1;
      transform: translateY(0);
    }

    @media (max-width: 900px) {
      .hero {
        grid-template-columns: 1fr;
        padding: 100px 5vw 60px;
      }

      .hero-visual {
        display: none;
      }

      .problem-grid,
      .features-grid,
      .form-wrapper {
        grid-template-columns: 1fr;
      }

      .how-steps {
        grid-template-columns: 1fr 1fr;
      }

      .how-steps::before {
        display: none;
      }

      /* Mobile nav: reveal hamburger; collapse links into a dropdown panel */
      .nav-toggle {
        display: flex;
      }

      .nav-links {
        position: absolute;
        top: calc(100% + 6px);
        right: 5vw;
        left: 5vw;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: var(--r-lg);
        padding: 8px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        display: none;
      }

      .nav-links.open {
        display: flex;
      }

      .nav-links li {
        width: 100%;
      }

      .nav-links a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        font-size: 15px;
        color: var(--ink);
        border-radius: 10px;
      }

      .nav-links a:hover,
      .nav-links a:focus-visible {
        background: var(--sand);
        color: var(--ink);
      }

      /* Surface the marketing links and profile label inside the dropdown */
      .nav-links .nav-secondary {
        display: list-item;
      }

      .nav-links .nav-profile-label {
        display: inline;
      }

      /* Restyle the CTA inside the dropdown so it doesn't dominate */
      .nav-links .nav-cta {
        justify-content: center;
        text-align: center;
        margin-top: 4px;
        padding: 10px 14px !important;
      }

      /* Lock background scroll while open */
      body.nav-open {
        overflow: hidden;
      }

      .beta-input-row {
        flex-direction: column;
      }
    }

    /* Inline modal for showing existing forms */
    .inline-modal {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 1200;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .inline-modal.open {
      display: flex;
    }

    .inline-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.45);
      backdrop-filter: blur(2px);
    }

    .inline-modal-content {
      position: relative;
      background: var(--white);
      border-radius: 16px;
      max-width: 1100px;
      width: 100%;
      max-height: 90vh;
      overflow: auto;
      box-shadow: 0 20px 60px rgba(0,0,0,0.25);
      padding: 18px;
    }

    .inline-modal-close {
      position: absolute;
      right: 12px;
      top: 8px;
      background: transparent;
      border: none;
      font-size: 22px;
      cursor: pointer;
      color: var(--muted);
    }

    body.modal-open {
      overflow: hidden;
    }

    .inline-form-placeholder { display: none; }

    /* City autocomplete suggestion list */
    .city-suggestion-list {
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% + 8px);
      background: var(--white);
      border: 1px solid var(--border);
      box-shadow: 0 6px 24px rgba(0,0,0,0.08);
      border-radius: 10px;
      max-height: 260px;
      overflow: auto;
      z-index: 1200;
      padding: 6px 6px;
      display: none;
    }

    .city-suggestion {
      padding: 8px 10px;
      font-size: 14px;
      color: var(--ink);
      cursor: pointer;
      border-radius: 6px;
    }

    .city-suggestion:hover,
    .city-suggestion.active {
      background: var(--teal-l);
      color: var(--teal2);
    }

    /* Profile page layout: left profile column and centered ads area */
    .profile-page {
      display: grid;
      grid-template-columns: 300px minmax(640px, 820px);
      gap: 28px;
      max-width: 1120px;
      margin: 120px auto 80px;
      padding: 0 5vw;
      align-items: start;
    }

    .profile-side .form-card {
      padding: 28px;
    }

    .profile-main {
      display: flex;
      justify-content: center; /* center the ads card inside the main column */
    }

    .profile-main .profile-tabs {
      width: 100%;
      max-width: 760px;
    }

    @media (max-width: 900px) {
      .profile-page {
        grid-template-columns: 1fr;
        margin: 80px auto 40px;
        gap: 18px;
        padding: 0 5vw;
      }

      .profile-main {
        justify-content: stretch;
      }

      .profile-side { order: -1; }
    }

    /* Tabs card: stack buttons vertically and adjust visual hierarchy */
    .tabs-card {
      padding: 12px;
    }

    .tabs-card .tabs-header {
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: stretch;
    }

    .tabs-card .tab-btn {
      display: block;
      width: 100%;
      text-align: left;
      padding: 12px 14px;
      font-size: 15px;
      border-radius: 10px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--ink);
      box-shadow: none;
      font-weight: 700;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
    }

    .tabs-card .tab-btn:hover {
      background: #fafafa;
    }

    .tabs-card .tab-btn.active {
      background: var(--teal);
      color: var(--white);
      border-color: var(--teal);
      box-shadow: none;
    }

    /* Make the profile card slightly more prominent */
    .profile-side .form-card {
      box-shadow: 0 10px 48px rgba(0,0,0,0.06);
    }

    .profile-main .profile-tabs {
      padding: 18px;
    }

    .avatar {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--teal-l);
      color: var(--teal2);
      border-radius: var(--r-pill);
      overflow: hidden;
      flex-shrink: 0;
      font-weight: 700;
      line-height: 1;
      user-select: none;
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .avatar-initial {
      font-family: "Syne", sans-serif;
    }

    .avatar-sm {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }

    .avatar-md {
      width: 40px;
      height: 40px;
      font-size: 16px;
    }

    .avatar-lg {
      width: 72px;
      height: 72px;
      font-size: 28px;
    }

    .nav-profile {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px 12px 4px 4px;
      background: var(--sand);
      border: 1px solid var(--border);
      border-radius: var(--r-pill);
      color: var(--ink) !important;
      font-weight: 600;
      transition: background 0.15s, border-color 0.15s;
    }

    .nav-profile:hover {
      background: var(--teal-l);
      border-color: var(--teal);
    }

    .nav-profile .avatar-sm {
      width: 26px;
      height: 26px;
    }

    /* Contact row in my.php / responses.php — keeps avatar+login together,
       lets email/phone/price wrap to the next line cleanly. */
    .contact-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .contact-row-head {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      font-size: 14px;
      color: var(--ink);
    }

    .contact-row-meta {
      font-size: 13px;
      color: var(--muted);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .contact-row-meta > span:not(:first-child)::before {
      content: "·";
      margin-right: 8px;
      color: var(--border);
    }

    .btn-accept {
      background: var(--teal);
      color: var(--white);
      font-family: "Syne", sans-serif;
      font-size: 12px;
      font-weight: 700;
      padding: 6px 14px;
      border: none;
      border-radius: var(--r-pill);
      cursor: pointer;
      transition: background 0.15s;
    }

    .btn-accept:hover {
      background: var(--teal2);
    }

    .btn-accept:disabled {
      opacity: 0.55;
      cursor: default;
    }

    .badge-accepted {
      color: var(--teal2);
      font-weight: 600;
      font-size: 13px;
    }

    /* Owner block on send.php / carry.php detail page */
    .owner-block {
      margin-top: 14px;
      padding: 14px;
      border-top: 1px solid var(--border);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      justify-content: space-between;
    }

    .owner-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .status-badge--owner {
      background: var(--ink);
      color: var(--white);
    }

    .status-badge--open {
      background: var(--teal-l);
      color: var(--teal2);
    }

    .status-badge--matched {
      background: #fef3c7;
      color: #92400e;
    }

    .status-badge--completed {
      background: var(--ink);
      color: var(--white);
    }

    .status-badge--closed,
    .status-badge--cancelled {
      background: #f1f1ee;
      color: var(--muted);
    }

    /* Status filter pills above .status-list in profile "Мои объявления" */
    .status-filter {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      padding: 4px;
      background: var(--sand);
      border-radius: var(--r-pill);
      margin-top: 14px;
      width: fit-content;
      max-width: 100%;
    }

    .status-pill {
      font-family: "Syne", sans-serif;
      font-size: 13px;
      font-weight: 600;
      padding: 7px 14px;
      border-radius: var(--r-pill);
      border: none;
      cursor: pointer;
      background: transparent;
      color: var(--muted);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s, color 0.15s;
    }

    .status-pill:hover {
      color: var(--ink);
    }

    .status-pill.active {
      background: var(--white);
      color: var(--ink);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .status-pill-count {
      font-family: "DM Sans", sans-serif;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
      background: rgba(0, 0, 0, 0.06);
      padding: 1px 6px;
      border-radius: var(--r-pill);
    }

    .status-pill.active .status-pill-count {
      background: var(--teal-l);
      color: var(--teal2);
    }

    .status-card.is-hidden {
      display: none;
    }

    .owner-responses-link {
      font-size: 13px;
      color: var(--teal);
      text-decoration: none;
      font-weight: 600;
    }

    .owner-responses-link:hover {
      text-decoration: underline;
    }

    .owner-responses-link--empty {
      color: var(--muted);
      font-weight: 400;
    }

    .btn-outline {
      background: transparent;
      color: var(--ink);
      border: 1.5px solid var(--border);
      font-family: "Syne", sans-serif;
      font-size: 13px;
      font-weight: 700;
      padding: 9px 18px;
      border-radius: var(--r-pill);
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .btn-outline:hover {
      border-color: #dc2626;
      color: #dc2626;
    }

    .btn-outline:disabled {
      opacity: 0.55;
      cursor: default;
    }

    .bargain-box {
      margin-top: 14px;
      padding: 14px;
      border-top: 1px solid var(--border);
    }

    .bargain-box--accepted {
      background: linear-gradient(180deg, var(--teal-l) 0%, transparent 60%);
      border-radius: var(--r-lg);
      border-top: 1px solid var(--teal);
    }

    .bargain-status {
      font-size: 14px;
      color: var(--ink);
    }

    .bargain-counter {
      margin-top: 10px;
      padding: 10px 12px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      border-radius: var(--r-lg);
      font-size: 14px;
    }

    .counter-form {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .profile-info {
      display: grid;
      gap: 8px;
      margin-top: 20px;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: var(--r-lg);
      background: var(--sand);
    }

    .profile-info > div {
      font-size: 14px;
      color: var(--ink);
      display: flex;
      gap: 10px;
      align-items: baseline;
    }

    .profile-info-label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
      min-width: 70px;
    }

    .profile-edit {
      margin-top: 14px;
      border: 1px solid var(--border);
      border-radius: var(--r-lg);
      background: var(--white);
    }

    .profile-edit > summary {
      cursor: pointer;
      padding: 12px 16px;
      font-family: "Syne", sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: var(--ink);
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .profile-edit > summary::-webkit-details-marker {
      display: none;
    }

    .profile-edit > summary::after {
      content: "+";
      font-family: "DM Sans", sans-serif;
      font-size: 18px;
      font-weight: 400;
      color: var(--muted);
      transition: transform 0.2s;
    }

    .profile-edit[open] > summary::after {
      content: "−";
    }

    .profile-edit > form {
      padding: 0 16px 16px;
      border-top: 1px solid var(--border);
      padding-top: 14px;
    }

    .price-input-group {
      display: flex;
      gap: 8px;
      align-items: stretch;
    }

    .price-input-group > input {
      flex: 1 1 auto;
      min-width: 0;
    }

    .price-input-group > select {
      flex: 0 0 auto;
      width: 92px;
    }

    /* Compact variant used in inline contact forms on send.php / carry.php */
    .price-input-group.compact > input,
    .price-input-group.compact > select {
      padding: 9px 12px;
      font-size: 13px;
      border-radius: var(--r-lg);
      border-width: 1px;
    }

    .price-input-group.compact > select {
      width: 78px;
      padding-right: 28px;
      background-position: right 10px center;
    }

    /* =========================================================
       Mobile (≤ 600px) — comprehensive overrides
       ========================================================= */
    @media (max-width: 600px) {
      /* Tighter vertical rhythm for full-bleed sections */
      section {
        padding: 56px 5vw;
      }

      /* Hero */
      .hero {
        padding: 88px 5vw 48px;
      }

      .hero h1 {
        letter-spacing: -1px;
        margin-bottom: 18px;
      }

      .hero-sub {
        font-size: 16px;
        margin-bottom: 28px;
      }

      .hero-actions {
        gap: 10px;
        margin-bottom: 32px;
      }

      .hero-actions .btn-primary,
      .hero-actions .btn-secondary {
        flex: 1 1 100%;
        justify-content: center;
        padding: 13px 20px;
      }

      .hero-proof {
        flex-wrap: wrap;
        gap: 10px 14px;
      }

      .hero-sep {
        display: none;
      }

      /* Cards/Sections */
      .form-card {
        padding: 22px;
      }

      .problem-card {
        padding: 22px;
      }

      .feature-card {
        padding: 24px;
      }

      .form-side-info h3 {
        font-size: 22px;
      }

      .form-side-info > p {
        margin-bottom: 24px;
      }

      /* Forms collapse two-up rows to single column */
      .form-row {
        grid-template-columns: 1fr;
        gap: 0;
      }

      .form-group {
        margin-bottom: 14px;
      }

      label {
        font-size: 11px;
      }

      /* Saving banner wraps */
      .saving-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
      }

      .saving-amount {
        font-size: 20px;
      }

      /* Footer stacks centered */
      footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 32px 5vw;
        gap: 14px;
      }

      .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px 18px;
      }

      /* Page wrappers (inline-styled across pages): clamp top margin */
      body > div[style*="margin: 80px auto"] {
        margin-top: 80px !important;
      }

      body > div[style*="margin: 120px auto"] {
        margin: 90px auto 40px !important;
      }

      /* Profile page */
      .profile-page {
        margin: 80px auto 30px;
      }

      .profile-side .form-card {
        padding: 20px;
      }

      .profile-info-label {
        min-width: 60px;
      }

      /* Detail card form-cards in send/carry/my/responses */
      .form-card h3 {
        font-size: 20px;
      }

      /* Section title scales down naturally via clamp; reduce label margin */
      .section-label {
        margin-bottom: 12px;
      }

      .section-title {
        letter-spacing: -1px;
        margin-bottom: 12px;
      }

      .section-sub {
        font-size: 15px;
      }

      /* Inline modal — full-width content with smaller padding */
      .inline-modal {
        padding: 12px;
      }

      .inline-modal-content {
        padding: 14px;
        border-radius: 12px;
        max-height: 92vh;
      }

      /* Beta banner already stacks via existing rule */

      /* Avatar in profile — slightly smaller on mobile to free room */
      .avatar-lg {
        width: 60px;
        height: 60px;
        font-size: 24px;
      }
    }

    /* =========================================================
       Very small screens (≤ 480px)
       ========================================================= */
    @media (max-width: 480px) {
      .how-steps {
        grid-template-columns: 1fr;
        gap: 18px;
      }

      .form-card {
        padding: 18px;
      }

      .hero {
        padding: 80px 5vw 40px;
      }

      .hero h1 {
        font-size: clamp(28px, 8vw, 44px);
      }
    }