/* Apple-grade sweep (rules: docs/design/APPLE-GRADE-RULES.md in the product repo, Parts 2, 3, 4.2, 5.3, 5.6).
   Loads after the page styles so these tokens and floors win. No new accent, no new font file. */

:root{
  --ag-ground:#fdfdfc;--ag-text:#161616;
  /* Space scale, px: 4 8 12 16 20 24 32 40 48 64 */
  --ag-s1:.25rem;--ag-s2:.5rem;--ag-s3:.75rem;--ag-s4:1rem;--ag-s5:1.25rem;--ag-s6:1.5rem;--ag-s8:2rem;--ag-s10:2.5rem;--ag-s12:3rem;--ag-s16:4rem;
  /* Type floors in rem: nothing under 11 px */
  --ag-caption:.6875rem;--ag-footnote:.75rem;--ag-subhead:.9375rem;--ag-body:1rem;
  /* Targets: 44 px on touch and phones, 28 px with a pointer */
  --ag-target:2.75rem;--ag-target-pointer:1.75rem;
  --ag-ring:var(--ink);--ag-ring-width:2px;--ag-ring-offset:3px;
  --ag-font:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
}

/* One face: the visitor's own system font. */
html body,html body.eleven-home,.eleven-home,.fluid-home,.fluid-home button,.fluid-home input,.fluid-home textarea,button,input,select,textarea{font-family:var(--ag-font)}

/* Focus ring: 2 px, offset, 3:1 against the page in both appearances (ink flips with the theme). */
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role=button]:focus-visible,[tabindex]:focus-visible{
  outline:var(--ag-ring-width) solid var(--ag-ring);outline-offset:var(--ag-ring-offset);
}

/* Type floors: nothing under 11 px (!important because older page rules set 9 to 10.5 px per component). */
.section-eyebrow,.breadth-number,.hero-eyebrow,.adaptive-example>.section-eyebrow,.eleven-home .adaptive-example>.section-eyebrow,
.footer-bottom,.footer-bottom a,.footer-bottom span,.eleven-home .footer-bottom>span,.site-footer small,.pricing-footer p,.pricing-footer small{font-size:var(--ag-footnote)!important}
.demo-step-number,.kicker,.plan-flag,.pricing-page .price-card-heading>.plan-flag,.ad-a-n,.ind-b-lab,.demo-sample,.k-roll-word,
.first-month-list li>span,.activation-steps li>span,.hl-m-k,.hl-m-cap b,.pg-a-who,.pg-a-step small,.dp-a-you small,.dp-a-tile small,.su-a-job-k,.su-a-stamp{font-size:var(--ag-caption)!important}
.header-cta,a.button.header-cta{font-size:.875rem!important}

/* Inputs: 16 px or larger so phones do not zoom. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea,
.gb-optin input,.gb-optin select,.gb-optin-form input,.gb-optin-form select,.manager-name-edit input{font-size:var(--ag-body)!important}

/* Discount tags: one solid, high-contrast chip instead of a multi-colour gradient with white text. */
.plan-off,.checkout-off{background:var(--ink)!important;color:var(--bg)!important;box-shadow:none!important;font-weight:600!important}
.plan-off:after{display:none!important}

/* Targets with a pointer: 28 px. */
button,summary,select,[role=button],a.button,a.pill,a.link,.header-login,.theme-toggle,.mobile-toggle,.motion-toggle,
nav a,footer a,.wordmark,.caps-index a,.fh-intro-jump a,.gd-d-t a,th>a,td>a:only-child,.ind-b-chip,.gd-d-chip,.faq-b-chip,.ind-pill-change,.ind-pill-x,.faq-b-plus{
  min-height:var(--ag-target-pointer)!important;
}
summary{min-height:var(--ag-target-pointer)!important;display:list-item}
input[type=range]{min-height:var(--ag-target-pointer)!important}
label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:var(--ag-target-pointer)}
nav a,footer a,.caps-index a,.fh-intro-jump a,.gd-d-t a,a.wordmark,a.pill,th>a,td>a:only-child{display:inline-flex;align-items:center;min-width:var(--ag-target-pointer)}
.site-footer .footer-columns a,.pricing-footer a{display:flex}
.motion-toggle,.header-login{display:inline-flex;align-items:center}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),select{min-height:var(--ag-target-pointer)}

/* Targets on touch and phones: 44 px. */
@media (pointer:coarse),(max-width:760px){
  button,summary,select,[role=button],a.button,a.pill,a.link,.header-login,.theme-toggle,.mobile-toggle,.motion-toggle,
  nav a,footer a,.wordmark,.caps-index a,.fh-intro-jump a,.gd-d-t a,th>a,td>a:only-child,.ind-b-chip,.gd-d-chip,.faq-b-chip,.ind-pill-change,.ind-pill-x,.faq-b-plus,
  .workspace-icon,.caps-secondary,a.button.primary,a.button.header-cta,summary,input[type=range],.pr-c-depts a,.pr-c-tab,.hl-a-arrow{min-height:var(--ag-target)!important}
  nav a,footer a,.caps-index a,.fh-intro-jump a,.gd-d-t a,a.wordmark,th>a,td>a:only-child{min-width:var(--ag-target)}
  .theme-toggle,.mobile-toggle,.ind-pill-x,.workspace-icon,.faq-b-plus,.hl-a-arrow{min-width:var(--ag-target)}
  .pr-c-depts a,.hl-a-arrow{display:inline-flex;align-items:center;justify-content:center}
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select{min-height:var(--ag-target)!important}
  .manager-name-edit{display:inline-flex;align-items:center;min-height:var(--ag-target)}
  .mobile-toggle{box-sizing:border-box;padding-inline:var(--ag-s3)}
  .site-footer .footer-columns a{margin-block:0}
  .footer-bottom{gap:var(--ag-s1) var(--ag-s4)}
  .footer-bottom a,.motion-toggle{padding-inline:var(--ag-s1)}
  /* Checkbox and radio rows: the whole label is the target. */
  label:has(>input[type=checkbox]),label:has(>input[type=radio]),.consent-label,.checkout-consent{min-height:var(--ag-target);align-items:center}
  input[type=checkbox],input[type=radio]{min-width:1.375rem;min-height:1.375rem}
}

/* Narrow header: the sign-in link lives in the menu, so the primary action and the 44 px controls fit. */
/* Narrow header: the sign-in link lives in the menu, so the primary action and the 44 px controls fit. */
@media (max-width:560px){
  .site-header .header-login{display:none}
  .site-header .header-actions{gap:var(--ag-s1)}
  .site-header .header-cta{padding-inline:var(--ag-s3)}
}

/* Reduce Motion: no looping or decorative movement. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* Increase Contrast: darker secondary text and stronger hairlines. */
@media (prefers-contrast:more){
  :root{--muted:#3d3d3d;--line:#767676}
  :root[data-theme=dark]{--muted:#d4d4d4;--line:#9a9a9a}
  a{text-decoration-thickness:2px}
}

/* Forced colours: keep focus visible. */
@media (forced-colors:active){
  a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:Highlight}
}

/* Home hero: two actions side by side (wraps on narrow screens), and the free sign-up link in the mobile menu. */
.hero-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}
.hero-actions .button{margin:0}
.hero-actions .start-free-hero{background:transparent;color:var(--ink);border:1px solid var(--ink);text-decoration:none}
.hero-actions .start-free-hero:hover{background:var(--soft)}
.mobile-menu .mobile-start-free{font-weight:600}

/* 375px: the header's demo pill, theme toggle and menu button no longer fit in one row (pages were 388px wide).
   Below 400px the pill leaves the header; "Get a demo call" stays in the hero, the announcement bar and the footer. */
@media (max-width:399px){
  .site-header .header-actions .header-cta{display:none}
  .site-header .header-actions{gap:4px}
}

/* Dark ground for the pages that have no site tokens of their own (legal, support, contact). */
html[data-theme=dark]{--ag-ground:#101110;--ag-text:#f4f4f1}

/* Legal, support and contact pages: a skip link and a home bar, on the same warm ground as the site. */
body:has(>.legal-bar){background:var(--ag-ground)}
.legal-skip{position:absolute;left:-999px;top:var(--ag-s2);z-index:60;padding:var(--ag-s3) var(--ag-s4);border-radius:10px;background:var(--ag-text);color:var(--ag-ground);text-decoration:none}
.legal-skip:focus{left:var(--ag-s2)}
.legal-bar.privacy-page{padding-top:var(--ag-s4);padding-bottom:0}
.legal-bar .brand{min-height:var(--ag-target);color:inherit;text-decoration:none}
.legal-bar+.privacy-page{padding-top:var(--ag-s6)}
