/* Automations grid (2026-10-28, picked from scratchpad autos-pro/e-grid-cards, heading 2).
   Left column: the five jobs as selectors; right: one automation at a time inside a hairline grid.
   Everything is scoped under .acw.gx (cards themselves come from autocards.css). */
.acw.gx { --hair: #1e1e1e; --hair-2: #2a2a2a; --g1: #a3a3a0; --g2: #6d6d6a; --g3: #3d3d3b; max-width: 1320px; padding: 0 var(--gut); border-top: 0; }
.acw.gx .ag { display: grid; grid-template-columns: 240px minmax(0, 1fr); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.acw.gx .ag-side { padding: 54px 32px 32px 0; display: flex; flex-direction: column; border-right: 1px solid var(--hair); }
.acw.gx .ag-lbl { font-size: 12px; color: var(--g2); margin-bottom: 22px; }
.acw.gx .ag-nav button { position: relative; display: block; padding-left: 16px; font-size: 19px; letter-spacing: -.015em; line-height: 1.75; color: var(--g3); text-align: left; transition: color .4s; }
.acw.gx .ag-nav button::before { content: ''; position: absolute; left: 0; top: 50%; width: 2px; height: 0; background: var(--red); transition: height .4s var(--ease), margin .4s var(--ease); }
.acw.gx .ag-nav button:hover { color: var(--g1); }
.acw.gx .ag-nav button.on { color: var(--paper); } .acw.gx .ag-nav button.on::before { height: 18px; margin-top: -9px; }
.acw.gx .ag-nav button i { position: absolute; left: 16px; right: 0; bottom: 2px; height: 1px; background: var(--g3); transform: scaleX(0); transform-origin: left; opacity: 0; }
.acw.gx .ag-nav button.on i { opacity: 1; } .acw.gx.held .ag-nav button i { opacity: 0; }
.acw.gx .ag-foot { margin-top: auto; padding-top: 40px; }
.acw.gx .ag-foot p { color: var(--g2); font-size: 13.5px; margin-bottom: 16px; max-width: 24ch; }
.acw.gx .ag-blocks { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.acw.gx .ag-blk { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s; }
.acw.gx .ag-blk.on { opacity: 1; visibility: visible; transition: opacity .6s var(--ease) .1s, visibility 0s; }
.acw.gx .ag-top { padding: 54px 40px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; border-bottom: 1px solid var(--hair); }
.acw.gx .ag-n { font-size: 12px; color: var(--g2); }
.acw.gx .ag-top h3 { margin-top: 10px; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; letter-spacing: -.025em; font-weight: 400; }
.acw.gx .ag-top h3::first-letter { text-transform: uppercase; }
.acw.gx .ag-top p { color: var(--g1); max-width: 42ch; } .acw.gx .ag-top p small { display: block; margin-top: 6px; font-size: 13.5px; color: var(--g2); }
.acw.gx .deck { grid-template-columns: repeat(3, 1fr); gap: 0; }
.acw.gx .ag-cell { padding: 22px; } .acw.gx .ag-cell + .ag-cell { border-left: 1px solid var(--hair); }
.acw.gx .cd { height: clamp(440px, 62vh, 520px); }
@media (max-width: 960px) {
  .acw.gx .ag { grid-template-columns: minmax(0, 1fr); border-bottom: 0; }
  .acw.gx .ag-side { border-right: 0; padding: 24px 0 0; } .acw.gx .ag-lbl, .acw.gx .ag-foot { display: none; }
  .acw.gx .ag-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut); }
  .acw.gx .ag-nav::-webkit-scrollbar { display: none; }
  .acw.gx .ag-nav button { flex: none; overflow: hidden; white-space: nowrap; padding: 0 14px; line-height: 36px; font-size: 14px; border: 1px solid var(--hair-2); border-radius: 99px; }
  .acw.gx .ag-nav button::before { display: none; }
  .acw.gx .ag-nav button.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
  .acw.gx .ag-nav button i { left: 0; bottom: 0; height: 2px; background: var(--red); }
  .acw.gx .ag-top { grid-template-columns: minmax(0, 1fr); padding: 30px 0 22px; gap: 12px; }
  .acw.gx .deck { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 20px var(--gut); margin: 0 calc(var(--gut) * -1); scrollbar-width: none; }
  .acw.gx .deck::-webkit-scrollbar { display: none; }
  .acw.gx .ag-cell { flex: 0 0 min(82%, 360px); padding: 0; scroll-snap-align: center; } .acw.gx .ag-cell + .ag-cell { border-left: 0; }
  .acw.gx .cd { height: min(500px, 74svh); }
}

/* phones (≤760px, picked 2026-10-28 "B2"): stepper + one card at a time + dots + button; heading → button fits one screen.
   The card scales as a whole (zoom) so its content never clips; visual height = 100svh minus the rest of the section,
   the fixed header bar (56px) and a little air (394px in total). */
.acw.gx .ag-step, .acw.gx .ag-dots, .ag-cta, .ag-sheet, .ag-back { display: none; }
@media (max-width: 760px) {
  .autos { padding-top: 56px; padding-bottom: 40px; }
  .autos .stmt { margin-bottom: 24px; } .autos .stmt-rule { margin-bottom: 40px; }
    .acw.gx .ag { border-top: 0; }
  .acw.gx .ag-side, .acw.gx .ag-top, .acw.gx .ac-foot { display: none; }
  .acw.gx .ag-step { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); position: relative; }
  .acw.gx .ag-now b { display: block; font-size: 16.5px; font-weight: 400; letter-spacing: -.015em; white-space: nowrap; }
  /* Details sits right beside the job name */
  .acw.gx .ag-step { grid-template-columns: auto auto 1fr auto; }
  .acw.gx .ag-info { grid-column: 2; justify-self: start; margin-left: 4px; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 11px;
    border: 1px solid rgba(252,252,252,.42); background: rgba(252,252,252,.06); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .02em; color: var(--paper); white-space: nowrap; transition: background .3s, color .3s; }
  .acw.gx .ag-info i { position: relative; width: 9px; height: 9px; }
  .acw.gx .ag-info i::before, .acw.gx .ag-info i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .45s var(--ease); }
  .acw.gx .ag-info i::after { transform: rotate(90deg); }
  .acw.gx.open .ag-info { background: var(--paper); color: var(--ink); }
  .acw.gx.open .ag-info i::before { transform: rotate(45deg); } .acw.gx.open .ag-info i::after { transform: rotate(135deg); }
  /* ← 01/05 → in one box */
  .acw.gx .ag-arr { grid-column: 4; display: flex; align-items: center; border: 1px solid var(--hair-2); }
  .acw.gx .ag-arr button { width: 34px; height: 40px; display: grid; place-items: center; font-size: 15px; color: var(--paper); }
  .acw.gx .ag-arr button:active { color: var(--red); }
  .acw.gx .ag-count { min-width: 40px; text-align: center; font-size: 11px; color: var(--g1); font-variant-numeric: tabular-nums; }
  .acw.gx .ag-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--paper); transform-origin: left; transform: scaleX(0); }
  .acw.gx .deck { padding: 10px var(--gut) 0; gap: 10px; }
  .acw.gx .ag-cell { flex-basis: 100%; }
  /* switching to the next automation: a slower crossfade than desktop */
  .acw.gx .ag-blk { transition: opacity .9s var(--ease), visibility 0s .9s; }
  .acw.gx .ag-blk.on { transition: opacity 1.1s var(--ease) .2s, visibility 0s; }
  .acw.gx .cd { zoom: .85; height: clamp(420px, calc((100svh - 394px) / .85), 520px); }
  .acw.gx .ag-dots { display: flex; justify-content: center; gap: 6px; padding: 4px 0 0; }
  .acw.gx .ag-dots button { padding: 6px 0; background: linear-gradient(var(--hair-2), var(--hair-2)) center / 26px 2px no-repeat; }
  .acw.gx .ag-dots i { display: block; width: 26px; height: 2px; background: var(--paper); transform-origin: left; transform: scaleX(0); }
  .ag-cta { display: flex; justify-content: center; margin-top: 8px; }
}

/* Details bottom sheet (phones): frosted, slides up; lives on <body> */
@media (max-width: 760px) {
  .ag-back { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .5s; }
  .ag-back.open { opacity: 1; pointer-events: auto; }
  .ag-sheet { display: block; position: fixed; z-index: 96; left: 0; right: 0; bottom: 0; max-height: 86svh; overflow: auto; padding: 12px 20px calc(28px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0; border: 1px solid rgba(252,252,252,.14); border-bottom: 0; color: var(--paper);
    background: rgba(14,14,14,.62); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
    transform: translateY(105%); transition: transform .6s var(--ease); }
  .ag-sheet.open { transform: none; }
  .ag-grab { display: block; width: 36px; height: 4px; border-radius: 4px; background: rgba(252,252,252,.25); margin: 0 auto 14px; }
  .ag-x { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(252,252,252,.2); display: grid; place-items: center; font-size: 13px; color: rgba(252,252,252,.8); }
  .ag-sn { font-size: 11.5px; color: rgba(252,252,252,.6); }
  .ag-sheet h4 { margin-top: 6px; font-size: 24px; font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
  .ag-sheet p { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: rgba(252,252,252,.86); }
  .ag-sheet p small { display: block; margin-top: 8px; font-size: 13px; color: rgba(252,252,252,.6); }
  .ag-sheet ul { margin-top: 18px; border-top: 1px solid rgba(252,252,252,.14); list-style: none; }
  .ag-sheet li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid rgba(252,252,252,.1); font-size: 13.5px; line-height: 1.4; color: rgba(252,252,252,.7); }
  .ag-sheet li span { font-size: 11px; color: rgba(252,252,252,.5); padding-top: 2px; }
  .ag-sheet li b { display: block; font-weight: 500; color: var(--paper); }
  .ag-sheet .btn-line { margin-top: 20px; height: 40px; font-size: 12px; gap: 28px; }
}
