/* ── hierarchy.html — page styles (extracted from inline <style>) ── */

.tier { margin-bottom: 1.75rem; }
.tier-header { display: flex; align-items: center; gap: 12px; margin-bottom: 0.85rem; }
.tier-badge { font-size: 11px; font-weight: 400; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.tier-badge.t1 { background: var(--scarlet); color: var(--bg); }
.tier-badge.t2 { background: var(--scarlet-pale); color: var(--scarlet-dim); border: 0.5px solid #E0B0B8; }
.tier-badge.t3 { background: var(--surface); color: var(--text-muted); border: 0.5px solid var(--border); }
.tier-sublabel { font-size: 13px; color: var(--text-muted); }
.factors-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.factor-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem; }
.factor-card.t1 { border-left: 2px solid var(--scarlet); }
.factor-card.t2 { border-left: 2px solid #E0A0A8; }
.factor-card.t3 { border-left: 2px solid var(--border); }
.factor-num { font-size: 11px; margin-bottom: 4px; }
.factor-num.t1 { color: var(--scarlet); }
.factor-num.t2 { color: #C07080; }
.factor-num.t3 { color: var(--text-dim); }
.factor-name { font-size: 14px; color: var(--text); line-height: 1.3; }
.factor-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.rule-box { border-left: 2px solid; padding: 0.7rem 1rem; margin-top: 10px; font-size: 13px; line-height: 1.6; border-radius: 0; }
.rule-box.t1 { border-color: var(--scarlet); background: var(--scarlet-pale); color: var(--scarlet-dim); }
.rule-box.t2 { border-color: #E0A0A8; background: #FDF5F6; color: #9A5060; }
.rule-box.t3 { border-color: var(--border); background: var(--surface); color: var(--text-muted); }
.connector { display: flex; align-items: center; gap: 10px; margin: 0.5rem 0 1.25rem; }
.connector-line { flex: 1; height: 0.5px; background: var(--border); }
.connector-label { font-size: 11px; color: var(--text-dim); white-space: nowrap; letter-spacing: 0.04em; }

/* Build your own hierarchy */
.builder-intro { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }
.builder-tier { margin-bottom: 1.5rem; }
.builder-card { position: relative; padding-right: 2rem; }
.bf-remove { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.bf-remove:hover { color: var(--scarlet); background: var(--scarlet-pale); }
.bf-input { width: 100%; border: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--text); padding: 0; outline: none; }
.bf-input:focus { border-bottom: 1px solid var(--scarlet); }
.bf-input::placeholder { color: var(--text-dim); font-style: italic; }
.builder-add { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; border-style: dashed; color: var(--text-dim); min-height: 70px; transition: color 0.12s, border-color 0.12s, background 0.12s; }
.builder-add:hover { color: var(--scarlet); border-color: var(--scarlet); background: var(--scarlet-pale); }
.add-plus { font-size: 22px; line-height: 1; }
.add-label { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }
.builder-actions { display: flex; gap: 8px; margin-top: 1.5rem; flex-wrap: wrap; }
.builder-panel { margin-top: 1rem; padding: 1rem 1.25rem; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-md); }
.bpanel-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.bpanel-text { width: 100%; min-height: 110px; padding: 0.75rem; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; color: var(--text); resize: vertical; margin-bottom: 8px; box-sizing: border-box; }
.bpanel-msg { font-size: 12px; margin-left: 10px; }
.bpanel-msg.ok { color: #1D9E75; }
.bpanel-msg.err { color: var(--scarlet); }
.builder-divider { height: 0.5px; background: var(--border); margin: 2.5rem 0 1.5rem; }

/* Custom, editable tiers in the builder */
.bt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 0.85rem; }
.bt-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.bt-dot.t1 { background: var(--scarlet); }
.bt-dot.t2 { background: #E0A0A8; }
.bt-dot.t3 { background: var(--border); }
.bt-name { font-size: 14px; font-weight: 700; color: var(--text); border: none; background: transparent; font-family: inherit; padding: 2px 0; outline: none; border-bottom: 1px solid transparent; min-width: 130px; max-width: 55%; }
.bt-name:focus { border-bottom-color: var(--scarlet); }
.bt-name::placeholder { color: var(--text-dim); font-style: italic; font-weight: 400; }
.bt-count { margin-left: auto; flex-shrink: 0; }
.bt-remove { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 11px; letter-spacing: 0.04em; padding: 4px 8px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.bt-remove:hover { color: var(--scarlet); background: var(--scarlet-pale); }
.builder-add-tier { margin-top: 0.25rem; }

/* Flat full-width intro */
.hierarchy-intro-flat { max-width: 760px; margin: 0 auto 2.75rem; text-align: center; }
.hierarchy-intro-flat h2 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0.4rem 0 1rem; }
.hierarchy-intro-flat p { color: var(--text-muted); margin-bottom: 0.9rem; }

/* Each hierarchy = pyramid resting on its own sequential gates */
.hier-block { margin-bottom: 2.5rem; }
.hier-block + .hier-block { border-top: 0.5px solid var(--border); padding-top: 2.25rem; }
.pyramid-stage { margin-left: auto; margin-right: auto; margin-bottom: 1rem; }

/* His pyramid → blue */
.pyr-blue .pyramid-primary { background: linear-gradient(145deg, #3A7CC0, #1E5AA0); color: #f3f8ff; }
.pyr-blue .pyramid-secondary { background: linear-gradient(145deg, #D2E3F5, rgba(255,255,255,0.80)); }
.pyr-blue .pyramid-kicker { color: #2E6FB5; }
.pyr-blue .pyramid-primary .pyramid-kicker { color: #cfe6ff; }

/* His gates → blue */
.gates-blue .tier-badge.t1 { background: #1E5AA0; color: #fff; }
.gates-blue .tier-badge.t2 { background: #D2E3F5; color: #1E5AA0; border-color: #A9C6E6; }
.gates-blue .factor-card.t1 { border-left-color: #1E5AA0; }
.gates-blue .factor-card.t2 { border-left-color: #7FA9D6; }
.gates-blue .factor-num.t1 { color: #1E5AA0; }
.gates-blue .factor-num.t2 { color: #4E86C6; }
.gates-blue .rule-box.t1 { border-color: #1E5AA0; background: #EAF2FB; color: #17467F; }
.gates-blue .rule-box.t2 { border-color: #A9C6E6; background: #F2F7FC; color: #2E6FB5; }

/* Claude's synthesis uses the default scarlet hierarchy palette. */
.gates-scarlet .tier-badge.t1 { background: var(--scarlet); color: var(--bg); }
.gates-scarlet .tier-badge.t2 { background: var(--scarlet-pale); color: var(--scarlet-dim); border-color: #E0B0B8; }
.gates-scarlet .factor-card.t1 { border-left-color: var(--scarlet); }
.gates-scarlet .factor-card.t2 { border-left-color: #E0A0A8; }
.gates-scarlet .factor-num.t1 { color: var(--scarlet); }
.gates-scarlet .factor-num.t2 { color: #C07080; }
.gates-scarlet .rule-box.t1 { border-color: var(--scarlet); background: var(--scarlet-pale); color: var(--scarlet-dim); }
.gates-scarlet .rule-box.t2 { border-color: #E0A0A8; background: #FDF5F6; color: #9A5060; }

/* ChatGPT's synthesis → wine */
.pyr-wine .pyramid-primary { background: linear-gradient(145deg, #8C3553, #66243C); color: #f7e9ef; }
.pyr-wine .pyramid-secondary { background: linear-gradient(145deg, #E7CEDA, rgba(255,255,255,0.80)); }
.pyr-wine .pyramid-kicker { color: #7C2C48; }
.pyr-wine .pyramid-primary .pyramid-kicker { color: #f0cedd; }
.gates-wine .tier-badge.t1 { background: #6E2742; color: #fff; }
.gates-wine .tier-badge.t2 { background: #E7CEDA; color: #6E2742; border-color: #D3A8BC; }
.gates-wine .factor-card.t1 { border-left-color: #6E2742; }
.gates-wine .factor-card.t2 { border-left-color: #B27D93; }
.gates-wine .factor-num.t1 { color: #6E2742; }
.gates-wine .factor-num.t2 { color: #97506B; }
.gates-wine .rule-box.t1 { border-color: #6E2742; background: #F6EAF0; color: #571B32; }
.gates-wine .rule-box.t2 { border-color: #D3A8BC; background: #FAF2F6; color: #7C2C48; }

/* Color/type legend */
.pyr-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0 auto 2.25rem; max-width: 820px; font-size: 12px; color: var(--text-muted); }
.pyr-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.pyr-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex-shrink: 0; }

/* Synthesized generic-male → indigo */
.pyr-indigo .pyramid-primary { background: linear-gradient(145deg, #6A55C4, #453396); color: #f3f0fc; }
.pyr-indigo .pyramid-secondary { background: linear-gradient(145deg, #E1DBF5, rgba(255,255,255,0.80)); }
.pyr-indigo .pyramid-kicker { color: #5A46B0; }
.pyr-indigo .pyramid-primary .pyramid-kicker { color: #ddd4f7; }
.gates-indigo .tier-badge.t1 { background: #4E3D9E; color: #fff; }
.gates-indigo .tier-badge.t2 { background: #E3DDF6; color: #463893; border-color: #C7BCEB; }
.gates-indigo .factor-card.t1 { border-left-color: #4E3D9E; }
.gates-indigo .factor-card.t2 { border-left-color: #9486CE; }
.gates-indigo .factor-num.t1 { color: #4E3D9E; }
.gates-indigo .factor-num.t2 { color: #6D5BC0; }
.gates-indigo .rule-box.t1 { border-color: #4E3D9E; background: #EEEAF9; color: #3A2D78; }
.gates-indigo .rule-box.t2 { border-color: #C7BCEB; background: #F5F2FC; color: #5A48A8; }

/* Collapsible gate stacks (length control) */
.gates-collapsible > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border: 0.5px solid var(--border); border-radius: 20px; background: var(--surface); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin: 1.25rem 0 0.9rem; transition: border-color 0.12s, color 0.12s; }
.gates-collapsible > summary::-webkit-details-marker { display: none; }
.gates-collapsible > summary::before { content: "▸ show"; font-size: 10px; letter-spacing: 0.04em; }
.gates-collapsible[open] > summary::before { content: "▾ hide"; }
.gates-collapsible > summary:hover { border-color: var(--text-dim); color: var(--text); }

/* Author/model descriptor on block titles */
.label-desc { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--text-dim); margin-left: 8px; }

.pyr-note { max-width: 620px; margin: 1rem auto 0; text-align: center; font-size: 12px; color: var(--text-muted); line-height: 1.65; }
