/* Agent Marketplace — panels & components.
   Colours, fonts and radius come from Settings → Design (CSS variables). */
:root {
	--am-primary: #1C1E3A; --am-accent: #B08D57; --am-bg: #F7F7F4; --am-surface: #FFFFFF;
	--am-text: #2B2D3A; --am-muted: #6B6D7A; --am-good: #2E6B5E; --am-bad: #9B2C3A;
	--am-radius: 14px;
	--am-display: "Cormorant Garamond", Georgia, serif;
	--am-body: "Jost", system-ui, sans-serif;
	--am-line: color-mix(in srgb, var(--am-primary) 12%, transparent);
	--am-line-strong: color-mix(in srgb, var(--am-primary) 22%, transparent);
	--am-tint: color-mix(in srgb, var(--am-primary) 4%, var(--am-surface));
	--am-brass-tint: color-mix(in srgb, var(--am-accent) 12%, var(--am-surface));
	--am-ease: cubic-bezier(.2, .7, .2, 1);
}

[class*="am-"], [class*="am-"]::before, [class*="am-"]::after { box-sizing: border-box; }
.am-app, .am-standalone, .am-auth-wrap, .am-gate, .am-tp--front, .am-cat-grid, .am-pricing, .am-contact, .am-grievance, .am-cta, .am-cities {
	font-family: var(--am-body); color: var(--am-text); font-size: 16px; line-height: 1.55;
}
.am-app h1, .am-app h2, .am-app h3, .am-app h4 { font-family: var(--am-display); color: var(--am-primary); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: 0; }
.am-ico { flex: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.am-hp { position: absolute; left: -9999px; }
.am-muted { color: var(--am-muted); }
.am-small { font-size: .85rem; }
.am-block { display: block; }

/* ---------- App shell ---------- */
.am-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: var(--am-bg); }
.am-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 28px 18px 20px; background: var(--am-surface); border-right: 1px solid var(--am-line); }
.am-app--dark .am-side { background: var(--am-primary); color: color-mix(in srgb, #fff 78%, var(--am-primary)); border-right: 0; }
.am-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--am-primary); padding: 0 10px; }
.am-app--dark .am-brand { color: #fff; }
.am-brand img { max-height: 40px; max-width: 180px; }
.am-brand__mark { color: var(--am-accent); display: inline-flex; }
.am-brand__name { font-family: var(--am-display); font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; line-height: 1; }
.am-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.am-nav__item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit; font-size: .95rem; transition: background .2s var(--am-ease), color .2s; }
.am-nav__item:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.am-nav__item.is-current { color: var(--am-primary); background: var(--am-brass-tint); font-weight: 500; }
.am-app--dark .am-nav__item.is-current { color: #fff; background: color-mix(in srgb, #fff 9%, transparent); }
.am-nav__item.is-current::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--am-accent); }
.am-nav__badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--am-accent); color: #fff; font-size: .75rem; text-align: center; font-weight: 600; }
.am-side__user { display: flex; align-items: center; gap: 10px; padding: 14px 10px 0; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.am-side__user strong { display: block; font-size: .9rem; font-weight: 500; }
.am-side__user small { opacity: .7; font-size: .78rem; }
.am-side__out { margin-left: auto; color: inherit; opacity: .7; display: inline-flex; padding: 6px; border-radius: 8px; }
.am-side__out:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }

.am-main { padding: 40px clamp(18px, 4vw, 56px) 96px; min-width: 0; }
.am-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--am-line); }
.am-top__title { font-size: clamp(2rem, 3.4vw, 2.85rem); font-weight: 500 !important; }
.am-top__sub { margin: 6px 0 0; color: var(--am-muted); }
.am-sec { font-size: 1.5rem; margin: 40px 0 16px !important; }
.am-h { font-size: 1.3rem; margin-bottom: 14px !important; display: flex; align-items: baseline; gap: 8px; }
.am-h small { font-family: var(--am-body); font-size: .85rem; color: var(--am-muted); font-weight: 400; }

/* ---------- Avatars ---------- */
.am-avatar { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--am-brass-tint); color: var(--am-primary); font-weight: 600; font-size: .85rem; letter-spacing: .02em; border: 1px solid color-mix(in srgb, var(--am-accent) 40%, transparent); }
.am-app--dark .am-side .am-avatar { background: color-mix(in srgb, var(--am-accent) 30%, var(--am-primary)); color: #fff; border-color: transparent; }
.am-avatar--lg { width: 64px; height: 64px; font-size: 1.2rem; font-family: var(--am-display); }

/* ---------- Buttons ---------- */
.am-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; font: 500 .95rem/1.2 var(--am-body); text-decoration: none; cursor: pointer; transition: background .2s var(--am-ease), color .2s, border-color .2s, transform .15s; white-space: nowrap; }
.am-btn:active { transform: translateY(1px); }
.am-btn--primary { background: var(--am-primary); color: #fff; }
.am-btn--primary:hover { background: color-mix(in srgb, var(--am-primary) 82%, var(--am-accent)); color: #fff; }
.am-btn--ghost { background: transparent; color: var(--am-primary); border-color: var(--am-line-strong); }
.am-btn--ghost:hover { border-color: var(--am-accent); color: var(--am-primary); background: var(--am-brass-tint); }
.am-btn--danger { background: transparent; color: var(--am-bad); border-color: color-mix(in srgb, var(--am-bad) 40%, transparent); }
.am-btn--danger:hover { background: var(--am-bad); color: #fff; }
.am-btn--lg { padding: 15px 30px; font-size: 1.02rem; }
.am-btn--block { width: 100%; }
.am-btn[disabled], .am-btn.is-busy { opacity: .6; pointer-events: none; }
.am-btn .am-ico { width: 18px; height: 18px; }
:where(.am-app, .am-standalone, .am-auth-wrap) :focus-visible { outline: 2px solid var(--am-accent); outline-offset: 2px; }

/* ---------- Pills ---------- */
.am-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; line-height: 1.5; }
.am-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.am-pill--good { background: color-mix(in srgb, var(--am-good) 12%, transparent); color: var(--am-good); }
.am-pill--warn { background: color-mix(in srgb, var(--am-accent) 18%, transparent); color: color-mix(in srgb, var(--am-accent) 70%, #000); }
.am-pill--bad { background: color-mix(in srgb, var(--am-bad) 11%, transparent); color: var(--am-bad); }
.am-pill--info { background: color-mix(in srgb, var(--am-primary) 9%, transparent); color: var(--am-primary); }
.am-pill--mute { background: color-mix(in srgb, var(--am-muted) 12%, transparent); color: var(--am-muted); }
.am-flag { display: inline-flex; align-items: center; gap: 4px; color: var(--am-bad); font-size: .78rem; }
.am-flag .am-ico { width: 14px; height: 14px; }

/* ---------- Cards & layout ---------- */
.am-card { background: var(--am-surface); border: 1px solid var(--am-line); border-radius: var(--am-radius); padding: clamp(18px, 2.4vw, 28px); margin-bottom: 20px; }
.am-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.am-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.am-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.am-narrow { max-width: 760px; }
.am-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.am-detail__side { position: sticky; top: 24px; }

/* ---------- Stats (ledger row, not cards) ---------- */
.am-stats { display: flex; flex-wrap: wrap; margin: 0 0 28px; border-top: 1px solid var(--am-line); border-bottom: 1px solid var(--am-line); }
.am-stat { flex: 1 1 160px; padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; }
.am-stat + .am-stat { border-left: 1px solid var(--am-line); }
.am-stat__label { font-size: .85rem; color: var(--am-muted); }
.am-stat__value { font-family: var(--am-display); font-size: 2.3rem; font-weight: 500; color: var(--am-primary); line-height: 1.1; }
.am-stat small { color: var(--am-muted); font-size: .8rem; }

/* ---------- Chips & filters ---------- */
.am-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.am-chip { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--am-line-strong); color: var(--am-text); text-decoration: none; font-size: .9rem; }
.am-chip:hover { border-color: var(--am-accent); }
.am-chip.is-current { background: var(--am-primary); border-color: var(--am-primary); color: #fff; }
.am-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.am-filters .am-field { margin: 0; min-width: 180px; }

/* ---------- Task list (ledger) ---------- */
.am-tasks { background: var(--am-surface); border: 1px solid var(--am-line); border-radius: var(--am-radius); overflow: hidden; margin-bottom: 20px; }
.am-task { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; text-decoration: none; color: inherit; transition: background .2s var(--am-ease); }
.am-task + .am-task { border-top: 1px solid var(--am-line); }
.am-task:hover { background: var(--am-tint); }
.am-task__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: var(--am-brass-tint); }
.am-task__body strong { display: block; font-weight: 500; font-size: 1.02rem; color: var(--am-primary); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-task__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: .85rem; color: var(--am-muted); }
.am-task__meta .am-ico { width: 15px; height: 15px; margin-right: -9px; }
.am-task__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.am-task__price { font-family: var(--am-display); font-size: 1.3rem; font-weight: 600; color: var(--am-primary); }

/* ---------- Empty ---------- */
.am-empty { text-align: center; padding: 56px 24px; color: var(--am-muted); background: var(--am-surface); border: 1px dashed var(--am-line-strong); border-radius: var(--am-radius); margin-bottom: 20px; }
.am-empty svg { color: var(--am-accent); margin-bottom: 14px; }
.am-empty p { max-width: 42ch; margin: 0 auto 20px; }

/* ---------- Notices ---------- */
.am-notice { padding: 14px 18px; border-radius: 12px; margin: 0 0 18px; font-size: .95rem; border: 1px solid; }
.am-notice--info { background: var(--am-tint); border-color: var(--am-line); }
.am-notice--warn { background: var(--am-brass-tint); border-color: color-mix(in srgb, var(--am-accent) 35%, transparent); }
.am-notice--bad { background: color-mix(in srgb, var(--am-bad) 7%, var(--am-surface)); border-color: color-mix(in srgb, var(--am-bad) 30%, transparent); color: var(--am-bad); }
.am-notice--good { background: color-mix(in srgb, var(--am-good) 8%, var(--am-surface)); border-color: color-mix(in srgb, var(--am-good) 30%, transparent); }
.am-notice a { color: inherit; font-weight: 500; }

/* ---------- Task head & next step ---------- */
.am-back { display: inline-block; margin-bottom: 18px; color: var(--am-muted); text-decoration: none; font-size: .9rem; }
.am-back:hover { color: var(--am-primary); }
.am-taskhead { margin-bottom: 26px; }
.am-taskhead__cat { font-size: .9rem; color: var(--am-muted); display: flex; gap: 8px; align-items: center; }
.am-taskhead__id { color: var(--am-accent); }
.am-taskhead__title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 500 !important; margin: 6px 0 14px !important; max-width: 26ch; }
.am-taskhead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--am-muted); font-size: .92rem; }
.am-taskhead__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.am-taskhead__meta .am-ico { width: 16px; height: 16px; }
.am-taskhead__price { font-family: var(--am-display); font-size: 1.35rem; color: var(--am-primary); font-weight: 600; }

.am-next { position: relative; background: var(--am-surface); border: 1px solid color-mix(in srgb, var(--am-accent) 35%, transparent); border-radius: var(--am-radius); padding: 26px 28px 24px 32px; margin-bottom: 20px; box-shadow: 0 18px 40px -28px color-mix(in srgb, var(--am-primary) 45%, transparent); }
.am-next::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: var(--am-accent); }
.am-next h3 { font-size: 1.55rem; margin-bottom: 8px !important; }
.am-next > p { color: var(--am-muted); margin: 0 0 16px; max-width: 62ch; }
.am-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }

.am-more { margin-top: 14px; border-top: 1px solid var(--am-line); padding-top: 12px; }
.am-more summary { cursor: pointer; color: var(--am-primary); font-weight: 500; font-size: .95rem; list-style: none; display: flex; align-items: center; gap: 8px; }
.am-more summary::-webkit-details-marker { display: none; }
.am-more summary::after { content: "+"; color: var(--am-accent); font-size: 1.2rem; line-height: 1; transition: transform .2s; }
.am-more[open] summary::after { transform: rotate(45deg); }
.am-more[open] summary { margin-bottom: 14px; }

.am-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; margin: 10px 0 12px; max-width: 420px; }
.am-sum dt { color: var(--am-muted); }
.am-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.am-sum__total { padding-top: 8px; border-top: 1px solid var(--am-line); color: var(--am-primary) !important; font-weight: 600; }
dd.am-sum__total { font-family: var(--am-display); font-size: 1.35rem; }
.am-policybox { background: var(--am-tint); padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px; }
.am-policybox strong { display: block; margin-bottom: 4px; }

.am-prose p { margin: 0 0 12px; max-width: 70ch; }
.am-defs { display: grid; grid-template-columns: 190px 1fr; gap: 12px 20px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--am-line); }
.am-defs dt { color: var(--am-muted); font-size: .9rem; }
.am-defs dd { margin: 0; }
.am-defs--row { grid-template-columns: auto 1fr; font-size: .9rem; }
.am-masked { color: var(--am-muted); font-style: italic; }

/* ---------- Proposals ---------- */
.am-props { display: grid; gap: 14px; }
.am-prop { border: 1px solid var(--am-line); border-radius: 12px; padding: 18px 20px; }
.am-prop.is-selected { border-color: var(--am-accent); background: var(--am-brass-tint); }
.am-prop header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.am-prop header > div { flex: 1; min-width: 0; }
.am-prop__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; color: var(--am-muted); align-items: center; }
.am-prop__price { text-align: right; font-family: var(--am-display); font-size: 1.6rem; font-weight: 600; color: var(--am-primary); line-height: 1; }
.am-prop__price small { display: block; font-family: var(--am-body); font-size: .78rem; color: var(--am-muted); font-weight: 400; margin-top: 4px; }
.am-prop p { margin: 0 0 8px; }
.am-verified { display: inline-flex; align-items: center; gap: 4px; color: var(--am-good); font-weight: 500; }
.am-verified .am-ico { width: 15px; height: 15px; }
.am-stars { display: inline-flex; align-items: center; gap: 3px; color: var(--am-primary); }
.am-stars .am-ico { width: 15px; height: 15px; fill: var(--am-accent); stroke: var(--am-accent); }
.am-stars--none { color: var(--am-muted); }

/* ---------- Report & files ---------- */
.am-report { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--am-line); }
.am-report.is-old { opacity: .7; }
.am-report > small { color: var(--am-accent); font-weight: 500; }
.am-report h4 { font-size: 1.05rem; margin: 12px 0 4px !important; }
.am-files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.am-files li { display: flex; gap: 12px; align-items: center; border: 1px solid var(--am-line); border-radius: 12px; padding: 8px; }
.am-files__thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--am-tint); }
.am-files__thumb img { width: 100%; height: 100%; object-fit: cover; }
.am-files__meta { min-width: 0; display: flex; flex-direction: column; font-size: .85rem; }
.am-files__meta strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-files__meta small { color: var(--am-muted); }
.am-files__meta a { color: var(--am-primary); }

/* ---------- Messages ---------- */
.am-thread { display: flex; flex-direction: column; gap: 14px; max-height: 460px; overflow-y: auto; padding: 4px 2px 14px; }
.am-msg { max-width: 78%; display: flex; flex-direction: column; gap: 4px; }
.am-msg__bubble { background: var(--am-tint); padding: 11px 15px; border-radius: 16px 16px 16px 4px; }
.am-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.am-msg.is-mine .am-msg__bubble { background: var(--am-primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.am-msg.is-internal .am-msg__bubble { background: var(--am-brass-tint); color: var(--am-text); border: 1px dashed var(--am-accent); }
.am-msg small { color: var(--am-muted); font-size: .76rem; }
.am-compose { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.am-compose textarea { flex: 1; }

/* ---------- Timeline ---------- */
.am-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.am-timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: var(--am-line-strong); }
.am-timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 16px; }
.am-timeline__dot { position: relative; z-index: 1; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: currentColor; box-shadow: 0 0 0 4px var(--am-surface); }
.am-timeline strong { display: block; font-weight: 500; font-size: .92rem; }
.am-timeline small { color: var(--am-muted); font-size: .78rem; }
.am-timeline p { margin: 4px 0 0; font-size: .85rem; }

.am-person { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.am-person .am-h { align-self: stretch; text-align: left; }
.am-help .am-link, .am-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--am-primary); text-decoration: none; padding: 8px 0; font-weight: 500; font-size: .95rem; }

/* ---------- Forms ---------- */
.am-form { margin: 0; }
.am-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.am-field--wide { grid-column: 1 / -1; }
.am-field > label { font-size: .88rem; font-weight: 500; color: var(--am-primary); }
.am-req { color: var(--am-accent); }
.am-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .am-field select, .am-field textarea, .am-compose textarea, .am-inline input[type=text] {
	width: 100%; padding: 11px 14px; border: 1px solid var(--am-line-strong); border-radius: 10px; background: var(--am-surface); color: var(--am-text); font: inherit; font-size: .97rem; transition: border-color .2s, box-shadow .2s;
}
.am-field textarea, .am-compose textarea { resize: vertical; min-height: 44px; }
.am-field input:focus, .am-field select:focus, .am-field textarea:focus, .am-compose textarea:focus, .am-inline input:focus { outline: none; border-color: var(--am-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--am-accent) 22%, transparent); }
.am-field.has-error input, .am-field.has-error select, .am-field.has-error textarea { border-color: var(--am-bad); }
.am-field__help { color: var(--am-muted); font-size: .8rem; }
.am-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .93rem; }
.am-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--am-primary); flex: none; }
.am-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px dashed var(--am-line-strong); border-radius: 12px; cursor: pointer; color: var(--am-muted); background: var(--am-tint); transition: border-color .2s, background .2s; }
.am-drop:hover, .am-drop.is-over { border-color: var(--am-accent); background: var(--am-brass-tint); }
.am-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.am-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.am-inline .am-field { margin: 0; flex: 1 1 200px; }
.am-inline--tight { margin: 0; flex-wrap: nowrap; }
.am-inline--tight input { padding: 7px 10px !important; min-width: 110px; }

/* Task form */
.am-formpage { max-width: 860px; }
.am-step { border: 0; padding: 0; margin: 0 0 34px; }
.am-step legend { display: flex; align-items: center; gap: 12px; font-family: var(--am-display); font-size: 1.5rem; color: var(--am-primary); font-weight: 600; margin-bottom: 16px; padding: 0; }
.am-step legend span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--am-accent); color: var(--am-accent); font-size: 1rem; font-family: var(--am-body); }
.am-catpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.am-catpick__item { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--am-line-strong); border-radius: 12px; cursor: pointer; background: var(--am-surface); transition: border-color .2s, background .2s; }
.am-catpick__item input { position: absolute; opacity: 0; }
.am-catpick__item:hover { border-color: var(--am-accent); }
.am-catpick__item:has(input:checked) { border-color: var(--am-primary); background: var(--am-tint); box-shadow: inset 0 0 0 1px var(--am-primary); }
.am-catpick__item:has(input:focus-visible) { outline: 2px solid var(--am-accent); outline-offset: 2px; }
.am-catpick__icon { font-size: 1.5rem; }
.am-catpick__name { font-size: .92rem; font-weight: 500; line-height: 1.3; }
.am-formbar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 0; background: linear-gradient(transparent, var(--am-bg) 30%); }

/* Rating */
.am-rate { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 12px; }
.am-rate input { position: absolute; opacity: 0; }
.am-rate label { cursor: pointer; color: var(--am-line-strong); }
.am-rate label .am-ico { width: 30px; height: 30px; }
.am-rate input:checked ~ label, .am-rate label:hover, .am-rate label:hover ~ label { color: var(--am-accent); }
.am-rate input:checked ~ label .am-ico, .am-rate label:hover .am-ico, .am-rate label:hover ~ label .am-ico { fill: var(--am-accent); }

/* ---------- Tables & lists ---------- */
.am-table-wrap { overflow-x: auto; }
.am-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.am-table th { text-align: left; font-weight: 500; color: var(--am-muted); font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--am-line-strong); white-space: nowrap; }
.am-table td { padding: 12px; border-bottom: 1px solid var(--am-line); vertical-align: top; }
.am-table tr:last-child td { border-bottom: 0; }
.am-table a { color: var(--am-primary); font-weight: 500; }
.am-table--dense td { padding: 8px 12px; }
.am-table code, .am-defs code, .am-sum code { font-size: .82rem; background: var(--am-tint); padding: 2px 6px; border-radius: 4px; }
.am-list { list-style: none; margin: 0; padding: 0; }
.am-list li + li { border-top: 1px solid var(--am-line); }
.am-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: inherit; }
.am-list a strong { display: block; font-weight: 500; color: var(--am-primary); }
.am-list small { color: var(--am-muted); font-size: .82rem; display: block; }
.am-list--plain li { padding: 12px 0; }
.am-list--plain p { margin: 6px 0 0; font-size: .9rem; }
.am-pager { display: flex; gap: 10px; justify-content: center; }

/* ---------- Ops ---------- */
.am-queues { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--am-line); border-radius: var(--am-radius); overflow: hidden; background: var(--am-surface); margin-bottom: 10px; }
.am-queue { display: flex; flex-direction: column; gap: 4px; padding: 22px; text-decoration: none; color: var(--am-text); border-right: 1px solid var(--am-line); border-bottom: 1px solid var(--am-line); margin: 0 -1px -1px 0; transition: background .2s; }
.am-queue:hover { background: var(--am-tint); }
.am-queue .am-ico { color: var(--am-accent); }
.am-queue strong { font-family: var(--am-display); font-size: 2.4rem; font-weight: 500; color: var(--am-primary); line-height: 1; margin-top: 8px; }
.am-queue span { color: var(--am-muted); font-size: .9rem; }
.am-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.am-vcard { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; background: var(--am-surface); border: 1px solid var(--am-line); border-radius: 12px; padding: 16px; }
.am-vcard__icon { font-size: 1.3rem; color: var(--am-accent); }
.am-vcard strong { font-weight: 500; font-size: .92rem; }
.am-vcard small { color: var(--am-muted); font-size: .8rem; }
.am-vrow__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.am-vrow__head > div { flex: 1; }
.am-vrow__head small { display: block; color: var(--am-muted); }
.am-fin__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.am-fin__head > div { flex: 1; }
.am-fin__head small { display: block; color: var(--am-muted); font-size: .82rem; }
.am-fin__amt { font-family: var(--am-display); font-size: 1.6rem; font-weight: 600; color: var(--am-primary); }

/* ---------- Auth ---------- */
.am-auth-wrap, .am-gate { display: flex; flex-direction: column; align-items: center; padding: 40px 16px; }
.am-gate h2 { font-family: var(--am-display); color: var(--am-primary); font-weight: 500; font-size: 2rem; text-align: center; margin: 0 0 24px; }
.am-auth { width: 100%; max-width: 460px; background: var(--am-surface); border: 1px solid var(--am-line); border-radius: calc(var(--am-radius) + 6px); padding: 30px clamp(20px, 4vw, 36px) 32px; box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--am-primary) 50%, transparent); }
.am-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; margin: -6px 0 24px; border-bottom: 1px solid var(--am-line); }
.am-auth__tabs a { text-align: center; padding: 10px; text-decoration: none; color: var(--am-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.am-auth__tabs a.is-current { color: var(--am-primary); border-color: var(--am-accent); }
.am-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: .9rem; }
.am-auth__row .am-field { margin: 0; }
.am-auth__row a, .am-auth a { color: var(--am-primary); }
.am-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.am-seg label { position: relative; cursor: pointer; }
.am-seg input { position: absolute; opacity: 0; }
.am-seg span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border: 1px solid var(--am-line-strong); border-radius: 12px; transition: border-color .2s, background .2s; }
.am-seg strong { font-weight: 500; font-size: .92rem; color: var(--am-primary); line-height: 1.3; }
.am-seg small { color: var(--am-muted); font-size: .8rem; }
.am-seg input:checked + span { border-color: var(--am-primary); background: var(--am-tint); box-shadow: inset 0 0 0 1px var(--am-primary); }
.am-seg input:focus-visible + span { outline: 2px solid var(--am-accent); outline-offset: 2px; }

/* ---------- Public components ---------- */
.am-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--am-line); margin: 24px 0; }
.am-cat { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--am-line); }
.am-cat__icon { font-size: 1.7rem; }
.am-cat h3 { font-family: var(--am-display); font-size: 1.45rem; color: var(--am-primary); margin: 10px 0 6px; font-weight: 600; }
.am-cat p { margin: 0 0 8px; color: var(--am-muted); }
.am-cat__note { color: var(--am-accent); font-size: .82rem; }
.am-cities { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.am-cities li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--am-line-strong); }
.am-cities .am-ico { color: var(--am-accent); width: 16px; height: 16px; }
.am-pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 24px 0; }
.am-pricing__col h3 { font-family: var(--am-display); color: var(--am-primary); font-size: 1.4rem; margin: 0 0 6px; }
.am-pricing__big { font-family: var(--am-display); font-size: 1.9rem; color: var(--am-primary); line-height: 1.15; margin: 0 0 8px; }
.am-pricing__example { grid-column: 1 / -1; background: var(--am-tint); border-radius: var(--am-radius); padding: 24px 28px; }
.am-pricing__example h4 { font-family: var(--am-display); font-size: 1.3rem; margin: 0 0 12px; color: var(--am-primary); }
.am-pricing__example dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; max-width: 420px; margin: 0 0 10px; }
.am-pricing__example dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.am-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.am-policy li { margin-bottom: 6px; }
.am-grievance dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.am-grievance dt { color: var(--am-muted); }
.am-grievance dd { margin: 0; }
.am-contact { max-width: 720px; }
.am-legal-note { background: var(--am-brass-tint); border-left: 3px solid var(--am-accent); padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: .92rem; }
.am-standalone { max-width: 900px; margin: 0 auto; }

/* ---------- Mobile tab bar ---------- */
.am-tabbar { display: none; }

/* ---------- Toast ---------- */
.am-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 99999; background: var(--am-primary); color: #fff; padding: 13px 22px; border-radius: 999px; font: 500 .93rem var(--am-body); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35); transition: opacity .25s var(--am-ease), transform .25s var(--am-ease); max-width: calc(100vw - 32px); text-align: center; }
.am-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.am-toast--bad { background: var(--am-bad); }

/* ---------- Install banner ---------- */
.am-install { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9998; max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 12px; background: var(--am-surface); border: 1px solid var(--am-line); border-radius: 18px; padding: 12px 14px; box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--am-primary) 50%, transparent); font-family: var(--am-body); }
.am-install[hidden] { display: none; }
.am-install img { border-radius: 10px; }
.am-install div { flex: 1; min-width: 0; }
.am-install strong { display: block; font-size: .92rem; color: var(--am-primary); }
.am-install small { display: block; color: var(--am-muted); font-size: .78rem; line-height: 1.35; }
.am-install .am-btn { padding: 9px 16px; font-size: .85rem; }
.am-install__x { border: 0; background: none; font-size: 1.4rem; color: var(--am-muted); cursor: pointer; padding: 0 4px; }

/* ---------- Test panel (front) ---------- */
.am-tp__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.am-tp__card h2 { font-family: var(--am-display); color: var(--am-primary); font-size: 1.6rem; margin: 0 0 8px; }
.am-tp__list { list-style: none; margin: 14px 0; padding: 0; font-size: .92rem; }
.am-tp__list li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--am-line); flex-wrap: wrap; }
.am-tp__list li span { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; }
.am-tp__list .is-pass span { background: var(--am-good); }
.am-tp__list .is-fail span { background: var(--am-bad); }
.am-tp__list .is-warn span { background: var(--am-accent); }
.am-tp__list small { color: var(--am-muted); flex-basis: 100%; padding-left: 32px; }
.am-tp__score { font-size: 1.05rem; }
.am-tp__score strong { font-family: var(--am-display); font-size: 2rem; }
.am-tp__score.is-good strong { color: var(--am-good); }
.am-tp__score.is-bad strong { color: var(--am-bad); }
.am-tp__row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.am-tp__form { display: inline; margin: 0; }
.am-tp__links { columns: 2; padding-left: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.am-detail { grid-template-columns: 1fr; }
	.am-detail__side { position: static; }
	.am-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.am-app { grid-template-columns: 1fr; }
	.am-side { display: none; }
	.am-main { padding: 22px 16px 110px; }
	.am-top { margin-bottom: 22px; padding-bottom: 16px; align-items: center; }
	.am-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: var(--am-primary); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
	.am-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: color-mix(in srgb, #fff 62%, var(--am-primary)); text-decoration: none; font-size: .68rem; padding: 4px 2px; border-radius: 10px; text-align: center; line-height: 1.2; }
	.am-tabbar a.is-current { color: #fff; }
	.am-tabbar a.is-current .am-ico { color: var(--am-accent); }
	.am-install { bottom: 84px; }
	.am-toast { bottom: 92px; }
}
@media (max-width: 640px) {
	.am-grid2, .am-grid3, .am-pricing, .am-seg { grid-template-columns: 1fr; }
	.am-task { grid-template-columns: 40px minmax(0, 1fr); padding: 16px; gap: 12px; }
	.am-task__icon { width: 40px; height: 40px; font-size: 1.1rem; }
	.am-task__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
	.am-stats { flex-wrap: nowrap; overflow-x: auto; }
	.am-stat { flex: 1 0 33%; min-width: 108px; padding: 12px 14px; }
	.am-stat__label { font-size: .75rem; }
	.am-stat__value { font-size: 1.7rem; }
	.am-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
	.am-chip { flex: none; }
	.am-task__body strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
	.am-top__title { font-size: 1.9rem; }
	.am-defs { grid-template-columns: 1fr; gap: 2px; }
	.am-defs dd { margin-bottom: 10px; }
	.am-msg { max-width: 92%; }
	.am-next { padding: 22px 18px 20px 22px; }
	.am-top__actions .am-btn { padding: 10px 14px; }
	.am-tp__grid { grid-template-columns: 1fr; }
	.am-formbar { justify-content: stretch; }
	.am-formbar .am-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	[class*="am-"] { transition: none !important; animation: none !important; }
}
@media print {
	.am-side, .am-tabbar, .am-install, .am-next form, .am-help { display: none !important; }
	.am-app { display: block; }
}
