@import url("/xag-button.css");
@import url("/xag-checks.css");
/* ONE LOOK FOR NEW UI (owner order: everything matches the home page). Loaded last, after readable-layout.css, on every page except the home page itself.
   It sets the shared look of cards, buttons (primary / secondary), form fields, badges, notices, tables and lists for the per-feature classes
   (sp-*, mk-*, cn-*, rr-*, rp-*, xf-*, xta-*, xtf-* ...) and gives pages that have no own button styles the home .btn family.
   Colours come from the tokens below (which follow the theme) and from xag-theme.css; a hard-coded colour only belongs in a token line here or in a theme file.
   test/ui-colours.test.mjs keeps new UI from adding page-level colours. Section headings (yellow with a dot) come from typo-fit.css. */
:root {
  --ui-card-r: var(--xag-radius, 16px);
  --ui-card-line: rgba(11, 28, 45, .12);
  --ui-card-shadow: 0 6px 20px rgba(11, 28, 45, .07);
  --xag-btn-radius: 28px; /* owner order: pill buttons (28px = a full pill up to 56px high, rounded corners on anything taller, so cards and option tiles never turn into ovals); change here to reshape every button family (home page .btn keeps its own 8px) */
  --ui-field-r: 8px;
  --ui-pri-bg: #304adc;
  --ui-pri-fg: #fff;
  --ui-sec-bg: #fff;
  --ui-sec-fg: #0b1c2d;
  --ui-sec-line: #304adc;
  --ui-ok: #047857;
  --ui-bad: #b91c1c;
  --ui-focus: #304adc;
}
html[data-theme="dark"], html[data-theme="glass"] {
  --ui-card-line: var(--xag-border, rgba(127, 208, 255, .22));
  --ui-card-shadow: var(--xag-shadow, 0 10px 30px rgba(3, 10, 30, .45));
  --ui-pri-bg: var(--xag-gold, #ffb000);
  --ui-pri-fg: var(--xag-gold-ink, #1a1100);
  --ui-sec-bg: rgba(26, 61, 129, .9);
  --ui-sec-fg: #d8e4fb;
  --ui-sec-line: #7385e7;
  --ui-ok: #34d399;
  --ui-bad: #fca5a5;
  --ui-focus: #ffb45c;
}
html[data-theme="brite"] {
  --ui-card-line: rgba(0, 229, 255, .3);
  --ui-card-shadow: var(--xag-shadow, 0 10px 30px rgba(3, 10, 30, .45));
  --ui-pri-bg: #304adc;
  --ui-pri-fg: #ffffff;
  --ui-sec-bg: #01306e;
  --ui-sec-fg: #fff;
  --ui-sec-line: #00e5ff;
  --ui-ok: #39ff88;
  --ui-bad: #fca5a5;
  --ui-focus: #00e5ff;
}

/* 1. CARDS: same corner radius and soft shadow as the home page cards */
.sp-card, .sp-form, .sp-founder, .mk-card, .mk-none, [class$="-card"], [class*="-card "] { border-radius: var(--ui-card-r); }
.sp-card, .sp-form, .sp-founder, .mk-card, .rr-card, .rp-card, .sai-card, .swp-card, .cn-card, .xh-card, .xv-card, .disc-card, .order-card { box-shadow: var(--ui-card-shadow); }
.sp-card, .sp-form { padding: 1rem 1.1rem; }
.sp-note, .mk-note.box, .rr-note, .swp-note, .recp-note { border-radius: 12px; }

/* 2. BUTTONS: one shape and weight; primary (blue in light, gold in dark/glass, green in Brite) and secondary (outline) */
.btn, .sp-btn, .mk-btn, .cn-btn, .xtf-btn, .xta-btn, .xf-btn, .xpm-btn, .xav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .45rem 1rem;
  border-radius: var(--xag-btn-radius); font-family: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .12s;
}
.btn { border: 1.5px solid transparent; font-size: .9rem; }
.btn-sm { min-height: 34px; padding: .3rem .7rem; font-size: .8rem; }
.xf-btn { display: flex; }
.btn:focus-visible, .sp-btn:focus-visible, .mk-btn:focus-visible, .cn-btn:focus-visible, .xtf-btn:focus-visible, .xta-btn:focus-visible, .xf-btn:focus-visible, .xpm-btn:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.btn:disabled, .sp-btn:disabled, .mk-btn:disabled { opacity: .55; cursor: not-allowed; }
/* primary */
.btn-turquoise, .btn-gold, .sp-btn:not(.alt), .mk-btn.mk-pri, #cnRoot .cn-btn.main, .cn-dlg .cn-btn.main, .xtf-btn.p, .xta-btn.p, .xf-btn:not(.xf-ghost) {
  background: var(--ui-pri-bg); border: 1.5px solid var(--ui-pri-bg); color: var(--ui-pri-fg);
}
.btn-turquoise:hover, .btn-gold:hover, .sp-btn:not(.alt):hover, .mk-btn.mk-pri:hover, .xtf-btn.p:hover, .xta-btn.p:hover, .xf-btn:not(.xf-ghost):hover { filter: brightness(1.08); }
/* a bare .btn (no variant class) is a primary button too: without this it showed the browser's own grey button or blue link (full audit 2026-11-09: Help > Send, Studio passport > Sign in). :where() keeps specificity at zero, so any page rule for .btn still wins. */
:where(.btn:not(.btn-turquoise, .btn-gold, .btn-outline, .btn-primary, .btn-blue, .btn-bright, .btn-ghost, .btn-secondary, .btn-danger, .btn-link, .ghost, .alt)) { background: var(--ui-pri-bg); border-color: var(--ui-pri-bg); color: var(--ui-pri-fg); }
/* secondary */
.btn-outline, .sp-btn.alt, .mk-btn:not(.mk-pri), #cnRoot .cn-btn:not(.main), .cn-dlg .cn-btn:not(.main), .xtf-btn:not(.p), .xta-btn:not(.p), .xf-btn.xf-ghost {
  background: var(--ui-sec-bg); border: 1.5px solid var(--ui-sec-line); color: var(--ui-sec-fg);
}
.btn-outline:hover, .sp-btn.alt:hover, .mk-btn:not(.mk-pri):hover, .xtf-btn:not(.p):hover, .xta-btn:not(.p):hover { border-color: var(--ui-pri-bg); }
html[data-theme="glass"] .sp-btn:not(.alt), html[data-theme="brite"] .sp-btn:not(.alt) { color: var(--ui-pri-fg); }

/* 3. FORM FIELDS: same corners, border and height everywhere */
.sp-form input[type=text], .sp-form input[type=email], .sp-form input[type=tel], .sp-form input[type=url], .sp-form select, .sp-form textarea,
#mktRoot input:not([type=checkbox]):not([type=radio]), #mktRoot select, #mktRoot textarea,
.xflow input:not([type=checkbox]):not([type=radio]), .xflow select, .xflow textarea {
  border-radius: var(--ui-field-r); border-width: 1.5px; min-height: 40px; font: inherit;
}
.sp-form textarea, #mktRoot textarea, .xflow textarea { min-height: 96px; }
.sp-form label { color: inherit; }
.sp-form input:focus-visible, .sp-form select:focus-visible, .sp-form textarea:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 2px; }
.sp-msg.bad, .mk-msg.bad, .xf-msg.bad { color: var(--ui-bad); }
.sp-msg.ok, .mk-msg.ok, .xf-msg.ok { color: var(--ui-ok); }

/* 4. BADGES AND CHIPS: pill shape, bold, small */
[class$="-badge"], [class*="-badge "], .sp-badge, .xk-pill, .xta-pill, .cn-pill, .mk-chip, .rr-chip, .xcf-chip {
  border-radius: var(--xag-radius-pill, 999px); font-weight: 700; line-height: 1.2;
}

/* 5. TABLES: same header, lines and rounding */
.sp-tbl, .sp-t, .sp-cmp { border-radius: 12px; }
.sp-tbl th, .sp-t th, .sp-cmp thead th { font-weight: 700; }
.sp-tbl tr:last-child td, .sp-t tr:last-child td { border-bottom-width: 1px; }

/* 6. LISTS: same bullets, indent and spacing inside cards and notices */
.sp-card ul, .sp-note ul, .sp-form ul, .mk-card ul { padding-inline-start: 1.2rem; }
.sp-card li, .sp-note li { margin-block: 0 .3rem; }
.sp-card li::marker, .sp-note li::marker { color: var(--ui-sec-line); }

/* 7. DIALOGS (modals): same radius, border and shadow as a card */
.xta-dlg, .cn-dlg, .xk-dlg, .rr-modal, [role="dialog"] { border-radius: var(--ui-card-r); box-shadow: var(--xag-shadow-lg, 0 22px 56px rgba(3, 10, 30, .55)); }
