/* V42 mobile redesign. The footer is intentionally not targeted or modified. */
@media (max-width: 860px) {
  :root {
    --mobile-gutter: 16px;
    --mobile-radius-xl: 24px;
    --mobile-radius-lg: 19px;
    --mobile-radius-md: 15px;
    --mobile-header-height: 70px;
    --mobile-shadow: 0 18px 48px rgba(17, 36, 79, .12);
  }

  html {
    overflow-x: hidden;
    scroll-padding-top: calc(var(--mobile-header-height) + 14px);
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 100% 0, rgba(49, 87, 245, .10), transparent 32rem),
      linear-gradient(180deg, #fff 0, #f6f8fd 38%, #eef3fb 100%);
  }

  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  img,
  svg,
  video,
  iframe {
    max-width: 100%;
  }

  .topbar {
    min-height: var(--mobile-header-height);
    padding:
      max(10px, env(safe-area-inset-top))
      var(--mobile-gutter)
      10px;
    gap: 12px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(220, 228, 241, .9);
    box-shadow: 0 8px 26px rgba(17, 36, 79, .07);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
  }

  .topbar .brand {
    gap: 9px;
    max-width: calc(100% - 58px);
  }

  .topbar .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(49, 87, 245, .12);
  }

  .topbar .brand-mark img {
    width: 27px;
    height: 27px;
  }

  .topbar .brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.04;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .brand small {
    margin-top: 5px;
    overflow: hidden;
    font-size: 8px;
    letter-spacing: 1.15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-button {
    position: relative;
    z-index: 102;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 15px;
    border-color: #d6dfed;
    background: #f7f9fd;
    color: #14223b;
    font-size: 0;
    box-shadow: 0 7px 18px rgba(17, 36, 79, .08);
  }

  .menu-button::before,
  .menu-button::after {
    content: "";
    position: absolute;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .22s ease, top .22s ease;
  }

  .menu-button::before {
    top: 17px;
    box-shadow: 0 6px 0 currentColor;
  }

  .menu-button::after {
    top: 29px;
  }

  .menu-button[aria-expanded="true"]::before {
    top: 22px;
    transform: rotate(45deg);
    box-shadow: none;
  }

  .menu-button[aria-expanded="true"]::after {
    top: 22px;
    transform: rotate(-45deg);
  }

  .nav {
    position: fixed;
    z-index: 101;
    top: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    display: grid;
    gap: 6px;
    max-height: calc(100dvh - var(--mobile-header-height) - 24px);
    padding: 12px;
    overflow: auto;
    border: 1px solid #dce4f1;
    border-radius: 22px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 26px 70px rgba(8, 23, 45, .22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(.985);
    transform-origin: top center;
    transition: opacity .2s ease, transform .2s ease;
  }

  .nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav a {
    min-height: 48px;
    justify-content: space-between;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #f7f9fd;
    color: #25334b;
    font-size: 14px;
  }

  .nav a::after {
    content: "→";
    color: #8794a9;
  }

  .nav .nav-primary {
    min-height: 52px;
    justify-content: center;
    margin-top: 4px;
    background: linear-gradient(135deg, #3157f5, #7357f3);
    box-shadow: 0 14px 28px rgba(49, 87, 245, .25);
  }

  .nav .nav-primary::after {
    color: #fff;
  }

  .main {
    width: 100%;
    margin: 0;
    padding: 18px var(--mobile-gutter) 68px;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .hero-copy,
  .hero-side,
  .order-card,
  .summary,
  .preview,
  .public-page,
  .home-intake,
  .tile {
    border-radius: var(--mobile-radius-xl);
    box-shadow: var(--mobile-shadow);
  }

  .hero-copy {
    position: relative;
    overflow: hidden;
    padding: 28px 22px 26px;
    border-color: rgba(112, 139, 255, .28);
    background:
      radial-gradient(circle at 92% 8%, rgba(99, 120, 255, .34), transparent 34%),
      linear-gradient(150deg, #07152a 0, #102f58 62%, #173f69 100%);
    color: #fff;
  }

  .hero-copy::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(255, 255, 255, .035), 0 0 0 58px rgba(255, 255, 255, .025);
    pointer-events: none;
  }

  .hero-copy .eyebrow {
    position: relative;
    z-index: 1;
    color: #a7b9ff;
  }

  .hero-copy .eyebrow::before {
    background: linear-gradient(90deg, #8ea4ff, #75e2c5);
  }

  .hero h1,
  .hero-copy h1 {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 15px 0 15px;
    font-size: clamp(2.55rem, 11vw, 3.65rem);
    line-height: .99;
    letter-spacing: -.055em;
  }

  .hero p,
  .hero-copy p {
    position: relative;
    z-index: 1;
    max-width: none;
    color: #cbd6e8;
    font-size: 15px;
    line-height: 1.67;
  }

  .hero-copy .actions {
    position: relative;
    z-index: 2;
  }

  .hero-side {
    padding: 20px;
    border-radius: 20px;
  }

  .hero-side strong {
    margin: 10px 0 10px;
    font-size: 22px;
  }

  .hero-side li {
    padding: 10px 0;
    font-size: 13px;
  }

  .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 22px;
  }

  .button,
  button,
  input[type="submit"] {
    min-height: 52px;
    border-radius: 15px;
    touch-action: manipulation;
  }

  .button {
    width: 100%;
    padding: 15px 17px;
    font-size: 14px;
  }

  .home-intake {
    margin-top: 16px;
    padding: 20px 16px 18px;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .section-heading h2 {
    margin: 9px 0 7px;
    font-size: clamp(1.85rem, 8vw, 2.55rem);
    line-height: 1.04;
  }

  .section-heading p {
    font-size: 13px;
    line-height: 1.58;
  }

  .intake-form {
    gap: 15px;
  }

  .service-picker {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .service-picker > header {
    align-items: flex-start;
    padding: 0 2px 13px;
    border: 0;
    background: transparent;
  }

  .service-picker header > div {
    align-items: flex-start;
  }

  .service-picker header em {
    display: none;
  }

  .section-icon {
    width: 35px;
    height: 35px;
    border-radius: 12px;
  }

  .service-grid {
    display: grid;
    grid-auto-columns: minmax(78%, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 10px;
    margin: 0 calc(var(--mobile-gutter) * -1);
    padding: 2px var(--mobile-gutter) 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: var(--mobile-gutter);
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  .service-grid::-webkit-scrollbar {
    display: none;
  }

  .service-card {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 12px;
    min-height: 104px;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(17, 36, 79, .06);
    scroll-snap-align: center;
  }

  .service-card:hover {
    transform: none;
  }

  .service-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .service-copy strong {
    font-size: 14px;
  }

  .service-copy small {
    font-size: 11px;
    line-height: 1.45;
  }

  .intake-grid,
  .checkout-grid,
  .review-grid,
  .offer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .intake-fields,
  .upload-panel,
  .checkout-form,
  .summary {
    padding: 17px;
    border-radius: var(--mobile-radius-lg);
  }

  .numbered-field {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 15px;
  }

  .numbered-field > span,
  .upload-heading > span {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .field {
    min-width: 0;
  }

  .field label {
    font-size: 12px;
  }

  .field input,
  .field textarea,
  .field select {
    min-height: 52px;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
  }

  .field textarea {
    min-height: 190px;
    resize: vertical;
  }

  .hint {
    font-size: 11px;
  }

  .upload-heading {
    margin-bottom: 12px;
  }

  .dropzone {
    min-height: 168px;
    padding: 20px 16px;
    border-radius: 17px;
  }

  .drop-graphic {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 23px;
  }

  .dropzone output span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .form-finish {
    position: sticky;
    z-index: 35;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0 -10px -10px;
    padding: 12px 10px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(220, 228, 241, .86);
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 -14px 34px rgba(17, 36, 79, .10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .trust-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 2px;
    overflow-x: auto;
    font-size: 10px;
    scrollbar-width: none;
  }

  .trust-row::-webkit-scrollbar {
    display: none;
  }

  .trust-row span {
    flex: 0 0 auto;
    padding: 7px 9px;
    border-radius: 999px;
    background: #f2f6fb;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    margin-top: 16px;
  }

  .tile {
    position: relative;
    min-height: 0;
    padding: 19px 50px 19px 19px;
    border-radius: 19px;
  }

  .tile::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: 19px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
    transform: translateY(-50%);
  }

  .tile h3 {
    margin: 10px 0 6px;
    font-size: 17px;
  }

  .tile p {
    font-size: 12px;
    line-height: 1.55;
  }

  .process-band {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    margin-top: 16px;
    border-radius: 19px;
  }

  .process-band > div {
    min-height: 72px;
    padding: 16px;
  }

  .order-wrap {
    width: 100%;
  }

  .steps {
    position: sticky;
    z-index: 38;
    top: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    gap: 5px;
    margin: -2px -4px 12px;
    padding: 9px 4px;
    background: rgba(246, 248, 253, .94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .step {
    height: 5px;
  }

  .order-card {
    padding: 21px 17px;
  }

  .order-card h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.02;
  }

  .order-card > p {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.6;
  }

  .offer {
    padding: 19px;
    border-radius: 19px;
  }

  .offer p {
    min-height: 0;
  }

  .price {
    margin: 14px 0;
    font-size: 28px;
  }

  .checkout-form details {
    border-radius: 13px;
  }

  .consent-line {
    font-size: 11px;
  }

  .status-list {
    gap: 8px;
  }

  .status-item {
    align-items: flex-start;
    padding: 13px;
    border-radius: 14px;
    font-size: 12px;
  }

  .preview {
    min-height: 0;
    padding: 10px;
    border-radius: 18px;
  }

  .preview iframe {
    height: min(64dvh, 560px);
    border-radius: 11px;
  }

  .review-grid {
    gap: 12px;
  }

  .completion-card {
    align-items: flex-start;
    padding: 17px;
    border-radius: 17px;
  }

  .completion-mark {
    flex: 0 0 auto;
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .public-page {
    max-width: none;
    padding: 22px 17px 28px;
  }

  .public-hero {
    padding: 10px 0 19px;
  }

  .public-hero h1 {
    margin: 12px 0 13px;
    font-size: clamp(2.35rem, 11vw, 3.6rem);
    line-height: 1;
  }

  .public-hero .lead,
  .public-page p,
  .public-page li {
    font-size: 14px;
    line-height: 1.7;
  }

  .breadcrumbs {
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  .public-inline-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-inline: -17px;
    padding: 4px 17px 10px;
    overflow-x: auto;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
  }

  .public-inline-links::-webkit-scrollbar {
    display: none;
  }

  .public-inline-links a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f7f9fd;
    text-decoration: none;
    scroll-snap-align: start;
  }

  .public-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .public-list article {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
  }

  .public-page table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-spacing: 0;
    -webkit-overflow-scrolling: touch;
  }

  .public-page pre,
  .public-page code {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  :root {
    --mobile-gutter: 13px;
  }

  .hero-copy {
    padding: 25px 19px 23px;
  }

  .hero h1,
  .hero-copy h1 {
    font-size: clamp(2.35rem, 12vw, 3.1rem);
  }

  .home-intake {
    padding: 18px 13px 16px;
  }

  .service-grid {
    grid-auto-columns: minmax(84%, 1fr);
  }

  .order-card,
  .public-page {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .menu-button::before,
  .menu-button::after,
  .service-card,
  .button {
    transition: none !important;
  }

  .progress::before {
    animation-duration: 3s;
  }
}
