/* ── Perfect Scale · shared components for the evidence/research architecture ── */

/* Breadcrumb */
.ps-crumb {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-dim, #8C877F);
    margin-bottom: 18px;
}
.ps-crumb a { color: var(--text-dim, #8C877F); border-bottom: 1px solid rgba(245,242,237,0.18); }
.ps-crumb a:hover { color: var(--text, #F5F2ED); }
.ps-crumb span { margin: 0 8px; opacity: 0.5; }

/* Prose */
.ps-prose { max-width: 760px; margin: 1.2rem auto 0; text-align: center; font-family: 'Inter', sans-serif; font-size: 17px; line-height: 1.75; color: var(--text-mid); }
.ps-prose-left { max-width: 720px; margin: 0 auto; font-family: 'Inter', sans-serif; font-size: 17px; line-height: 1.75; color: var(--text-mid); }
.ps-prose-left p { margin-bottom: 1.1rem; }
.ps-prose-left p:last-child { margin-bottom: 0; }
.ps-prose-left p strong { color: var(--text); font-weight: 600; }
.ps-lead { max-width: 780px; margin: 1.4rem auto 0; text-align: center; font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.55; color: var(--text-mid); }

/* Statement / big serif line */
.ps-statement { text-align: center; font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(30px, 4vw, 50px); line-height: 1.14; letter-spacing: -0.01em; color: var(--text); margin: 0 auto 1.6rem; max-width: 20ch; }
.ps-statement-left { text-align: left; margin-left: 0; margin-right: 0; }

/* Numeric strip */
.ps-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 980px; margin: 2.2rem auto 0; }
@media (max-width: 860px) { .ps-stats { grid-template-columns: repeat(2, 1fr); } }
.ps-stat { border-top: 2px solid var(--terracotta); padding-top: 16px; }
.ps-stat .n { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(28px, 3.4vw, 42px); line-height: 1; color: var(--text); }
.ps-stat .l { font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.45; color: var(--text-dim, #8C877F); margin-top: 10px; }

/* Question list */
.ps-qlist { max-width: 760px; margin: 1.8rem auto 0; padding: 0; list-style: none; }
.ps-qlist li { font-family: 'Libre Baskerville', Georgia, serif; font-size: 18px; line-height: 1.5; color: var(--text); padding: 0.95rem 0 0.95rem 1.5rem; border-bottom: 1px solid rgba(245,242,237,0.09); position: relative; }
.ps-qlist li:first-child { border-top: 1px solid rgba(245,242,237,0.09); }
.ps-qlist li::before { content: '?'; position: absolute; left: 0; top: 0.95rem; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--terracotta); font-weight: 600; }
.ps-qlist-note { max-width: 760px; margin: 1.2rem auto 0; font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.7; color: var(--text-dim, #8C877F); }

/* Dataset card */
.ps-card { max-width: 860px; margin: 0 auto; padding: 34px 38px; background: var(--bg-raised, #14110F); border: 1px solid rgba(245,242,237,0.10); border-radius: 8px; }
.ps-card h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; color: var(--text); margin: 0 0 14px; line-height: 1.3; }
.ps-card p { font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.72; color: var(--text-mid); margin: 0 0 14px; }
.ps-card .ps-card-figs { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--text-dim, #8C877F); margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(245,242,237,0.09); }
.ps-card a.ps-more { display: inline-block; margin-top: 18px; font-family: 'Inter', sans-serif; font-size: 15px; color: var(--terracotta); border-bottom: 1px solid rgba(198,121,102,0.4); }
.ps-card a.ps-more:hover { color: var(--text); border-bottom-color: var(--text); }

/* Notes panel */
.ps-note { max-width: 800px; margin: 1.6rem auto 0; padding: 26px 30px; background: var(--bg-raised, #14110F); border: 1px solid rgba(245,242,237,0.10); border-radius: 8px; }
.ps-note h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 18px; font-weight: 400; color: var(--text); margin: 0 0 10px; }
.ps-note h3 + p { margin-top: 0; }
.ps-note p { font-family: 'Inter', sans-serif; font-size: 15.5px; line-height: 1.7; color: var(--text-mid); margin: 0 0 20px; }
.ps-note p:last-child { margin-bottom: 0; }

/* Inline link list */
.ps-links { max-width: 760px; margin: 1.6rem auto 0; font-family: 'Inter', sans-serif; font-size: 15.5px; line-height: 2; }
.ps-links a { color: var(--terracotta); border-bottom: 1px solid rgba(198,121,102,0.35); }
.ps-links a:hover { color: var(--text); border-bottom-color: var(--text); }
.ps-links span { color: var(--text-muted, #6E6A64); margin: 0 12px; }

/* Outcome differential ranking chart */
.ps-diff { max-width: 860px; margin: 2rem auto 0; font-family: 'Inter', sans-serif; }
.ps-diff-head, .ps-diff-foot { display: grid; grid-template-columns: 150px 1fr 62px; gap: 12px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim, #8C877F); }
.ps-diff-head { padding-bottom: 8px; border-bottom: 1px solid rgba(245,242,237,0.10); margin-bottom: 8px; }
.ps-diff-foot { padding-top: 8px; margin-top: 8px; border-top: 1px solid rgba(245,242,237,0.10); }
.ps-diff-row { display: grid; grid-template-columns: 150px 1fr 62px; gap: 12px; align-items: center; padding: 2px 0; }
.ps-diff-name { font-size: 12.5px; color: var(--text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-diff-bar-wrap { position: relative; height: 11px; }
.ps-diff-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(245,242,237,0.22); }
.ps-diff-bar { position: absolute; top: 1px; height: 9px; border-radius: 1px; }
.ps-diff-bar.neg { right: 50%; background: #C67966; }
.ps-diff-bar.pos { left: 50%; background: #5B8A72; }
.ps-diff-val { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.ps-diff-val.neg { color: #D88774; }
.ps-diff-val.pos { color: #7FB37F; }
.ps-caption { max-width: 860px; margin: 1.2rem auto 0; font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.65; color: var(--text-dim, #8C877F); }
@media (max-width: 620px) {
    .ps-diff-head, .ps-diff-foot, .ps-diff-row { grid-template-columns: 104px 1fr 50px; gap: 8px; }
    .ps-diff-name { font-size: 11px; }
}

/* Publication meta (research pages) */
.ps-pubtype { display: inline-block; font-family: 'Inter', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta); border: 1px solid rgba(198,121,102,0.45); border-radius: 2px; padding: 3px 8px; }
.ps-pubmeta { max-width: 760px; margin: 1.4rem 0 0; font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.8; color: var(--text-dim, #8C877F); }
.ps-pubmeta dt { display: inline; font-weight: 600; color: var(--text-muted, #6E6A64); }
.ps-pubmeta dd { display: inline; margin: 0 0 0 6px; }
.ps-pubmeta div { display: block; }

/* End-of-publication block */
.ps-pubend { max-width: 760px; margin: 3rem auto 0; padding-top: 1.6rem; border-top: 1px solid rgba(245,242,237,0.12); font-family: 'Inter', sans-serif; }
.ps-pubend h3 { font-family: 'Inter', sans-serif; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim, #8C877F); font-weight: 600; margin: 0 0 10px; }
.ps-pubend p { font-size: 14.5px; line-height: 1.75; color: var(--text-mid); margin: 0 0 1.3rem; }
.ps-pubend .ps-cite { font-size: 13.5px; line-height: 1.7; color: var(--text-dim, #8C877F); background: var(--bg-raised, #14110F); border: 1px solid rgba(245,242,237,0.09); border-radius: 6px; padding: 14px 16px; }
.ps-pubend a { color: var(--terracotta); border-bottom: 1px solid rgba(198,121,102,0.35); }
.ps-pubend a:hover { color: var(--text); border-bottom-color: var(--text); }

/* Publication cards on the research index */
.ps-pubs { display: grid; gap: 0; max-width: 900px; margin: 0 auto; }
.ps-pub { display: block; padding: 1.6rem 0; border-bottom: 1px solid rgba(245,242,237,0.09); }
.ps-pub:first-child { border-top: 1px solid rgba(245,242,237,0.09); }
.ps-pub-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.ps-pub-kind { font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta); border: 1px solid rgba(198,121,102,0.4); border-radius: 2px; padding: 2px 7px; }
.ps-pub-scope, .ps-pub-date { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim, #8C877F); }
.ps-pub h2 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(19px, 2.1vw, 24px); font-weight: 400; line-height: 1.32; margin: 0 0 8px; }
.ps-pub h2 a { color: var(--text); }
.ps-pub h2 a:hover { color: var(--terracotta); }
.ps-pub p { font-family: 'Inter', sans-serif; font-size: 15.5px; line-height: 1.7; color: var(--text-mid); margin: 0; max-width: 76ch; }
.ps-filter { display: flex; gap: 8px; flex-wrap: wrap; max-width: 900px; margin: 0 auto 2rem; }
.ps-filter button { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim, #8C877F); background: none; border: 1px solid rgba(245,242,237,0.16); border-radius: 3px; padding: 7px 14px; cursor: pointer; transition: color .2s, border-color .2s; }
.ps-filter button:hover { color: var(--text); border-color: rgba(245,242,237,0.4); }
.ps-filter button[aria-pressed="true"] { color: var(--terracotta); border-color: var(--terracotta); }

/* Contents rail (method page) */
.ps-doc { display: grid; grid-template-columns: 1fr; gap: 40px; max-width: 1080px; margin: 0 auto; }
@media (min-width: 1000px) { .ps-doc { grid-template-columns: 210px 1fr; gap: 56px; } }
.ps-rail { font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.9; }
@media (min-width: 1000px) { .ps-rail { position: sticky; top: 96px; align-self: start; } }
.ps-rail h4 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim, #8C877F); font-weight: 600; margin: 0 0 12px; }
.ps-rail a { display: block; color: var(--text-mid); border-left: 1px solid rgba(245,242,237,0.12); padding-left: 12px; }
.ps-rail a:hover { color: var(--text); border-left-color: var(--terracotta); }
.ps-rail a.active { color: var(--terracotta); border-left-color: var(--terracotta); }
.ps-doc-body { max-width: 760px; }
.ps-doc-body h2 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(24px, 2.6vw, 30px); font-weight: 400; color: var(--text); margin: 2.8rem 0 1rem; line-height: 1.3; scroll-margin-top: 96px; }
.ps-doc-body h2:first-child { margin-top: 0; }
.ps-doc-body h3 { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600; color: var(--text); margin: 1.8rem 0 0.6rem; }
.ps-doc-body p, .ps-doc-body li { font-family: 'Inter', sans-serif; font-size: 16.5px; line-height: 1.8; color: var(--text-mid); }
.ps-doc-body p { margin: 0 0 1.1rem; }
.ps-doc-body ul { margin: 0 0 1.3rem; padding-left: 1.2rem; }
.ps-doc-body li { margin-bottom: 0.55rem; }
.ps-doc-body strong { color: var(--text); font-weight: 600; }
.ps-doc-body a { color: var(--terracotta); border-bottom: 1px solid rgba(198,121,102,0.35); }
.ps-doc-body a:hover { color: var(--text); border-bottom-color: var(--text); }
.ps-tiertable { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-family: 'Inter', sans-serif; font-size: 14.5px; }
.ps-tiertable th, .ps-tiertable td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid rgba(245,242,237,0.09); color: var(--text-mid); }
.ps-tiertable th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim, #8C877F); font-weight: 600; }
.ps-tiertable td:first-child { color: var(--text); }

/* Download table */
.ps-dl { width: 100%; border-collapse: collapse; max-width: 860px; margin: 0 auto; font-family: 'Inter', sans-serif; font-size: 15px; }
.ps-dl th, .ps-dl td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid rgba(245,242,237,0.09); }
.ps-dl th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim, #8C877F); font-weight: 600; }
.ps-dl td { color: var(--text-mid); }
.ps-dl td:first-child { color: var(--text); }
.ps-dl a { color: var(--terracotta); }
.ps-dl a:hover { color: var(--text); }
.ps-dl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-dl th.num { text-align: right; }

/* Form */
.ps-form { max-width: 620px; margin: 2rem auto 0; }
.ps-form label { display: block; font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim, #8C877F); margin-bottom: 7px; }
.ps-form input, .ps-form select, .ps-form textarea { width: 100%; padding: 12px 14px; margin-bottom: 20px; background: var(--bg-raised, #14110F); border: 1px solid rgba(245,242,237,0.16); border-radius: 6px; color: var(--text, #F5F2ED); font-family: 'Inter', sans-serif; font-size: 15.5px; line-height: 1.5; }
.ps-form textarea { min-height: 150px; resize: vertical; }
.ps-form input:focus, .ps-form select:focus, .ps-form textarea:focus { outline: none; border-color: var(--terracotta); }
.ps-form .hp { position: absolute; left: -9999px; }
.ps-form-note { font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.6; color: var(--text-dim, #8C877F); margin-top: 14px; }
.ps-form-note a { color: var(--terracotta); }
.ps-form-status { font-family: 'Inter', sans-serif; font-size: 15px; margin-top: 16px; min-height: 22px; }
.ps-form-status.ok { color: #7FB37F; }
.ps-form-status.err { color: var(--terracotta); }
