/* Shared secondary-page finish. Palette and glass tokens are the homepage's
   rs-ambience.css + rs-glass-clear.css; no duplicate palette or business logic. */
html:root :is(body.rs-subpage,body.rs-detail,body.rs-console) {
  background: radial-gradient(ellipse 65% 36% at 10% 0%,var(--glow-a),transparent 75%),
              radial-gradient(ellipse 55% 35% at 96% 8%,var(--glow-b),transparent 75%),var(--bg);
  color:var(--text-main); min-height:100dvh;
}
html:root body.rs-subpage main { width:100%; max-width:1280px; padding:24px clamp(16px,3vw,36px); margin:auto; }
body.rs-subpage nav { display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; margin-bottom:24px; }
body.rs-subpage nav .theme-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-left:auto; }
body.rs-subpage .rs-page-content { min-width:0; }
body.rs-subpage :is(h1,h2,h3) { color:var(--text-main); text-wrap:balance; }
body.rs-subpage h1 { font-size:clamp(26px,4vw,38px); line-height:1.2; letter-spacing:-.035em; margin:0 0 20px; }
body.rs-subpage p { line-height:1.8; max-width:80ch; color:var(--text-muted); }
body.rs-subpage a { text-underline-offset:4px; }
body.rs-subpage nav>a:not(.brand),.rs-page-footer a { text-decoration:none; font-size:13px; color:var(--text-muted); }
body.rs-subpage :is(nav>a,.rs-page-footer a):hover { color:var(--text-main); }
/* One surface recipe for public content and both privileged consoles. */
html:root body.rs-console :is(.panel,.stats article,.login-card,.toolbar,.plan,.choice-group,.roles,.message,.guild-row,.channel-row,.options,.pre),
html:root body.rs-subpage :is(.rs-legal-view,.seo-hero,.seo-explain,.seo-group,.rs-catalog-tools,#rs-catalog-list>li) {
  background:linear-gradient(168deg,var(--gl-frost-a),var(--gl-frost-b) 46%,transparent),var(--gl-fill);
  border:1px solid var(--gl-edge); border-radius:18px;
  box-shadow:inset 0 1px 0 var(--gl-rim),var(--gl-depth);
  -webkit-backdrop-filter:blur(var(--g-blur,12px)); backdrop-filter:blur(var(--g-blur,12px));
  color:var(--text-main);
}
html:root body.rs-console :is(.top,.side,.sidebar) {
  background:color-mix(in srgb,var(--bg) 88%,transparent); border-color:var(--gl-edge);
  box-shadow:inset 0 -1px 0 var(--gl-rim-lo); backdrop-filter:blur(14px);
}
html:root body.rs-console :is(.primary,.outline,.ghost,.head-link,.quick button,.choice,.service-option,.login-glyph,.login-mark,.owner-pill,.tiny-pill,.chip,.chips span,.limit-tag) {
  background:var(--gl-chip); border:1px solid var(--gl-edge); color:var(--text-main);
  box-shadow:inset 0 1px 0 var(--gl-rim-lo);
}
html:root body.rs-console :is(.primary,.outline,.ghost,.quick button,.choice,.service-option):hover { background:var(--gl-chip-hi); border-color:var(--accent); }
html:root body.rs-console :is(.choice,.service-option)[aria-pressed=true],
html:root body.rs-console :is(.nav button,.sidebar nav button).active { background:var(--accent-wash); border-color:var(--accent); color:var(--text-main); }
html:root body.rs-console :is(label,.panel.calm p) { color:var(--text-muted); }
html:root body.rs-console :is(input:not([type=checkbox]):not([type=radio]),textarea,select) { background:var(--gl-chip); color:var(--text-main); border-color:var(--gl-edge); }
html:root body.rs-console :is(input,textarea,select):focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-wash); }
html:root body.rs-console :is(.brand,.brand span) { color:var(--text-main); }
body.rs-subpage .rs-catalog-tools { padding:20px; margin:24px 0; max-width:640px; }
body.rs-subpage .rs-catalog-tools label { display:block; color:var(--text-muted); margin-bottom:8px; }
body.rs-subpage .rs-catalog-tools input { width:100%; min-height:44px; background:var(--gl-chip); color:var(--text-main); border:1px solid var(--gl-edge); border-radius:12px; padding:12px 14px; font:inherit; }
body.rs-subpage #rs-catalog-count { margin:12px 0 0; font-size:12px; }
body.rs-subpage #rs-catalog-list { columns:auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:12px; list-style:none; padding:0; margin:24px 0; }
html:root body.rs-subpage #rs-catalog-list>li { -webkit-backdrop-filter:none; backdrop-filter:none; margin:0; min-width:0; overflow-wrap:anywhere; }
body.rs-subpage #rs-catalog-list>li>a { display:flex; align-items:center; min-height:64px; height:100%; padding:16px 18px; text-decoration:none; font-weight:600; border-radius:inherit; }
body.rs-subpage #rs-catalog-list>li:hover { background:var(--gl-chip-hi); }
body.rs-subpage #rs-catalog-list>li[hidden] { display:none!important; }
html:root body.rs-subpage .rs-legal-view { max-width:860px; margin:24px auto; padding:clamp(22px,4vw,48px); }
body.rs-subpage .rs-legal-content { max-width:72ch; }
body.rs-subpage .rs-legal-content :is(p,li) { color:var(--text-main); line-height:1.85; }
body.rs-subpage .rs-legal-kicker { color:var(--accent); letter-spacing:.14em; font-size:11px; }
body.rs-subpage .rs-legal-content h3 { margin-top:32px; }
body.rs-subpage .rs-legal-back { display:inline-flex; margin-top:24px; padding:10px 16px; border:1px solid var(--gl-edge); border-radius:12px; text-decoration:none; background:var(--gl-chip); }
body.rs-subpage .rs-page-footer { display:flex; flex-wrap:wrap; gap:14px 24px; padding:24px 0; margin-top:28px; border-top:1px solid var(--border); }
:is(body.rs-subpage,body.rs-console,body.rs-detail) :focus-visible { outline:2px solid var(--rs-focus,var(--accent)); outline-offset:3px; }
@media(max-width:640px) {
  body.rs-subpage nav { align-items:flex-start; }
  body.rs-subpage nav .theme-bar { width:100%; margin-left:0; }
  body.rs-subpage #rs-catalog-list { grid-template-columns:1fr; }
  body.rs-subpage .rs-page-footer { gap:16px; }
}
@supports not (backdrop-filter:blur(1px)) {
  html:root body.rs-console :is(.panel,.stats article,.login-card,.toolbar,.plan),
  html:root body.rs-subpage :is(.rs-legal-view,.rs-catalog-tools,#rs-catalog-list>li) { background:var(--card); }
}
@media(prefers-reduced-transparency:reduce) {
  html:root body.rs-console :is(.panel,.stats article,.login-card,.toolbar,.plan),
  html:root body.rs-subpage :is(.rs-legal-view,.rs-catalog-tools,#rs-catalog-list>li) { background:var(--card); backdrop-filter:none; }
}
@media(forced-colors:active) {
  html:root body.rs-console :is(.panel,.stats article,.login-card,.primary,.outline),
  html:root body.rs-subpage :is(.rs-legal-view,.rs-catalog-tools,#rs-catalog-list>li) { background:Canvas; color:CanvasText; border:1px solid CanvasText; box-shadow:none; }
}
/* Console symbols and selected checkmarks also follow the chosen ambience. */
html:root body.rs-console :is(.lock-icon,.login-glyph) { background:var(--accent-wash); color:var(--accent); border:1px solid var(--gl-edge); }
html:root body.rs-console .choice[aria-pressed=true] .tick { background:var(--accent); color:var(--bg); border-color:var(--accent); }
