/* Customer controls retain their existing brand colors and layout at rest. */
:is(button:enabled:not([data-handle]), input:is([type=button],[type=submit]):enabled, summary,
    select:enabled, input:is([type=checkbox],[type=radio]):enabled,
    label:has(>input:is([type=checkbox],[type=radio]):enabled)) { cursor: pointer; }
a[href]:not([class]):where(p *, li *, footer *) {
  text-decoration: underline;
  text-underline-offset: .17em;
}
@media (hover:hover) and (pointer:fine) {
  a[href]:not([aria-disabled=true]):hover, summary:hover {
    text-decoration-line: underline;
    text-underline-offset: .18em;
    text-decoration-thickness: .12em;
  }
  :is(button:enabled:not([data-handle]), input:is([type=button],[type=submit]):enabled,
      a:is(.btn,.ap-button,.account-action,.primary)[href], select:enabled,
      [role=button]:not([aria-disabled=true])):hover {
    box-shadow: inset 0 0 0 2px currentColor;
  }
}
:is(button:enabled:not([data-handle]), a:is(.btn,.ap-button,.account-action,.primary)[href],
    summary, input:is([type=button],[type=submit]):enabled):active {
  box-shadow: inset 0 0 0 2px currentColor;
  filter: brightness(.93);
}
:is(a[href],button,input,select,textarea,summary,[role=button],[tabindex="0"]):focus-visible {
  outline: 3px solid #005bc4;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px white;
}
@media (forced-colors:active) {
  :focus-visible { outline-color: Highlight; }
}

/* Keep motion on the control, never on the photo being positioned. */
@media (prefers-reduced-motion: no-preference) {
  :where(a[href], summary, select, button:not([data-handle]), input:is([type=button],[type=submit])) {
    transition: background-color 140ms ease-out, color 140ms ease-out,
      border-color 140ms ease-out, text-decoration-color 140ms ease-out, box-shadow 140ms ease-out;
  }
  :where(a.btn[href], a.ap-button[href], .btn:enabled, .account-action[href]) {
    transition: background-color 140ms ease-out, border-color 140ms ease-out,
      box-shadow 140ms ease-out, translate 100ms ease-out;
  }
  :where(a.btn[href], a.ap-button[href], .btn:enabled, .account-action[href]):active {
    translate: 0 1px;
  }
  :where(.faq-item[open] > p, .faq-item[open] > div) {
    animation: ap-dialog-in 150ms ease-out;
  }
  :where(dialog[open]) {
    animation: ap-dialog-in 150ms ease-out;
  }
  dialog[open]::backdrop {
    animation: ap-dialog-in 150ms ease-out;
  }
  :where([role=status][data-loading]:not(:empty))::before {
    content: "";
    display: inline-block;
    width: .75em;
    height: .75em;
    margin-inline-end: .5em;
    border: .12em solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: ap-busy-turn 850ms linear infinite;
  }
}
@keyframes ap-dialog-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ap-busy-turn { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  :is(a[href], button, input, select, summary, dialog, [role=status]),
  dialog::backdrop, [role=status]::before {
    transition: none !important;
    animation: none !important;
  }
}

@font-face {
  font-family: "AllPrint DM Sans";
  src: url("/assets/type/dm-sans-latin-wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root { --ap-customer-type: "AllPrint DM Sans", "Segoe UI", Arial, sans-serif; }
html body, :root body :is(main, nav, footer, dialog, button, input, select, textarea, label, summary) {
  font-family: var(--ap-customer-type);
}
:root body :is(h1,h2,h3,h4):not(.brand-wordmark) {
  font-family: var(--ap-customer-type);
  font-weight: 600;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
:root body h1:not(.brand-wordmark) { letter-spacing: -.035em; }
:root body :is(button,.btn,.primary,.account-action,summary) { letter-spacing: normal; }
:root body :is(.quick-size,.photo-size-matrix,.cart-summary,.print-item-details,.price,output,input[type=number]) {
  font-variant-numeric: lining-nums tabular-nums;
}
:root body :is(.cart-summary,.print-item-details) strong { font-weight: 650; }
@media (max-width: 640px) {
  :root body :is(select,textarea,input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=hidden])) {
    font-size: max(1rem, 16px);
  }
}

/* The order builder has its own more specific heading and price rules. */
:root body.review-build.builder-page :is(h1,h2,h3,.hero-title,.builder-collection-title,.panel-step-title),
:root body #builder-login-heading, :root body .cart-summary h2 {
  font-family: var(--ap-customer-type);
  font-weight: 600;
}
@media (max-width: 420px) {
  :root body .ap-customer-nav summary span { max-width: 100%; }
}

@media (max-width: 480px) {
  .site-header:has(+ #login-card) .header-inner,
  .site-header:has(+ #login-card) .header-nav { flex-wrap: wrap; gap: .35em .75em; }
  #login-card .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #login-card .two-column-layout > section { min-width: 0; }
  #receipt-main .account-intro > img { max-width: min(28vw, 100%); min-width: 0; }
}
@media (max-width: 480px) {
  #receipt-main .account-intro { flex-wrap: wrap; }
  #receipt-main .account-intro h1, #builder-login-heading { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .ap-unified-bar .ap-customer-nav > :is(a,span) span,
  .account-shortcuts a.account-link {
    max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: center;
  }
}
@media (max-width: 480px) {
  :root body header .ap-unified-bar,
  :root body header.site-header.builder-header .container.header-inner.ap-unified-bar { flex-wrap: wrap; }
  :root body .ap-unified-bar .ap-customer-nav { min-inline-size: min(100%, 11.5rem); max-inline-size: 100%; }
}

/* The mark keeps its print lettering. Working screens use the existing local DM Sans. */
:root body :is(.brand-wordmark,.brand-name,.account-header .brand-link > span,.phone-transfer-page .phone-brand,.ap-brand-word),
:root body.review-build.builder-page .brand-wordmark {
  font:700 clamp(1.375rem,1.2rem + .45vw,1.625rem)/1.1 Georgia,serif;
  color:#12284b;letter-spacing:-.035em;text-transform:none;
}
:root body .ap-unified-bar :is(.ap-main-toggle,.ap-customer-nav) {font-family:var(--ap-customer-type)}
:root body .hero-section {padding-block:clamp(1.5rem,3vw,2.75rem)}
:root body :is(.hero-section .hero-title,#print-storefront .hero h1,#guide-title,.hero .copy h1) {
  font-size:clamp(2rem,1.55rem + 1.85vw,3.125rem);line-height:1.08;
}
:root body :is(.hero-lead,.account-intro p) {font-size:1.0625rem;line-height:1.5}
:root body #print-storefront .hero-image img {height:clamp(11rem,25vw,21rem)}
:root body #print-storefront .hero {gap:clamp(1rem,2.5vw,2rem)}
:root body #print-storefront .hero .ap-action-row {margin-top:1rem}
:root body :is(.hero-footnote,.photo-card-meta,.photo-preview-caption,.photo-preview-advisory,.frame-resolution) {font-size:.875rem;line-height:1.4}
:root body .account-intro h1 {font-size:clamp(1.75rem,1.55rem + 1vw,2.25rem)}
:root body .phone-transfer-page {padding:clamp(1rem,3vw,1.5rem);margin-block:clamp(1rem,4vh,2.5rem)}
:root body .phone-transfer-page h1 {font-size:clamp(1.625rem,1.4rem + 1vw,2rem);line-height:1.15}
:root body .phone-transfer-page .phone-brand {margin:0 0 .875rem}
:root body .cart-workspace.in-checkout :is(.checkout-main,.cart-summary) {padding:clamp(1rem,1.75vw,1.5rem)}
:root body .cart-summary :is(dt,dd), :root body .cart-product-line {line-height:1.45}
:root body :is(.hero-actions,.ap-action-row) :is(a,button),
:root body .brand-group + nav a {min-height:44px}
@media (min-width:601px) and (max-width:960px) {
  :root body .ap-unified-bar .ap-customer-nav {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:1 1 auto;min-width:0;max-width:36rem;gap:2px}
  :root body .ap-unified-bar .ap-customer-nav > :is(a,span),:root body .ap-unified-bar .ap-customer-nav summary {flex-direction:column;min-width:0;text-align:center;padding:.2rem;gap:2px}
  :root body .ap-unified-bar .ap-customer-nav :is(span,small) {max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
@container (max-width:22rem) {
  .site-header .header-inner .brand-wordmark { display:none }
}
:root body.order-page .order-main .btn {min-height:44px}
