/*
 * AIGator app 1.0: one sidebar, one document column and one floating composer.
 * Tokens are shared with Theme 2.0 (same names, same values). Everything here is
 * scoped to the app document (html.agx-doc) so nothing leaks into public pages.
 */

@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"); 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; }
@font-face { font-family: "Figtree"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations"); 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; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900; src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations"); 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; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900; src: url("fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-display: swap; font-weight: 200 900; src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2-variations"); 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; }

.agx-doc {
	--bg: #fffdf9;
	--side: #f7f4ee;
	--surface: #ffffff;
	--line: #e8e2d7;
	--line-2: #d9d1c2;
	--ink: #1d1b17;
	--ink-2: #3b372f;
	--muted: #6b645a;
	--hint: #787166;
	--accent: #2f7d2a;
	--accent-hover: #276a23;
	--accent-ink: #235c1f;
	--accent-tint: #eaf4e2;
	--on-accent: #ffffff;
	--ai: #a5410f;
	--ai-mark: #fbe3d2;
	--ai-line: #cf5f22;
	--hu: #1d5a8e;
	--hu-mark: #dfebf7;
	--hu-line: #4a88c7;
	--un: #5f594f;
	--un-line: #8c8478;
	--warn-bg: #fbf1d8;
	--warn-ink: #6f4b00;
	--err-bg: #fce8e4;
	--err-ink: #9c2a17;
	--hover: rgba(64, 48, 24, 0.06);
	--scrim: rgba(20, 18, 15, 0.38);
	--shadow: 0 1px 2px rgba(64, 48, 24, 0.06), 0 10px 30px -12px rgba(64, 48, 24, 0.22);
	--shadow-pop: 0 2px 6px rgba(64, 48, 24, 0.08), 0 18px 40px -16px rgba(64, 48, 24, 0.35);
	--focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
	--ui: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Bricolage Grotesque", "Figtree", ui-sans-serif, system-ui, sans-serif;
	--doc: "Source Serif 4", "Iowan Old Style", "Charter", Georgia, serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	.agx-doc:not([data-theme="light"]) {
		--bg: #191815; --side: #141311; --surface: #22201c; --line: #34302a; --line-2: #48433b;
		--ink: #f3eee6; --ink-2: #d8d1c5; --muted: #aaa295; --hint: #9d9588;
		--accent: #6bb65a; --accent-hover: #7cc56b; --accent-ink: #9bd58b; --accent-tint: #22311d; --on-accent: #0f1a0c;
		--ai: #f2a77a; --ai-mark: rgba(224, 123, 57, 0.24); --ai-line: #e07b39;
		--hu: #93c0ea; --hu-mark: rgba(74, 136, 199, 0.26); --hu-line: #5a97d4;
		--un: #c3bbae; --un-line: #7b746a;
		--warn-bg: #33290f; --warn-ink: #ecc56d; --err-bg: #3a1a14; --err-ink: #f5a593;
		--hover: rgba(255, 245, 230, 0.06);
		--scrim: rgba(0, 0, 0, 0.55);
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -12px rgba(0, 0, 0, 0.7);
		--shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(0, 0, 0, 0.8);
		color-scheme: dark;
	}
}
.agx-doc[data-theme="dark"] {
	--bg: #191815; --side: #141311; --surface: #22201c; --line: #34302a; --line-2: #48433b;
	--ink: #f3eee6; --ink-2: #d8d1c5; --muted: #aaa295; --hint: #9d9588;
	--accent: #6bb65a; --accent-hover: #7cc56b; --accent-ink: #9bd58b; --accent-tint: #22311d; --on-accent: #0f1a0c;
	--ai: #f2a77a; --ai-mark: rgba(224, 123, 57, 0.24); --ai-line: #e07b39;
	--hu: #93c0ea; --hu-mark: rgba(74, 136, 199, 0.26); --hu-line: #5a97d4;
	--un: #c3bbae; --un-line: #7b746a;
	--warn-bg: #33290f; --warn-ink: #ecc56d; --err-bg: #3a1a14; --err-ink: #f5a593;
	--hover: rgba(255, 245, 230, 0.06);
	--scrim: rgba(0, 0, 0, 0.55);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -12px rgba(0, 0, 0, 0.7);
	--shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(0, 0, 0, 0.8);
	color-scheme: dark;
}

.agx-doc, .agx-doc body { margin: 0; height: 100%; background: var(--bg); }
.agx-doc body { color: var(--ink); font: 400 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.agx, .agx *, .agx *::before, .agx *::after { box-sizing: border-box; }
.agx button, .agx input, .agx select, .agx textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.agx button { cursor: pointer; }
.agx button:disabled { cursor: not-allowed; }
.agx a { color: inherit; }
.agx h1, .agx h2, .agx h3, .agx h4, .agx p { overflow-wrap: break-word; }
.agx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.agx :focus { outline: none; }
.agx :focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--focus); border-radius: 6px; }
/* Headings and regions that focus is moved to (tabindex="-1"), so screen
   readers announce the new view or explanation, are not controls: no ring,
   also right after a page load, when browsers would otherwise draw one. */
.agx h1[tabindex="-1"]:focus, .agx h2[tabindex="-1"]:focus, .agx [role="region"][tabindex="-1"]:focus { outline: none; box-shadow: none; }
.agx svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agx [hidden] { display: none !important; }

/* Shared pieces */
.agx .logo { display: block; height: 26px; }
.agx .logo img { display: block; height: 100%; width: auto; max-width: 150px; }
.agx .logo .dark { display: none; }
@media (prefers-color-scheme: dark) { .agx-doc:not([data-theme="light"]) .agx .logo .light { display: none; } .agx-doc:not([data-theme="light"]) .agx .logo .dark { display: block; } }
.agx-doc[data-theme="dark"] .agx .logo .light { display: none; }
.agx-doc[data-theme="dark"] .agx .logo .dark { display: block; }
.agx .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: background-color 0.12s ease, border-color 0.12s ease; }
.agx .btn-primary { background: var(--accent); color: var(--on-accent); }
.agx .btn-primary:hover { background: var(--accent-hover); }
.agx .btn-primary:disabled { background: var(--hover); color: var(--hint); box-shadow: inset 0 0 0 1px var(--line); }
.agx .btn-quiet { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.agx .btn-quiet:hover { background: var(--hover); }
.agx .btn-quiet:disabled { color: var(--muted); }
.agx .btn-ghost { color: var(--ink-2); }
.agx .btn-ghost:hover { background: var(--hover); color: var(--ink); }
.agx .btn-danger { background: var(--err-ink); color: var(--bg); }
.agx .btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.agx .btn-lg { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.agx .btn .spin { width: 13px; height: 13px; }
.agx .icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 0; }
.agx .icon-btn:hover { background: var(--hover); color: var(--ink); }
.agx .link { border: 0; background: none; padding: 0; color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.agx .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.agx .tag::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: currentColor; flex: none; }
.agx .tag-ai { color: var(--ai); } .agx .tag-hu { color: var(--hu); } .agx .tag-un { color: var(--un); }
.agx .tag-un::before { background: transparent; box-shadow: inset 0 0 0 2px var(--un-line); }
.agx .spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: agx-spin 0.8s linear infinite; flex: none; vertical-align: -2px; }
@keyframes agx-spin { to { transform: rotate(360deg); } }

/* Shell */
.agx { container: app / inline-size; position: fixed; inset: 0; display: flex; background: var(--bg); color: var(--ink); overflow: hidden; }
.agx-boot { margin: auto; display: grid; gap: 14px; justify-items: center; color: var(--muted); font-size: 14px; }
.agx .side { width: 264px; flex: none; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--line); min-height: 0; }
.agx.side-closed .side { display: none; }
.agx .side-top { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 8px 0 16px; flex: none; }
.agx .side-top a { padding: 6px 0; border-radius: 6px; }
.agx .new-check { margin: 4px 10px 6px; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--accent-ink); font-weight: 650; text-align: left; text-decoration: none; }
.agx .new-check:hover { background: var(--hover); }
.agx .new-check .plus { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.agx .new-check .plus svg { width: 14px; height: 14px; stroke-width: 2.4; }
.agx .new-check[aria-current="page"] { background: var(--accent-tint); }
/* Links to the rest of the site, under New check: quieter than the checks. */
.agx .side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 20px; color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 0; }
.agx .side-search { margin: 4px 10px 6px; position: relative; }
.agx .side-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--hint); }
.agx .side-search input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px 0 31px; font-size: 13.5px; }
.agx .side-search input::placeholder { color: var(--hint); }
.agx .side-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.agx .history { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 10px; scrollbar-width: thin; overscroll-behavior: contain; }
.agx .history h3 { margin: 12px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.agx .history ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.agx .row { position: relative; }
.agx .row-link { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 34px 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.agx .row-link:hover { background: var(--hover); color: var(--ink); }
.agx .row-link .t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agx .row.is-current .row-link { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.agx .row.is-pending .row-link { color: var(--muted); font-style: italic; }
.agx .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.agx .dot-ai { background: var(--ai-line); } .agx .dot-hu { background: var(--hu-line); }
.agx .dot-mixed { background: linear-gradient(90deg, var(--ai-line) 50%, var(--hu-line) 50%); }
.agx .dot-un { background: transparent; box-shadow: inset 0 0 0 1.5px var(--un-line); }
.agx .row-more { position: absolute; right: 3px; top: 3px; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; opacity: 0; padding: 0; }
.agx .row:hover .row-more, .agx .row.is-current .row-more, .agx .row-more:focus-visible, .agx .row-more[aria-expanded="true"] { opacity: 1; }
.agx .row-more:hover { background: var(--hover); color: var(--ink); }
@media (hover: none) { .agx .row-more { opacity: 1; } }
.agx .row-menu { right: 0; top: calc(100% + 2px); min-width: 180px; }
.agx .row-edit { display: flex; gap: 6px; padding: 3px 4px; }
.agx .row-edit input { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--accent); border-radius: 7px; padding: 0 8px; background: var(--surface); font-size: 14px; }
.agx .row-edit input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.agx .row-confirm { margin: 2px 0 6px; padding: 10px; border-radius: 10px; background: var(--err-bg); color: var(--err-ink); font-size: 13px; display: grid; gap: 8px; }
.agx .row-confirm div { display: flex; gap: 6px; flex-wrap: wrap; }
.agx .row-error { margin: 2px 4px 6px 10px; color: var(--err-ink); font-size: 12.5px; }
.agx .side-msg { margin: 10px; padding: 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.agx .side-msg.box { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.agx .side-msg .btn { margin-top: 8px; }
.agx .more-row { padding: 8px 10px; }
.agx .side-note { margin: 0; padding: 14px 10px 4px; color: var(--hint); font-size: 12px; }
/* Prompts, Blog (and Pricing for guests): compact rows above the account,
   drawn like the rest of the sidebar but quieter. */
.agx .site-links { flex: none; margin: 0 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.agx .site-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.agx .site-links a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.agx .site-links a:hover { background: var(--hover); color: var(--ink); }
.agx .site-links svg.i { width: 17px; height: 17px; color: var(--muted); }
.agx .site-links + .side-foot { border-top: 0; padding-top: 2px; }
.agx .guest-row .row-link { padding-right: 10px; }
.agx .row .tag { flex: none; margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.agx .side-foot.guest-foot { margin-top: auto; display: grid; gap: 8px; padding: 14px 16px 16px 20px; }
.agx .guest-pitch { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.agx .guest-pitch b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 14px; font-weight: 650; }
.agx .guest-foot .btn { width: 100%; justify-content: center; }
.agx .side-foot { border-top: 1px solid var(--line); padding: 8px 10px 10px; position: relative; flex: none; }
.agx .me { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.agx .me:hover, .agx .me[aria-expanded="true"] { background: var(--hover); }
.agx .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 14px var(--display); flex: none; }
.agx .me .who { display: grid; min-width: 0; line-height: 1.25; }
.agx .me .who b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx .me .who small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The plan line is a link of its own, laid over the second line of the account row.
   It is only as wide and as tall as its text, so the middle and the rest of the row
   still open the menu. */
.agx .me .who .me-plan-space { display: block; height: 1.25em; }
.agx .me-plan { position: absolute; left: 60px; bottom: 16px; max-width: calc(100% - 78px); color: var(--muted); font-size: 12.5px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; border-radius: 4px; }
.agx .me-plan:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.agx .menu { position: absolute; z-index: 30; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); display: grid; gap: 1px; }
.agx .menu button:not(.btn), .agx .menu a:not(.btn) { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px; color: var(--ink-2); text-decoration: none; }
/* Buttons drawn as buttons (.btn, as in the Export menu) keep their own look. */
.agx .menu button:not(.btn):hover, .agx .menu a:not(.btn):hover, .agx .menu button:not(.btn):focus-visible, .agx .menu a:not(.btn):focus-visible { background: var(--hover); color: var(--ink); }
.agx .menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.agx .menu .danger { color: var(--err-ink); }
.agx .menu .label { padding: 6px 10px 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.agx .menu .opt { align-items: flex-start; padding: 8px 10px; min-height: 0; }
.agx .menu .opt .ck { width: 18px; flex: none; color: var(--accent-ink); }
.agx .menu .opt span { display: grid; gap: 2px; }
.agx .menu .opt small { color: var(--muted); font-size: 12.5px; }
.agx .me-menu { left: 10px; right: 10px; bottom: 62px; }

.agx .main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.agx .top { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; }
.agx .top .title { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.agx .top .acts { display: flex; align-items: center; gap: 6px; position: relative; }
.agx .top .home-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; text-decoration: none; }
/* Same size as the sidebar logo, so hiding the sidebar doesn't make the logo jump. */
.agx .top .home-link.logo { height: 26px; padding: 6px 4px; }
.agx .status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--hover); white-space: nowrap; }
.agx .status.ok { color: var(--accent-ink); background: var(--accent-tint); }
.agx .status.warn { color: var(--warn-ink); background: var(--warn-bg); }
.agx .status svg { width: 15px; height: 15px; }
.agx .banner { margin: 0 auto 4px; width: min(100% - 32px, 720px); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; flex-wrap: wrap; }
.agx .banner.err { background: var(--err-bg); color: var(--err-ink); }
.agx .banner .grow { flex: 1; min-width: 200px; }
.agx .pane { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.agx .col { width: min(100% - 48px, 680px); margin: 0 auto; }

/* Editor */
.agx .editor { padding: 0 0 220px; position: relative; }
/* The editing note (left) and Paste / Clear (right), above the text. */
.agx .edit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 30px; margin: 0 0 10px; }
.agx .edit-bar .edit-hint { margin: 0; }
.agx .edit-tools { display: flex; gap: 4px; margin-left: auto; }
.agx .edit-tools[hidden] { display: none; }
.agx .edit-tools .btn { color: var(--muted); }
.agx .edit-tools .btn:hover { color: var(--ink); }
.agx .editor label.sr-only + .draft { margin: 0; }
.agx .draft { display: block; width: 100%; min-height: 360px; border: 0; resize: none; background: transparent; color: var(--ink); font: 400 18px/1.72 var(--doc); padding: 0; overflow: hidden; }
.agx .draft::placeholder { color: var(--hint); }
.agx .draft:focus, .agx .draft:focus-visible { outline: none; box-shadow: none; }
.agx .starter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -300px; position: relative; pointer-events: none; }
.agx .starter > * { pointer-events: auto; }
.agx .starter p { width: 100%; margin: 0 0 4px; color: var(--muted); font-size: 13.5px; }
.agx .chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.agx .chip:hover { background: var(--hover); color: var(--ink); }
.agx .chip svg { width: 16px; height: 16px; }
.agx .hint-inline { color: var(--muted); font-size: 13px; }
.agx .edit-hint { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; display: flex; gap: 8px; align-items: center; }

/* Dock: the one raised surface */
.agx .dock { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 16px 16px; pointer-events: none; z-index: 10; }
.agx .dock-in { pointer-events: auto; width: min(100%, 720px); margin: 0 auto; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); position: relative; }
.agx .dock-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.agx .dock-note .grow { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.agx .dock-note .grow b { color: var(--ink); font-weight: 650; }
.agx .dock-note .grow small { color: var(--muted); font-size: 13px; }
.agx .dock-note.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 16px 16px 0 0; }
.agx .dock-note.err { background: var(--err-bg); color: var(--err-ink); border-radius: 16px 16px 0 0; }
.agx .dock-note.warn b, .agx .dock-note.err b { color: inherit; }
.agx .dock-note.warn small, .agx .dock-note.err small { color: inherit; opacity: 0.92; }
.agx .dock-note .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.agx .packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: 100%; margin-top: 4px; }
.agx .pack { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); text-align: left; color: var(--ink); }
.agx .pack:hover { border-color: var(--accent); }
.agx .pack b { font-size: 14.5px; }
.agx .pack small { color: var(--muted); font-size: 13px; }
.agx .pack.featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.agx .dock-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
.agx .dock-row .meta { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.agx .dock-row .meta b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.agx .dock-row .meta .need { color: var(--warn-ink); }
.agx .dock-row .meta .chars { font-variant-numeric: tabular-nums; }
.agx .dock-row .meta .chars.over { font-weight: 600; } /* colour from .over */
.agx .dock-row .meta .over { color: var(--err-ink); }
.agx .mode { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.agx .mode:hover { background: var(--hover); }
.agx .mode.temp { border-style: dashed; }
.agx .mode svg { width: 15px; height: 15px; }
.agx .mode-wrap { position: relative; display: inline-flex; }
.agx .mode-menu { bottom: calc(100% + 8px); left: 0; width: 300px; }
.agx .progress { height: 3px; border-radius: 3px; overflow: hidden; background: var(--line); margin: 0 16px; }
.agx .progress i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: inherit; animation: agx-slide 1.4s ease-in-out infinite; }
@keyframes agx-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.agx .ts-slot:empty { display: none; }
.agx .ts-slot { padding: 10px 14px 0; display: flex; justify-content: center; }

/* Checking */
.agx .reading { position: relative; padding: 28px 0 200px; }
/* While checking: the gator bites along each line; the text behind it returns to full ink. */
.agx .biter-run { position: absolute; inset: 0; pointer-events: none; }
.agx .reading .biter-run__read { position: absolute; margin: 0; opacity: 1; clip-path: polygon(0 0, 0 0, 0 0); }
/* The logo's gator, frames of 40 x 20 pixels shown at 2x (1.5x on narrow screens):
   closed, open, blink, step, front, front blink. app.js reads the size from the element. */
.agx .biter-run__gator { --gw: 80px; position: absolute; left: 0; top: 0; width: var(--gw); height: calc(var(--gw) / 2); background: url("img/gator-sprite-3.png") 0 0 / 600% 100% no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; animation: agx-chomp 0.3s steps(1, end) infinite; will-change: transform; }
.agx .biter-run.is-patrol .biter-run__gator { animation: none; }
.agx .biter-run.is-patrol .biter-run__gator.is-step { background-position: calc(var(--gw) * -3) 0; }
.agx .biter-run.is-patrol .biter-run__gator.is-front { background-position: calc(var(--gw) * -4) 0; }
.agx .biter-run.is-patrol .biter-run__gator.is-front.is-blink { background-position: calc(var(--gw) * -5) 0; }
@keyframes agx-chomp { 0% { background-position: 0 0; } 50% { background-position: calc(var(--gw) * -1) 0; } }
@media (prefers-reduced-motion: reduce) { .agx .biter-run { display: none; } }
.agx .reading .docbody { opacity: 0.55; }

/* Document body (checking and result) */
.agx .docbody { font: 400 18px/1.72 var(--doc); color: var(--ink); }
.agx .docbody p { margin: 0 0 1.05em; white-space: pre-wrap; }
.agx .hl { padding: 0.06em 0.1em; margin: 0 -0.05em; border-radius: 3px; color: inherit; background: transparent; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.agx .hl-ai { background: var(--ai-mark); box-shadow: inset 0 -2px 0 var(--ai-line); }
.agx .hl-hu { background: var(--hu-mark); box-shadow: inset 0 -2px 0 var(--hu-line); }
.agx .hl:hover { filter: saturate(1.3); }
.agx .hl[aria-expanded="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.agx .hl:focus-visible { box-shadow: var(--focus); }
.agx .plain .hl { background: none; box-shadow: none; cursor: text; }
.agx .plain .hl[aria-expanded="true"] { outline: none; }
.agx .hl { transition: background-color 0.15s, box-shadow 0.15s; }
.agx .docbody.has-lit .hl:not(.is-lit) { background: transparent; box-shadow: inset 0 -1px 0 var(--line-2); }
.agx .docbody .hl-ai.is-lit { background: var(--ai-mark); box-shadow: inset 0 -2px 0 var(--ai-line), 0 0 0 2px var(--ai-line); }
.agx .docbody .hl-hu.is-lit { background: var(--hu-mark); box-shadow: inset 0 -2px 0 var(--hu-line), 0 0 0 2px var(--hu-line); }

/* Result */
.agx .result { padding: 26px 0 140px; }
.agx .verdict { display: grid; gap: 10px; margin-bottom: 26px; }
.agx .verdict h1 { margin: 0; font: 700 clamp(24px, 3.4cqi, 32px)/1.12 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.agx .verdict h1:focus { box-shadow: none; }
.agx .verdict .conf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.agx .verdict .conf b { color: var(--ink); font-weight: 650; }
.agx .verdict p.sum { margin: 0; font-size: 16px; color: var(--ink-2); max-width: 62ch; }
.agx .strip { display: grid; gap: 8px; margin-top: 4px; }
.agx .strip-bar { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; }
.agx .strip-bar button, .agx .strip-bar span { border: 0; padding: 0; height: 100%; min-width: 4px; display: block; }
.agx .strip-bar .s-ai { background: var(--ai-line); } .agx .strip-bar .s-hu { background: var(--hu-line); } .agx .strip-bar .s-un { background: var(--line-2); }
.agx .strip-bar button:hover { filter: brightness(0.9); }
.agx .strip-key { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.agx .keybtn { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.agx button.keybtn:hover { background: var(--hover); }
.agx .keybtn .tag { font-size: 13px; }
.agx .keyline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agx .keyline small { color: var(--muted); font-size: 12.5px; }
/* Your text is a sheet of paper: white, serif, edged. The report around it
   stays on the warm background in the interface type, so text and report never
   read as one block. */
.agx .page { margin-top: 30px; padding: 0 44px 40px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(64, 48, 24, 0.04), 0 14px 36px -20px rgba(64, 48, 24, 0.22); }
.agx .page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; margin: 0 -44px 26px; padding: 0 18px 0 44px; border-bottom: 1px solid var(--line); }
.agx .page-head h2 { margin: 0; font: 600 13.5px/1.2 var(--ui); color: var(--muted); }
.agx .page-none { color: var(--muted); font-size: 13px; }
/* The page is headed by the check's title; selecting it renames the check. */
.agx .page-title-h { flex: 1; min-width: 0; }
.agx .page-title { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; margin-left: -8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 14.5px/1.3 var(--ui); text-align: left; cursor: text; }
.agx .page-title .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agx .page-title svg.i { width: 15px; height: 15px; flex: none; color: var(--muted); opacity: 0.55; transition: opacity 0.15s; }
.agx .page-title:hover, .agx .page-title:focus-visible { background: var(--hover); }
.agx .page-title:hover svg.i, .agx .page-title:focus-visible svg.i { opacity: 1; }
.agx .page-head.is-editing { flex-wrap: wrap; }
.agx .page-title-edit { flex: 1 1 320px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; padding: 8px 0; }
.agx .page-title-edit input { flex: 1 1 200px; min-width: 0; height: 36px; border: 1px solid var(--accent); border-radius: 8px; padding: 0 10px; background: var(--surface); color: var(--ink); font: 600 14.5px var(--ui); }
.agx .page-title-edit input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.agx .page-title-edit .row-error { flex-basis: 100%; margin: 2px 0 0; }
.agx .page .docbody > p:last-child { margin-bottom: 0; }
/* Side by side: the page on the left, the report on the right. The report
   panel keeps its place while the page scrolls, and scrolls on its own when
   it is taller than the window. */
.agx .result.split { max-width: 1160px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); column-gap: 44px; align-items: start; }
.agx .split-top { grid-column: 1 / -1; padding-top: 20px; }
.agx .split-top .callout:last-child { margin-bottom: 0; }
.agx .report-doc { grid-column: 1; grid-row: 2; min-width: 0; padding: 24px 0 120px; }
.agx .report-doc .page { margin-top: 0; }
.agx .report-panel { grid-column: 2; grid-row: 2; position: sticky; top: 0; max-height: var(--pane-h, calc(100dvh - 52px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 28px 6px 48px; margin: 0 -6px; }
.agx .split .verdict { gap: 8px; margin-bottom: 18px; }
.agx .split .verdict h1 { font-size: 26px; }
.agx .split .verdict p.sum { font-size: 15px; }
.agx .split .report-panel .note { margin: 0 0 4px; }
.agx .split .note-head strong { min-width: 0; }
.agx .panel-hint { margin: 0; padding: 11px 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.agx .split .sections { margin-top: 18px; }
.agx .split .sections .body { font-size: 14.5px; }
.agx .split .more-checks { margin-top: 18px; }
.agx .more-checks { margin-top: 22px; }
/* A finding's sentences, shown from its button or while pointing at it. */
.agx .ev-show { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; margin: 2px 0 0 -8px; padding: 0 10px 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.agx .ev-show:hover { background: var(--hover); }
.agx .ev-show[aria-pressed="true"] { background: var(--accent-tint); }
.agx .ev-show svg.i { width: 16px; height: 16px; }
.agx .ev[data-k] { border-radius: 10px; margin: -6px -8px; padding: 6px 8px; transition: background-color 0.15s; }
.agx .ev[data-k]:hover, .agx .ev.is-lit { background: var(--hover); }
.agx .switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 600; padding: 4px 6px; border-radius: 8px; }
.agx .switch:hover { background: var(--hover); }
.agx .switch .track { width: 30px; height: 18px; border-radius: 999px; background: var(--line-2); position: relative; transition: background-color 0.15s; flex: none; }
.agx .switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.agx .switch[aria-checked="true"] .track { background: var(--accent); }
.agx .switch[aria-checked="true"] .track::after { transform: translateX(12px); }
.agx .switch:disabled { opacity: 0.6; }

.agx .note { margin: -0.3em 0 1.2em; padding: 14px 16px 14px; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow); font: 400 15px/1.55 var(--ui); color: var(--ink-2); position: relative; white-space: normal; }
.agx .note::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--un-line); }
.agx .note.n-ai::before { background: var(--ai-line); } .agx .note.n-hu::before { background: var(--hu-line); }
.agx .note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.agx .note-head strong { color: var(--ink); font-weight: 650; flex: 1; min-width: 160px; }
.agx .note-nav { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.agx .note-nav .icon-btn { width: 28px; height: 28px; }
.agx .note p { margin: 0 0 6px; }
.agx .note .alt { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; }
.agx .note .alt b { color: var(--ink-2); font-weight: 650; }

.agx .sections { margin-top: 28px; border-top: 1px solid var(--line); }
.agx .sections details { border-bottom: 1px solid var(--line); }
.agx .sections summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; font-weight: 650; color: var(--ink); border-radius: 6px; }
.agx .sections summary::-webkit-details-marker { display: none; }
.agx .sections summary .count { color: var(--muted); font-weight: 500; font-size: 14px; }
.agx .sections summary .chev { margin-left: auto; transition: transform 0.15s; color: var(--muted); }
.agx .sections details[open] summary .chev { transform: rotate(90deg); }
.agx .sections .body { padding: 0 0 18px; display: grid; gap: 14px; font-size: 15px; color: var(--ink-2); }
.agx .ev { display: grid; gap: 4px; }
.agx .ev h4 { margin: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 15px; color: var(--ink); }
.agx .ev p { margin: 0; }
.agx .ev q { font: italic 400 15.5px/1.5 var(--doc); color: var(--ink-2); quotes: "\201C" "\201D"; }
.agx .checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.agx .checks li { display: grid; grid-template-columns: 20px 1fr auto; gap: 4px 10px; align-items: baseline; }
.agx .checks li .d { grid-column: 2 / -1; color: var(--muted); font-size: 14px; }
.agx .checks li small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.agx .checks svg { width: 16px; height: 16px; }
.agx .meta-foot { margin-top: 20px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.agx .callout { margin: 0 0 22px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.agx .callout .grow { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.agx .callout.soft { background: var(--hover); color: var(--ink-2); }
.agx .callout.err { background: var(--err-bg); color: var(--err-ink); }

/* Export popover */
.agx .export-menu { right: 0; top: calc(100% + 6px); width: 300px; padding: 12px; gap: 10px; }
.agx .export-menu fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.agx .export-menu legend { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; padding: 0; }
.agx .export-menu label { display: flex; gap: 8px; align-items: center; font-size: 14px; min-height: 30px; }
.agx .export-menu input { accent-color: var(--accent); }
.agx .export-menu .row2 { display: flex; gap: 6px; flex-wrap: wrap; }
.agx .export-menu .pdf-btn { width: 100%; justify-content: center; }
.agx .export-menu .row2 .btn { flex: 1; justify-content: center; }
.agx .export-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.agx .callout .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.agx .guest-keep { align-items: center; }
.agx .doc-menu { right: 0; top: calc(100% + 6px); }

/* Full-page panels (signed out, unverified, not found) */
.agx .panel { width: min(100% - 32px, 460px); margin: 9vh auto 40px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.agx .panel img.g { width: 80px; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.agx .panel h1 { margin: 0; font: 700 26px/1.15 var(--display); letter-spacing: -0.02em; }
.agx .panel p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.agx .panel .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* Settings */
.agx .settings { padding: 30px 0 80px; }
.agx .settings h1 { margin: 0 0 22px; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.agx .set { padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.agx .set h2 { margin: 0; font-size: 16px; font-weight: 650; }
.agx .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.agx .set-row .k { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.agx .set-row .k b { font-weight: 600; color: var(--ink); }
.agx .set-row .k small { color: var(--muted); font-size: 13.5px; }
.agx .set-row .v { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.agx .meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; width: 160px; }
.agx .meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.agx .set .confirm { padding: 12px; border-radius: 12px; background: var(--err-bg); color: var(--err-ink); display: grid; gap: 10px; font-size: 14px; }
.agx .set .confirm div { display: flex; gap: 8px; flex-wrap: wrap; }

/* Toast */
.agx .toast { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-pop); max-width: calc(100% - 32px); }
.agx .toast .link { color: var(--bg); }

/* Narrow app (phone) */
.agx .scrim { display: none; }
@container app (max-width: 760px) {
	.agx .side { position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: min(86%, 320px); box-shadow: var(--shadow-pop); }
	.agx:not(.side-closed) .scrim { display: block; position: absolute; inset: 0; z-index: 15; background: var(--scrim); border: 0; padding: 0; }
	.agx .col { width: calc(100% - 40px); }
	.agx .draft, .agx .docbody { font-size: 17px; }
	.agx .biter-run__gator { --gw: 60px; }
	.agx .editor, .agx .reading { padding-top: 18px; }
	.agx .editor { padding-top: 0; }
	.agx .dock { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
	.agx .dock-row { flex-wrap: wrap; padding: 10px 10px 10px 14px; }
	.agx .dock-row .meta { gap: 2px 10px; font-size: 13px; }
	.agx .dock-row > .btn-primary { width: 100%; min-height: 46px; }
	.agx .result { padding-top: 16px; }
	.agx .page { margin-top: 22px; padding: 0 18px 24px; border-radius: 12px; }
	.agx .page-head { margin: 0 -18px 18px; padding: 0 6px 0 18px; }
	.agx .top .hide-narrow { display: none; }
	.agx .export-menu { right: -6px; width: min(300px, calc(100cqw - 24px)); }
	.agx .mode-menu { width: min(300px, calc(100cqw - 32px)); }
	.agx .toast { bottom: 160px; }
	.agx .icon-btn, .agx .row-more { min-width: 44px; min-height: 44px; }
	.agx .row-more { width: 40px; height: 40px; top: -3px; }
	.agx .row-link { min-height: 40px; }
	.agx .btn { min-height: 40px; }
	.agx .btn-sm { min-height: 36px; }
	.agx .keybtn, .agx .switch, .agx .mode, .agx .chip, .agx .ev-show, .agx .page-title { min-height: 40px; }
	.agx .note-nav .icon-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
}
@container app (min-width: 761px) {
	.agx .top .only-narrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.agx .hl, .agx .ev[data-k] { transition: none; }
	.agx .spin { animation-duration: 2.4s; }
	.agx .progress i { animation: none; width: 100%; opacity: 0.5; }
	.agx *, .agx *::before, .agx *::after { transition-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
	.agx .hl-ai, .agx .hl-hu { text-decoration: underline; text-decoration-thickness: 2px; }
	.agx .hl-hu { text-decoration-style: wavy; }
	/* Box-shadow focus rings disappear in Windows high contrast; outlines don't. */
	.agx :focus-visible, .agx .draft:focus-visible, .agx .side-search input:focus, .agx .row-edit input:focus { outline: 2px solid Highlight; outline-offset: 2px; }
}
