/* Shared research surfaces. Kept scoped so calculator and account layouts retain ownership.
   CE theme (docs/design/THEME.md): every colour is a --ce-* token from assets/mobile.css. Each rs-
   surface paints its own background (panel, card, context, account path), so it reads the same on
   /research, /account and inside the rental cash flow calculator, whatever page surrounds it. */
.research-surface{--rs-ink:var(--ce-ink);--rs-muted:var(--ce-muted);--rs-dim:var(--ce-dim);--rs-line:var(--ce-border);--rs-accent:var(--ce-primary);color:var(--rs-ink);font-family:var(--ce-font);line-height:1.6}
.research-surface *{box-sizing:border-box}
.research-surface [hidden]{display:none!important}
.research-surface a{color:var(--ce-link);text-underline-offset:4px}
.research-surface a:hover{color:var(--ce-link-hover)}
.research-surface h1,.research-surface h2,.research-surface h3{font-family:var(--ce-display);font-weight:600;color:var(--rs-ink);letter-spacing:-.02em;line-height:1.15}
.research-surface b,.research-surface strong{color:var(--rs-ink)}
/* .research-surface prefix: `.rs-panel p` (0,1,1) used to outrank a bare .rs-eyebrow, so the
   notebook's eyebrow rendered as 14px muted body text. */
.research-surface .rs-eyebrow{font:500 11px/1.6 var(--ce-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--ce-cyan);margin:0 0 9px}
.rs-panel{padding:clamp(20px,3vw,32px);border:1px solid var(--rs-line);background:var(--ce-surface);border-radius:var(--ce-radius);margin:20px 0;color:var(--rs-ink)}
.rs-panel h2{font-size:var(--ce-h2);margin:0 0 12px}
.rs-panel p{margin:8px 0;color:var(--rs-muted);font-size:14px}
.rs-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0 0}
/* Secondary by default, primary for the one main action. !important on colour beats the generic
   `.research-surface a` link colour, which has higher specificity than a single class. */
.rs-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 17px;border:1px solid var(--ce-border-strong);border-radius:var(--ce-radius-sm);font:600 13px/1.4 var(--ce-font);text-decoration:none!important;background:transparent;color:var(--ce-ink)!important;cursor:pointer}
.rs-button:hover{background:var(--ce-surface-2)}
.rs-button.primary{background:var(--ce-primary);color:var(--ce-primary-ink)!important;border-color:var(--ce-primary)}
.rs-button.primary:hover{background:var(--ce-primary-hover);border-color:var(--ce-primary-hover)}
.research-surface :focus-visible{outline:3px solid var(--ce-focus);outline-offset:3px}
.rs-status{font-size:13px;color:var(--rs-muted);min-height:24px;margin:8px 0}
.rs-context{background:var(--ce-surface-2);border:1px solid var(--rs-line);border-left:3px solid var(--ce-cyan);padding:14px 18px;border-radius:var(--ce-radius-sm);font-size:14px;margin-bottom:18px;color:var(--rs-ink)}
.rs-context strong{display:block;margin-bottom:4px;color:var(--rs-ink)}
.rs-context p{margin:4px 0;color:var(--rs-muted)}
.rs-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}
.rs-fields label,.rs-notes{font-size:13px;font-weight:600;display:block;color:var(--rs-ink)}
.research-surface input[type=text],.research-surface select,.research-surface textarea{display:block;width:100%;min-height:44px;padding:11px 12px;margin-top:6px;border:1px solid var(--ce-border-input);border-radius:var(--ce-radius-sm);background:var(--ce-surface-2);color:var(--ce-ink);font:16px/1.5 var(--ce-font);text-align:left}
.research-surface input[type=text]::placeholder,.research-surface textarea::placeholder{color:var(--ce-dim);opacity:1}
.research-surface input[type=text]:focus,.research-surface select:focus,.research-surface textarea:focus{border-color:var(--ce-focus)}
.research-surface select option{background:var(--ce-surface-2);color:var(--ce-ink)}
.research-surface textarea{resize:vertical;min-height:100px}
.rs-checks{display:grid;grid-template-columns:1fr 1fr;gap:10px 24px;border:0;padding:0;margin:18px 0}
.rs-checks legend{font-size:15px;font-weight:650;margin-bottom:10px;color:var(--rs-ink)}
.rs-check{display:flex;align-items:flex-start;gap:11px;padding:10px 0;cursor:pointer;font-size:13px;min-height:44px;color:var(--rs-ink)}
.rs-check input{flex:none;margin-top:4px;width:18px;height:18px;accent-color:var(--ce-primary)}
.rs-check small{display:block;color:var(--rs-dim);font-size:12px;font-weight:400;line-height:1.5;margin-top:4px}
.rs-check b{font-weight:600;color:var(--rs-ink)}
.rs-notebook{grid-column:1/-1}
.rs-path{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px;font-size:12px;color:var(--rs-muted)}
.rs-path span{color:var(--ce-primary);font-weight:700}
.rs-path i{width:25px;height:1px;background:var(--ce-border-strong)}
.rs-account-path{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:18px 22px;background:var(--ce-surface);border:1px solid var(--rs-line);border-left:3px solid var(--ce-cyan);border-radius:var(--ce-radius);margin:20px 0;color:var(--rs-ink)}
.rs-account-path p{font-size:14px;margin:0;color:var(--rs-muted)}
.rs-account-path a{color:var(--ce-link)}
.rs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.rs-hero{padding:0 0 4px}.rs-hero h1{font:600 var(--ce-h1)/1.12 var(--ce-display);letter-spacing:-.02em;margin:0 0 12px}.has-research .rs-hero>.rs-actions{display:none}.has-research .rs-hero>p:not(.rs-eyebrow){display:none}
.rs-card{padding:22px;border:1px solid var(--rs-line);border-radius:var(--ce-radius);background:var(--ce-surface);min-width:0;color:var(--rs-ink)}
.rs-card h3{font-size:20px;margin:10px 0 10px;overflow-wrap:anywhere}
.rs-card p{font-size:13px;color:var(--rs-muted);margin:8px 0;overflow-wrap:anywhere}
.rs-card .rs-notepreview{white-space:pre-wrap}
.rs-tag{display:inline-block;font:600 10px/1.4 var(--ce-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ce-link);background:var(--ce-info-bg);padding:6px 9px;border-radius:6px}
.rs-changes{padding:12px 15px;margin-top:14px;border:1px solid var(--rs-line);border-left:3px solid var(--ce-warn);border-radius:var(--ce-radius-sm);background:var(--ce-warn-bg);font-size:13px;color:var(--rs-ink)}
.rs-changes ul{padding-left:20px;margin:5px 0}
.rs-empty{grid-column:1/-1;text-wrap:pretty;padding:24px 26px;border:1px dashed var(--ce-border-strong);border-radius:var(--ce-radius);background:var(--ce-surface);color:var(--rs-muted);font-size:14px}
.rs-progress{height:4px;border-radius:4px;background:var(--ce-surface-2);margin:13px 0;overflow:hidden}.rs-progress span{display:block;height:100%;background:var(--ce-primary)}
.rs-textbutton{min-height:44px;border:0;background:transparent;color:var(--rs-muted);font:inherit;font-size:12px;cursor:pointer;text-decoration:underline;text-underline-offset:4px;padding:8px}
.rs-textbutton:hover{color:var(--ce-ink)}
@media(max-width:640px){.rs-grid,.rs-fields,.rs-checks{grid-template-columns:1fr}.rs-panel{padding:20px 16px}.rs-actions .rs-button{flex:1}.rs-card{padding:19px}.rs-path{gap:7px}.rs-account-path{padding:16px}}
@media(prefers-reduced-motion:reduce){.research-surface *{scroll-behavior:auto!important;transition:none!important}}
@media print{.research-surface,.research-surface .rs-panel,.research-surface .rs-card,.research-surface .rs-context,.research-surface .rs-account-path,.research-surface .rs-empty{background:#fff!important;color:#111!important;border-color:#bbb!important}.research-surface *{color:#111!important}}
