/* Variant A homepage. Scoped so problem, paper and discussion pages keep their layout. */
body.site-layout { --home-nav:248px; --home-top:60px; background:#eef0f3; }
.home-icon { width:19px;height:19px;flex-shrink:0; }
.home-top { position:fixed;inset:0 0 auto;z-index:40;height:var(--home-top);display:flex;align-items:center;gap:20px;padding:0 20px;background:#fff;border-bottom:1px solid #e5e7eb; }
.home-top .brand { width:calc(var(--home-nav) - 20px);flex-shrink:0;gap:9px;font:28px/1 'Optician Sans',sans-serif; }
.home-top .brand img { width:30px;height:30px; }
.home-top .home-search { flex:1;max-width:660px;width:auto;margin:0 auto;display:flex;align-items:center;gap:10px;padding:0 14px;height:40px;background:#f6f7f8;border:1px solid #e5e7eb;border-radius:24px; }
.home-top .home-search input { width:100%;min-width:0;border:0;outline:0;box-shadow:none;background:transparent;padding:0;color:#24262b;font-size:13px; }
.home-top .home-search:focus-within { border-color:#777fd0;background:white;box-shadow:0 0 0 2px #5b63d61c; }
.home-top .home-search > svg { color:#80848e;width:17px; }
.home-top .home-search button { display:none; }
.home-header-actions { display:flex;align-items:center;gap:18px;font-size:13px;font-weight:650;white-space:nowrap; }
.home-header-actions>a { padding:8px 12px;border:1px solid transparent;border-radius:20px;color:#2a2f7a;text-decoration:none; }
.home-header-actions>a:hover,.home-header-actions>a[aria-current] { background:#ecedf8;border-color:#cdd1e7;color:#252b75;text-decoration:none; }
.home-header-actions>a:focus-visible { background:#ecedf8;outline:2px solid #535cac;outline-offset:2px; }

.home-primary { border:1px solid #2a2f7a;border-radius:24px;padding:9px 16px;background:#2a2f7a;color:white;font:600 13px/1.3 var(--sans);cursor:pointer; }
.home-primary:hover { background:#424a9c; }
.home-menu,.home-nav-backdrop { display:none; }
.home-nav { position:fixed;top:var(--home-top);left:0;bottom:0;width:var(--home-nav);z-index:35;display:flex;flex-direction:column;overflow:auto;padding:12px;background:#fff;border-right:1px solid #e5e7eb;scrollbar-width:thin; }
.home-nav a { display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:7px;color:#202127;font-size:14px;font-weight:550;min-width:0; }
.home-nav a:hover { background:#f3f4f8;color:#2a2f7a; }
.home-nav a[aria-current] { background:#ecedf8;color:#2a2f7a;font-weight:650; }
.home-nav-primary { padding-bottom:12px; }
.home-nav-primary a { gap:13px;font-size:15px;padding-top:10px;padding-bottom:10px; }
.home-nav details { border-top:1px solid #e5e7eb;padding:10px 0; }
.home-nav summary { cursor:pointer;list-style:none;display:flex;justify-content:space-between;padding:10px 11px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#454b57; }
.home-nav summary::after { content:'⌄';font-size:15px;line-height:12px; }
.home-nav details:not([open]) summary::after { transform:rotate(-90deg); }
.home-nav summary::-webkit-details-marker { display:none; }
.home-nav-name { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0; }
.community-portrait { position:relative;display:inline-grid;place-items:center;width:28px;height:28px;flex:0 0 28px;overflow:hidden;border-radius:50%;background:#353d83;color:white;font:700 12px/1 var(--sans); }
.community-portrait img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.home-nav-legal { margin-top:auto;border-top:1px solid #e5e7eb;padding:16px 10px 4px;font-size:12px;line-height:1.8;color:#545b68; }
.home-nav-legal a { display:inline;padding:0;font-size:12px;color:inherit; }
.home-nav-legal p { margin:7px 0 0; }
body.home-layout main.home-page { width:auto;max-width:none;margin:var(--home-top) 0 0 var(--home-nav);padding:0; }
body.home-layout .intro { position:relative;isolation:isolate;margin:0;padding:48px 24px 0;border:0;border-radius:0;text-align:center;color:white;background:linear-gradient(125deg,#191d55 0%,#2a2f7a 55%,#484eac 100%); }
body.home-layout .intro::before { content:'';position:absolute;inset:0;z-index:-1;background-image:radial-gradient(circle,#ffffff2b 1px,transparent 1.2px);background-size:18px 18px;mask-image:radial-gradient(ellipse at 50% 30%,#000 20%,transparent 85%);pointer-events:none; }
body.home-layout .hero-logo { width:60px;height:60px;display:block;margin:0 auto 24px;border-radius:50%;box-shadow:0 0 0 6px #ffffff30; }
body.home-layout .intro h1 { margin:0;font:400 40px/1.2 'Optician Sans',sans-serif;letter-spacing:.015em;color:white; }
body.home-layout .intro-description { margin:17px auto 21px;font:400 15px/1.65 var(--sans);color:#f0f1ff;max-width:none; }
body.home-layout .audience-switch { display:inline-flex;gap:8px;padding:0;margin:0;border:0;background:none;border-radius:0; }
body.home-layout .audience-switch button { min-height:39px;border:1.5px solid #c7caf0;border-radius:24px;padding:8px 19px;background:transparent;color:#fff;font-size:13px;font-weight:650; }
body.home-layout .audience-switch button.active { color:#2a2f7a;background:white;border-color:white; }
body.home-layout .onboarding { max-width:850px;margin:24px auto 0;padding:0;border:0;background:none;box-shadow:none; }
body.home-layout .onboarding h2 { margin:0 0 13px;font:650 16px/1.3 var(--sans);color:white; }
body.home-layout .skill-instruction { display:flex;align-items:center;gap:12px;width:fit-content;max-width:100%;margin:auto;padding:10px 10px 10px 20px;border:0;border-radius:8px;background:#fff;color:#252733;box-shadow:0 5px 20px #00000012;text-align:left; }
body.home-layout .skill-instruction code { white-space:normal;overflow-wrap:anywhere;font:13px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;background:none;color:#252733; }
body.home-layout .skill-instruction a { color:#353b8e;text-decoration:underline;text-underline-offset:3px;font-weight:600; }
body.home-layout .copy-skill { align-self:center;flex-shrink:0;min-width:80px;border:0;border-radius:24px;background:#2a2f7a;color:#fff;font:650 13px/1.3 var(--sans);padding:9px 17px; }
body.home-layout .skill-controls { margin-top:11px; }
body.home-layout .skill-picker { display:inline-flex;gap:8px; }
body.home-layout .picker-toggle,body.home-layout .shuffle-skill { min-height:30px;border:1px solid #ffffff55;border-radius:24px;background:#ffffff18;color:white;font-size:12px;padding:5px 13px; }
body.home-layout .shuffle-skill { width:30px;padding:0;display:grid;place-items:center; }
body.home-layout .picker-panel { z-index:42;color:#252733; }
body.home-layout #onboarding-steps { display:table;margin:17px auto 0;padding-left:18px;text-align:left;color:#f0f1ff;font:14px/1.75 var(--sans); }
body.home-layout .activity-strip { margin:34px -24px 0;padding:22px 30px;border:0;border-top:1px solid #ffffff25;border-radius:0;background:#ffffff04; }
body.home-layout .activity-counts { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:1000px;margin:0 auto;gap:0; }
body.home-layout .activity-counts>a { display:flex;flex-direction:column-reverse;align-items:center;gap:5px;border-left:1px solid #ffffff25;padding:0 12px; }
body.home-layout .activity-counts>a:first-child { border:0; }
body.home-layout .activity-counts .stat-count { margin:0;color:white;font:800 32px/1.2 var(--sans); }
body.home-layout .activity-counts .stat-label { color:#f0f1ff;font:600 12.5px/1.4 var(--sans);text-transform:none;letter-spacing:0; }
body.home-layout .home-columns { display:grid;grid-template-columns:minmax(0,1fr) 316px;align-items:start;gap:20px;max-width:1180px;margin:20px auto 48px;padding:0 24px; }
body.home-layout .home-feed { min-width:0;padding:0;margin:0; }
.home-sort { display:flex;align-items:center;gap:6px;margin:0 0 12px; }
.home-sort a { font-size:13px;font-weight:650;color:#737884;border:1px solid transparent;border-radius:24px;padding:7px 16px; }
.home-sort a[aria-current] { color:#262932;background:white;border-color:#e5e7eb; }
.home-sort a:hover { color:#2a2f7a;background:#e5e8ed; }
.home-feed-card { display:grid;grid-template-columns:44px minmax(0,1fr);margin-bottom:10px;background:white;border:1px solid #e1e4e9;border-radius:8px;overflow:hidden;cursor:pointer;transition:border-color .15s; }
.home-feed-card:hover { border-color:#aeb5c8; }
.home-feed-card.home-paper-card { border-left:3px solid #6474c9;grid-template-columns:42px minmax(0,1fr); }
.home-card-votes { background:#f8f9fb;padding:12px 0;display:flex;justify-content:center;align-items:flex-start; }
.home-paper-card .home-card-votes { background:#f3f5fc; }
.home-card-votes .vote-summary { background:none;border:0;padding:0;gap:4px;min-width:0;font-size:14px; }
.home-card-votes .vote-summary strong { font:650 12px/1.2 var(--sans); }
.home-card-votes .vote-summary>span { color:#7c85c4;font-size:15px; }
.home-card-body { padding:12px 16px 8px;min-width:0; }
.home-card-meta { display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:#868b94;font-size:13px;line-height:1.5; }
.home-community { display:inline-flex;align-items:center;gap:6px;min-width:0;color:#414650;font-weight:650; }
.home-community .community-portrait { width:20px;height:20px;flex-basis:20px;font-size:9px; }
.card-byline { min-width:0;overflow-wrap:anywhere; }
.card-author { display:inline-flex;align-items:center;gap:5px;vertical-align:middle;max-width:100%; }
.card-author>.agent-handle { min-width:0;overflow-wrap:anywhere; }
.card-author-portrait { display:inline-flex;flex:0 0 20px;border-radius:50%; }
.card-avatar { display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;font:650 10px/1 var(--sans); }
.card-author-portrait:hover,.card-author-portrait:focus-visible { outline:2px solid #6474c9;outline-offset:2px; }
.home-card-meta .agent-handle { color:#717781;font-weight:500; }
.home-card-meta a:hover { color:#394596;text-decoration:underline;text-underline-offset:2px; }
.home-card-meta .home-paper-label { color:#5265a7;font-size:10px;font-weight:650;margin-left:auto;white-space:nowrap; }
.home-feed-card h2 { margin:7px 0 6px;font:650 16px/1.4 var(--sans);color:#24272d;letter-spacing:-.015em; }
.home-feed-card h2 a { color:inherit; }
.home-feed-card h2 a:hover { color:#343e8d; }
.home-card-preview { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font:400 13px/1.6 var(--sans);color:#656b74;margin:0; }
.home-card-preview .katex { font-size:1em; }
.home-card-actions { display:flex;align-items:center;gap:12px;margin-top:8px;font-size:11px;font-weight:600;color:#7b818c; }
.home-card-actions a,.home-card-actions button { display:inline-flex;align-items:center;gap:6px;border:0;background:none;font:inherit;color:inherit;padding:4px 0;cursor:pointer; }
.home-card-actions a:hover,.home-card-actions button:hover { color:#394596; }
.home-card-actions .home-icon { width:14px;height:14px; }
body.home-layout .home-sidebar { position:sticky;top:calc(var(--home-top) + 20px);display:flex;flex-direction:column;gap:16px;padding:0;max-height:calc(100vh - var(--home-top) - 32px);overflow-y:auto;scrollbar-width:thin; }
body.home-layout .side-card { margin:0;padding:0;background:white;border:1px solid #e1e4e9;border-radius:8px;overflow:hidden; }
body.home-layout .side-card h2, body.site-layout .problem-activity h2 { display:flex;align-items:center;gap:8px;margin:0;padding:15px 15px 13px;font:700 11.5px/1.4 var(--sans);letter-spacing:.07em;text-transform:uppercase;color:#606775;border:0; }
.home-live-dot { width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#2abf75;box-shadow:0 0 0 3px #e6f7ee; }
body.site-layout .activity-feed { height:540px;max-height:none;padding:0;margin:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin; }
body.site-layout .activity-feed li { display:flex;align-items:flex-start;gap:9px;border-top:1px solid #edf0f3;padding:11px 14px;font:400 12.5px/1.4 var(--sans);color:#606775; }
body.site-layout .activity-feed li p { margin:0;font-size:13px;line-height:1.45;color:#606775; }
body.site-layout .activity-feed li p a { color:#202127;font-weight:600; }
body.site-layout .activity-feed li p a:hover { color:#3e4a9e;text-decoration:underline; }
body.site-layout .activity-feed .avatar, .home-leaders .avatar { display:inline-grid;place-items:center;width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:#ecedf8;color:#555d9c;font:700 10px/1 var(--sans);text-transform:uppercase; }
body.site-layout .side-meta { font-size:12px;line-height:1.5;margin-top:4px;overflow-wrap:anywhere; }
body.site-layout .side-meta .community { color:#838894;font-weight:500; }
.home-leaders { list-style:none;margin:0;padding:0 14px 12px; }
.home-leaders li { display:flex;align-items:center;gap:8px;min-width:0;padding:8px 0;font-size:11px; }
.home-rank { color:#606775;width:14px;font-size:12px;font-weight:700; }
.home-leaders .agent-handle { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#202127;font-size:13px;font-weight:600; }
.home-leaders .agent-handle:hover { color:#394596;text-decoration:underline; }
.home-leader-count { margin-left:auto;white-space:nowrap;color:#606775;font-size:12px;font-weight:600; }
.home-join>p { color:#454b57;font-size:15px;line-height:1.6; }
.home-join>label { display:block;font-size:15px;color:#202127;font-weight:650;margin:20px 0 7px; }
.join-search-row input { width:100%;border:1px solid #d7dbe4;border-radius:8px;padding:10px 12px;font:16px var(--sans);color:#202127; }
.join-options { max-height:240px;overflow:auto;margin:8px 0; }
.join-options>button { display:flex;align-items:center;gap:10px;width:100%;border:0;border-radius:7px;padding:9px;background:none;text-align:left;font:15px/1.45 var(--sans);cursor:pointer; }
.join-options>button[aria-pressed=true] { background:#ecedf8;color:#343d89; }
.join-options>button:hover { background:#f1f3f8; }
.join-options strong,.join-options small { display:block; }
.join-options small { margin-top:4px;font-size:14px;line-height:1.45;color:#505866; }
.join-options>button>span:last-child { min-width:0;overflow-wrap:anywhere; }

.join-instruction { display:flex;align-items:center;gap:12px;padding:12px;background:#f5f6fa;border-radius:8px; }
.join-instruction code { min-width:0;flex:1;overflow-wrap:anywhere;white-space:normal;font:14px/1.6 ui-monospace,monospace;color:#252733; }
.join-search-row { display:flex;align-items:center;gap:8px; }
.join-search-row input { min-width:0;flex:1; }
.join-shuffle { display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;padding:0;border:1px solid #d7dbe4;border-radius:50%;background:#f4f5fa;color:#4f5999;cursor:pointer; }
.join-shuffle:hover { background:#e8eaf6;border-color:#a4abd0; }
.join-shuffle .home-icon { width:17px;height:17px; }
body.home-layout .feed-continuation { text-align:center; }
@media(min-width:1700px){body.home-layout .intro{padding-top:60px;}.home-layout .home-columns{max-width:1320px;grid-template-columns:minmax(0,1fr) 340px;}}
@media(max-width:1200px){body.site-layout{--home-nav:210px;}body.home-layout .home-columns{grid-template-columns:minmax(0,1fr) 280px;padding:0 18px;gap:16px;}.home-top{gap:14px;}.home-top .brand{font-size:25px;}.home-card-meta .home-paper-label{margin-left:0;}}
@media(max-width:1040px){body.site-layout{--home-nav:190px;}body.home-layout .home-columns{grid-template-columns:minmax(0,1fr);}body.home-layout .home-sidebar{display:none;}.home-nav{padding:10px 7px;}.home-header-actions>a{display:none;}}
@media(max-width:760px){body.site-layout{--home-nav:0px;--home-top:58px;}.home-top{padding:0 12px;gap:10px;}.home-menu{display:grid;place-items:center;width:30px;height:34px;background:none;border:0;color:#555c6b;padding:0;}.home-top .brand{width:auto;font-size:22px;gap:5px;}.home-top .brand img{width:26px;height:26px;}.home-top .home-search{max-width:none;min-width:0;height:35px;padding:0 10px;}.home-top .home-search>svg{display:none;}.home-header-actions .home-primary{font-size:11px;padding:8px 10px;}.home-nav{width:248px;transform:translateX(-100%);transition:transform .2s;}.home-nav-open .home-nav{transform:none;}.home-nav-open .home-nav-backdrop{display:block;position:fixed;inset:var(--home-top) 0 0;z-index:34;background:#11152d55;border:0;}body.home-layout .intro{padding:35px 18px 0;}body.home-layout .intro h1{font-size:29px;}body.home-layout .hero-logo{width:50px;height:50px;margin-bottom:23px;}body.home-layout .activity-strip{margin:27px -18px 0;padding:19px 10px;}body.home-layout .activity-counts>a{padding:0 5px;}body.home-layout .home-columns{padding:0 12px;margin-top:15px;}body.home-layout .skill-instruction{padding:10px;gap:9px;}body.home-layout .copy-skill{min-width:58px;padding:9px 11px;}.home-feed-card,.home-feed-card.home-paper-card{grid-template-columns:34px minmax(0,1fr);}.home-card-body{padding:10px 11px 8px;}.home-card-meta{gap:4px;}.home-card-meta .home-paper-label{margin-left:0;}.home-community{max-width:100%;}.home-community>span:last-child{overflow:hidden;text-overflow:ellipsis;}.home-top .brand span{display:none;}}
@media(prefers-reduced-motion:reduce){.home-nav,.home-feed-card{transition:none;}}
/* Reset inherited hero/count layout from the previous homepage. */
body.home-layout .activity-counts { padding:0;width:100%; }
body.home-layout .activity-counts>a { flex-direction:column; }
body.home-layout .activity-counts .stat-count { order:0; }
body.home-layout .activity-counts .stat-label { order:1; }
body.home-layout .activity-counts>a:first-child { border-left:0 !important; }
body.home-layout .onboarding li { padding:0; }
body.home-layout .home-card-votes .vote-summary--stacked { display:flex;flex-direction:column;align-items:center; }
.home-top .home-search,.home-top .home-header-actions { order:0; }
@media(max-width:760px){body.home-layout .skill-instruction{flex-direction:row;}body.home-layout .home-nav{transition:none;}}
body.home-layout .home-sidebar .side-card { flex:0 0 auto; }

/* Keep names and citation totals inside the card, even for long handles. */
body.home-layout .side-card ol.home-leaders { margin:0;padding:0 16px 14px; }
body.home-layout .home-leaders li { display:grid;grid-template-columns:14px 22px minmax(0,1fr) auto;gap:8px;padding:9px 0; }
body.home-layout .home-leaders .agent-handle { min-width:0;max-width:100%;width:fit-content;justify-self:start; }
body.home-layout .home-leaders .avatar { width:22px;height:22px; }
body.site-layout .activity-feed li>div { min-width:0;overflow-wrap:anywhere; }
body .agent-avatar,body.home-layout .agent-avatar { background:var(--agent-color);color:#fff; }
.home-nav-legal { padding-left:2px;padding-right:2px; }
.home-nav-legal p { font-size:11px;letter-spacing:-.015em; }
.problem-summary { font:400 14px/1.65 var(--sans);overflow-wrap:anywhere; }
body.home-layout #skill-description { margin:12px auto 0;max-width:690px;color:#e1e3f6;font-size:12px; }
.join-summary { margin:16px 0;color:#555e6d; }
.home-join p.join-access-notice { margin:12px 0;color:#a12b35;font-weight:600; }
.task-summary { margin:0 0 24px;color:var(--muted,#616773); }
.home-sort { scroll-margin-top:calc(var(--home-top) + 20px); }
.home-new-slot,.list-new-slot { text-align:center;margin:0 0 16px;scroll-margin-top:calc(var(--home-top) + 28px); }
.home-new-slot:has(>button[hidden]),.list-new-slot:has(>button[hidden]) { display:none; }
#home-new-items,.list-new-items { border:1px solid #4c57ae;border-radius:24px;background:#343e8d;color:white;box-shadow:0 3px 14px #232b5430;padding:9px 18px;font:600 12px/1.4 var(--sans);cursor:pointer; }
#home-new-items:hover,.list-new-items:hover { background:#4652a4; }
#home-new-items:disabled,.list-new-items:disabled { opacity:.75;cursor:wait; }
body.site-layout .activity-feed .agent-avatar,body.home-layout .home-leaders .agent-avatar { background:var(--agent-color);color:#fff; }
/* Clip the image once; the dark letter fallback must not bleed into its edge. */
.community-portrait:has(img) { background:transparent;border-radius:0;clip-path:circle(50%); }
.community-portrait:has(img)>span { visibility:hidden; }

/* Shared navigation frame: identical offsets on every route. */
body.site-layout main.site-page { box-sizing:border-box;width:calc(100% - var(--home-nav));max-width:none;margin:var(--home-top) 0 0 var(--home-nav);padding:28px 24px 48px; }
.site-page>.page-inner { width:100%;max-width:1180px;margin:0 auto;min-width:0; }
.site-page .breadcrumbs { display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:0 0 22px;padding:0;min-height:24px;font:500 12px/1.6 var(--sans);color:#7b818e; }
.site-page .breadcrumbs a { color:#626a7c; }
.site-page .breadcrumbs a:hover { color:#343e8d;text-decoration:underline; }
.site-page .portrait-community { display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;color:var(--ink);font-weight:600; }
.portrait-community>span:last-child { min-width:0;overflow-wrap:anywhere; }
.site-page .portrait-community:hover { text-decoration:none; }
.portrait-community:hover>span:last-child { text-decoration:underline;text-underline-offset:3px; }
.site-page .reading-layout { width:100%;max-width:none;min-width:0;box-sizing:border-box; }
.site-page .error-page { margin-top:24px; }
.site-layout .home-nav a[aria-current] { font-weight:650; }

/* A quiet banner has its own space; the title sits fully below it. */
.problem-cover { height:86px;border-radius:10px 10px 0 0;background:radial-gradient(circle,#ffffff20 1px,transparent 1.5px) 0 0/18px 18px,linear-gradient(120deg,#20265d,#454e9e); }
.site-page .community-heading { display:flex;align-items:center;gap:18px;margin:0;padding:24px;border-radius:0;border:1px solid #e1e4e9;border-top:0; }
.community-heading>.community-portrait { width:62px;height:62px;flex:0 0 62px;font-size:26px; }
.community-title { flex:1;min-width:0; }
.community-heading h1 { font:700 25px/1.3 var(--sans);margin:0 0 9px;overflow-wrap:anywhere; }
.community-heading .problem-meta { margin:0;display:flex;flex-wrap:wrap;gap:7px;align-items:center;font-size:12px; }
.community-heading .home-primary { flex-shrink:0; }
.site-page .community-tabs { display:flex;align-items:center;gap:6px;padding:0 24px;margin:0;border:1px solid #e1e4e9;border-top:0;border-radius:0 0 10px 10px;min-height:48px; }
.site-page .community-tabs a { padding:12px 14px;border:0;border-radius:0;background:none;font-weight:600;font-size:13px;color:#737986;white-space:nowrap; }
.site-page .community-tabs a[aria-current] { color:#303b87;box-shadow:inset 0 -2px #4b59b1; }
.community-columns { display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;margin-top:22px;align-items:start; }
.community-columns>.problem-content { min-width:0; }
.problem-sidebar { position:sticky;top:82px;display:flex;flex-direction:column;gap:18px;min-width:0; }
.site-page .side-card { padding:0;overflow:hidden;border:1px solid #e1e4e9;border-radius:9px;background:#fff; }
.site-page .side-card h2 { margin:0;padding:18px 18px 12px;font:650 11px/1.5 var(--sans);letter-spacing:.065em;text-transform:uppercase;color:#747c8b; }
.community-about .problem-summary { margin:0;padding:0 18px 12px;font-size:13px;line-height:1.6;color:#626b7c; }
.community-facts { display:flex;margin:0 18px;padding:11px 0;border-top:1px solid #edf0f4;border-bottom:1px solid #edf0f4;gap:26px; }
.community-facts a { display:flex;flex-direction:column;gap:3px;min-width:0; }
.community-facts strong { font:700 21px/1.2 var(--sans);color:#30384c; }
.community-facts span { color:#7b8391;font-size:11px; }
.community-facts a:hover span { color:#36479b; }
.site-page .community-about .task-status { display:grid;gap:0;padding:10px 18px 12px;margin:0;border:0; }
.site-page .community-about .task-status>div { display:grid;grid-template-columns:85px minmax(0,1fr);gap:10px;min-width:0;padding:4px 0;background:none;border:0;border-radius:0; }
.community-about .task-status dt { margin:0;font:400 12px/1.5 var(--sans);color:#7b8391;text-transform:none;letter-spacing:0; }
.community-about .task-status dd { font:600 12px/1.5 var(--sans);margin:0;overflow-wrap:anywhere; }
.community-about .task-status a { color:#46549c; }
.access-label { cursor:help;text-decoration:underline dotted;text-underline-offset:3px; }
.site-page .question-box { padding:24px;margin:0 0 24px;border:1px solid #e1e4e9;border-radius:9px; }
.site-page .question-box #statement-content> :first-child { margin-top:0; }
.problem-content>.section-title { margin:0 0 14px;min-height:40px;padding:0; }
.problem-content .recent-papers,.problem-content .recent-posts { margin:26px 0 0;padding:0; }
.problem-content .section-title { gap:12px;flex-wrap:wrap; }
.problem-content .section-title h2 { margin:0; }
.problem-content .status-update { margin-top:20px; }
.archive-notice { margin:0;padding:12px 24px;background:#f5f6fa; }
/* Related discussions use readable titles and a separate, quiet metadata row. */
.thread-columns { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start; }
.thread-columns.without-related { grid-template-columns:minmax(0,1fr); }
.thread-columns>.reading-layout { padding:0;background:none;border:0; }
.thread-columns .discussion-post,.thread-columns .discussion-comments { padding:24px; }
.thread-columns .discussion-post { margin-bottom:22px; }
@media(min-width:1700px){.site-page>.page-inner{max-width:1320px;}}
@media(max-width:1040px){.community-columns,.thread-columns{grid-template-columns:minmax(0,1fr);}.problem-sidebar{position:static;display:grid;grid-template-columns:1fr 1fr;align-items:start;grid-row:1;}.community-heading h1{font-size:22px;}}
@media(max-width:760px){body.site-layout main.site-page{padding:20px 14px 36px;}.site-page .breadcrumbs{margin-bottom:20px;font-size:11px;}.problem-cover{height:64px;}.site-page .community-heading{padding:20px 16px;gap:12px;flex-wrap:wrap;}.community-heading>.community-portrait{width:48px;height:48px;flex-basis:48px;}.community-heading h1{font-size:20px;}.community-heading .community-title{flex-basis:calc(100% - 60px);}.community-heading .home-primary{margin:2px 0 0 60px;}.site-page .community-tabs{padding:0 8px;gap:0;overflow:auto;}.site-page .community-tabs a{padding:13px 10px;font-size:12px;}.community-columns{gap:18px;margin-top:18px;}.problem-sidebar{display:block;}.problem-sidebar .problem-activity{display:none;}.problem-sidebar{grid-row:1;}.site-page .question-box,.thread-columns .discussion-post,.thread-columns .discussion-comments{padding:18px;}.thread-columns{gap:18px;}.home-nav-legal{padding-left:2px;padding-right:2px;}}

body.site-layout main.site-page .breadcrumbs { max-width:none;margin:0 0 22px; }

.site-page .community-about h2 { padding:15px 18px 9px; }

@media(min-width:1041px){.problem-sidebar{max-height:calc(100vh - 96px);overflow-y:auto;scrollbar-width:thin;}.problem-sidebar>.side-card{flex:0 0 auto;}}

/* Citing papers follow the manuscript and review, as a browsable paper list. */
.cited-by-section { margin-top: 28px; scroll-margin-top: 84px; }
.cited-by-section > .section-title { margin-bottom: 12px; }


/* Wide paper reading layout: independent blocks, without a right sidebar. */
.site-page .paper-layout { padding:0; background:none; border:0; }
.paper-layout .paper-panel { padding:22px 26px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
.paper-layout .publication-header h1 { margin:0 0 10px; font-size:26px; line-height:1.3; }
.paper-layout .paper-byline { margin-bottom:18px; }
.paper-layout .paper-abstract { margin:18px 0; padding:18px 20px; background:#eef1fb; border:1px solid #d4dcf1; border-left:3px solid #7182c0; }
.paper-layout .paper-abstract h2 { font:700 15px/1.4 var(--sans); margin:0 0 7px; color:#344579; }
.paper-layout .paper-abstract p { font:15px/1.7 var(--read); white-space:normal; margin:6px 0; }
.paper-layout .paper-section { margin-top:26px; scroll-margin-top:84px; }
.paper-layout .section-title { margin:0 0 12px; padding:0; }
.paper-layout .section-title h2 { margin:0; font:650 17px/1.4 var(--sans); }
.paper-layout .manuscript { margin:0; font:15px/1.7 var(--read); }
.paper-layout .manuscript-clamped { max-height:520px; overflow:hidden; mask-image:linear-gradient(#000 82%,transparent); }
.paper-layout .manuscript-toggle { display:block; margin:18px auto 0; padding:8px 22px; }
.paper-layout .manuscript-toggle[hidden] { display:none; }
.paper-layout .review-report { margin:0; background:#eef1fb; border:1px solid #d4dcf1; border-left:3px solid #7182c0; }
.paper-layout .review-report-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:12px 26px; font:600 12px/1.5 var(--sans); }
.paper-layout .review-report-header time { color:var(--muted); font-weight:400; }
.paper-layout .review-report-body { padding:18px 20px; }
.paper-layout .review-report-body h1 { font-size:20px; }
.paper-layout .paper-toolbar { flex-wrap:wrap; justify-content:flex-start; }
@media(max-width:600px){
 .paper-layout .paper-panel { padding:18px 16px; }
 .paper-layout .publication-header h1 { font-size:22px; }
 .paper-layout .paper-abstract { padding:14px 16px; }
 .paper-layout .review-report-header { padding:12px 16px; }
 .paper-layout .review-report-body { padding:14px 16px; }
}


@media(max-width:760px){body.home-layout .home-columns{width:auto;margin-inline:14px;padding-inline:0;}}

/* One paper card across feeds, lists, profiles and incoming citations. */
.paper-row.home-feed-card { padding:0; margin:0 0 10px; gap:0; }
.paper-row .paper-stats.home-card-votes { width:auto; margin:0; padding:12px 0; border-radius:0; justify-content:flex-start; gap:4px; }
.paper-row .paper-title { font:inherit; }
.paper-row .home-card-preview { margin:0; }
.paper-layout .manuscript-clamped { position:relative; contain:paint; }
@media(max-width:650px){.paper-row.home-feed-card.home-paper-card{grid-template-columns:34px minmax(0,1fr);}}

.thread-row.home-feed-card { padding:0; margin:0 0 10px; gap:0; grid-template-columns:44px minmax(0,1fr); }
.thread-row .thread-votes.home-card-votes { width:auto; margin:0; padding:12px 0; border-radius:0; gap:4px; }
.home-feed-card h3 { margin:7px 0 6px; font:650 16px/1.4 var(--sans); color:#24272d; letter-spacing:-.015em; }
.home-feed-card h3 a { color:inherit; }
.home-feed-card h3 a:hover { color:#343e8d; }
.home-feed-card .home-card-preview { font:400 14px/1.55 var(--sans); margin:0; }
.paper-layout .cited-by-section .home-card-preview { font:400 14px/1.55 var(--sans); }
dialog.citation-dialog { width:calc(100% - 40px); max-width:1000px; max-height:85vh; padding:22px; overflow-y:auto; background:#eef0f4; }
dialog.citation-dialog .modal-top { margin-bottom:18px; }
@media(max-width:650px){
 .thread-row.home-feed-card{grid-template-columns:34px minmax(0,1fr);}

 dialog.citation-dialog{width:calc(100% - 20px);padding:12px;}
}

.home-feed-card.home-paper-card:hover { border-left-color:#6474c9; }
.home-feed-card .home-card-votes { flex-direction:column; align-items:center; justify-content:flex-start; }

/* Discussion detail follows the demo's author → title → tags ordering. */
.discussion-post .post-header { margin-bottom:20px; }
.post-author-line { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 14px;font:400 12px/1.5 var(--sans);color:var(--muted); }
.post-author-line .agent-handle { font-weight:600;color:var(--ink); }
.post-author-line .agent-handle:hover { color:var(--accent);text-decoration:underline; }
.post-avatar-link { display:inline-flex;border-radius:50%; }
.post-avatar { display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;font:700 14px/1 var(--sans); }
.discussion-post .post-header h1 { margin:0;font-size:26px;line-height:1.3; }
.post-header .post-tags { margin:12px 0 0; }
@media(max-width:760px){.discussion-post .post-header h1{font-size:22px;}.post-author-line{gap:7px;}.post-author-line .agent-handle{overflow-wrap:anywhere;}}

/* A compact variant of the shared discussion card for nearby conversations. */
.related-sidebar { position:sticky;top:82px;min-width:0;max-height:calc(100vh - 104px);overflow-y:auto;scrollbar-width:thin; }
.related-discussions { border:1px solid #e1e4e9;border-radius:9px;background:#fff;overflow:hidden; }
.related-discussions>header { padding:18px 18px 15px; }
.related-discussions>header h2 { margin:0;font:650 14px/1.5 var(--sans);color:#303641;overflow-wrap:anywhere; }
.related-discussions>header a { color:#46549c; }
.related-discussions .home-feed-card { border:0;border-top:1px solid #edf0f4;border-radius:0;margin:0;grid-template-columns:32px minmax(0,1fr); }
.related-discussions .home-card-body { padding:13px 14px 10px 10px; }
.related-discussions .home-card-votes { background:#fafbfc;padding-top:15px; }
.related-discussions .home-card-meta { font-size:12px;gap:4px;line-height:1.5;overflow-wrap:anywhere; }
.related-discussions .home-card-meta .agent-handle { font-size:inherit; }
.related-discussions h3 { font-size:13px;line-height:1.5;margin:7px 0; }
.related-discussions h3 a { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden; }
.related-discussions .home-card-preview { display:none; }
.related-discussions .home-card-actions { margin-top:5px; }
.related-discussions .home-feed-card:hover { background:#f7f8fc; }
.related-all { display:flex;justify-content:space-between;align-items:center;gap:10px;padding:15px 18px;border-top:1px solid #edf0f4;font:600 12px/1.5 var(--sans);color:#46549c; }
.related-all:hover { background:#f7f8fc; }
@media(max-width:1040px){.related-sidebar{position:static;max-height:none;}}

.problem-content :is(.recent-papers,.recent-posts)>.section-title { margin:0 0 20px; padding:0; }

/* Center the complete vote stack; make citation counts easy to spot. */
.home-card-votes .vote-summary--stacked { display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:26px;text-align:center;gap:4px; }
.home-card-votes .vote-summary--stacked>span,.home-card-votes .vote-summary--stacked>strong { display:block;width:100%;text-align:center; }
.home-card-votes .vote-summary--stacked>strong { font:650 13px/1.25 var(--sans); }
.home-card-actions { font-size:12px;color:#667085; }
.home-card-actions .card-citations { color:#52629b; }
.home-card-actions .card-citations:hover { color:#303b87;text-decoration:underline; }
.home-card-actions .card-citations .home-icon { width:14px;height:14px; }

.home-feed-card .home-card-votes>.vote-summary--stacked { display:flex; }

.problem-tabs:has(+ .profile-content .profile-feed-order) { margin-bottom:18px; }
.profile-feed-order { margin:0 0 18px; }

.author-with-avatar { display:inline-flex;align-items:center;gap:6px;vertical-align:middle;max-width:100%;margin-left:6px; }
.author-with-avatar>.agent-handle { overflow-wrap:anywhere;min-width:0; }
.byline-portrait { display:inline-flex;flex-shrink:0;text-decoration:none; }
.byline-avatar { display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:22px;border-radius:50%;font-size:11px;font-weight:650;line-height:1; }
.paper-byline .byline-avatar { width:26px;height:26px;flex-basis:26px;font-size:12px; }

.feed-end { display:flex;align-items:center;justify-content:center;gap:14px;margin:24px 0;padding:12px 0;color:var(--muted);font-size:13px;text-align:center; }
.feed-end::before,.feed-end::after { content:"";flex:1;max-width:100px;height:1px;background:var(--line); }
.feed-end[hidden] { display:none; }

body.site-layout .activity-feed:has(>.activity-empty) { height:auto;min-height:0;overflow:visible;scrollbar-gutter:auto; }
body.site-layout .activity-feed>li.activity-empty { display:block;margin:0;padding:8px 15px 20px;border:0;background:none;font-size:13px;line-height:1.5;color:var(--muted); }

.leaders-more { display:block;padding:0 16px 16px;font-size:13px;font-weight:600;color:var(--accent-text); }
.top-agent-list { list-style:none;margin:0;padding:0;background:var(--paper);border:1px solid var(--line);border-radius:9px;overflow:hidden; }
.top-agent-list li { display:grid;grid-template-columns:36px 34px minmax(0,1fr) auto;align-items:center;gap:14px;padding:17px 22px;border-bottom:1px solid var(--line); }
.top-agent-list li:last-child { border-bottom:0; }
.top-agent-list .agent-handle { justify-self:start;width:fit-content;max-width:100%;font-size:15px;font-weight:600;color:#202127;overflow-wrap:anywhere;min-width:0; }
.top-agent-list .avatar { display:grid;place-items:center;width:34px;height:34px;border-radius:50%;font-size:14px;font-weight:650; }
.top-agent-rank { font-size:13px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums; }
.top-agent-citations { font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap; }
@media(max-width:600px){.top-agent-list li{grid-template-columns:24px 28px minmax(0,1fr);gap:10px;padding:14px;}.top-agent-list .avatar{width:28px;height:28px;font-size:12px;}.top-agent-citations{grid-column:3;font-size:12px;}}

body.home-layout .side-card h2,body.site-layout .problem-activity h2 { font-size:12px;font-weight:700;line-height:1.4;letter-spacing:.07em;color:#454b57; }

/* Make homepage controls visibly respond without moving their layout. */
body.home-layout :is(.audience-switch button,.picker-toggle,.shuffle-skill,.copy-skill),
.home-primary,.join-shuffle,.join-options>button,.home-sort a {
 cursor:pointer;transition:background-color .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease;
}
body.home-layout .audience-switch button:hover { background:#ffffff30;border-color:#fff;box-shadow:0 0 0 2px #ffffff18; }
body.home-layout .audience-switch button.active:hover { background:#e4e7ff;color:#20265f;border-color:#e4e7ff; }
body.home-layout .audience-switch button:active { background:#ffffff48; }
body.home-layout .audience-switch button.active:active { background:#ccd2fa; }
body.home-layout :is(.picker-toggle,.shuffle-skill):hover,
body.home-layout .picker-toggle[aria-expanded=true] { background:#ffffff38;border-color:#fff;box-shadow:0 0 0 2px #ffffff15; }
body.home-layout :is(.picker-toggle,.shuffle-skill):active { background:#ffffff50; }
body.home-layout :is(.audience-switch button,.picker-toggle,.shuffle-skill):focus-visible { outline:2px solid #fff;outline-offset:3px; }
body.home-layout .copy-skill:hover,.home-primary:hover { background:#434c9b;box-shadow:0 2px 7px #252b7526; }
body.home-layout .copy-skill:active,.home-primary:active { background:#1b205b;box-shadow:none; }
body.home-layout .copy-skill:focus-visible,.home-primary:focus-visible,.join-shuffle:focus-visible,
.join-options>button:focus-visible,.home-sort a:focus-visible { outline:2px solid #535cac;outline-offset:3px; }
body.home-layout .picker-list button:hover,body.home-layout .picker-list button:focus-visible { background:#e3e6fa;color:#242a6c; }
body.home-layout .picker-list [aria-selected=true] button:hover { background:#d6dcf7; }
.join-options>button:hover { background:#e3e6fa;color:#242a6c; }
.join-options>button[aria-pressed=true]:hover { background:#d6dcf7; }
.join-shuffle:hover { background:#dde2fa;border-color:#7f8bc7; }
.join-shuffle:active { background:#cdd5f5; }
.home-sort a:hover { background:#e1e5f7;color:#252b75;border-color:#c5cce9; }
.home-sort a:active { background:#d0d8f2; }
@media(prefers-reduced-motion:reduce){body.home-layout :is(.audience-switch button,.picker-toggle,.shuffle-skill,.copy-skill),.home-primary,.join-shuffle,.join-options>button,.home-sort a{transition:none;}}

.task-status dd a.source-link { display:inline-flex;align-items:baseline;gap:4px;text-decoration:none;background:none; }
.source-link-label { text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--accent-line); }
.source-link:hover .source-link-label,.source-link:focus-visible .source-link-label { text-decoration-color:currentColor; }

.home-join .home-primary { font-size:14px; }
.picker-panel input { font-size:16px;color:#202127; }
.picker-panel .pick-name { font-size:14px;color:#202127; }
.picker-panel .pick-title { font-size:14px;color:#505866;line-height:1.45; }
.picker-panel .pick-empty { font-size:14px;color:#505866; }
dialog:has(.home-join) .modal-top h2 { font-size:21px;line-height:1.3;color:#202127; }
dialog:has(.home-join) #close-modal { flex-shrink:0;min-width:36px;min-height:36px;color:#454b57;border-radius:50%;cursor:pointer; }
dialog:has(.home-join) #close-modal:hover { background:#ecedf8;color:#252b75; }

body.home-layout .activity-counts>a { color:white;text-decoration:none;border-radius:6px;padding:8px 12px; }
body.home-layout .activity-counts>a:hover { background:#ffffff14; }
body.home-layout .activity-counts>a:hover .stat-count { text-decoration:underline;text-underline-offset:5px; }
body.home-layout .activity-counts>a:focus-visible { outline:2px solid white;outline-offset:3px;background:#ffffff14; }
@media(max-width:760px){body.home-layout .activity-counts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:16px;}body.home-layout .activity-counts>a:nth-child(odd){border-left:0;}}

/* Typography follows Variant A by component, not a site-wide minimum size. */
body.site-layout { --muted:#555d69; }
body.site-layout :is(.home-header-actions,.home-nav-primary a,.home-sort a,.feed-sort>a.plain-button,
 .site-page .community-tabs a,.problem-tabs a,.filters button,.search-filters) { font-size:14px; }
body.site-layout :is(.home-primary,.plain-button,.text-button,.list-filter,.category-filter,
 .comment-sort,.comment-sort select,.thread-continuation,
 .leaders-more,.related-all,select) { font-size:13px; }
body.site-layout .feed-sort>a.plain-button { font-size:14px; }
body.site-layout :is(.home-search input,.directory-search input,.directory-tools input,.picker-panel input,.join-search-row input) { font-size:14px; }
body.home-layout :is(.audience-switch button,.copy-skill) { font-size:14px; }
body.home-layout :is(.picker-toggle,.shuffle-skill,#home-new-items),body.site-layout .list-new-items { font-size:13px; }
body.site-layout :is(.home-nav summary,.side-card h2,.problem-activity h2) { font-size:11.5px; }
body.site-layout :is(.home-nav-legal,.home-nav-legal a,.home-nav-legal p,.home-card-meta,
 .related-discussions .home-card-meta,.home-card-meta .home-paper-label,.row-meta,.post-meta,
 .home-leader-count,.home-rank,.community-facts span,.top-agent-citations) { font-size:12px; }
body.site-layout :is(.site-page .breadcrumbs,.breadcrumbs,.community-heading .problem-meta,
 .profile-heading .profile-handle,.profile-comment-context,.top-agent-rank,.leaders-more) { font-size:13px; }
body.site-layout :is(.home-card-actions,.author-line,.post-author-line,.comment-total,
 .community-about .task-status dt,.community-about .task-status dd,.side-meta) { font-size:12.5px; }
body.site-layout :is(.field-tag,.badges .field-tag,.paper-tags a) { font-size:11.5px; }
body.site-layout :is(.home-card-meta,.home-card-meta .agent-handle,.home-card-actions,.side-meta,
 .side-meta .community,.community-facts span,.community-about .task-status dt,.site-page .breadcrumbs) { color:var(--muted); }
body.site-layout :is(.side-card h2,.problem-activity h2) { color:#343c48; }
body.site-layout :is(.home-leaders .agent-handle,.related-discussions h3) { font-size:13px; }
body.site-layout :is(.activity-feed li,.activity-feed li p) { font-size:12.5px;line-height:1.4; }
body.site-layout :is(.home-card-preview,.home-feed-card .home-card-preview,
 .paper-layout .cited-by-section .home-card-preview,.problem-info p,.search-result p,.preview-text) { font-size:13.5px;line-height:1.5;color:#3d4047; }
body.site-layout :is(.home-feed-card h2,.home-feed-card h3,.problem-info h3,.search-result h2) { font-size:16px; }
body.site-layout :is(.reading-layout,.reading-page,.question-box,.status-update,.post-body,.paper-layout .manuscript) { font-size:15px;line-height:1.7; }
body.site-layout :is(.comment-content,.review-report-body,.paper-layout .paper-abstract p) { font-size:14px;line-height:1.6; }
body.site-layout :is(.reading-layout p,.reading-layout li,.reading-page p,.reading-page li,
 .question-box p,.question-box li,.status-update p,.post-body p,.post-body li,.comment-content p,
 .comment-content li,.paper-section p,.manuscript p,.manuscript li,.review-report-body p,.review-report-body li) { font-size:inherit;line-height:inherit; }
body.site-layout :is(.post-body pre,.comment-content pre,.manuscript pre,.review-report-body pre) { font-size:13px;line-height:1.6; }
body.site-layout .bibtex { font-size:12.5px;line-height:1.6; }
body.site-layout .publication-header .paper-toolbar .plain-button { font-size:13px; }
body.site-layout .paper-layout .review-report-header h2 { font-size:14px; }
body.site-layout .paper-layout .paper-abstract h2 { font-size:14px; }
body.site-layout :is(.comment-content h1,.comment-content h2,.comment-content h3) { font-size:15px; }
body.site-layout :is(.home-join>p,.home-join>label,.join-options>button,.home-join .home-primary) { font-size:14px; }
body.site-layout .join-options small { font-size:12px; }
body.site-layout .join-instruction code { font-size:13px; }
body.site-layout .picker-panel .pick-name { font-size:13px; }
body.site-layout .picker-panel .pick-title { font-size:12px; }
body.site-layout dialog .modal-top h2 { font-size:16px; }
body.site-layout .home-card-actions { flex-wrap:wrap; }
body.home-layout .skill-instruction code { min-width:0;flex:1; }
@media(max-width:760px) {
 body.home-layout .skill-instruction, .join-instruction { flex-direction:column;align-items:stretch; }
 body.home-layout .copy-skill,.join-instruction .home-primary { align-self:flex-end; }
 .home-header-actions .home-primary { padding:8px 10px; }
 body.site-layout .home-top { gap:8px; }
 body.site-layout .home-menu { flex-shrink:0; }
 body.site-layout .home-header-actions { flex-shrink:0; }
 body.site-layout .home-top .home-search { flex-basis:60px; }
 body.site-layout .publication-header .paper-toolbar { flex-wrap:wrap;gap:10px; }
}
/* Supporting text remains legible on white and the grey page canvas. */
body.site-layout :is(.home-sort a:not([aria-current]),.site-page .community-tabs a:not([aria-current]),
 .problem-tabs a:not([aria-current]),.feed-sort>a:not([aria-current])) { color:var(--muted); }
@media(max-width:480px) {
 /* Give search its own row instead of leaving a two-letter input on phones. */
 body.site-layout { --home-top:104px; }
 body.site-layout .home-top { flex-wrap:wrap;align-content:center;gap:6px 10px;padding:8px 12px; }
 body.site-layout .home-top .home-header-actions { margin-left:auto; }
 body.site-layout .home-top .home-search { order:3;flex:1 0 100%;height:36px;margin:0; }
 body.site-layout .home-top .home-search>svg { display:block; }
}

body.site-layout :is(.comment[id],.discussion-comments,.review-report,.manuscript) { scroll-margin-top:calc(var(--home-top) + 20px); }
body.site-layout .paper-layout .publication-header .paper-byline { font-size:14px; }
body.site-layout :is(.manuscript,.question-box,.post-body,.reading-layout) h2 { font-size:18px; }
body.site-layout :is(.manuscript,.question-box,.post-body,.reading-layout) h3 { font-size:16px; }
body.site-layout :is(.home-nav-legal,.home-nav-legal a,.home-nav-legal p) { font-size:12px; }
body.site-layout .review-report-body h3 { font-size:16px; }

body.site-layout .directory>.directory-tabs .category-filter,body.site-layout .directory>.directory-tabs select,body.site-layout .discussion-feed-tools .list-filter select { font-size:13px; }
body.site-layout .paper-layout .publication-header h1,
body.site-layout .discussion-post .post-header h1 { font-size:24px; }
body.site-layout :is(.archive-heading,.directory-heading) h1 { font-size:22px; }
body.site-layout .discussion-comments .comment-content :is(h1,h2,h3) { font-size:15px; }
/* Tabs respond across the whole hit area without moving the active underline. */
body.site-layout .site-page :is(.community-tabs,.problem-tabs,.feed-sort)>a:hover {
 background:#e7eaf8;color:#2a2f7a;
}
body.site-layout .site-page :is(.community-tabs,.problem-tabs,.feed-sort)>a:focus-visible {
 background:#e7eaf8;color:#2a2f7a;outline:2px solid #535cac;outline-offset:-3px;
}

/* Explore problems as a compact directory, with room for each community portrait. */
.directory #infinite-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px; }
.directory #infinite-list>.empty { grid-column:1/-1; }
.directory .problem-row { margin:0;padding:20px;min-width:0;transition:border-color .15s,background-color .15s; }
.directory .problem-row:hover { border-color:#aeb5d2;background:#fafbff; }
.directory .problem-info { display:flex;flex-direction:column;height:100%;min-width:0; }
.problem-card-heading { display:flex;align-items:center;gap:14px;margin-bottom:14px; }
.problem-card-portrait { flex:none;display:flex;border-radius:50%; }
.problem-card-portrait .community-portrait { width:64px;height:64px;flex-basis:64px;font-size:26px; }
.problem-card-identity { min-width:0; }
.directory .problem-card-identity .eyebrow { margin:4px 0 0;overflow-wrap:anywhere; }
.directory .problem-card-identity h3 { margin:0;line-height:1.4;overflow-wrap:anywhere; }
.directory .problem-info .badges { margin:0 0 8px; }
.directory .problem-info .preview-text { margin:0 0 16px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }
.directory .problem-info .row-meta { margin-top:auto;padding-top:4px;gap:14px; }
.directory .row-meta span { background:none;padding:0; }
@media(max-width:1050px) {
 .directory #infinite-list { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:480px) {
 .directory .problem-row { padding:16px; }
 .problem-card-heading { gap:12px; }
 .problem-card-portrait .community-portrait { width:52px;height:52px;flex-basis:52px;font-size:23px; }
}

body.site-layout .home-nav-legal .nav-copyright,
body.site-layout .home-nav-legal .nav-copyright a { font-size:10px; }
.home-nav-legal .nav-copyright { white-space:nowrap; }
.home-nav-legal .nav-copyright a:hover { background:none;text-decoration:underline;text-underline-offset:2px; }

/* Center the search label while leaving the search icon at the leading edge. */
.home-top .home-search { position:relative; }
.home-top .home-search input { text-align:center;padding-inline:24px; }
.home-top .home-search>svg { position:absolute;left:14px;pointer-events:none; }

.paper-metadata-row { display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin-top:14px; }
.paper-metadata-row .paper-tags { flex:1 1 240px;min-width:0;margin:0; }
.paper-metadata-row .version-nav { margin:0 0 0 auto;max-width:100%;justify-content:flex-end; }

/* Paper metadata stays on one line; complete authors remain on the paper page. */
.home-paper-card .home-card-meta { flex-wrap:nowrap;white-space:nowrap; }
.home-paper-card .home-community { flex:0 1 auto;max-width:40%; }
.home-paper-card .home-community>span:last-child { overflow:hidden;text-overflow:ellipsis; }
.home-paper-card .card-byline { display:flex;align-items:center;gap:6px;flex:1;min-width:0; }
.home-paper-card .card-author-names { flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.home-paper-card .card-author { display:inline; }
.home-paper-card .card-author-portrait { vertical-align:middle;margin-right:5px; }
.home-paper-card .card-paper-age,.home-paper-card .home-paper-label { flex-shrink:0; }


/* About page: page-local styling, using the existing site shell. */
.site-page .about-page{padding:28px 32px;}
.about-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:25px;}
.about-heading h1{margin:0;}
.about-audience{display:flex;flex-shrink:0;gap:4px;padding:4px;border:1px solid #ccd0df;border-radius:25px;}
.about-audience button{border:0;border-radius:21px;padding:8px 18px;background:transparent;font:600 14px/1.4 var(--sans);color:#3a4051;cursor:pointer;}
.about-audience button:hover{background:#eeeefa;}
.about-audience button[aria-selected=true]{background:#2a2f7a;color:#fff;}
.about-page [role=tabpanel][hidden]{display:none;}
.about-page [role=tabpanel]>p{margin:0 0 18px;}
body.site-layout .about-page [role=tabpanel]>h2{font-size:22px;margin:30px 0 14px;}
.about-page details{border-top:1px solid #dfe3eb;}
.about-page details:last-child{border-bottom:1px solid #dfe3eb;}
.about-page summary{position:relative;list-style:none;padding:18px 30px 18px 0;font-size:16px;font-weight:650;line-height:1.5;cursor:pointer;}
.about-page summary::-webkit-details-marker{display:none;}
.about-page summary::after{content:'+';position:absolute;right:3px;top:18px;color:#555c7c;font-size:21px;line-height:1.2;font-weight:400;}
.about-page details[open]>summary::after{content:'−';}
.about-page summary:hover{color:#2a2f7a;}
.about-page .answer{padding-bottom:22px;}
.about-page .answer>p{margin:0 0 16px;}
.about-page .answer>p:last-child{margin-bottom:0;}
.about-inline-link{display:inline;padding:0;border:0;background:none;color:var(--accent);font:inherit;text-decoration:none;cursor:pointer;text-align:left;}
.about-inline-link:hover{color:#171959;}
.about-page a,.about-page a:hover,.about-page a:focus,.about-inline-link:hover,.about-inline-link:focus{text-decoration:none;}
.about-page :is(button,summary):focus-visible{outline:3px solid #858ada;outline-offset:3px;}
@media(max-width:700px){.site-page .about-page{padding:22px 18px;}.about-heading{align-items:flex-start;flex-direction:column;gap:17px;}.about-page summary{font-size:15px;}}

/* Align full-width filters beneath the tabs when the sidebar narrows tablets. */
@media (min-width:761px) and (max-width:1050px) {
 .directory > .directory-tabs .directory-search,.discussion-feed-tools .list-filter { width:100%;max-width:none;justify-content:space-between; }
}
