/* =========================================================================
   Anna Griffin — Design System
   Site-wide tokens and components. Load this before any page stylesheet.

   Each block under COMPONENTS maps 1:1 to a component if this site is ever
   ported to React — the mapping is documented in styles/README.md.

   Conventions
   -----------
   - Tokens are namespaced --ag-* so they cannot collide with anything.
   - Components are namespaced .ag-* and use BEM (__element, --modifier).
   - Components never set their own outer margin; the parent owns spacing.
   - No inline styles. Colours, type, spacing, shape and effects are
     tokens; the only literals left are the 1px visually-hidden clip and a
     2px hover nudge.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TOKENS
   ---------------------------------------------------------------------- */

:root {
  /* --- Colour -----------------------------------------------------------
     Measured contrast against #ffffff (WCAG 2.1):
       ink          17.28:1   (blue-black)
       body          8.86:1
       soft          5.02:1
       faint         4.74:1   <- floor for body text on WHITE; on --panel
                                 it falls to 4.31:1, so use --soft there
       accent-text   4.61:1   <- passes on WHITE only; on --panel it falls
                                 to 4.18:1
       accent        4.61:1   (same blue; used for dots and borders)
     Any accent text below 24px must use --ag-color-accent-text.            */
  --ag-color-surface: #ffffff;
  --ag-color-panel: #f4f4f2;
  --ag-color-ink: #0f1b2d;
  --ag-color-body: #4a4a4a;
  --ag-color-soft: #6f6f6f;
  --ag-color-faint: #737373;
  --ag-color-rule: #e6e6e3;
  --ag-color-accent: #3a76c3;
  --ag-color-accent-text: #3a76c3;
  --ag-color-accent-hover: #2c5e9e;
  --ag-color-focus: #0f1b2d;

  /* --- Typeface ---------------------------------------------------------
     Momo Trust Display ships a SINGLE weight (400). Never request a heavier
     weight from it: the browser synthesises a faux bold that smears at
     display sizes. All weight contrast comes from Momo Trust Sans.         */
  --ag-font-display:
    "Momo Trust Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ag-font-sans:
    "Momo Trust Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* --- Type scale (8 steps; do not add intermediate sizes) -------------- */
  --ag-text-2xs: 0.6875rem; /* 11px — dates, chips, meta      */
  --ag-text-xs: 0.75rem; /* 12px — location, eyebrow       */
  --ag-text-sm: 0.8125rem; /* 13px — nav, buttons, links     */
  --ag-text-md: 0.9375rem; /* 15px — body, position titles   */
  --ag-text-lg: 1.125rem; /* 18px — hero lede               */
  --ag-text-xl: 1.3125rem; /* 21px — company + project title */
  --ag-text-2xl: 2.125rem; /* 34px — section heading         */
  --ag-text-3xl: clamp(2.5rem, 5.6vw, 4.125rem); /* 40–66px — hero */

  /* --- Weight ---------------------------------------------------------- */
  --ag-weight-regular: 400;
  --ag-weight-medium: 500;
  --ag-weight-semibold: 600;
  --ag-weight-bold: 700;

  /* --- Leading --------------------------------------------------------- */
  --ag-leading-hero: 1.06;
  --ag-leading-tight: 1.2;
  --ag-leading-normal: 1.45;
  --ag-leading-relaxed: 1.68;

  /* --- Tracking -------------------------------------------------------- */
  --ag-tracking-hero: -0.038em;
  --ag-tracking-tight: -0.02em;
  --ag-tracking-wide: 0.1em;
  --ag-tracking-wider: 0.18em;

  /* --- Spacing (4px base; use these, never raw px) --------------------- */
  --ag-space-1: 0.25rem; /*  4 */
  --ag-space-2: 0.5rem; /*  8 */
  --ag-space-3: 0.75rem; /* 12 */
  --ag-space-4: 1rem; /* 16 */
  --ag-space-5: 1.25rem; /* 20 */
  --ag-space-6: 1.5rem; /* 24 */
  --ag-space-7: 1.75rem; /* 28 */
  --ag-space-8: 2rem; /* 32 */
  --ag-space-10: 2.5rem; /* 40 */
  --ag-space-12: 3rem; /* 48 */
  --ag-space-16: 4rem; /* 64 */
  --ag-space-20: 5rem; /* 80 */

  /* --- Layout ---------------------------------------------------------- */
  --ag-page-max: 90rem; /* 1440px — matches the artboard */
  --ag-page-gutter: clamp(1.5rem, 5vw, 5.5rem); /* 24 → 88px */
  --ag-rail: 16.875rem; /* 270px left column */
  --ag-col-gap: var(--ag-space-12);
  --ag-measure: 62ch;

  /* --- Shape ----------------------------------------------------------- */
  --ag-radius-md: 0.5rem;
  --ag-radius-pill: 999px;
  --ag-hairline: 1px;
  --ag-ladder-line: 1.5px;
  --ag-ladder-dot: 0.625rem; /* 10px */

  /* --- Effects --------------------------------------------------------- */
  --ag-focus-width: 2px;
  --ag-focus-offset: 3px;
  --ag-blur-chrome: 12px;
  --ag-blur-scrim: 3px;

  /* --- Motion ---------------------------------------------------------- */
  --ag-duration: 160ms;
  --ag-ease: cubic-bezier(0.2, 0, 0.2, 1);
}

/* -------------------------------------------------------------------------
   2. BASE
   ---------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ag-color-surface);
  color: var(--ag-color-ink);
  font-family: var(--ag-font-sans);
  font-size: var(--ag-text-md);
  line-height: var(--ag-leading-relaxed);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--ag-color-accent-text);
  text-decoration: none;
  transition: color var(--ag-duration) var(--ag-ease);
}
a:hover {
  color: var(--ag-color-accent-hover);
}

:focus-visible {
  outline: var(--ag-focus-width) solid var(--ag-color-focus);
  outline-offset: var(--ag-focus-offset);
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   3. UTILITIES
   ---------------------------------------------------------------------- */

.ag-skip-link {
  position: absolute;
  left: var(--ag-space-4);
  top: var(--ag-space-4);
  z-index: 100;
  transform: translateY(-250%);
  padding: var(--ag-space-3) var(--ag-space-5);
  border-radius: var(--ag-radius-pill);
  background: var(--ag-color-ink);
  color: var(--ag-color-surface);
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-semibold);
}
.ag-skip-link:focus {
  transform: translateY(0);
  color: var(--ag-color-surface);
}

/* -------------------------------------------------------------------------
   4. LAYOUT
   ---------------------------------------------------------------------- */

/* <Container> — one horizontal rhythm for the whole site. */
.ag-container {
  width: 100%;
  max-width: var(--ag-page-max);
  margin-inline: auto;
  padding-inline: var(--ag-page-gutter);
}

/* <Section> — one vertical rhythm for the whole site. */
.ag-section {
  padding-block-end: var(--ag-space-20);
}
.ag-section__heading {
  margin-block-end: var(--ag-space-8);
  font-family: var(--ag-font-display);
  font-weight: var(--ag-weight-regular);
  font-size: var(--ag-text-2xl);
  line-height: var(--ag-leading-tight);
  letter-spacing: var(--ag-tracking-hero);
  color: var(--ag-color-ink);
}
.ag-section__footer {
  margin-block-start: var(--ag-space-8);
  padding-block-start: var(--ag-space-8);
  border-block-start: var(--ag-hairline) solid var(--ag-color-rule);
}

/* <Row> — the rail/body grid. EVERY aligned row on the site uses this one
   template, which is what keeps the left column true down the whole page. */
.ag-row {
  display: grid;
  grid-template-columns: var(--ag-rail) minmax(0, 1fr);
  column-gap: var(--ag-col-gap);
}

.ag-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ag-space-8);
}

/* -------------------------------------------------------------------------
   5. COMPONENTS
   ---------------------------------------------------------------------- */

/* --- <SiteHeader> ----------------------------------------------------- */
.ag-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ag-color-surface) 92%, transparent);
  backdrop-filter: blur(var(--ag-blur-chrome));
  border-block-end: var(--ag-hairline) solid var(--ag-color-rule);
}
.ag-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ag-space-4);
  padding-block: var(--ag-space-6);
}

.ag-nav {
  display: flex;
  gap: var(--ag-space-8);
}
.ag-nav__link {
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-medium);
  /* --soft would be 5.02:1 on white but only ~3.8:1 once dark content
     scrolls under the translucent header. --body holds up in both cases. */
  color: var(--ag-color-body);
}
.ag-nav__link:hover {
  color: var(--ag-color-accent-text);
}
/* The nav is identical on every page, so it always contains a link to the
   page you are already on. Without this the nav reads as inert. */
.ag-nav__link[aria-current="page"] {
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-color-ink);
}

/* --- <Hero> ------------------------------------------------------------ */
.ag-hero {
  padding-block: var(--ag-space-20) var(--ag-space-16);
}
/* Sits UNDER the name, so it labels the person rather than heading the
   page — hence __role, not the usual __eyebrow. */
.ag-hero__role {
  margin-block-end: var(--ag-space-7);
  font-size: var(--ag-text-xs);
  font-weight: var(--ag-weight-semibold);
  letter-spacing: var(--ag-tracking-wider);
  text-transform: uppercase;
  color: var(--ag-color-accent-text);
}
.ag-hero__title {
  margin-block-end: var(--ag-space-3);
  max-width: 15ch;
  font-family: var(--ag-font-display);
  font-weight: var(--ag-weight-regular);
  font-size: var(--ag-text-3xl);
  line-height: var(--ag-leading-hero);
  letter-spacing: var(--ag-tracking-hero);
  text-wrap: balance;
}
.ag-hero__lede {
  margin-block-end: var(--ag-space-8);
  max-width: 50ch;
  font-size: var(--ag-text-lg);
  line-height: var(--ag-leading-relaxed);
  color: var(--ag-color-body);
}

/* --- <PageHead> — the hero's counterpart on a subpage. Same top rhythm,
       one size down, so a subpage opens the way the home page does. ------ */
.ag-page-head {
  padding-block: var(--ag-space-20) var(--ag-space-10);
}
.ag-page-head__back {
  display: inline-flex;
  align-items: center;
  gap: var(--ag-space-2);
  margin-block-end: var(--ag-space-4);
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-color-body);
}
.ag-page-head__back:hover {
  color: var(--ag-color-accent-text);
}
.ag-page-head__back-arrow {
  transition: transform var(--ag-duration) var(--ag-ease);
}
.ag-page-head__back:hover .ag-page-head__back-arrow {
  transform: translateX(-2px);
}
.ag-page-head__title {
  font-family: var(--ag-font-display);
  font-weight: var(--ag-weight-regular);
  font-size: var(--ag-text-2xl);
  line-height: var(--ag-leading-tight);
  letter-spacing: var(--ag-tracking-hero);
  color: var(--ag-color-ink);
}

/* --- <Button> ---------------------------------------------------------- */
.ag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ag-space-3);
}
.ag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem; /* 44px hit target */
  padding: var(--ag-space-3) var(--ag-space-6);
  border: var(--ag-hairline) solid transparent;
  border-radius: var(--ag-radius-pill);
  background: none;
  font-family: inherit;
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-semibold);
  /* Controls must not inherit the body's prose leading — it adds ~5px of
     dead space inside the pill. Height comes from padding and min-height. */
  line-height: 1;
  cursor: pointer;
  transition:
    border-color var(--ag-duration) var(--ag-ease),
    color var(--ag-duration) var(--ag-ease);
}
.ag-button--primary {
  border-color: var(--ag-color-ink);
  color: var(--ag-color-ink);
}
.ag-button--secondary {
  border-color: var(--ag-color-rule);
  color: var(--ag-color-body);
}
.ag-button--primary:hover,
.ag-button--secondary:hover {
  border-color: var(--ag-color-accent-text);
  color: var(--ag-color-accent-text);
}

/* --- <ExperienceEntry> -------------------------------------------------
   Structure: one header row (org | empty), then one row per position
   (title+dates | bullets), then one trailing row (empty | chips).
   Each row is its own .ag-row, so every left cell shares the same rail.   */
.ag-entry {
  border-block-start: var(--ag-hairline) solid var(--ag-color-rule);
  padding-block-start: var(--ag-space-8);
}

.ag-org {
  padding-block-end: var(--ag-space-5);
}
.ag-org__name {
  margin-block-end: var(--ag-space-1);
  font-weight: var(--ag-weight-bold);
  font-size: var(--ag-text-xl);
  line-height: var(--ag-leading-tight);
  letter-spacing: var(--ag-tracking-tight);
}
.ag-org__place {
  font-size: var(--ag-text-xs);
  line-height: var(--ag-leading-normal);
  color: var(--ag-color-faint);
}

/* <Role> — left cell */
.ag-role__head {
  padding-block-end: var(--ag-space-7);
}
.ag-role:last-child .ag-role__head {
  padding-block-end: 0;
}
.ag-role__title {
  font-size: var(--ag-text-md);
  font-weight: var(--ag-weight-semibold);
  line-height: var(--ag-leading-normal);
  color: var(--ag-color-accent-text);
}
.ag-role__dates {
  margin-block-start: var(--ag-space-1);
  font-size: var(--ag-text-2xs);
  font-weight: var(--ag-weight-semibold);
  letter-spacing: var(--ag-tracking-wide);
  text-transform: uppercase;
  color: var(--ag-color-faint);
}

/* <Role> — right cell. The last one leaves the same gap before the chip
   row that a single-position entry leaves, so every block matches.        */
.ag-role__body {
  padding-block-end: var(--ag-space-7);
}
.ag-role:last-child .ag-role__body {
  padding-block-end: var(--ag-space-5);
}

/* <RoleLadder> — only when an entry has more than one position. The
   connector is trimmed to the dot centres, so nothing protrudes at
   either end of the run.                                                  */
.ag-roles--ladder .ag-role__head {
  position: relative;
  padding-inline-start: var(--ag-space-5);
}
.ag-roles--ladder .ag-role__head::before {
  /* dot, painted over the line */
  content: "";
  position: absolute;
  left: 0;
  top: 0.4375rem; /* centre falls at 0.75rem */
  z-index: 1;
  width: var(--ag-ladder-dot);
  height: var(--ag-ladder-dot);
  border-radius: 50%;
  background: var(--ag-color-surface);
  border: var(--ag-ladder-line) solid var(--ag-color-faint);
}
.ag-roles--ladder .ag-role--current .ag-role__head::before {
  background: var(--ag-color-accent);
  border-color: var(--ag-color-accent);
}
.ag-roles--ladder .ag-role__head::after {
  /* connector */
  content: "";
  position: absolute;
  left: calc(var(--ag-ladder-dot) / 2 - var(--ag-ladder-line) / 2);
  top: 0;
  bottom: 0;
  width: var(--ag-ladder-line);
  background: var(--ag-color-rule);
}
.ag-roles--ladder .ag-role:first-child .ag-role__head::after {
  top: 0.75rem;
}
.ag-roles--ladder .ag-role:last-child .ag-role__head::after {
  bottom: auto;
  height: 0.75rem;
}
.ag-roles--ladder .ag-role:only-child .ag-role__head::after {
  display: none;
}

/* --- <Bullets> --------------------------------------------------------- */
.ag-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--ag-space-2);
  max-width: var(--ag-measure);
  font-size: var(--ag-text-md);
  line-height: var(--ag-leading-relaxed);
  color: var(--ag-color-body);
}
/* Accent chevron with a hanging indent, so each bullet starts on a clean
   edge. A glyph rather than a dot keeps it distinct from the ladder's round
   role markers. The empty alt text after the slash keeps screen readers
   from announcing the character on every item. */
.ag-bullets > li {
  position: relative;
  padding-inline-start: var(--ag-space-4);
}
.ag-bullets > li::before {
  content: "\203A" / "";
  position: absolute;
  left: 0;
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-color-accent-text);
}

/* --- <ChipList> / <Chip> ---------------------------------------------- */
.ag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ag-space-2);
  padding-block-start: var(--ag-space-1);
}
.ag-chip {
  padding: var(--ag-space-1) var(--ag-space-3);
  border-radius: var(--ag-radius-pill);
  background: var(--ag-color-panel);
  font-size: var(--ag-text-2xs);
  font-weight: var(--ag-weight-medium);
  line-height: var(--ag-leading-normal);
  color: var(--ag-color-body);
}

/* --- <OutLink> --------------------------------------------------------- */
.ag-outlinks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ag-space-5);
}
.ag-outlink {
  display: inline-flex;
  align-items: center;
  gap: var(--ag-space-1);
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-semibold);
}

/* --- <BrowserFrame> — chrome that reads a dated screenshot as deliberate */
.ag-browser {
  overflow: hidden;
  border: var(--ag-hairline) solid var(--ag-color-rule);
  border-radius: var(--ag-radius-md);
  background: var(--ag-color-panel);
}
.ag-browser__bar {
  display: flex;
  align-items: center;
  gap: var(--ag-space-1);
  height: 1.375rem;
  padding-inline: var(--ag-space-3);
  border-block-end: var(--ag-hairline) solid var(--ag-color-rule);
}
.ag-browser__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--ag-color-faint);
}
.ag-browser__media,
.ag-browser__placeholder {
  width: 100%;
  height: 9.25rem; /* 148px */
}
.ag-browser__media {
  object-fit: cover;
}
.ag-browser__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ag-color-panel);
  font-size: var(--ag-text-2xs);
  letter-spacing: var(--ag-tracking-wide);
  text-transform: uppercase;
  /* --faint is calibrated against white; on the tinted panel it drops to
     4.31:1, so this one sits a step darker. */
  color: var(--ag-color-soft);
}

/* --- <ProjectRow> ------------------------------------------------------ */
.ag-project {
  align-items: start;
  border-block-start: var(--ag-hairline) solid var(--ag-color-rule);
  padding-block-start: var(--ag-space-8);
}
.ag-project__body {
  display: flex;
  flex-direction: column;
  gap: var(--ag-space-3);
}
.ag-project__heading {
  display: flex;
  align-items: baseline;
  gap: var(--ag-space-2);
}
.ag-project__title {
  font-weight: var(--ag-weight-bold);
  font-size: var(--ag-text-xl);
  line-height: var(--ag-leading-tight);
  letter-spacing: var(--ag-tracking-tight);
  color: var(--ag-color-ink);
  transition: color var(--ag-duration) var(--ag-ease);
}
.ag-project__arrow {
  flex-shrink: 0;
  color: var(--ag-color-accent-text);
  transition: transform var(--ag-duration) var(--ag-ease);
}
.ag-project__link:hover .ag-project__title {
  color: var(--ag-color-accent-text);
}
.ag-project__link:hover .ag-project__arrow {
  transform: translate(2px, -2px);
}
.ag-project__meta {
  font-size: var(--ag-text-2xs);
  font-weight: var(--ag-weight-semibold);
  letter-spacing: var(--ag-tracking-wide);
  text-transform: uppercase;
  color: var(--ag-color-faint);
}
.ag-project__summary {
  max-width: var(--ag-measure);
  font-size: var(--ag-text-md);
  line-height: var(--ag-leading-relaxed);
  color: var(--ag-color-body);
}

.ag-textlink {
  font-size: var(--ag-text-md);
  font-weight: var(--ag-weight-semibold);
}

/* --- <SiteFooter> ------------------------------------------------------ */
.ag-site-footer {
  border-block-start: var(--ag-hairline) solid var(--ag-color-rule);
}
.ag-site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ag-space-4);
  padding-block: var(--ag-space-8);
}
.ag-site-footer__name {
  font-size: var(--ag-text-md);
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-color-soft);
}
.ag-site-footer__links {
  display: flex;
  gap: var(--ag-space-6);
  font-size: var(--ag-text-sm);
  font-weight: var(--ag-weight-medium);
}

/* --- <ContactCard> — native <dialog> ---------------------------------- */
.ag-contact-card {
  width: min(24rem, calc(100vw - var(--ag-space-12)));
  padding: var(--ag-space-10);
  border: var(--ag-hairline) solid var(--ag-color-rule);
  border-radius: var(--ag-radius-md);
  background: var(--ag-color-surface);
  color: var(--ag-color-ink);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.16);
}
.ag-contact-card::backdrop {
  background: rgb(11 11 16 / 0.42);
  backdrop-filter: blur(var(--ag-blur-scrim));
}
.ag-contact-card__close {
  position: absolute;
  top: var(--ag-space-2);
  right: var(--ag-space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--ag-radius-pill);
  background: none;
  color: var(--ag-color-soft);
  font-family: inherit;
  font-size: var(--ag-text-lg);
  line-height: 1;
  cursor: pointer;
  transition: color var(--ag-duration) var(--ag-ease);
}
.ag-contact-card__close:hover {
  color: var(--ag-color-ink);
}
.ag-contact-card__name {
  font-family: var(--ag-font-display);
  font-weight: var(--ag-weight-regular);
  font-size: var(--ag-text-2xl);
  line-height: var(--ag-leading-tight);
  letter-spacing: var(--ag-tracking-tight);
}
.ag-contact-card__role {
  margin-block: var(--ag-space-1) var(--ag-space-6);
  font-size: var(--ag-text-xs);
  font-weight: var(--ag-weight-semibold);
  letter-spacing: var(--ag-tracking-wider);
  text-transform: uppercase;
  color: var(--ag-color-accent-text);
}
.ag-contact-card__list {
  display: flex;
  flex-direction: column;
  gap: var(--ag-space-3);
  padding-block-start: var(--ag-space-5);
  border-block-start: var(--ag-hairline) solid var(--ag-color-rule);
}
.ag-contact-card__row {
  display: flex;
  align-items: baseline;
  gap: var(--ag-space-4);
  font-size: var(--ag-text-md);
}
.ag-contact-card__label {
  flex: 0 0 4.5rem;
  font-size: var(--ag-text-2xs);
  letter-spacing: var(--ag-tracking-wide);
  text-transform: uppercase;
  color: var(--ag-color-faint);
}
/* "Copied" confirmation beside the email. Empty until a copy succeeds; it
   is a live region, so screen readers announce it too. */
.ag-contact-card__status {
  font-size: var(--ag-text-xs);
  font-weight: var(--ag-weight-semibold);
  color: var(--ag-color-accent-text);
}

/* -------------------------------------------------------------------------
   6. RESPONSIVE
   One breakpoint. Below it every rail/body grid becomes a single column
   and the ladder keeps working, because it is anchored to .ag-role__head.
   ---------------------------------------------------------------------- */

@media (max-width: 45em) {
  /* 720px */
  .ag-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--ag-space-4);
  }
  .ag-site-header__inner {
    padding-block: var(--ag-space-4);
  }
  .ag-nav {
    gap: var(--ag-space-6);
  }

  /* Inline links are only ~22px tall at text size. On touch that is below
     the 24px target-size minimum, so give them a full 44px hit area. */
  .ag-nav__link,
  .ag-site-footer__links a,
  .ag-textlink {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  .ag-hero {
    padding-block: var(--ag-space-12) var(--ag-space-10);
  }
  .ag-page-head {
    padding-block: var(--ag-space-12) var(--ag-space-8);
  }
  .ag-page-head__title {
    font-size: 1.6875rem;
  } /* 27px */
  .ag-section {
    padding-block-end: var(--ag-space-16);
  }
  .ag-section__heading {
    font-size: 1.6875rem;
  } /* 27px */
  .ag-org {
    padding-block-end: 0;
  }
  .ag-role__head {
    padding-block-end: var(--ag-space-2);
  }
  .ag-role:last-child .ag-role__head {
    padding-block-end: var(--ag-space-2);
  }
  .ag-role__body {
    padding-block-end: var(--ag-space-5);
  }
  .ag-site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
