:root {
  color-scheme: light;
  --paper: #f6f7f2;
  --white: #fff;
  --ink: #1d2925;
  --muted: #78827b;
  --line: #e6e9e1;
  --green: #376b52;
  --green-dark: #28523e;
  --green-pale: #e9f0e9;
  --lime: #d6e5a5;
  --coral: #e78d70;
  --shadow: 0 15px 45px rgb(34 51 41 / 5%);
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 87% 14%, rgb(227 235 214 / 46%), transparent 29rem),
    var(--paper);
  color: var(--ink);
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgb(29 41 37 / 8%); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 800 20px "Manrope", sans-serif; letter-spacing: -1px; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: white; font: 800 19px "Manrope", sans-serif; letter-spacing: -2px; }
.brand-period, .heading-period { color: var(--coral); }
.topbar-right { display: flex; align-items: center; gap: 27px; font-size: 12px; }
.docs-link { color: #536159; font-weight: 600; }
.docs-link span, .footer a span { color: var(--green); }
.header-account { display: inline-flex; align-items: center; gap: 8px; padding-left: 17px; border-left: 1px solid var(--line); color: #435248; font-size: 11px; font-weight: 600; }
.header-avatar { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #e3eddf; color: var(--green-dark); font: 700 11px "Manrope", sans-serif; }
.profile-link-text { margin-left: 4px; color: var(--green); font-size: 10px; font-weight: 700; }
.service-indicator { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #e1e9de; border-radius: 99px; background: rgb(255 255 255 / 54%); color: #69786d; font-size: 11px; }
.indicator-dot { width: 7px; height: 7px; border-radius: 50%; background: #79a879; box-shadow: 0 0 0 3px #79a87922; }

.hero { position: relative; display: flex; min-height: 285px; align-items: center; justify-content: space-between; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; padding: 30px 0 37px; }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--green); font-size: 9px; font-weight: 700; letter-spacing: 1.65px; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow-line { width: 22px; height: 1px; background: var(--coral); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font: 700 clamp(42px, 5vw, 61px)/1.08 "Manrope", sans-serif; letter-spacing: -3.4px; }
h1 span { color: var(--green); }
.hero-description { max-width: 420px; margin-bottom: 0; color: #69756e; font-size: 14px; line-height: 1.7; }
.hero-art { position: absolute; top: 8px; right: 51px; width: 300px; height: 270px; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid #cbd9c5; border-radius: 50%; transform: translate(-50%, -50%) rotate(-24deg); }
.orbit-one { width: 250px; height: 127px; }
.orbit-two { width: 245px; height: 127px; transform: translate(-50%, -50%) rotate(42deg); border-color: #d3ddc8; }
.orbit-three { width: 183px; height: 183px; border-style: dashed; opacity: .7; }
.art-center { position: absolute; top: 50%; left: 50%; display: grid; width: 77px; height: 77px; place-items: center; border-radius: 50%; background: #e5eddc; color: var(--green); font-size: 42px; transform: translate(-50%, -50%); }
.art-center::after { position: absolute; width: 56px; height: 56px; border: 1px solid #c7d7bd; border-radius: 50%; content: ""; }
.art-label { position: absolute; z-index: 1; padding: 6px 10px; border: 1px solid #e6e9df; border-radius: 99px; background: #fbfcf8; color: #68736b; font-size: 10px; box-shadow: 0 4px 12px #253c2b0d; }
.label-one { top: 43px; left: 84px; }
.label-two { right: 3px; bottom: 69px; }
.label-three { bottom: 43px; left: 52px; }
.dashboard-intro { display: flex; min-height: 194px; align-items: center; justify-content: space-between; padding: 25px 20px 30px; border-bottom: 1px solid rgb(29 41 37 / 7%); }
.dashboard-intro .eyebrow { margin-bottom: 11px; }
.dashboard-intro h1 { margin-bottom: 8px; font-size: 39px; letter-spacing: -2px; }
.dashboard-intro h1 span { color: var(--coral); }
.dashboard-intro .hero-description { font-size: 12px; }
.intro-note { display: flex; align-items: center; gap: 10px; margin-right: 35px; color: #81907f; font: 600 11px/1.5 "Manrope", sans-serif; }
.intro-note-mark { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid #dfe7d9; border-radius: 14px; background: #edf2e8; color: var(--green); font-size: 24px; }

.notice { margin: 0 0 16px; padding: 12px 15px; border: 1px solid #d6e3d3; border-radius: 10px; background: #edf5eb; color: #355a40; font-size: 13px; }
.notice.error { border-color: #f0d2c8; background: #fff2ed; color: #9c4c35; }
[hidden] { display: none !important; }
.auth-gate { display: grid; grid-template-columns: minmax(0, 1fr) 370px; align-items: center; gap: 80px; min-height: 340px; padding: 18px 7% 72px; }
.auth-intro h2 { margin: 0 0 13px; font: 700 clamp(28px, 3.5vw, 40px)/1.2 "Manrope", sans-serif; letter-spacing: -1.7px; }
.auth-intro > p:not(.section-kicker) { max-width: 390px; margin-bottom: 20px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.auth-benefits { display: grid; gap: 9px; color: #59685d; font-size: 10px; }
.auth-benefits span span { margin-right: 7px; color: var(--green); font-weight: 700; }
.auth-card { padding: 24px; border: 1px solid #e8ebe4; border-radius: 15px; background: rgb(255 255 255 / 90%); box-shadow: var(--shadow); }
.auth-card h2 { font-size: 22px; }
.auth-card .panel-intro { margin-bottom: 17px; }
.workspace-grid { display: grid; grid-template-columns: minmax(245px, 285px) minmax(0, 1fr); align-items: start; gap: 25px; padding: 23px 0 55px; }
.workspace-grid--papers { grid-template-columns: minmax(0, 1fr); }
.sidebar { display: grid; gap: 16px; }
.panel { min-width: 0; border: 1px solid #e5e9e1; border-radius: 15px; background: rgb(255 255 255 / 94%); box-shadow: var(--shadow); }
.account-panel, .topics-panel { padding: 22px; }
.topics-panel { position: sticky; top: 18px; }
.section-heading, .papers-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.section-kicker { margin-bottom: 7px; font-size: 8px; letter-spacing: 1.45px; }
h2 { margin-bottom: 0; font: 700 20px "Manrope", sans-serif; letter-spacing: -.7px; }
.step-badge { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #f0f3eb; color: #7c897b; font-size: 9px; font-weight: 700; }
.panel-intro { margin: 10px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.stack-form { display: grid; }
.stack-form label, .search-bar label { margin-bottom: 6px; color: #48554c; font-size: 10px; font-weight: 700; }
.stack-form input, .inline-form select, .search-bar select { min-width: 0; height: 39px; border: 1px solid #e4e8e1; border-radius: 7px; outline: 0; background-color: #fbfcfa; color: var(--ink); font-size: 11px; }
.stack-form input { width: 100%; margin-bottom: 11px; padding: 0 11px; }
.stack-form input::placeholder { color: #a1a9a0; }
.stack-form input:focus, .inline-form select:focus, .search-bar select:focus { border-color: #91b196; box-shadow: 0 0 0 3px #91b19620; }
.button-row { display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 0; border-radius: 7px; font-size: 10px; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-dark); }
.button-quiet { background: #f1f3ee; color: #536157; }
.button-quiet:hover { background: #e8ece5; }
.button-dark { min-width: 61px; background: #263d32; color: white; }
.button-dark:hover { background: #172a21; }
.account-actions .button-primary { flex: 1; }
.small-note { margin: 14px 0 0; color: #9aa39a; font-size: 9px; line-height: 1.55; }
.account-status { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; background: #f2f6ef; }
.avatar { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 50%; background: #dce9d9; color: var(--green-dark); font: 700 13px "Manrope", sans-serif; }
.account-status-copy { display: grid; flex: 1; gap: 3px; }
.account-status-copy strong { font-size: 11px; }
.account-status-copy span { color: var(--muted); font-size: 9px; }
.icon-button { width: 29px; height: 29px; border: 1px solid #dce5d8; border-radius: 7px; background: white; color: var(--green); }
.inline-form { display: flex; gap: 7px; }
.inline-form select { flex: 1; padding: 0 10px; }
.topic-list { display: grid; gap: 7px; margin-top: 13px; }
.topic-chip { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid #edf0ea; border-radius: 7px; background: #fcfdfa; color: #405248; font-size: 10px; }
.topic-chip button { border: 0; background: transparent; color: #a3aaa1; font-size: 15px; }
.topic-chip button:hover { color: #bd614a; }
.empty-inline { margin: 0; padding: 11px 3px 4px; color: #9aa39a; font-size: 10px; }

.profile-heading { padding: 42px 12px 25px; }
.profile-heading h1 { margin-bottom: 8px; font-size: 38px; letter-spacing: -2px; }
.profile-heading h1 span { color: var(--coral); }
.profile-heading .hero-description { max-width: 520px; font-size: 12px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 390px); align-items: start; gap: 20px; padding: 0 0 55px; }
.profile-main { display: grid; gap: 18px; }
.profile-card { padding: 24px; }
.profile-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.profile-card-heading .section-kicker { margin-bottom: 5px; }
.profile-card-heading h2 { font-size: 18px; }
.profile-card-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border: 1px solid #e1e9dd; border-radius: 12px; background: #f0f4ec; color: var(--green); font-size: 18px; }
.profile-details { border-top: 1px solid #edf0ea; }
.profile-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; border-bottom: 1px solid #edf0ea; font-size: 11px; }
.profile-detail-row:last-child { border-bottom: 0; }
.email-form { display: grid; gap: 7px; padding: 14px 2px; border-bottom: 1px solid #edf0ea; }
.email-form > label { color: #839087; font-size: 11px; }
.email-edit-row { display: flex; align-items: center; gap: 9px; }
.email-edit-row input { min-width: 0; height: 38px; flex: 1; padding: 0 10px; border: 1px solid #e4e8e1; border-radius: 7px; outline: 0; background: #fbfcfa; color: var(--ink); font-size: 11px; }
.email-edit-row input:focus { border-color: #91b196; box-shadow: 0 0 0 3px #91b19620; }
.detail-label { color: #839087; }
.profile-detail-row strong { color: #334239; font-size: 11px; font-weight: 600; }
.password-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.password-field { display: grid; min-width: 0; align-content: start; gap: 6px; }
.password-field--full { grid-column: 1 / -1; }
.password-form label { color: #48554c; font-size: 10px; font-weight: 700; }
.password-form input { width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid #e4e8e1; border-radius: 7px; outline: 0; background: #fbfcfa; color: var(--ink); font-size: 11px; }
.password-form input:focus, .profile-topic-form select:focus { border-color: #91b196; box-shadow: 0 0 0 3px #91b19620; }
.password-submit { grid-column: 1 / -1; justify-self: start; margin-top: 3px; }
.topics-manager .profile-card-heading { margin-bottom: 12px; }
.topics-manager > .panel-intro { margin-bottom: 19px; }
.profile-topic-form > label { display: block; margin-bottom: 7px; color: #48554c; font-size: 10px; font-weight: 700; }
.profile-topic-form select { min-width: 0; height: 39px; flex: 1; padding: 0 10px; border: 1px solid #e4e8e1; border-radius: 7px; outline: 0; background: #fbfcfa; color: var(--ink); font-size: 10px; }
.topic-list-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 23px; padding-bottom: 9px; border-bottom: 1px solid #edf0ea; color: #68756c; font-size: 10px; font-weight: 700; }
.topic-count { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #eef3e9; color: var(--green); font-size: 9px; }
.topic-list { gap: 0; margin-top: 0; }
.managed-topic { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 1px; border-bottom: 1px solid #edf0ea; }
.managed-topic-info { display: grid; gap: 4px; min-width: 0; }
.managed-topic-info strong { color: #35473c; font-size: 11px; }
.managed-topic-info span { overflow: hidden; color: #8a948c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.remove-topic { flex: 0 0 auto; padding: 6px 8px; border: 1px solid #eceee8; border-radius: 6px; background: white; color: #8a655b; font-size: 9px; }
.remove-topic:hover { border-color: #ebc9bc; background: #fff8f5; color: #9f5039; }
.remove-topic:disabled { opacity: .5; cursor: wait; }
.back-to-search { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 13px; border-top: 1px solid #edf0ea; color: var(--green); font-size: 10px; font-weight: 700; }

.papers-panel { min-height: 520px; padding: 28px; }
.papers-panel--wide { min-height: 560px; padding: 32px; }
.papers-heading { margin-bottom: 21px; }
.papers-heading h2 { font-size: 25px; letter-spacing: -1px; }
.papers-heading .panel-intro { margin-bottom: 0; }
.papers-heading-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #e4eadf; border-radius: 11px; background: #f3f6ef; color: var(--green); font-size: 16px; }
.search-bar { display: flex; align-items: end; gap: 14px; padding: 14px; border: 1px solid #e9ece6; border-radius: 10px; background: #fafbf8; }
.followed-topics { display: grid; min-width: 0; flex: 1; gap: 8px; }
.followed-topics-label { color: #78867b; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.followed-topic-list { display: flex; min-height: 34px; flex-wrap: wrap; align-items: center; gap: 6px; }
.followed-topic-chip { padding: 7px 10px; border: 1px solid #dfe8dc; border-radius: 99px; background: #eef4ea; color: #45634c; font-size: 10px; font-weight: 600; }
.topic-loading { color: #89938a; font-size: 10px; }
.manage-topics-link { justify-self: start; color: var(--green); font-size: 9px; font-weight: 700; }
.manage-topics-link:hover, .empty-state-link:hover { color: var(--green-dark); text-decoration: underline; }
.search-limit { width: 83px; }
.search-bar select { padding: 0 10px; }
.search-button { min-width: 121px; }
.search-button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.results-toolbar { display: flex; justify-content: space-between; margin: 24px 1px 11px; color: #88938a; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.paper-results { display: grid; gap: 9px; }
.empty-state { display: grid; min-height: 236px; align-content: center; justify-items: center; text-align: center; }
.empty-icon { display: grid; width: 50px; height: 50px; margin-bottom: 13px; place-items: center; border: 1px solid #e5eade; border-radius: 16px; background: #f5f7f0; color: #779074; font-size: 30px; }
.empty-state h3 { margin-bottom: 6px; font: 700 15px "Manrope", sans-serif; }
.empty-state p { max-width: 270px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-state-link { margin-top: 13px; color: var(--green); font-size: 10px; font-weight: 700; }
.paper-card { padding: 15px 16px; border: 1px solid #ebeee8; border-radius: 9px; background: white; animation: appear .24s ease both; }
.paper-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #8a958c; font-size: 9px; }
.source-pill { padding: 4px 7px; border-radius: 99px; background: #edf3eb; color: #4b7456; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.paper-title { margin: 0 0 6px; font: 700 13px/1.5 "Manrope", sans-serif; letter-spacing: -.2px; }
.paper-title a:hover { color: var(--green); }
.paper-authors { margin: 0 0 8px; color: #69756d; font-size: 10px; line-height: 1.55; }
.paper-abstract { margin: 0; color: #7b857d; font-size: 10px; line-height: 1.65; }
.paper-abstract[hidden] { display: none; }
.abstract-toggle { margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 9px; font-weight: 700; }
.footer { display: flex; align-items: center; justify-content: space-between; min-height: 65px; border-top: 1px solid rgb(29 41 37 / 8%); color: #89938a; font-size: 10px; }
.footer-brand { color: var(--ink); font-size: 13px; }
.footer-brand .brand-mark { width: 23px; height: 23px; border-radius: 7px 7px 7px 2px; font-size: 14px; }
.footer a:last-child { color: #536159; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 30px, 570px); }
  .hero { min-height: 260px; }
  .hero-art { right: -88px; opacity: .42; transform: scale(.85); transform-origin: center right; }
  .hero-copy { max-width: 390px; }
  .auth-gate { grid-template-columns: 1fr 330px; gap: 25px; padding: 18px 0 55px; }
  .dashboard-intro { min-height: 175px; padding-inline: 5px; }
  .intro-note { margin-right: 12px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .topics-panel { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page-shell { width: calc(100% - 26px); }
  .topbar { height: 68px; }
  .topbar-right { gap: 8px; }
  .header-account { gap: 6px; padding-left: 8px; }
  .header-username { max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-link-text { display: none; }
  .topbar-right .service-indicator { display: none; }
  .service-indicator { padding: 7px 8px; }
  .hero { min-height: 245px; }
  .hero-art { right: -133px; opacity: .27; }
  h1 { font-size: 47px; }
  .hero-description { max-width: 300px; font-size: 12px; }
  .dashboard-intro { min-height: 155px; padding: 20px 0; }
  .dashboard-intro h1 { font-size: 31px; letter-spacing: -1.5px; }
  .dashboard-intro .hero-description { max-width: 270px; font-size: 11px; }
  .intro-note { display: none; }
  .profile-heading { padding: 30px 2px 20px; }
  .profile-heading h1 { font-size: 30px; letter-spacing: -1.5px; }
  .profile-card { padding: 19px 16px; }
  .email-edit-row { align-items: stretch; flex-direction: column; }
  .email-edit-row .button { align-self: flex-start; }
  .password-form { grid-template-columns: 1fr; }
  .password-field--full { grid-column: auto; }
  .auth-gate { grid-template-columns: 1fr; gap: 24px; padding: 12px 0 45px; }
  .auth-intro h2 { font-size: 31px; }
  .auth-card { padding: 20px; }
  .sidebar { grid-template-columns: 1fr; }
  .papers-panel { min-height: 450px; padding: 20px 15px; }
  .search-bar { flex-wrap: wrap; }
  .followed-topics { flex-basis: 100%; }
  .search-limit { flex: 1; }
  .search-button { flex: 1; }
  .footer { gap: 9px; font-size: 8px; }
  .footer-brand { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Search controls reuse the existing visual system. */
.search-bar { flex-wrap: wrap; }
.search-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; width: 100%; }
.search-fields label { display: grid; gap: 6px; font-size: .8rem; }
.search-fields input, .search-fields select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #d9dfd2; border-radius: 8px; background: white; }
#paging { margin: 20px 0; }
#saved-searches button { margin-left: 10px; }

.button-row { flex-wrap: wrap; }
.paper-source-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 11px; }
.paper-meta { flex-wrap: wrap; }

/* Research desk: simple controls, spacious reading, a dedicated topic subscription. */
.research-workspace { display: grid; gap: 34px; padding: 28px 0 64px; }
.research-search { padding: 30px; border-radius: 20px; }
.research-search-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.research-search-heading h2 { font-size: 25px; letter-spacing: -1px; }
.research-search-heading p:not(.section-kicker) { margin: 9px 0 0; color: #738071; font-size: 13px; }
.research-mark { color: #86a170; font-size: 36px; padding: 10px; }
.query-entry { display: flex; gap: 12px; align-items: center; min-height: 66px; padding: 7px 8px 7px 18px; background: #f8f9f4; border: 1px solid #dce4d5; border-radius: 12px; }
.query-entry:focus-within { border-color: #65906d; box-shadow: 0 0 0 3px #6e926414; }
.query-icon { color: #71906b; font-size: 29px; }
.query-entry input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.query-entry input::placeholder { color: #98a18f; }
.query-entry .button { flex-shrink: 0; min-height: 48px; padding: 0 21px; font-size: 12px; border-radius: 9px; }
.search-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 17px; }
.text-button { display: inline-flex; align-items: center; border: 0; background: transparent; padding: 9px 8px; color: #53694e; font-size: 12px; font-weight: 600; cursor: pointer; }
.follow-search-link { margin-left: auto; }
.advanced-filters { position: relative; }
.advanced-filters > summary { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid #e2e7db; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.advanced-filters > summary::-webkit-details-marker { display: none; }
.advanced-filters[open] { display: contents; }
.advanced-filters[open] > summary { background: #edf3e7; border-color: #cbdcc3; order: 0; }
.filter-count { min-width: 18px; padding: 2px 5px; border-radius: 5px; background: #dce8d2; font-size: 10px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; order: 5; padding: 23px; margin-top: 4px; border: 1px solid #e3e8dc; border-radius: 12px; background: #fafbf7; }
.filter-grid label, .subscription-form > label:not(.subscription-consent) { display: grid; gap: 8px; color: #56664e; font-size: 12px; font-weight: 600; }
.filter-grid input, .filter-grid select { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #dce3d5; border-radius: 7px; background: white; color: #374a34; font-size: 12px; }
.filter-buttons { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; }
.filter-buttons .button { min-height: 38px; padding: 0 16px; font-size: 11px; }
.sort-control, .page-size-control { display: flex; gap: 9px; align-items: center; color: #85907b; font-size: 11px; }
.sort-control { padding-left: 12px; border-left: 1px solid #e4e8df; }
.sort-control select, .page-size-control select { max-width: 140px; border: 0; outline: none; background: transparent; padding: 8px 2px; color: #40563a; font-size: 12px; font-weight: 600; }
.followed-topics-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 21px; padding-top: 19px; border-top: 1px solid #edf0e6; }
.followed-topics-strip .manage-topics-link { margin-left: auto; font-size: 11px; }
.followed-topic-chip { border: 1px solid #e3e9d9; cursor: pointer; font: 500 11px "DM Sans", sans-serif; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 3px; }
.results-heading h2 { max-width: 780px; font-size: 25px; line-height: 1.4; overflow-wrap: anywhere; }
.results-summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 17px 3px 0; color: #788570; font-size: 12px; }
.source-caption { color: #7f8c75; font-size: 11px; }
.source-caption span { margin: 0 8px; color: #b4bda8; }
.provider-status { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.provider-chip { display: inline-flex; gap: 7px; align-items: center; padding: 7px 11px; border: 1px solid #e1e7d8; border-radius: 99px; background: #fafbf6; color: #6d7c61; font-size: 10px; }
.provider-chip::before { width: 5px; height: 5px; border-radius: 50%; background: #8ca777; content: ""; }
.provider-chip[data-status="error"], .provider-chip[data-status="cooldown"] { color: #a36343; background: #fff8ec; border-color: #ebddc8; }
.provider-chip[data-status="error"]::before, .provider-chip[data-status="cooldown"]::before { background: #c58b62; }
.provider-chip[data-status="loading"] { color: #8b8c66; }
.provider-chip[data-status="unsupported"] { opacity: .65; }
.stale-warning { flex-basis: 100%; padding: 12px 16px; border-radius: 10px; background: #fff4df; color: #8d6739; font-size: 12px; line-height: 1.6; }
.research-workspace .paper-results { gap: 14px; }
.research-workspace .paper-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 26px 28px; border: 1px solid #e2e7da; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px #31412b03; animation: none; }
.paper-number { padding-top: 2px; color: #a5b195; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.research-workspace .paper-meta { gap: 8px 12px; margin-bottom: 11px; color: #839078; font-size: 11px; }
.research-workspace .paper-title { margin: 0 0 10px; font-size: 20px; font-weight: 600; line-height: 1.45; letter-spacing: -.5px; }
.research-workspace .paper-title a:hover { color: #497341; }
.research-workspace .paper-authors { margin-bottom: 14px; color: #87927c; font-size: 12px; line-height: 1.6; }
.paper-excerpt, .research-workspace .paper-abstract { margin: 0 0 14px; color: #66735d; font-size: 13px; line-height: 1.85; }
.paper-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.paper-reading-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.paper-stat { padding: 5px 8px; border-radius: 5px; background: #f3f6ed; color: #6b7f5d; font-size: 10px; }
.paper-stat.oa { background: #eaf2e2; color: #4b713c; }
.paper-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #eff2e9; }
.research-workspace .paper-source-links { gap: 9px; margin: 0; color: #819173; font-size: 10px; }
.research-workspace .paper-source-links a:hover { text-decoration: underline; }
.paper-read-link { color: #3e683d; font-size: 11px; font-weight: 700; }
.research-workspace .abstract-toggle { padding: 0; color: #608153; font-size: 11px; }
.research-empty { min-height: 300px; padding: 50px 24px; background: #fbfcf7; border: 1px dashed #dce5cf; border-radius: 14px; }
.empty-search-symbol { display: grid; width: 52px; height: 52px; margin: 0 auto 17px; place-items: center; border-radius: 16px; background: #edf2e4; color: #739062; font-size: 33px; }
.research-empty h3 { color: #405539; font-size: 20px; font-weight: 600; }
.research-empty p { max-width: 380px; margin: 0 auto; color: #8a967e; font-size: 12px; }
.suggested-searches { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.suggested-searches button { padding: 9px 12px; border: 1px solid #e0e7d4; border-radius: 7px; background: white; color: #688355; font-size: 11px; }
.research-paging { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.research-paging .button { min-height: 40px; font-size: 11px; }
#page-indicator { padding: 0 8px; color: #849277; font-size: 11px; }
#expand-search { margin-left: auto; }
.ranking-note { margin-top: 18px; color: #8b967f; font-size: 11px; line-height: 1.8; }
.ranking-note summary { cursor: pointer; }
.ranking-note p { max-width: 760px; margin: 10px 0 0; }
.saved-research-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.saved-research-heading h2 { font-size: 21px; }
.saved-research-heading > span { color: #91a080; font-size: 11px; }
#saved-searches { display: grid; gap: 9px; }
.saved-search-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 19px 22px; border: 1px solid #e1e8d6; border-radius: 11px; background: #fcfdf9; }
.saved-search-info { min-width: 0; }
.saved-search-info strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.saved-search-info p { margin: 6px 0 0; color: #8a967e; font-size: 11px; overflow-wrap: anywhere; }
.saved-search-actions { display: flex; flex-wrap: wrap; gap: 5px; flex-shrink: 0; }
.saved-search-actions button { border: 0; border-radius: 6px; padding: 8px 10px; background: #eff3e9; color: #688150; font-size: 10px; }
.saved-state { display: inline-block; margin-left: 10px; padding: 4px 7px; border-radius: 5px; background: #edf2e4; color: #789266; font-size: 9px; font-weight: 500; }
.saved-state.pending { background: #faf0df; color: #b18a4f; }
.shelf-empty { padding: 22px; border: 1px dashed #dfe6d4; border-radius: 10px; color: #91a080; font-size: 12px; }
.subscription-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 44px; border: 1px solid #dce6cd; border-radius: 20px; background: #eaf0df; scroll-margin-top: 24px; }
.subscription-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 21px; border-radius: 12px; border: 1px solid #d6e2c6; color: #68894f; font-size: 22px; }
.subscription-copy h2 { margin-bottom: 17px; font-size: 33px; line-height: 1.25; letter-spacing: -1.4px; }
.subscription-copy > p:not(.section-kicker) { max-width: 360px; margin-bottom: 20px; color: #7d8f6a; font-size: 12px; line-height: 1.85; }
.subscription-topic { display: grid; gap: 7px; margin-top: 24px; }
.subscription-topic > span { color: #91a37b; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.subscription-topic strong { color: #65824d; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.subscription-form { display: grid; gap: 9px; }
.subscription-form > label span { color: #9aa98b; font-size: 10px; font-weight: 400; margin-left: 5px; }
.subscription-form > input { width: 100%; min-width: 0; min-height: 46px; margin-bottom: 8px; padding: 0 13px; border: 1px solid #d6e0c9; border-radius: 8px; background: #f8faf3; outline: none; font-size: 13px; color: #3e5831; }
.subscription-form > input:focus { border-color: #7c9b64; box-shadow: 0 0 0 3px #72945a15; }
.subscription-form .subscription-consent { display: flex; align-items: flex-start; gap: 10px; margin: 5px 0 9px; cursor: pointer; }
.subscription-consent input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--green); }
.subscription-form .subscription-consent span { margin: 0; color: #7c8d6a; font-size: 11px; line-height: 1.7; }
.subscription-form .button { min-height: 46px; width: 100%; font-size: 12px; }
.subscription-hint { margin: 4px 0 0; color: #8fa17c; font-size: 10px; line-height: 1.7; }
.subscription-status { margin: 5px 0 0; color: #496c35; font-size: 12px; line-height: 1.7; }
.subscription-status.error { color: #a06b3e; }
.research-workspace button:disabled { opacity: .5; cursor: default; transform: none; }
.research-workspace :focus-visible { outline: 2px solid #6a8e58; outline-offset: 3px; }
@media (max-width: 850px) {
  .subscription-panel { gap: 32px; padding: 32px; }
  .subscription-copy h2 { font-size: 28px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .research-workspace { padding-top: 20px; gap: 28px; }
  .research-search { padding: 20px 16px; border-radius: 14px; }
  .research-search-heading h2 { font-size: 22px; }
  .research-search-heading p:not(.section-kicker) { font-size: 11px; line-height: 1.6; }
  .research-mark { font-size: 27px; }
  .query-entry { flex-wrap: wrap; padding: 10px; gap: 5px; }
  .query-icon { width: 24px; text-align: center; }
  .query-entry input { width: calc(100% - 35px); flex: 1; font-size: 14px; }
  .query-entry .button { width: 100%; min-height: 42px; }
  .search-actions { gap: 6px 8px; }
  .follow-search-link { margin-left: 0; }
  .sort-control { padding-left: 8px; }
  .sort-control > label { display: none; }
  .filter-grid { padding: 16px; gap: 14px; }
  .followed-topics-strip { gap: 9px; }
  .followed-topics-strip .followed-topics-label { flex-basis: 100%; }
  .results-heading h2 { font-size: 21px; }
  .page-size-control > label { display: none; }
  .source-caption { font-size: 10px; }
  .research-workspace .paper-card { grid-template-columns: 23px minmax(0, 1fr); gap: 6px; padding: 21px 16px; }
  .research-workspace .paper-title { font-size: 17px; }
  .paper-excerpt, .research-workspace .paper-abstract { font-size: 12px; }
  .paper-reading-meta { gap: 6px; }
  .paper-card-footer { gap: 13px; }
  #expand-search { flex-basis: 100%; margin: 9px 0 0; }
  .saved-research-heading > span { display: none; }
  .saved-search-card { align-items: flex-start; flex-direction: column; gap: 13px; padding: 17px; }
  .saved-search-actions { flex-wrap: wrap; }
  .subscription-panel { grid-template-columns: 1fr; gap: 28px; padding: 26px 21px; border-radius: 15px; }
  .subscription-copy h2 br { display: none; }
  .subscription-topic { margin-top: 16px; }
}
