.ts-site .ts-menu-toggle,
.ts-site .ts-mobile-contact {
  display: none;
}

@media screen and (max-width: 1359px) {
  .ts-site .ts-menu-toggle,
  .ts-site .ts-menu-close {
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--ts-line);
    border-radius: 50%;
    background: transparent;
    color: var(--ts-ink);
  }

  .ts-site .ts-menu-toggle {
    justify-self: start;
    padding: 11px;
  }

  .ts-site .ts-drawer {
    width: min(390px, calc(100% - 24px));
    height: 100vh;
    height: 100dvh;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-block-start: calc(64px + env(safe-area-inset-top));
  }

  .ts-site .ts-drawer-top {
    position: sticky;
    top: 0;
    z-index: 1;
    gap: 12px;
    min-height: 64px;
    margin: 0;
    padding: calc(9px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 9px 16px;
    border-bottom: 1px solid var(--ts-line);
    background: #fbfcf7;
  }

  .ts-site .ts-drawer nav {
    padding: 6px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) 16px;
  }

  .ts-site .ts-drawer nav a,
  .ts-site .ts-drawer summary {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding-block: 8px;
    font-size: 1rem;
  }

  .ts-site .ts-drawer summary {
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
  }

  .ts-site .ts-drawer summary::-webkit-details-marker {
    display: none;
  }

  .ts-site .ts-drawer summary::after {
    width: 8px;
    height: 8px;
    margin-inline-end: 5px;
    border-right: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: rotate(45deg);
    content: "";
  }

  .ts-site .ts-drawer details[open] summary::after {
    transform: rotate(225deg);
  }

  .ts-site .ts-drawer details a {
    border-inline-start: 1px solid var(--ts-line);
    font-size: .9375rem;
  }

  .ts-site .ts-drawer [aria-current="page"] {
    color: var(--ts-ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #b27d00;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .ts-site .ts-menu-toggle:focus-visible,
  .ts-site .ts-mobile-contact:focus-visible,
  .ts-site .ts-drawer :focus-visible {
    outline: 2px solid var(--ts-ink);
    outline-offset: 2px;
  }
}

@media screen and (max-width: 767px),
       screen and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .ts-site .ts-header-inner {
    grid-template-columns: minmax(60px, 1fr) minmax(0, 134px) minmax(60px, 1fr);
    gap: 8px;
    min-height: 60px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }

  .ts-site .ts-logo img {
    width: min(100%, 134px);
    max-height: 44px;
  }

  .ts-site .ts-mobile-contact {
    display: inline-flex;
    grid-area: 1 / 3;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: 4px;
    min-height: 44px;
    padding-inline: 8px;
    border: 1px solid var(--ts-line);
    border-radius: 100px;
    color: var(--ts-ink);
    font-size: .8125rem;
    font-weight: 700;
    text-decoration: none;
  }

  .ts-site .ts-mobile-contact svg {
    flex: none;
    width: 17px;
    height: 17px;
  }
}
@media screen and (max-width: 767px), screen and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .ts-site section[id],
  .ts-site #contact-form,
  .ts-service-panel {
    scroll-margin-block-start: 76px;
  }

  .ts-faq-list summary { font-size: 15px; padding-block: 15px; }
  .ts-faq-list summary > span { flex: none; }
}

@media screen and (max-width: 767px) {
  /* Phone layout for the home page and shared action sizing. */
  .ts-site .ts-button {
    min-height: 48px;
    max-inline-size: 100%;
    padding: 10px 14px;
    gap: 10px;
    font-size: 14px;
    text-align: center;
    white-space: normal;
  }

  .ts-site.home .ts-section {
    padding-block: 46px;
  }

  .ts-creative-hero .ts-hero-grid {
    min-height: 0;
    padding-block: 40px 26px;
  }

  .ts-site .ts-creative-hero .ts-eyebrow {
    font-size: 12px;
    margin-block-end: 14px;
  }

  .ts-site .ts-creative-hero h1 {
    font-size: clamp(27px, 7vw, 38px);
  }

  .ts-site .ts-creative-hero .ts-hero-line-accent {
    font-size: 1.08em;
  }

  .ts-site .ts-creative-hero .ts-hero-details > p {
    margin-block: 14px 0;
    font-size: 15px;
    max-inline-size: 38ch;
  }

  .ts-creative-hero .ts-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-inline-size: 400px;
    margin-block: 20px 0;
  }

  .ts-creative-hero .ts-hero-work-link {
    justify-content: center;
    min-height: 48px;
    gap: 8px;
    padding: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border: 1px solid #b5b8ac;
    border-radius: 7px;
  }

  .ts-hero-work-link span { font-size: 19px; }
  .ts-creative-hero .ts-north-scene { opacity: .22; }

  .ts-creative-hero .ts-hero-bottom {
    border-block-start: 1px solid var(--ts-line);
    margin-block-start: 0;
    padding-block: 12px;
  }

  .ts-creative-hero .ts-hero-route span {
    width: auto;
    padding-inline-start: 8px;
    border-inline-start: 1px solid #cbc8bb;
  }

  .ts-site .ts-clients { padding-block: 22px; }
  .ts-clients > p { margin-block-end: 14px; font-size: 12px; }
  .ts-logo-strip { gap: 12px 16px; }
  .ts-logo-strip img { width: 72px; height: 30px; }

  .ts-product-switcher { gap: 8px; }
  .ts-site .ts-product-switcher button {
    align-items: center;
    min-block-size: 60px;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--ts-line);
    border-radius: 7px;
    background: #fbfcf7;
    color: var(--ts-ink);
  }

  .ts-site .ts-product-switcher button[aria-selected="true"] {
    padding: 8px;
    border-color: #ac8c00;
    background: #fff3b6;
  }

  .ts-site .ts-product-switcher button > span { font-size: 14px; line-height: 1.45; }
  .ts-product-switcher bdi { flex: none; color: var(--ts-muted); font-size: 12px; font-weight: 700; }
  .ts-product-switcher i { display: none; }

  .ts-service-panels { padding-block-start: 14px; }
  .ts-site .ts-service-stage[data-service-enhanced="true"] .ts-service-panel:not([hidden]) {
    padding: 15px;
    border: 1px solid var(--ts-line);
    border-radius: 7px;
    background: #f0f2e8;
  }

  .ts-site .ts-service-stage[data-service-enhanced="true"] .ts-service-panel h3 {
    display: block;
    margin-block-end: 6px !important;
  }

  .ts-site .ts-service-stage .ts-service-panel h3 {
    color: var(--ts-ink);
    font-size: clamp(18px, 4.8vw, 21px);
  }

  .ts-site .ts-service-panel p {
    color: #565e50;
    font-size: 15px;
  }

  .ts-product-tags { margin-block-end: 8px; }
  .ts-product-tags li {
    max-inline-size: 100%;
    padding: 5px 9px;
    color: var(--ts-ink);
    font-size: 12px;
    line-height: 1.5;
  }

  .ts-product-art .ts-connect-label {
    padding: 5px 8px;
    color: var(--ts-ink);
    font-size: 12px;
    line-height: 1.4;
  }

  .ts-product-art .ts-art-tag { color: #565e50; }
  .ts-service-panel .ts-text-link,
  .ts-site.home .ts-section-heading .ts-text-link {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    gap: 6px;
    font-size: 14px;
  }

  .ts-service-gallery,
  .ts-service-art {
    block-size: clamp(230px, 58vw, 300px);
    min-block-size: 0;
  }

  .ts-mock-browser { top: 25px; height: 72%; }
  .ts-mock-canvas { height: calc(100% - 28px); }
  .ts-mock-word { font-size: clamp(30px, 8vw, 44px); }
  .ts-wireframe { top: 46px; height: 74%; }
  .ts-art-tag { bottom: 10px; }

  .ts-site .ts-creative-process .ts-process-art { gap: 8px; }
  .ts-creative-process .ts-process-wave { height: clamp(76px, 23vw, 140px); }
  .ts-creative-process .ts-process-grid li { gap: 12px; }
  .ts-creative-process .ts-process-grid p { font-size: 14px; }

  .ts-site .ts-crm { padding: 24px 18px; gap: 14px; }
  .ts-site .ts-crm h2 { font-size: clamp(24px, 6vw, 28px); }
  .ts-site .ts-crm .ts-eyebrow {
    margin-block-end: 10px;
    color: #c3cdb7;
    font-size: 12px;
  }

  .ts-site .ts-crm p {
    margin-block: 10px 16px !important;
    color: #d4dccb;
    font-size: 15px;
  }

  .ts-crm .ts-crm-visual { max-inline-size: 215px; justify-self: center; }
  .ts-crm .ts-orbit-center { width: 76px; height: 76px; font-size: 18px; }
  .ts-crm .ts-orbit-node { padding: 5px 7px; }
  .ts-creative-selected .ts-project-link { width: 44px; height: 44px; }
  .ts-site .ts-faq { gap: 18px; padding-block-start: 40px !important; }
  .ts-site .ts-cta { padding: 27px 18px; margin-block-end: 42px; }
  .ts-site .ts-cta .ts-actions { align-items: stretch; }
  .ts-site .ts-cta .ts-actions .ts-button { flex: 0 1 auto; }
}

@media screen and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  /* Phones turned sideways still need the primary actions inside the first screen. */
  .ts-creative-hero .ts-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: auto;
    align-items: center;
    min-height: 0;
    gap: 16px;
    padding-block: 24px;
  }

  .ts-creative-hero .ts-hero-content,
  .ts-creative-hero .ts-hero-details {
    grid-row: 1;
    align-self: center;
    min-width: 0;
  }

  .ts-creative-hero .ts-hero-details { grid-column: 2; }
  .ts-site .ts-creative-hero .ts-eyebrow { margin-block-end: 8px; }
  .ts-site .ts-creative-hero h1 { font-size: clamp(26px, 3.4vw, 34px); }
  .ts-site .ts-creative-hero .ts-hero-details > p { margin-block: 0; max-inline-size: 58ch; }
  .ts-creative-hero .ts-actions { margin-block-start: 12px; gap: 10px; }
  .ts-site .ts-creative-hero .ts-button { min-height: 46px; padding: 8px; gap: 8px; }
  .ts-creative-hero .ts-hero-work-link { min-height: 46px; }
  .ts-creative-hero .ts-hero-bottom { padding-block: 8px; }
  .ts-creative-hero .ts-north-scene { opacity: .25; }
}

@media screen and (min-width: 768px) and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .ts-services-studio .ts-service-stage { min-height: 0; gap: 22px; }
  .ts-site .ts-product-switcher button { min-height: 56px; padding-block: 8px; gap: 8px; }
  .ts-service-gallery { min-height: 290px; }
  .ts-service-art { height: 290px; }
  .ts-mock-browser { top: 30px; height: 215px; }
  .ts-mock-canvas { height: 175px; padding: 12px; }
  .ts-mock-word { font-size: 40px; }
  .ts-wireframe { top: 60px; height: 200px; }
}

@media screen and (max-width: 767px), screen and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .ts-site .ts-contact-card > a,
  .ts-site .ts-map > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: fit-content;
    overflow-wrap: anywhere;
  }

  .ts-site .ts-form-panel {
    padding: clamp(16px, 5vw, 28px);
  }

  .ts-site .ts-form-panel .gform_wrapper {
    margin-block: 16px 0;
  }

  .ts-site .ts-form-panel .gform_wrapper .gfield_label {
    margin-bottom: 6px;
  }

  .ts-site #contact-form .gfield :is(input[type="text"], input[type="tel"], input[type="email"], textarea) {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #899378;
    box-shadow: none;
    font-size: 16px;
    line-height: 1.5;
  }

  /* Gravity Forms marks its legacy RTL input alignment as important. */
  .ts-site #contact-form .gfield input[type="tel"] {
    direction: ltr !important;
    text-align: start !important;
  }

  .ts-site #contact-form .gfield :is(input, textarea):focus-visible {
    outline: 2px solid #4a5a3b;
    outline-offset: 2px;
  }
}

@media screen and (max-width: 767px) {
  .ts-site .ts-contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ts-site .ts-single .ts-content,
  .ts-site .ts-legacy .elementor-widget-text-editor {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .ts-site .ts-services-directory > a:is(:hover, :focus-visible) {
    padding-inline: 8px;
  }

  .ts-site .ts-pagination {
    gap: 8px;
  }

  .ts-site .ts-pagination .page-numbers {
    min-width: 44px;
    height: 44px;
  }

  /* WordPress demotes the embedded landing page's original h1. */
  #tslp .hero-copy > h2 {
    margin-block: 16px 12px;
    color: #fff;
    font-size: clamp(22px, 5vw, 30px) !important;
  }

  #tslp .hero-copy > h2 > span {
    color: var(--a);
  }

  .ts-site .ts-footer {
    padding-top: 32px;
  }

  .ts-site .ts-footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 26px;
  }

  .ts-site .ts-footer-brand > p {
    margin-top: 14px !important;
  }

  .ts-site .ts-footer :is(nav, .ts-contact-details, .ts-trust) {
    border-top: 1px solid #cdd4bd;
    padding-top: 16px;
  }

  .ts-site .ts-footer h2 {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .ts-site .ts-footer nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 8px;
  }

  .ts-site .ts-footer nav > h2 {
    grid-column: 1 / -1;
  }

  .ts-site .ts-footer nav > a,
  .ts-site .ts-footer .ts-contact-details > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: 3px;
    font-size: 14px;
    line-height: 1.5;
  }

  .ts-site .ts-footer .ts-contact-details > .ts-phone {
    font-size: clamp(22px, 6.2vw, 26px);
    font-weight: 700;
    letter-spacing: normal;
  }

  .ts-site .ts-footer .ts-contact-details > p {
    margin-block: 4px !important;
    font-size: 13px;
  }

  .ts-site .ts-footer .ts-socials {
    gap: 8px;
    margin-top: 16px;
  }

  .ts-site .ts-footer .ts-socials > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding-inline: 10px;
    border: 1px solid #cdd4bd;
    border-radius: 100px;
    font-size: 13px;
  }

  .ts-site .ts-footer .ts-trust > a {
    margin: 0 0 0 8px;
  }

  .ts-site .ts-footer .ts-trust img {
    width: 68px;
    height: 68px;
  }

  .ts-site .ts-footer-bottom {
    padding-block: 18px;
    color: #48533a;
    font-size: 12px;
  }

  .ts-site .ts-footer-bottom > span {
    margin-top: 10px;
    font-size: 11px;
  }
}

@media screen and (max-width: 759px) {
  .ts-site:has(#tslp .mobile-bar) .ts-footer {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}
