/* Inter, self-hosted (SIL Open Font License; the latin subset, variable weight) — no third-party font server. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/renderers/web/fonts/inter-latin.h3100E775.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/*
 * Agenteer web — default stylesheet: each Morph rendered like its iOS (17/18)
 * UIKit default, so a web-rendered Agenteer interface is indistinguishable from
 * the same interface built natively. System colours (light + dark), Dynamic Type
 * sizes (Large), inset-grouped lists, controls and bars follow Apple's defaults.
 * Paired with the iOS-shaped markup in render-node.mjs.
 */

:root {
  --ag-blue: #007aff;
  --ag-green: #34c759;
  --ag-red: #ff3b30;
  --ag-gray: #8e8e93;
  --ag-label: #000;
  --ag-secondaryLabel: rgba(60, 60, 67, .6);
  --ag-tertiaryLabel: rgba(60, 60, 67, .3);
  --ag-placeholder: rgba(60, 60, 67, .3);
  --ag-separator: rgba(60, 60, 67, .29);
  --ag-groupedBg: #f2f2f7;
  --ag-cellBg: #fff;
  --ag-fill: rgba(120, 120, 128, .2);
  --ag-tertiaryFill: rgba(118, 118, 128, .12);
  --ag-switchOff: #e9e9ea;
  --ag-segmentSelected: #fff;
  --ag-bar: rgba(249, 249, 249, .94);
  --ag-material: rgba(242, 242, 242, .8);
  --ag-menu: rgba(237, 237, 237, .8);
  --ag-margin: 20px;
  color-scheme: light dark;
}
@media (max-width: 400px) { :root { --ag-margin: 16px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --ag-blue: #0a84ff;
    --ag-green: #30d158;
    --ag-red: #ff453a;
    --ag-label: #fff;
    --ag-secondaryLabel: rgba(235, 235, 245, .6);
    --ag-tertiaryLabel: rgba(235, 235, 245, .3);
    --ag-placeholder: rgba(235, 235, 245, .3);
    --ag-separator: rgba(84, 84, 88, .65);
    --ag-groupedBg: #000;
    --ag-cellBg: #1c1c1e;
    --ag-fill: rgba(120, 120, 128, .36);
    --ag-tertiaryFill: rgba(118, 118, 128, .24);
    --ag-switchOff: #39393d;
    --ag-segmentSelected: #636366;
    --ag-bar: rgba(29, 29, 29, .94);
    --ag-material: rgba(44, 44, 46, .82);
    --ag-menu: rgba(37, 37, 37, .82);
  }
}

/* ---- page + screen (an iPhone-width view controller) ------------------------ */
html, body { margin: 0; background: var(--ag-groupedBg); }
body {
  color: var(--ag-label);
  font: 17px/22px -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  letter-spacing: -.41px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
button:focus, input:focus, select:focus, textarea:focus { outline: none; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--ag-blue); outline-offset: 2px; }
.ag-screen {
  max-width: 430px; margin: 0 auto; min-height: 100vh;
  background: var(--ag-groupedBg); position: relative; padding-bottom: 8px;
  container-type: inline-size; container-name: ag-screen; /* its width decides the size class (680px+ is regular) */
}
/* A wide window: no longer a phone-width column (the size class follows the screen's width). */
@media (min-width: 680px) { .ag-screen { max-width: 1024px; } }
/* Free-standing content on the screen gets the system layout margins. */
.ag-screen > :not(.ag-list):not(.ag-navigationBar):not(.ag-toolbar):not(.ag-tabBar):not(.ag-alertBackdrop):not(.ag-scrollView) {
  margin-left: var(--ag-margin); margin-right: var(--ag-margin);
}
.ag-screen > .ag-label, .ag-screen > .ag-stackView, .ag-screen > .ag-button { margin-top: 8px; margin-bottom: 8px; }

/* ---- UILabel: Dynamic Type text styles (Large) ------------------------------ */
.ag-label { margin: 0; }
.ag-largeTitle { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .37px; }
.ag-title1 { font-size: 28px; line-height: 34px; font-weight: 400; letter-spacing: .36px; }
.ag-title2 { font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: .35px; }
.ag-title3 { font-size: 20px; line-height: 25px; font-weight: 400; letter-spacing: .38px; }
.ag-headline { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.41px; }
.ag-body { font-size: 17px; line-height: 22px; letter-spacing: -.41px; }
.ag-callout { font-size: 16px; line-height: 21px; letter-spacing: -.32px; }
.ag-subheadline { font-size: 15px; line-height: 20px; letter-spacing: -.24px; }
.ag-footnote { font-size: 13px; line-height: 18px; letter-spacing: -.08px; }
.ag-caption1 { font-size: 12px; line-height: 16px; letter-spacing: 0; }
.ag-caption2 { font-size: 11px; line-height: 13px; letter-spacing: .07px; }

/* UILabel options: text alignment, symbolic traits, number of lines, line breaks, shrink to fit; attributed runs */
.ag-textAlignment-left { text-align: left; }
.ag-textAlignment-center { text-align: center; }
.ag-textAlignment-right { text-align: right; }
.ag-textAlignment-justified { text-align: justify; }
.ag-textAlignment-natural { text-align: start; }
.ag-traitBold { font-weight: 700; }
.ag-traitItalic { font-style: italic; }
.ag-traitMonoSpace { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.ag-linesClip { max-height: calc(var(--ag-lines) * 1lh); overflow: hidden; }
.ag-lines { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--ag-lines); line-clamp: var(--ag-lines); overflow: hidden; }
.ag-lineBreak-byClipping { text-overflow: clip; }
.ag-lineBreak-byCharWrapping { word-break: break-all; }
.ag-lineBreak-byTruncatingTail, .ag-lineBreak-byTruncatingHead, .ag-lineBreak-byTruncatingMiddle { text-overflow: ellipsis; }
.ag-fitWidth { white-space: nowrap; overflow: hidden; }
.ag-run { font: inherit; }
.ag-run.ag-largeTitle, .ag-run.ag-title1, .ag-run.ag-title2, .ag-run.ag-title3, .ag-run.ag-headline, .ag-run.ag-body,
.ag-run.ag-callout, .ag-run.ag-subheadline, .ag-run.ag-footnote, .ag-run.ag-caption1, .ag-run.ag-caption2 { line-height: inherit; }
em.ag-run { font-style: italic; }
strong.ag-run { font-weight: 700; }
code.ag-run { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9em; }
.ag-link { color: var(--ag-blue); text-decoration: none; }
.ag-link:hover { text-decoration: underline; }

/* ---- SF Symbol lookalikes --------------------------------------------------- */
.ag-symbol { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.ag-symbol svg { width: 1.15em; height: 1.15em; display: block; fill: currentColor; }
.ag-symbol.ag-unmapped { width: .9em; height: .9em; border: 1.5px solid currentColor; border-radius: 4px; opacity: .5; }
.ag-screen > .ag-symbol, .ag-row > .ag-symbol { color: var(--ag-blue); font-size: 22px; }
.ag-image { max-width: 100%; display: block; }

/* ---- UINavigationBar -------------------------------------------------------- */
.ag-navigationBar { position: sticky; top: 0; z-index: 3; background: var(--ag-groupedBg); }
.ag-navRow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 44px; padding: 0 8px; }
.ag-navigationBar:not(.ag-large) { background: var(--ag-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 .5px 0 var(--ag-separator); }
.ag-navTitle { font-weight: 600; text-align: center; white-space: nowrap; }
.ag-leading { justify-self: start; display: flex; } .ag-trailing { justify-self: end; display: flex; }
.ag-navSubtitle { margin: 0; padding: 0 var(--ag-margin) 8px; font-size: 15px; line-height: 20px; color: var(--ag-secondaryLabel); }
.ag-navLargeTitle { margin: 0; padding: 3px var(--ag-margin) 8px; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .37px; }
.ag-navigationBar.ag-large:not(:has(.ag-navRow)) { padding-top: 44px; }

/* ---- UIBarButtonItem / UIToolbar / UITabBar --------------------------------- */
.ag-barButtonItem { background: none; border: none; color: var(--ag-blue); padding: 0 8px; height: 44px; display: inline-flex; align-items: center; }
.ag-barButtonItem .ag-symbol { font-size: 20px; }
.ag-barButtonItem.ag-prominent { font-weight: 600; }
.ag-barButtonItem:active, .ag-button.ag-plain:active, .ag-tab:active { opacity: .3; }
.ag-toolbar {
  position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  height: 44px; padding: 0 8px; background: var(--ag-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -.5px 0 var(--ag-separator);
}
.ag-toolbar:has(+ .ag-tabBar) { bottom: 49px; }
.ag-tabBar {
  position: sticky; bottom: 0; z-index: 3; display: flex; height: 49px; padding-bottom: env(safe-area-inset-bottom);
  background: var(--ag-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -.5px 0 var(--ag-separator);
}
.ag-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: none; color: var(--ag-gray); padding: 0; }
.ag-tab[aria-selected="true"] { color: var(--ag-blue); }
.ag-tabIcon { position: relative; display: block; }
.ag-tabIcon .ag-symbol { font-size: 24px; }
.ag-tabLabel { font-size: 10px; line-height: 12px; font-weight: 500; letter-spacing: .1px; }
.ag-badge {
  background: var(--ag-red); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: 0; text-align: center; display: inline-block;
}
.ag-tabIcon .ag-badge { position: absolute; top: -3px; left: 15px; }

/* ---- Inset-grouped / grouped / plain lists (UICollectionView list, UITableView) ---- */
.ag-list { margin: 0 0 20px; }
.ag-screen > .ag-list:not(:has(> .ag-list-header)) { margin-top: 15px; }
.ag-list-header {
  margin: 0; padding: 16px calc(var(--ag-margin) + 16px) 6px; font-size: 13px; line-height: 18px; font-weight: 400;
  letter-spacing: -.08px; text-transform: uppercase; color: var(--ag-secondaryLabel);
}
.ag-list ul, ul.ag-list { list-style: none; margin: 0; padding: 0; background: var(--ag-cellBg); }
.ag-list-insetGrouped ul { margin: 0 var(--ag-margin); border-radius: 10px; overflow: hidden; }
.ag-list-insetGrouped .ag-list-header { padding-left: calc(var(--ag-margin) + 16px); }
/* In a stack on the screen, the stack already has the margins: an inset list doesn't add its own. */
.ag-screen > .ag-stackView .ag-list-insetGrouped ul { margin-left: 0; margin-right: 0; }
.ag-screen > .ag-stackView .ag-list-insetGrouped .ag-list-header { padding-left: 16px; }
.ag-list-grouped .ag-list-header { padding-left: var(--ag-margin); }
.ag-list-grouped ul { box-shadow: 0 -.5px 0 var(--ag-separator), 0 .5px 0 var(--ag-separator); }
.ag-row { position: relative; min-height: 44px; box-sizing: border-box; padding: 11px 16px; display: flex; align-items: center; }
.ag-list-grouped .ag-row { padding-left: var(--ag-margin); padding-right: var(--ag-margin); }
.ag-row + .ag-row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--ag-separator); }
.ag-list-grouped .ag-row + .ag-row::before { left: var(--ag-margin); }
.ag-row > * { flex: 1; min-width: 0; }
.ag-row > .ag-button, .ag-row > .ag-symbol, .ag-row > .ag-pasteControl, .ag-row > .ag-refreshControl,
.ag-row > .ag-activityIndicator, .ag-row > .ag-pullDownButton { flex: none; }
/* A list nested in a row (rare): drop its own card chrome. */
.ag-row .ag-list { margin: -11px -16px; background: none; }

/* List options: header styles (UIListContentConfiguration headers), separators, readable width, the sidebar */
.ag-headerStyle-prominentInsetGroupedHeader .ag-list-header { text-transform: none; font-size: 20px; line-height: 25px; font-weight: 600; color: var(--ag-label); letter-spacing: .38px; }
.ag-headerStyle-extraProminentInsetGroupedHeader .ag-list-header { text-transform: none; font-size: 28px; line-height: 34px; font-weight: 700; color: var(--ag-label); letter-spacing: .36px; }
.ag-headerStyle-sidebarHeader .ag-list-header { text-transform: none; font-size: 15px; font-weight: 600; color: var(--ag-secondaryLabel); }
.ag-headerStyle-plainHeader .ag-list-header { text-transform: none; font-size: 17px; font-weight: 600; color: var(--ag-label); }
.ag-noSeparators .ag-row + .ag-row::before { display: none; }
.ag-readableWidth > ul, .ag-readableWidth > .ag-list-header, .ag-readableWidth > .ag-list-footer { max-width: 672px; margin-left: auto; margin-right: auto; }
.ag-list-sidebar ul, .ag-list-sidebarPlain ul { background: none; margin: 0 var(--ag-margin); }
.ag-list-sidebar .ag-row + .ag-row::before, .ag-list-sidebarPlain .ag-row + .ag-row::before { display: none; }
.ag-list-sidebar .ag-cellRow { border-radius: 10px; min-height: 44px; }
.ag-list-sidebar .ag-cellRow.is-selected { background: var(--ag-blue); color: #fff; }
.ag-list-sidebar .ag-cellRow.is-selected .ag-cellSecondary, .ag-list-sidebar .ag-cellRow.is-selected .ag-symbol { color: #fff; }
/* Cells (UICollectionViewListCell): image, text and secondary text by configuration; accessories; selection */
.ag-cellRow { cursor: default; gap: 8px; }
.ag-cellRow[tabindex] { cursor: pointer; }
.ag-cellRow[tabindex]:active, .ag-cellRow.is-selected { background: var(--ag-fill); }
.ag-cellContent { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding-left: calc(var(--ag-indent, 0) * 20px); }
.ag-cellContent[role="button"] { cursor: pointer; }
.ag-cellImage { flex: none; color: var(--ag-blue); font-size: 22px; }
img.ag-cellImage { width: 29px; height: 29px; object-fit: cover; border-radius: 6px; }
.ag-cellTexts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-cellSecondary { color: var(--ag-secondaryLabel); font-size: 15px; line-height: 20px; }
.ag-config-valueCell .ag-cellTexts, .ag-config-accompaniedSidebarCell .ag-cellTexts { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
.ag-config-valueCell .ag-cellSecondary { font-size: 17px; text-align: right; }
.ag-config-sidebarCell .ag-cellText, .ag-config-sidebarSubtitleCell .ag-cellText { font-size: 17px; }
.ag-textTransform-uppercase { text-transform: uppercase; }
.ag-textTransform-lowercase { text-transform: lowercase; }
.ag-textTransform-capitalized { text-transform: capitalize; }
.ag-accessory { flex: none; display: inline-flex; align-items: center; color: var(--ag-secondaryLabel); }
.ag-accessoryLabel { font-size: 17px; }
.ag-checkmark { color: var(--ag-blue); }
.ag-detail { background: none; border: none; padding: 0; color: var(--ag-blue); font-size: 22px; }
.ag-disclosureIndicator, .ag-outlineDisclosure { color: var(--ag-gray3, #c4c4c7); font-size: 14px; }
.ag-outlineDisclosure { transition: transform .2s; color: var(--ag-blue); }
.ag-outlineDisclosure.is-open { transform: rotate(90deg); }
.ag-cellGroup { width: 100%; }
.ag-outlineChildren { list-style: none; margin: 8px 0 0; padding: 0; }
.ag-outlineChild { padding: 6px 0 0 20px; min-height: 0; }
.ag-cellActions { flex: none; }
/* Editing: delete / insert, reorder, multiselect */
.ag-editControl { flex: none; width: 24px; height: 24px; border-radius: 12px; border: none; color: #fff; background: var(--ag-gray); font-size: 18px; line-height: 24px; padding: 0; }
.ag-editControl.ag-delete { background: var(--ag-red); }
.ag-editControl.ag-insert { background: var(--ag-green, #34c759); }
.ag-reorder { flex: none; display: inline-flex; gap: 4px; }
.ag-reorder .ag-editControl { background: none; color: var(--ag-gray); font-size: 20px; }
.ag-multiselect { flex: none; width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid var(--ag-gray); box-sizing: border-box; }
.ag-multiselect.is-on { background: var(--ag-blue); border-color: var(--ag-blue); box-shadow: inset 0 0 0 3px var(--ag-cellBg); }
.ag-row > .ag-editControl, .ag-row > .ag-reorder, .ag-row > .ag-multiselect { flex: none; }

/* ---- form rows: caption left, control right ---------------------------------- */
.ag-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; }
.ag-caption { flex: none; white-space: nowrap; }
.ag-control { flex: 1; min-width: 0; display: flex; justify-content: flex-end; align-items: center; }
.ag-field:has(.ag-textView) { align-items: flex-start; }
.ag-field:has(.ag-picker) { flex-direction: column; align-items: stretch; gap: 4px; }

/* ---- UIButton (configurations) --------------------------------------------- */
.ag-button { border: none; border-radius: 8px; padding: 7px 14px; font-size: 17px; line-height: 22px; }
.ag-button.ag-filled { background: var(--ag-buttonTint, var(--ag-blue)); color: #fff; }
.ag-button.ag-filled:active { filter: brightness(.85); }
.ag-button.ag-tinted { background: color-mix(in srgb, var(--ag-buttonTint, var(--ag-blue)) 15%, transparent); color: var(--ag-buttonTint, var(--ag-blue)); }
.ag-button.ag-gray { background: var(--ag-tertiaryFill); color: var(--ag-buttonTint, var(--ag-blue)); }
.ag-button.ag-plain { background: none; color: var(--ag-buttonTint, var(--ag-blue)); padding: 0; }
.ag-row > .ag-button.ag-plain { flex: 1; text-align: left; }
/* The rest of UIButton.Configuration's styles (borderless = plain; bordered = gray; …) and iOS 26's glass */
.ag-button.ag-borderless { background: none; color: var(--ag-buttonTint, var(--ag-blue)); padding: 0; }
.ag-button.ag-bordered { background: var(--ag-tertiaryFill); color: var(--ag-buttonTint, var(--ag-blue)); }
.ag-button.ag-borderedTinted { background: color-mix(in srgb, var(--ag-buttonTint, var(--ag-blue)) 15%, transparent); color: var(--ag-buttonTint, var(--ag-blue)); }
.ag-button.ag-borderedProminent { background: var(--ag-buttonTint, var(--ag-blue)); color: #fff; }
.ag-button.ag-borderedProminent:active, .ag-button.ag-prominentGlass:active, .ag-button.ag-prominentClearGlass:active { filter: brightness(.85); }
.ag-button.ag-glass, .ag-button.ag-clearGlass {
  background: color-mix(in srgb, var(--ag-cellBg) 55%, transparent); color: var(--ag-blue);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: inset 0 0 0 .5px var(--ag-separator);
}
.ag-button.ag-clearGlass { background: color-mix(in srgb, var(--ag-cellBg) 20%, transparent); }
.ag-button.ag-prominentGlass, .ag-button.ag-prominentClearGlass {
  background: color-mix(in srgb, var(--ag-buttonTint, var(--ag-blue)) 85%, transparent); color: #fff;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
/* UIButton.Configuration.Size and cornerStyle */
.ag-size-mini { font-size: 12px; line-height: 16px; padding: 3px 8px; }
.ag-size-small { font-size: 15px; line-height: 20px; padding: 5px 10px; }
.ag-size-medium { font-size: 17px; line-height: 22px; padding: 7px 14px; }
.ag-size-large { font-size: 17px; line-height: 22px; padding: 14px 20px; }
.ag-corner-fixed { border-radius: 6px; }
.ag-corner-dynamic { border-radius: 8px; }
.ag-corner-small { border-radius: 4px; }
.ag-corner-medium { border-radius: 8px; }
.ag-corner-large { border-radius: 12px; }
.ag-corner-capsule { border-radius: 999px; }
/* UIButton.Role: destructive is red; primary is the main action */
.ag-role-destructive { --ag-buttonTint: var(--ag-red); }
.ag-role-primary { font-weight: 600; }
/* Image (or activity indicator) placement, title and subtitle, title alignment; a selected toggle; system types */
.ag-button[class*="ag-image-"] { display: inline-flex; align-items: center; gap: 6px; }
.ag-image-trailing { flex-direction: row-reverse; }
.ag-image-top { flex-direction: column; }
.ag-image-bottom { flex-direction: column-reverse; }
.ag-buttonImage { display: inline-flex; }
.ag-buttonTitles { display: inline-flex; flex-direction: column; }
.ag-buttonSubtitle { font-size: 13px; line-height: 18px; opacity: .85; }
.ag-titleAlignment-leading .ag-buttonTitles { align-items: flex-start; text-align: left; }
.ag-titleAlignment-center .ag-buttonTitles { align-items: center; text-align: center; }
.ag-titleAlignment-trailing .ag-buttonTitles { align-items: flex-end; text-align: right; }
.ag-button.is-selected:not(.ag-filled):not(.ag-borderedProminent) { background: color-mix(in srgb, var(--ag-buttonTint, var(--ag-blue)) 20%, transparent); }
.ag-button.ag-filled[aria-pressed="false"], .ag-button.ag-borderedProminent[aria-pressed="false"] { background: var(--ag-tertiaryFill); color: var(--ag-buttonTint, var(--ag-blue)); }
[class*="ag-buttonType-"] { background: none; border: none; padding: 0; color: var(--ag-blue); font-size: 22px; }
.ag-buttonType-close { color: var(--ag-gray); }

/* ---- UITextField / UITextView ------------------------------------------------ */
.ag-textField, .ag-textView { border: none; background: none; padding: 0; width: 100%; color: var(--ag-label); }
.ag-textField::placeholder, .ag-textView::placeholder { color: var(--ag-placeholder); opacity: 1; }
.ag-field .ag-textField { text-align: right; }
.ag-textView { resize: none; min-height: 66px; }
.ag-screen > .ag-textField, .ag-stackView > .ag-textField {   /* UITextField .roundedRect outside lists */
  height: 34px; box-sizing: border-box; padding: 0 7px; border-radius: 5px; background: var(--ag-cellBg);
  border: 1px solid rgba(60, 60, 67, .18); width: auto;
}

/* ---- UISwitch --------------------------------------------------------------- */
.ag-switch {
  position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; border: none; padding: 0;
  background: var(--ag-switchOff); transition: background .25s;
}
.ag-switch[aria-checked="true"] { background: var(--ag-green); }
.ag-knob {
  position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform .25s;
}
.ag-switch[aria-checked="true"] .ag-knob { transform: translateX(20px); }
.ag-switch:disabled { opacity: .45; cursor: default; }

/* ---- UISlider --------------------------------------------------------------- */
.ag-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: none; }
.ag-control:has(.ag-slider) { flex: 1; }
.ag-slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--ag-blue) var(--ag-value), var(--ag-fill) var(--ag-value));
}
.ag-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%; background: #fff;
  box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12);
}
.ag-slider::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(120, 120, 128, .2); }
.ag-slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ag-blue); }
.ag-slider::-moz-range-thumb { width: 28px; height: 28px; border: none; border-radius: 50%; background: #fff; box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12); }

/* ---- UIStepper -------------------------------------------------------------- */
.ag-stepperWrap { display: inline-flex; align-items: center; gap: 12px; }
.ag-stepperValue { color: var(--ag-secondaryLabel); font-variant-numeric: tabular-nums; }
.ag-stepper { display: inline-flex; align-items: center; width: 94px; height: 32px; border-radius: 8px; background: var(--ag-tertiaryFill); }
.ag-stepper button { flex: 1; height: 100%; border: none; background: none; font-size: 24px; line-height: 1; font-weight: 300; color: var(--ag-label); }
.ag-stepper button:disabled { color: var(--ag-tertiaryLabel); cursor: default; }
.ag-stepper button:active:not(:disabled) { background: var(--ag-fill); border-radius: 8px; }
.ag-stepperSep { width: 1px; height: 18px; background: var(--ag-separator); }

/* ---- UISegmentedControl ----------------------------------------------------- */
/* Equal segments, each as wide as the widest label needs (grid columns: n × the widest), shrinking only when the
   row is narrower than that. */
.ag-segmentedControl { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 32px; box-sizing: border-box; padding: 2px; border-radius: 9px; background: var(--ag-tertiaryFill); }
.ag-row > .ag-segmentedControl { flex: 1; max-width: 260px; }
/* Labelled: beside its caption when both fit on the line, below it (the full width) when they don't. On a shared line
   the caption takes the free space, so the control stays compact; on a line of its own the control takes it all. */
.ag-field:has(.ag-segmentedControl) { flex-wrap: wrap; row-gap: 8px; }
.ag-field:has(.ag-segmentedControl) > .ag-caption { flex: 1000 0 auto; }
.ag-control:has(.ag-segmentedControl) { flex: 1 0 auto; max-width: 100%; }
.ag-control:has(.ag-segmentedControl) .ag-segmentedControl { flex: 1; min-width: 0; }
.ag-segmentedControl button {
  position: relative; flex: 1; min-width: 56px; border: none; background: none; border-radius: 7px; padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* one line, equal segments (HIG); … when too long */
  font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: -.08px; color: var(--ag-label);
}
.ag-segmentedControl button[aria-checked="true"] {
  background: var(--ag-segmentSelected); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04);
}
.ag-segmentedControl button + button:not([aria-checked="true"])::before {
  content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 1px; background: rgba(142, 142, 147, .3);
}
.ag-segmentedControl button[aria-checked="true"] + button::before { display: none; }

/* ---- pop-up / pull-down buttons and their iOS menu ---------------------- */
.ag-popUp, .ag-pullDownButton { display: inline-flex; }
.ag-popUpButton, .ag-pullDownTitle {
  display: inline-flex; align-items: center; gap: 4px; border: none; background: none; padding: 0;
  color: var(--ag-blue); font: inherit; letter-spacing: inherit;
}
.ag-field .ag-popUpButton { color: var(--ag-secondaryLabel); }
.ag-popUpButton[aria-expanded="true"], .ag-pullDownTitle[aria-expanded="true"] { opacity: .5; }
.ag-popUpChevron { font-size: 12px; }
.ag-pullDownChevron { font-size: 13px; }
.ag-menu {
  position: fixed; z-index: 30; min-width: 250px; max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 13px;
  background: var(--ag-menu); -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 10px 40px rgba(0, 0, 0, .2);
  transform-origin: var(--ag-origin, top right); animation: ag-menu-in .28s cubic-bezier(.2, .9, .3, 1.15);
}
@keyframes ag-menu-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
.ag-menu button {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 16px; box-sizing: border-box;
  border: none; background: none; text-align: left; color: var(--ag-label); font-size: 17px; line-height: 22px;
}
.ag-menu button + button { border-top: .5px solid var(--ag-separator); }
.ag-menu button:focus { outline: none; }
.ag-menu button:active, .ag-menu.is-keyboard button:focus { background: var(--ag-fill); }
.ag-menuCheck { flex: none; display: inline-flex; width: 18px; margin-right: 10px; font-size: 15px; color: var(--ag-label); }
.ag-menuCheck svg { width: 1em; height: 1em; }
.ag-menuCheck .ag-symbol svg { stroke-width: 2px; }
.ag-menuText { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- UIPickerView (wheel) --------------------------------------------------- */
.ag-picker { position: relative; display: flex; height: 160px; width: 100%; overflow: hidden; }
.ag-pickerBand { position: absolute; left: 8px; right: 8px; top: 64px; height: 32px; border-radius: 8px; background: var(--ag-tertiaryFill); }
.ag-pickerColumn { position: relative; flex: 1; height: 160px; overflow: hidden; cursor: ns-resize; }
.ag-pickerRow {
  height: 32px; line-height: 32px; text-align: center; font-size: 21px; letter-spacing: .35px;
  transform: translateY(calc((2 - var(--ag-index)) * 32px)) scale(calc(1 - var(--ag-d) * .06));
  opacity: calc(1 - var(--ag-d) * .32); cursor: pointer; transition: transform .2s, opacity .2s;
}

/* ---- UIDatePicker (compact) + UIColorWell ----------------------------------- */
.ag-datePicker { position: relative; display: inline-flex; gap: 6px; }
.ag-datePill { background: var(--ag-tertiaryFill); border-radius: 6px; padding: 6px 11px; line-height: 22px; color: var(--ag-label); }
.ag-datePicker:focus-within .ag-datePill { color: var(--ag-blue); }
.ag-nativeOverlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.ag-colorWell {
  position: relative; display: inline-block; width: 28px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(circle, var(--ag-color) 0 9px, var(--ag-cellBg) 9.5px 11px, transparent 11.5px),
    conic-gradient(#ff3b30, #ffcc00, #34c759, #5ac8fa, #007aff, #af52de, #ff2d55, #ff3b30);
}

/* ---- UIPageControl ---------------------------------------------------------- */
.ag-pageControl { display: inline-flex; gap: 9px; align-items: center; padding: 8px 0; }
.ag-dot { width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%; background: var(--ag-tertiaryLabel); }
.ag-dot[aria-current="page"] { background: var(--ag-label); }

/* ---- UIPasteControl / UIRefreshControl -------------------------------------- */
.ag-pasteControl {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: none; border-radius: 17px;
  background: var(--ag-blue); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -.24px;
}
.ag-refreshControl { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 0; color: var(--ag-blue); }
.ag-refreshControl.ag-refreshing { color: var(--ag-secondaryLabel); }

/* ---- UIProgressView / UIActivityIndicatorView ------------------------------- */
.ag-progressView { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border: none; border-radius: 2px; background: var(--ag-fill); overflow: hidden; }
.ag-progressView::-webkit-progress-bar { background: var(--ag-fill); border-radius: 2px; }
.ag-progressView::-webkit-progress-value { background: var(--ag-blue); border-radius: 2px; }
.ag-progressView::-moz-progress-bar { background: var(--ag-blue); border-radius: 2px; }
.ag-activityIndicator { position: relative; display: inline-block; width: 20px; height: 20px; flex: none; }
.ag-activityIndicator i {
  position: absolute; left: 9px; top: 1px; width: 2px; height: 5.5px; border-radius: 1px; background: var(--ag-gray);
  transform-origin: 1px 9px; transform: rotate(calc(var(--ag-i) * 45deg));
  animation: ag-spoke .8s linear infinite; animation-delay: calc(var(--ag-i) * .1s - .8s);
}
.ag-activityIndicator.ag-small { transform: scale(.8); }
@keyframes ag-spoke { from { opacity: 1; } to { opacity: .25; } }

/* ---- UISearchBar / UISearchTextField ---------------------------------------- */
.ag-searchBar { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.ag-searchField, .ag-searchTextField {
  flex: 1; display: flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box; padding: 0 8px;
  border-radius: 10px; background: var(--ag-tertiaryFill);
}
.ag-searchIcon { color: var(--ag-secondaryLabel); font-size: 15px; }
.ag-searchField input, .ag-searchTextField input { flex: 1; min-width: 0; border: none; background: none; padding: 0; -webkit-appearance: none; appearance: none; }
.ag-searchField input::placeholder, .ag-searchTextField input::placeholder { color: var(--ag-secondaryLabel); opacity: 1; }
.ag-searchBar input::-webkit-search-cancel-button, .ag-searchTextField input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ag-searchCancel { display: none; border: none; background: none; padding: 0; color: var(--ag-blue); }
.ag-searchBar:focus-within .ag-searchCancel { display: block; }
.ag-token {
  display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; font-size: 15px; line-height: 20px;
  background: color-mix(in srgb, var(--ag-blue) 16%, transparent); color: var(--ag-blue); white-space: nowrap;
}
.ag-token button { border: none; background: none; padding: 0; color: inherit; font-size: 14px; opacity: .6; }

/* ---- UIScrollView / UICollectionView ---------------------------------------- */
.ag-scrollView { scrollbar-width: none; }
.ag-scrollView::-webkit-scrollbar { display: none; }
.ag-scrollView.ag-vertical { max-height: 60vh; overflow-y: auto; }
.ag-scrollView.ag-horizontal { display: flex; overflow-x: auto; }
.ag-scrollView.ag-horizontal > * { flex: none; min-width: 100%; }
.ag-scrollView.ag-paging { scroll-snap-type: x mandatory; } .ag-scrollView.ag-paging > * { scroll-snap-align: start; }
.ag-collectionView { display: grid; gap: 10px; grid-template-columns: repeat(var(--ag-columns, 2), 1fr); }
/* Compositional layout options: item widths (fractions), item height, columns at regular width, orthogonal
   scrolling (a shelf), content insets; a layout grid (allowsSelection: false) draws no cell chrome */
.ag-itemWidths { grid-template-columns: var(--ag-template); }
.ag-itemHeight-estimated { align-items: start; }
.ag-itemHeight-uniformAcrossSiblings { align-items: stretch; }
@container ag-screen (min-width: 680px) {
  .ag-collectionView.ag-regularColumns:not(.ag-itemWidths) { grid-template-columns: repeat(var(--ag-regular-columns), 1fr); }
}
.ag-orthogonal { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--ag-columns, 2) - 1) * 10px) / var(--ag-columns, 2)); overflow-x: auto; overscroll-behavior-x: contain; }
.ag-scroll-paging, .ag-scroll-groupPaging { scroll-snap-type: x mandatory; }
.ag-scroll-groupPagingCentered { scroll-snap-type: x mandatory; }
.ag-scroll-continuousGroupLeadingBoundary { scroll-snap-type: x proximity; }
.ag-scroll-paging > *, .ag-scroll-groupPaging > *, .ag-scroll-continuousGroupLeadingBoundary > * { scroll-snap-align: start; }
.ag-scroll-groupPagingCentered > * { scroll-snap-align: center; }
.ag-insets-readableContent { max-width: 672px; margin-left: auto; margin-right: auto; }
.ag-insets-none { margin-left: 0; margin-right: 0; }
.ag-insets-safeArea { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.ag-layoutOnly > .ag-cell { background: none; padding: 0; border-radius: 0; cursor: auto; }
.ag-layoutOnly > .ag-cell:active { background: none; }
.ag-collection { margin: 0 0 20px; }
.ag-collection > .ag-list-header { padding-left: 16px; } /* level with its cards' text */
.ag-cell { padding: 12px; border-radius: 10px; background: var(--ag-tertiaryFill); cursor: pointer; }
.ag-cell:active { background: var(--ag-fill); }
/* The selected cell (iOS selection): a blue ring and a checkmark badge in its corner. */
.ag-cell { position: relative; }
.ag-cell.is-selected { box-shadow: inset 0 0 0 3px var(--ag-blue); }
.ag-cellCheck { position: absolute; top: 6px; right: 6px; display: flex; border-radius: 50%; background: #fff; color: var(--ag-blue); font-size: 24px; line-height: 0; }
/* Pictures in a grid: uniform square thumbnails, cropped to fill (as Photos), so the cells line up. */
.ag-cell .ag-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }

/* ---- UICalendarView --------------------------------------------------------- */
.ag-calendarView { width: 100%; }
.ag-calHeader { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 12px; }
.ag-calTitle { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ag-calTitle .ag-symbol { color: var(--ag-blue); font-size: 14px; }
.ag-calNav { display: flex; gap: 20px; }
.ag-calNav button { border: none; background: none; padding: 0; color: var(--ag-blue); font-size: 20px; }
.ag-calWeekdays, .ag-calGrid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.ag-calWeekdays span { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ag-tertiaryLabel); padding-bottom: 6px; }
.ag-calDay {
  justify-self: center; width: 40px; height: 40px; margin: 2px 0; border: none; border-radius: 50%; background: none;
  font-size: 20px; letter-spacing: .38px; color: var(--ag-label); font-variant-numeric: tabular-nums;
}
.ag-calDay[aria-selected="true"] { background: color-mix(in srgb, var(--ag-blue) 15%, transparent); color: var(--ag-blue); font-weight: 600; }
.ag-calDay:disabled { color: var(--ag-tertiaryLabel); cursor: default; }

/* ---- UIContentUnavailableView ----------------------------------------------- */
.ag-contentUnavailableView { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 16px; color: var(--ag-secondaryLabel); }
.ag-contentUnavailableView .ag-hero { font-size: 48px; color: var(--ag-secondaryLabel); margin-bottom: 8px; }
.ag-contentUnavailableView h2 { margin: 0 0 4px; color: var(--ag-label); font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: .35px; }
.ag-contentUnavailableView p { margin: 0 0 12px; font-size: 15px; line-height: 20px; letter-spacing: -.24px; }

/* ---- UIAlertController (alert / action sheet) ------------------------------- */
.ag-alertBackdrop { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .2); }
.ag-alert {
  width: 270px; border-radius: 14px; overflow: hidden; text-align: center; background: var(--ag-material);
  -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px);
}
.ag-alertText { padding: 19px 16px 18px; }
.ag-alert h2 { margin: 0; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.41px; }
.ag-alert p { margin: 2px 0 0; font-size: 13px; line-height: 16px; letter-spacing: -.08px; }
.ag-actions { display: flex; flex-direction: column; }
.ag-actions.ag-pair { flex-direction: row; }
.ag-action { height: 44px; border: none; background: none; border-top: .5px solid var(--ag-separator); color: var(--ag-blue); font-size: 17px; }
.ag-actions.ag-pair .ag-action { flex: 1; }
.ag-actions.ag-pair .ag-action + .ag-action { border-left: .5px solid var(--ag-separator); }
.ag-action:active { background: var(--ag-fill); }
.ag-action.ag-cancel { font-weight: 600; }
.ag-action.ag-destructive { color: var(--ag-red); }
.ag-alertStyle-actionSheet { align-items: flex-end; }
.ag-alertStyle-actionSheet .ag-alert { width: calc(100% - 16px); max-width: 414px; margin: 8px; border-radius: 13px; overflow: visible; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ag-alertStyle-actionSheet .ag-alertText, .ag-alertStyle-actionSheet .ag-action { background: var(--ag-material); -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px); }
.ag-alertStyle-actionSheet .ag-alertText { border-radius: 13px 13px 0 0; padding: 14px 16px; color: var(--ag-secondaryLabel); }
.ag-alertStyle-actionSheet .ag-alert h2, .ag-alertStyle-actionSheet .ag-alert p { font-size: 13px; }
.ag-alertStyle-actionSheet .ag-action { height: 57px; font-size: 20px; }
.ag-alertStyle-actionSheet .ag-action:not(.ag-cancel):last-of-type, .ag-alertStyle-actionSheet .ag-action:nth-last-child(2):has(+ .ag-cancel) { border-radius: 0 0 13px 13px; }
.ag-alertStyle-actionSheet .ag-action.ag-cancel { order: 99; margin-top: 8px; border-radius: 13px; border-top: none; background: var(--ag-cellBg); }

/* ---- UIVisualEffectView, large content viewer, event attribution ------------ */
.ag-visualEffectView { border-radius: 10px; padding: 8px 10px; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); background: rgba(255, 255, 255, .7); }
.ag-visualEffectView.ag-systemThinMaterial { background: rgba(255, 255, 255, .5); }
.ag-visualEffectView.ag-systemThickMaterial { background: rgba(255, 255, 255, .85); }
@media (prefers-color-scheme: dark) {
  .ag-visualEffectView { background: rgba(37, 37, 37, .7); }
  .ag-visualEffectView.ag-systemThinMaterial { background: rgba(37, 37, 37, .5); }
  .ag-visualEffectView.ag-systemThickMaterial { background: rgba(37, 37, 37, .85); }
}
/* UIImageView.ContentMode: the image fills its container, fitted as asked */
[class*="ag-contentMode-"] { width: 100%; height: 100%; }
.ag-contentMode-scaleToFill { object-fit: fill; }
.ag-contentMode-scaleAspectFit { object-fit: contain; }
.ag-contentMode-scaleAspectFill { object-fit: cover; }
.ag-contentMode-center { object-fit: none; object-position: center; }
.ag-contentMode-top { object-fit: none; object-position: center top; }
.ag-contentMode-bottom { object-fit: none; object-position: center bottom; }
.ag-contentMode-left { object-fit: none; object-position: left center; }
.ag-contentMode-right { object-fit: none; object-position: right center; }
.ag-contentMode-topLeft { object-fit: none; object-position: left top; }
.ag-contentMode-topRight { object-fit: none; object-position: right top; }
.ag-contentMode-bottomLeft { object-fit: none; object-position: left bottom; }
.ag-contentMode-bottomRight { object-fit: none; object-position: right bottom; }
/* UIImage.SymbolConfiguration: a symbol sized by a text style, then scaled (weight and multicolour need SF Symbols) */
.ag-symbol.ag-symbolTextStyle-largeTitle { font-size: 34px; }
.ag-symbol.ag-symbolTextStyle-title1 { font-size: 28px; }
.ag-symbol.ag-symbolTextStyle-title2 { font-size: 22px; }
.ag-symbol.ag-symbolTextStyle-title3 { font-size: 20px; }
.ag-symbol.ag-symbolTextStyle-headline, .ag-symbol.ag-symbolTextStyle-body { font-size: 17px; }
.ag-symbol.ag-symbolTextStyle-callout { font-size: 16px; }
.ag-symbol.ag-symbolTextStyle-subheadline { font-size: 15px; }
.ag-symbol.ag-symbolTextStyle-footnote { font-size: 13px; }
.ag-symbol.ag-symbolTextStyle-caption1 { font-size: 12px; }
.ag-symbol.ag-symbolTextStyle-caption2 { font-size: 11px; }
.ag-symbolScale-small svg { width: .9em; height: .9em; font-size: inherit; }
.ag-symbolScale-medium svg { width: 1.15em; height: 1.15em; font-size: inherit; }
.ag-symbolScale-large svg { width: 1.45em; height: 1.45em; font-size: inherit; }
/* Symbol effects (the Symbols framework), repeating — none when the person prefers reduced motion */
.ag-effect-bounce { animation: ag-bounce 1.2s ease-in-out infinite; }
.ag-effect-pulse { animation: ag-pulse 1.6s ease-in-out infinite; }
.ag-effect-variableColor { animation: ag-pulse 1s steps(3) infinite; }
.ag-effect-scale { animation: ag-scale 1.6s ease-in-out infinite; }
.ag-effect-breathe { animation: ag-breathe 2.4s ease-in-out infinite; }
.ag-effect-rotate { animation: ag-rotate 1.6s linear infinite; }
.ag-effect-wiggle { animation: ag-wiggle 1.2s ease-in-out infinite; }
@keyframes ag-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-20%); } }
@keyframes ag-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ag-scale { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes ag-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: .6; } }
@keyframes ag-rotate { to { transform: rotate(360deg); } }
@keyframes ag-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { [class*="ag-effect-"] { animation: none; } }
.ag-largeContentViewer { display: contents; }
.ag-eventAttributionView { color: inherit; text-decoration: none; display: block; }

/* ---- stack views ------------------------------------------------------------ */
.ag-stackView { display: flex; gap: 8px; }
.ag-stackView.ag-vertical { flex-direction: column; align-items: stretch; }
.ag-stackView.ag-horizontal { flex-direction: row; align-items: center; }
.ag-screen > .ag-stackView:empty { display: none; }
/* UIStackView.Alignment (across the axis); unset keeps the defaults above */
.ag-stackView.ag-align-fill { align-items: stretch; }
.ag-stackView.ag-align-leading, .ag-stackView.ag-align-top { align-items: flex-start; }
.ag-stackView.ag-align-center { align-items: center; }
.ag-stackView.ag-align-trailing, .ag-stackView.ag-align-bottom { align-items: flex-end; }
.ag-stackView.ag-align-firstBaseline { align-items: baseline; }
.ag-stackView.ag-align-lastBaseline { align-items: last baseline; }
/* UIStackView.Distribution (along the axis) */
.ag-stackView.ag-distribution-fill > * { flex: 0 1 auto; }
.ag-stackView.ag-distribution-fill > :last-child { flex-grow: 1; }
.ag-stackView.ag-distribution-fillEqually > * { flex: 1 1 0; min-width: 0; }
.ag-stackView.ag-distribution-fillProportionally > * { flex: 1 1 auto; }
.ag-stackView.ag-distribution-equalSpacing { justify-content: space-between; }
.ag-stackView.ag-distribution-equalCentering { justify-content: space-around; }
/* spacing: UIKit's constants (the system's standard spacing) or none; layout margins */
.ag-stackView.ag-spacing-spacingUseDefault, .ag-stackView.ag-spacing-spacingUseSystem { gap: 8px; }
.ag-stackView.ag-spacing-0 { gap: 0; }
.ag-stackView.ag-margins { padding: 8px; }
/* The axis at regular width (horizontalSizeClass .regular: the screen is 680px or wider) */
@container ag-screen (min-width: 680px) {
  .ag-stackView.ag-regular-horizontal { flex-direction: row; align-items: center; }
  .ag-stackView.ag-regular-vertical { flex-direction: column; align-items: stretch; }
}

/* the demo page's reply log (was an inline style — the CSP allows no inline styles) */
.ag-log { max-width: 430px; margin: 0 auto; padding: 0 20px; color: var(--ag-blue); white-space: pre-wrap; }

/* the published landing page */
.ag-landing-note { margin: 0 20px 16px; color: var(--ag-secondaryLabel); }
.ag-landing-link { color: var(--ag-blue); text-decoration: none; }

/* PhotoPickerMorph / DocumentPickerMorph: the label, a tinted Choose… button (the system
   picker opens from it; the file input itself is hidden), then what was chosen. */
.ag-filePicker { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
.ag-filePicker-label { font-size: 17px; }
.ag-filePicker-input { display: none; }
.ag-filePicker-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.ag-filePicker-files li { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ag-secondaryLabel); min-width: 0; }
.ag-filePicker-files li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-filePicker-files .ag-symbol { width: 20px; height: 20px; color: var(--ag-tint); flex: none; }
.ag-filePicker-error { margin: 0; font-size: 13px; color: var(--ag-red); }

/* ---- Validation (docs/contracts/ui-model.md#validation) ---------------------- */
/* HIG: a short message directly under the field, once it's been changed; the primary action disabled until valid. */
.ag-validated { display: block; }
.ag-fieldError { margin: 6px 0 0; font-size: 13px; line-height: 1.35; color: var(--ag-red); }
.ag-row > .ag-validated > .ag-fieldError { margin: 0 0 8px; }
.ag-disabled { opacity: .4; }
.ag-button:disabled { opacity: .35; cursor: default; }
.ag-list-footer { margin: 6px 16px 0; font-size: 13px; line-height: 1.35; color: var(--ag-secondaryLabel); }

/* UITextView read-only: text (rich runs, links); not selectable; a rounded border */
.ag-textView.ag-readOnly { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 0; }
.ag-unselectable { user-select: none; -webkit-user-select: none; }
.ag-borderStyle-roundedRect { border: 1px solid var(--ag-separator); border-radius: 8px; padding: 6px 8px; }

/* UITextField: its box (border styles), a clear button, leading / trailing symbols */
.ag-textFieldBox { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; color: var(--ag-secondaryLabel); }
.ag-textFieldBox .ag-textField { flex: 1; min-width: 0; color: var(--ag-label); }
.ag-textFieldBox.ag-borderStyle-none { border: none; }
.ag-textFieldBox.ag-borderStyle-line { border: 1px solid var(--ag-label); padding: 4px 6px; }
.ag-textFieldBox.ag-borderStyle-bezel { border: 1px solid var(--ag-separator); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15); padding: 4px 6px; }
.ag-textFieldBox.ag-borderStyle-roundedRect { border: .5px solid var(--ag-separator); border-radius: 6px; padding: 5px 7px; background: var(--ag-cellBg); }
.ag-clearButton { flex: none; border: none; background: var(--ag-tertiaryFill, rgba(118, 118, 128, .24)); color: var(--ag-secondaryLabel); width: 18px; height: 18px; border-radius: 9px; padding: 0; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

/* Menus (UIMenu): section headers and separators, item subtitles and symbols, destructive and disabled items, submenus */
.ag-menuHeader { padding: 8px 16px 4px; font-size: 13px; line-height: 18px; color: var(--ag-secondaryLabel); padding-left: calc(16px + var(--ag-depth, 0) * 14px); }
.ag-menuSubmenu { color: var(--ag-label); font-weight: 600; font-size: 15px; }
.ag-menuSeparator { height: 8px; background: var(--ag-separator); opacity: .35; }
.ag-menuItem { padding-left: calc(16px + var(--ag-depth, 0) * 14px); }
.ag-menuItem.ag-destructive { color: var(--ag-red); }
.ag-menuItem[aria-disabled="true"] { opacity: .35; cursor: default; }
.ag-menuTexts { display: flex; flex-direction: column; flex: 1; min-width: 0; text-align: left; }
.ag-menuSubtitle { font-size: 13px; line-height: 18px; color: var(--ag-secondaryLabel); }
.ag-menuSymbol { margin-left: auto; font-size: 17px; }
/* Bar button items: flexible / fixed spaces, badges, a selected toggle */
.ag-barSpace.ag-flexibleSpace { flex: 1; }
.ag-barSpace.ag-fixedSpace { width: 8px; flex: none; }
.ag-barButtonItem { position: relative; }
.ag-barButtonItem .ag-badge { position: absolute; top: -4px; right: -8px; }
.ag-badge.ag-badgeIndicator { min-width: 10px; width: 10px; height: 10px; padding: 0; border-radius: 5px; }
.ag-barButtonItem.is-selected { color: var(--ag-blue); background: color-mix(in srgb, var(--ag-blue) 15%, transparent); border-radius: 8px; }
.ag-pullDownTitle.ag-plain, .ag-popUpButton.ag-plain { background: none; }
.ag-pullDownTitle.ag-gray, .ag-popUpButton.ag-gray, .ag-pullDownTitle.ag-bordered, .ag-popUpButton.ag-bordered { background: var(--ag-tertiaryFill); border-radius: 8px; padding: 4px 10px; }
.ag-pullDownTitle.ag-tinted, .ag-popUpButton.ag-tinted { background: color-mix(in srgb, var(--ag-blue) 15%, transparent); border-radius: 8px; padding: 4px 10px; color: var(--ag-blue); }
.ag-pullDownTitle.ag-filled, .ag-popUpButton.ag-filled { background: var(--ag-blue); color: #fff; border-radius: 8px; padding: 4px 10px; }

/* Navigation bar options: prompt, subtitle, styles (browser / editor: the title leads), center items, title menu */
.ag-navPrompt { margin: 0; padding: 6px var(--ag-margin) 0; text-align: center; font-size: 13px; color: var(--ag-secondaryLabel); }
.ag-navigationBar .ag-center { display: flex; gap: 16px; align-items: center; }
.ag-navStyle-browser .ag-navRow, .ag-navStyle-editor .ag-navRow { justify-content: flex-start; }
.ag-navStyle-browser .ag-navTitle, .ag-navStyle-editor .ag-navTitle { position: static; transform: none; margin-right: auto; font-weight: 600; }
.ag-titleMenu .ag-pullDownTitle { font-weight: 600; color: var(--ag-label); background: none; }
.ag-navLargeTitle .ag-titleMenu .ag-pullDownTitle { font: inherit; }
.ag-navigationBar .ag-searchBar { padding-top: 4px; }
/* Tab bar: a prominent tab, the search tab set apart */
.ag-tab.ag-prominentTab .ag-tabIcon { background: var(--ag-blue); color: #fff; border-radius: 14px; padding: 2px 10px; }
.ag-tab.ag-searchTab { flex: 0 0 64px; border-left: .5px solid var(--ag-separator); }
/* Search bar: prompt, accessory buttons, scope bar, suggestions */
.ag-searchPrompt { margin: 0 0 6px; text-align: center; font-size: 13px; color: var(--ag-secondaryLabel); }
.ag-searchRow { display: flex; align-items: center; gap: 8px; }
.ag-searchRow .ag-searchField { flex: 1; }
.ag-searchAccessory { border: none; background: none; color: var(--ag-secondaryLabel); padding: 0 2px; font-size: 16px; }
.ag-scopeBar { margin-top: 8px; display: flex; }
.ag-scopeBar > button { flex: 1; }
.ag-suggestions { list-style: none; margin: 8px 0 0; padding: 0; background: var(--ag-cellBg); border-radius: 10px; overflow: hidden; }
.ag-suggestion { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: none; background: none; text-align: left; color: var(--ag-label); }
.ag-suggestions li + li .ag-suggestion { border-top: .5px solid var(--ag-separator); }
.ag-suggestion .ag-symbol { color: var(--ag-secondaryLabel); }
.ag-suggestionTexts { display: flex; flex-direction: column; }
.ag-suggestionDescription { font-size: 13px; color: var(--ag-secondaryLabel); }
.ag-token .ag-symbol { margin-right: 3px; font-size: 13px; }

/* UIAlertController text fields; the preferred action */
.ag-alertFields { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 16px; }
.ag-alertField { border: .5px solid var(--ag-separator); border-radius: 6px; padding: 6px 8px; background: var(--ag-cellBg); font-size: 15px; color: var(--ag-label); }
.ag-action.ag-preferred { font-weight: 600; }
.ag-action:disabled { opacity: .35; }

/* UISlider: end symbols, thumbless (iOS 26), a neutral value (the fill starts there) */
.ag-sliderRow { display: flex; align-items: center; gap: 8px; width: 100%; }
.ag-sliderRow .ag-slider { flex: 1; }
.ag-sliderEnd { color: var(--ag-secondaryLabel); font-size: 15px; }
.ag-slider.ag-thumbless::-webkit-slider-thumb { opacity: 0; }
.ag-slider.ag-thumbless::-moz-range-thumb { opacity: 0; }
/* UISegmentedControl: widths by content */
.ag-segmentedControl.ag-apportioned > button { flex: 0 1 auto; padding-left: 12px; padding-right: 12px; }
.ag-segmentedControl > button:disabled { opacity: .35; }
/* UIColorWell: alpha and eyedropper */
.ag-colorWellRow { display: inline-flex; align-items: center; gap: 8px; }
.ag-alphaSlider { width: 90px; }
.ag-eyedropper { border: none; background: none; color: var(--ag-blue); font-size: 18px; padding: 0; }
/* UIPageControl: background styles, direction, indicator symbols */
.ag-pageControl.ag-pageBackground-prominent { background: var(--ag-fill); border-radius: 14px; padding: 4px 8px; }
.ag-pageControl.ag-pageBackground-minimal { background: none; }
.ag-pageControl.ag-pageDirection-topToBottom { flex-direction: column; }
.ag-pageControl.ag-pageDirection-bottomToTop { flex-direction: column-reverse; }
.ag-pageControl.ag-pageDirection-rightToLeft { flex-direction: row-reverse; }
.ag-dot.ag-dotSymbol { background: none; width: auto; height: auto; font-size: 10px; color: var(--ag-gray); }
.ag-dot.ag-dotSymbol[aria-current="page"] { color: var(--ag-label); }
/* UIPasteControl display modes */
.ag-pasteControl.ag-paste-iconOnly { padding-left: 10px; padding-right: 10px; }

/* UIScrollView: no scrolling; no indicators */
.ag-scrollView.ag-noScroll { overflow: hidden; }
.ag-scrollView.ag-noIndicators { scrollbar-width: none; }
.ag-scrollView.ag-noIndicators::-webkit-scrollbar { display: none; }
/* UIActivityIndicatorView large / stopped; UIProgressView bar */
.ag-activityIndicator.ag-large { width: 37px; height: 37px; }
.ag-activityIndicator.ag-large i { left: 17px; top: 2px; width: 3px; height: 10px; border-radius: 1.5px; transform-origin: 1.5px 16.5px; }
.ag-activityIndicator.ag-stopped i { animation: none; }
.ag-progressView.ag-bar { height: 2px; border-radius: 0; }
/* UIContentUnavailableView: a secondary button under the main one */
.ag-contentUnavailableView .ag-secondary { margin-top: 4px; }
/* UIVisualEffectView: vibrancy styles, glass (iOS 26) */
.ag-vibrancy-secondaryLabel { color: var(--ag-secondaryLabel); }
.ag-vibrancy-tertiaryLabel, .ag-vibrancy-quaternaryLabel { color: var(--ag-gray); }
.ag-visualEffectView.ag-glass { background: color-mix(in srgb, var(--ag-cellBg) 55%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: inset 0 0 0 .5px var(--ag-separator); }
.ag-visualEffectView.ag-glass-clear { background: color-mix(in srgb, var(--ag-cellBg) 20%, transparent); }
.ag-visualEffectView.ag-interactive:active { transform: scale(.98); }
/* UICalendarView decorations */
.ag-calDay { position: relative; }
.ag-calDecoration { position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--ag-blue); line-height: 1; }
.ag-calDecoration.ag-calDot { width: 4px; height: 4px; border-radius: 2px; background: var(--ag-gray); }
.ag-calDecoration.ag-decor-small { font-size: 6px; } .ag-calDecoration.ag-decor-large { font-size: 11px; }
.ag-calDot.ag-decor-small { width: 3px; height: 3px; } .ag-calDot.ag-decor-large { width: 6px; height: 6px; border-radius: 3px; }
