/* assets/css/house.css - The site's own look for pages built from the Collection Manager's cm-*
   components (Trades, account and member profiles, Price Tracker): the page colors of the home
   page and Tools index (white, or the nav's charcoal in dark mode) instead of the Collection
   Manager's cool greys, and the Tools index's motifs: § chapter heads with dotted leaders,
   element marks and hairline rules. Put "house" next to "cm" on <main>. Prefix: house- */

.cm.house, .house .cm {
    --cm-bg: #ffffff;
    --cm-surface: #ffffff;
    --cm-surface-2: #f5f5f4;
    --cm-ink: #15151a;
    --cm-muted: #6b7280;
    --cm-line: #e5e7eb;
}
.dark .cm.house, .dark .house .cm {
    --cm-bg: #1a1a1a;
    --cm-surface: #1f1f1f;
    --cm-surface-2: #292929;
    --cm-ink: #ececec;
    --cm-muted: #9ca3af;
    --cm-line: #323232;
    --cm-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* Square-shouldered controls, like the site's buttons */
.house .cm-btn, .house .cm-filter-input, .house .cm-field, .house .cm-chip-select { border-radius: 0.3rem; }
.house .cm-btn-primary { border-radius: 0.3rem; }
.house .cm-segmented { border-radius: 0.35rem; }
.house .cm-segmented button { border-radius: 0.25rem; }
.house .cm-panel { border-radius: 0.4rem; }
.house .cm-add-input { border-radius: 0.4rem; }

/* ---------- Chapter heads: §01 TITLE ·········· 03 ---------- */
.house-chapter { display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
.house-chapter-no { flex: none; color: var(--cm-accent); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.house-chapter-title { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.house-chapter-title.is-lg { font-size: 1.6rem; letter-spacing: 0.01em; }
.house-leader { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--cm-accent); opacity: 0.5; transform: translateY(-0.25rem); }
.house-chapter-count { flex: none; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cm-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.house-tagline { margin-top: 0.35rem; font-size: 0.85rem; color: var(--cm-muted); }

/* ---------- Element mark: a gold-ruled square with a number and a symbol ---------- */
.house-mark {
    position: relative; flex: none; width: 4.5rem; height: 4.5rem; display: grid; place-items: center;
    border: 1px solid rgba(192, 160, 98, 0.55); background: rgba(192, 160, 98, 0.06);
}
.house-mark.is-dashed { border-style: dashed; background: transparent; }
.house-mark-no { position: absolute; top: 0.3rem; left: 0.4rem; font-size: 0.62rem; color: var(--cm-muted); }
.house-mark-symbol { font-size: 1.7rem; font-weight: 700; color: var(--cm-accent); line-height: 1; }

/* ---------- Ruled list rows with the gold edge on hover ---------- */
.house-row { position: relative; }
.house-row::before {
    content: ''; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; background: var(--cm-accent);
    transform: scaleY(0); transition: transform 0.2s;
}
.house-row:hover::before, .house-row:focus-visible::before, .house-row.is-active::before { transform: scaleY(1); }
@media (prefers-reduced-motion: reduce) { .house-row::before { transition: none; } }

/* ---------- Readout line under a header band: ◊ LABEL value ---------- */
.house-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; font-size: 0.85rem; }
.house-readout-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #9ca3af; }
.house-readout-label::before { content: '◊ '; color: var(--cm-accent); }

/* styles.css forces dark text fields to a blue-grey with !important; house pages use their own
   neutral surface, and fields that sit inside a styled box stay transparent */
.dark .house input[type="text"], .dark .house input[type="email"], .dark .house input[type="password"], .dark .house textarea {
    background-color: var(--cm-surface) !important; border-color: var(--cm-line) !important; color: var(--cm-ink) !important;
}
.dark .house input[type="text"]:focus, .dark .house input[type="email"]:focus, .dark .house input[type="password"]:focus, .dark .house textarea:focus {
    border-color: var(--cm-accent) !important;
}
.dark .house .cm-add-input input, .dark .house .tr-money-input input, .dark .house .pt-money-input input, .dark .house .ud-affix input {
    background-color: transparent !important; border-color: transparent !important;
}
