/* The search application has its own palette; tuning pages keep their shared styles. */
.search-app {
  --ink: #142453;
  --muted: #6e7fa4;
  --green: #0878f9;
  --green-dark: #075fd0;
  --paper: #f8fbff;
  --surface: #fff;
  --line: #dce7f7;
  --soft: #edf5ff;
  --home-ui-scale: .8;
  --home-header-height: 108px;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  isolation: isolate;
}
.search-app [hidden] { display: none !important; }
.search-app .home-svg-text { display: inline-block; overflow: visible; max-width: none; font: inherit; letter-spacing: inherit; fill: currentColor; }
.search-app .home-svg-text text { font: inherit; letter-spacing: inherit; white-space: pre; }
.search-app :is(button, a, textarea):focus-visible { outline-color: #73adff; }
.search-app .ui-icon { display: block; flex: none; width: 24px; height: 24px; }
/* Use the visitor's local YaHei font throughout the home page. */
.search-app[data-page="home"],
.search-app[data-page="home"] :is(button, input, textarea, select) {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.home-background { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(ellipse at 8% 20%, #ffffffeb, #ffffff00 68%), linear-gradient(120deg, #fafdff 10%, #edf8ff 45%, #d6ecff 78%, #bfdffc); }
.home-scene { position: absolute; right: 0; bottom: 0; width: max(100vw, 177.683svh); aspect-ratio: 1672 / 941; }
.home-scene-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.search-app:not([data-page="home"]) .home-background { display: none; }
.search-app .site-header {
  width: 100%; max-width: none; height: 108px; padding: 30px 4.5vw 20px;
  display: flex; align-items: flex-end; gap: 26px;
}
.search-app .brand { flex: none; align-self: center; line-height: 0; }
.search-app .brand-wordmark { display: block; width: 264.6px; height: auto; }
.header-rule { display: flex; align-items: center; justify-content: flex-end; gap: 32px; flex: 1; min-width: 0; padding-bottom: 11px; color: #6b80af; font-size: 18px; font-weight: 550; letter-spacing: 1px; }
.header-domain { border-left: 1px solid #849cc9; padding-left: 32px; white-space: nowrap; }
.header-motto { white-space: nowrap; }
.search-app[data-page="home"] .header-rule { align-self: center; padding-bottom: 0; }
.search-app[data-page="home"] .header-motto { font-size: 20px; white-space: normal; text-align: right; }
/* Scale the foreground only; the artwork continues to cover the viewport. */
.search-app[data-page="home"] .site-header, .search-app .home { zoom: var(--home-ui-scale); }
.search-app[data-page="home"] main { min-height: calc(100svh - var(--home-header-height) * var(--home-ui-scale)); }
.search-app[data-page="home"] .site-footer { display: none; }
.search-app .home { --home-content-inset: 28px; --home-padding-top: clamp(40px, 8vh, 110px); width: min(72.4vw, 1280px); max-width: none; margin: 0 auto; padding: calc(var(--home-padding-top) + var(--home-shift, 120px)) 0 80px; }
/* Preserve the first two track widths; center the group without the final track's trailing space. */
.home-metrics { --metric-column-gap: clamp(30px, 4.2vw, 76px); --metric-track-unit: calc((100% - 2 * var(--metric-column-gap)) / 3.1); display: grid; grid-template-columns: calc(.95 * var(--metric-track-unit)) calc(1.15 * var(--metric-track-unit)) max-content; justify-content: center; align-items: start; column-gap: var(--metric-column-gap); margin: 0 0 clamp(44px, 7.2vh, 78px); padding-inline: calc(var(--home-content-inset) + 1px); color: #111969; }
.home-metric { position: relative; min-width: 0; }
.home-metric + .home-metric::before { content: ""; position: absolute; top: 10px; bottom: 7px; left: calc(var(--metric-column-gap) * -.8); width: 1px; background: #adc2df; }
.metric-title { margin: 0; font-size: clamp(42px, 3.4vw, 60px); font-weight: 750; line-height: 1.15; letter-spacing: .0675em; white-space: nowrap; }
.metric-accent { color: #9d7848; font-size: 1.16em; }
.metric-detail { display: flex; align-items: center; gap: 2px; margin: 10px 0 0; font-size: clamp(18px, 1.4vw, 25px); line-height: 1.4; white-space: nowrap; }
.home-metric:first-child .metric-detail { gap: 4px; }
.metric-number { display: inline-flex; align-items: center; flex: none; gap: 1px; color: #111969; }
.metric-value { font-size: 1.45em; font-weight: 700; line-height: 1; letter-spacing: -.045em; font-variant-numeric: lining-nums tabular-nums; }
.metric-unit { font-size: 1.05em; font-weight: 700; transform: translateY(.03em); }
.metric-label { color: #7283a4; font-weight: 600; transform: translateY(.08em); }
.search-app .query-form { position: relative; border: 1px solid #b6d3f6; border-radius: 15px; background: #fff; box-shadow: 0 8px 26px #2682df1c, 0 2px 8px #2682df09; padding: 28px 24px 20px; }
.search-app .query-form:focus-within { border-color: #4d9cff; box-shadow: 0 8px 32px #2682df25, 0 0 0 3px #b5d9ff38; }
.search-app .home .query-form { isolation: isolate; padding: 0; border: 1px solid transparent; border-radius: 25px; background: linear-gradient(118deg, #fffffffa, #fcfefff5) padding-box, linear-gradient(125deg, #c5e2ff, #edf6ff 30%, #95c5ff 66%, #c3dfff) border-box; box-shadow: 0 25px 55px -25px #357fc951, 0 7px 18px -8px #4f95e32e, 0 0 0 6px #ffffff55, inset 0 1px 0 #fff; }
.search-app .home .query-form::after { content: ""; position: absolute; z-index: -1; pointer-events: none; bottom: -20px; left: 15%; width: 70%; height: 28px; border-radius: 50%; background: #4599f620; filter: blur(20px); }
/* Keep the home search surface unchanged when focus moves into the voice popover. */
.search-app .home .query-form { z-index: 2; }
.query-field { display: flex; align-items: flex-start; gap: 26px; }
.home .query-field { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 27px var(--home-content-inset) 14px; }
.home .query-field > :is(textarea, .query-placeholder, .voice-panel) { grid-area: 1 / 1; }
.search-app .query-icon { width: 33px; height: 33px; color: #7a89af; margin-top: 2px; }
.search-app .query-form textarea { min-width: 0; min-height: 84px; max-height: 230px; padding: 3px 0; font-size: 19px; line-height: 1.7; resize: none; color: #233963; }
.search-app .home .query-form textarea { font-size: 20px; }
.search-app .query-form textarea::placeholder { color: #7a88ac; opacity: 1; letter-spacing: .4px; }
.search-app .query-form textarea:focus-visible { outline: none; }
.search-app .home textarea::placeholder { color: transparent; }
.query-placeholder { display: flex; flex-direction: column; align-self: start; gap: 9px; margin-top: 3px; pointer-events: none; }
.query-placeholder-line { display: grid; color: #8396b0; font-size: 20px; line-height: 1.7; letter-spacing: .3px; }
/* Reserve the complete prompt's wrapped height while its text is being typed. */
.query-placeholder-line::before { content: attr(data-text); visibility: hidden; grid-area: 1 / 1; }
.query-placeholder-typed { grid-area: 1 / 1; }
.query-field > textarea:not(:placeholder-shown) + .query-placeholder, .voice-active:not(.voice-popover) .query-placeholder { visibility: hidden; }
.search-app .query-actions { margin-top: 20px; align-items: flex-end; gap: 16px; }
.search-app .home .query-actions { margin-top: 0; align-items: center; padding: 12px 24px 22px; border: 0; background: none; }
.search-mode { position: relative; }
.search-mode-trigger { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 13px; min-height: 49px; padding: 0 17px; border: 1px solid #b1d4ff; border-radius: 10px; background: #e9f4ff; color: #0075f5; font-size: 17px; font-weight: 600; white-space: nowrap; transition: background .15s; }
/* Keep the trigger and menu wide enough for either mode name. */
.mode-label-sizer { visibility: hidden; pointer-events: none; }
.mode-engine-name, .mode-engine-name > span { display: inline-block; letter-spacing: normal; }
.mode-engine-version { display: inline-block; white-space: pre; letter-spacing: normal; }
.search-mode-trigger > .mode-icon { grid-area: 1 / 1; }
.search-mode-trigger > span:not(.mode-icon) { grid-area: 1 / 2; }
.search-mode-trigger > .mode-chevron { grid-area: 1 / 3; }
.home .search-mode-trigger { min-height: 42px; gap: 9px; padding: 0 14px; background: #dcecff; border-color: #83b2ec; box-shadow: 0 2px 5px #3278c31a, inset 0 1px 0 #ffffffb3; border-radius: 24px; color: #205b9e; font-size: 20px; font-weight: 650; }
.home .search-mode-trigger > span:not(.mode-icon) { line-height: 1; text-align: center; }
.home .search-mode-trigger .mode-icon { color: #086bdd; }
.home .search-mode-trigger .ui-icon { width: 20px; height: 20px; }
.home .search-mode-trigger .mode-chevron { width: 23px; height: 23px; padding: 3px; margin-left: 1px; border-radius: 50%; background: #bdd7f6; color: #205b9e; stroke-width: 2.5; }
.home .search-mode-trigger:hover, .home .search-mode-trigger[aria-expanded="true"] { background: #cce2ff; border-color: #518fd9; }
.search-mode-trigger:hover, .search-mode-trigger[aria-expanded="true"] { background: #dceeff; border-color: #82b9ff; }
.search-mode-trigger .mode-chevron { width: 20px; height: 20px; margin-left: 3px; transition: transform .15s; }
.search-mode-trigger[aria-expanded="true"] .mode-chevron { transform: rotate(180deg); }
.search-mode-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 20; width: 100%; max-width: calc(100vw - 48px); padding: 6px; border: 1px solid #d8e8fb; border-radius: 13px; background: #fff; box-shadow: 0 14px 40px #13376224; }
.home .search-mode-menu { top: calc(100% + 5px); }
.search-mode-option { display: flex; align-items: center; gap: 6px; width: 100%; padding: 13px 6px; border: 0; border-radius: 8px; background: transparent; color: #6e82a5; text-align: left; }
.search-mode-option > .ui-icon { width: 18px; height: 18px; }
.search-mode-option:hover, .search-mode-option:focus-visible { background: #f0f7ff; outline-offset: -3px; }
.search-mode-option[aria-checked="true"] { color: #0075f5; }
.mode-option-text { display: flex; flex: 1; }
.mode-option-title { font-size: 14px; font-weight: 600; }
.home .mode-option-title { font-size: 16px; }
.search-mode-option .mode-check { width: 14px; height: 14px; visibility: hidden; }
.search-mode-option[aria-checked="true"] .mode-check { visibility: visible; }
.search-app .search-submit { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 24px; min-width: 170px; min-height: 56px; padding: 12px 26px; border: 1px solid #2585ed; border-radius: 13px; background: linear-gradient(125deg, #389cfb, #167bea 56%, #216ddd); box-shadow: 0 7px 17px -7px #1878e780, inset 0 1px 0 #ffffff5c, inset 0 -1px 0 #0d4cb033; font-size: 21px; letter-spacing: 2px; font-weight: 400; transition: background .15s; }
.search-app .search-submit:hover:not(:disabled) { background: linear-gradient(125deg, #288ffa, #0870e1 62%, #1962d1); border-color: #2273d2; }
.search-submit .ui-icon { width: 29px; height: 29px; }
.search-app .compact { padding: 16px 18px 13px; border-radius: 12px; }
.search-app .compact .query-field { gap: 14px; }
.search-app .compact .query-icon { width: 23px; height: 23px; }
.search-app .compact textarea { min-height: 38px; font-size: 15px; }
.search-app .compact .query-actions { margin-top: 9px; align-items: center; }
.compact .search-mode-trigger { min-height: 36px; gap: 8px; padding: 0 12px; border-radius: 7px; font-size: 13px; }
.compact .search-mode-trigger .ui-icon { width: 18px; height: 18px; }
.compact .search-mode-option { gap: 4px; padding-inline: 4px; }
.compact .mode-option-title { font-size: 12px; }
.search-app .compact .search-submit { min-width: 104px; min-height: 38px; padding: 7px 15px; gap: 12px; border-radius: 7px; font-size: 15px; }
.compact .search-submit .ui-icon { width: 20px; height: 20px; }
.search-app .scope-option { color: #627594; }
.search-app .scope-option.active { background: #e6f1ff; }
.search-app .paper-card { border-color: #dce7f7; }
.search-app :is(.paper-excerpt, .abstract-text, .fulltext-document, .fulltext-raw) { color: #455875; }
.search-app :is(.translated-title, .detail-journal, .title-translation .abstract-text) { color: #566d90; }
.search-app .notice { background: #edf4fe; color: #617697; }
.search-app .notice.error { background: #fff0eb; color: var(--danger); }
.search-app .reading-panel { background: #eff6ff; border-color: #d6e6fa; }
.search-app .reading-panel .mode-switch { background: #dceafb; }
.search-app .site-footer { max-width: 1120px; }

@media (max-width: 1100px) {
  .search-app .site-header { padding-inline: 4vw; gap: 24px; }
  .header-rule { gap: 22px; font-size: 15px; }
  .header-domain { padding-left: 22px; }
  .search-app .home { width: 82vw; }
  .home-metrics { --metric-column-gap: 26px; --metric-track-unit: calc((100% - 2 * var(--metric-column-gap)) / 3.15); grid-template-columns: calc(.9 * var(--metric-track-unit)) calc(1.25 * var(--metric-track-unit)) max-content; }
  .metric-title { font-size: 42px; }
  .metric-detail { font-size: 19px; }
  .search-app .query-form textarea { font-size: 17px; }
}
@media (max-width: 900px) {
  .home-metrics { width: max-content; max-width: 100%; margin-inline: auto; grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .home-metric + .home-metric::before { content: none; }
  .metric-title { font-size: 38px; }
  .metric-detail { margin-top: 5px; font-size: 20px; }
}
@media (max-width: 760px) {
  .search-app { --home-header-height: 95px; }
  .home .query-field { padding: 23px var(--home-content-inset) 12px; }
  .search-app .home .query-actions { padding: 13px 20px 16px; }
  .search-app .site-header { height: 95px; padding: 23px 24px 15px; gap: 20px; }
  .search-app .brand { gap: 10px; font-size: 18px; letter-spacing: 2px; }
  .search-app .brand-mark { width: 40px; height: 45px; font-size: 41px; }
  .search-app .brand small { font-size: 11px; letter-spacing: 3px; }
  .header-rule { align-self: stretch; padding-bottom: 8px; font-size: 14px; }
  .header-domain { display: none; }
  .search-app .home { width: auto; margin: 0 24px; --home-content-inset: 22px; --home-padding-top: 76px; }
  .home-metrics { margin-bottom: 42px; }
  .search-app .query-form { padding: 22px 20px 18px; }
  .query-field { gap: 16px; }
  .search-app .query-icon { width: 26px; height: 26px; }
  .search-app .query-form textarea { font-size: 16px; min-height: 98px; }
  .search-app .query-actions { margin-top: 24px; align-items: center; }
  .search-mode-trigger { font-size: 15px; min-height: 44px; padding-inline: 12px; gap: 8px; }
  .search-app .search-submit { font-size: 19px; min-width: 125px; min-height: 50px; padding: 10px 18px; gap: 15px; }
  .search-submit .ui-icon { width: 24px; height: 24px; }
}
@media (max-width: 640px) {
  .search-app { --home-header-height: 86px; }
  .home-background { position: absolute; height: max(100svh, 820px); }
  .home-scene { bottom: 0; right: -100px; width: 950px; mask-image: linear-gradient(transparent, #000 12%); }
  .home-background::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#fafdff 0%, #fafdffde 25%, #fafdff40 54%, transparent 72%); }
  .search-app .site-header { height: 86px; padding: 22px 20px 14px; gap: 12px; }
  .search-app .brand-wordmark { width: 189px; }
  .header-rule { padding-bottom: 8px; font-size: 12px; letter-spacing: 0; }
  .search-app .home { margin-inline: 20px; --home-content-inset: 16px; --home-padding-top: 24px; padding-bottom: 270px; }
  .home-metrics { margin-bottom: 32px; }
  .metric-title { font-size: 36px; }
  .metric-detail { font-size: 19px; }
  .search-app .home .query-form { padding: 0; border-radius: 20px; }
  .home .query-field { padding: 20px var(--home-content-inset) 10px; gap: 11px; }
  .query-placeholder { gap: 10px; }
  .query-placeholder-line { line-height: 1.8; }
  .search-app .home .query-actions { padding: 12px 14px 14px; border-radius: 0 0 19px 19px; }
  .query-field { gap: 11px; }
  .search-app .query-icon { width: 22px; height: 22px; margin-top: 5px; }
  .search-app .home .query-form textarea { min-height: 116px; line-height: 1.8; }
  .search-app .query-actions { gap: 8px; margin-top: 16px; }
  .search-mode-trigger { font-size: 13px; min-height: 44px; padding-inline: 9px; gap: 7px; border-radius: 8px; }
  .home .search-mode-trigger { min-height: 55px; }
  .search-mode-trigger .ui-icon { width: 18px; height: 18px; }
  .search-mode-trigger .mode-chevron { width: 16px; height: 16px; margin-left: 0; }
  .search-app .search-submit { font-size: 16px; min-width: 100px; min-height: 44px; padding: 9px 14px; gap: 10px; border-radius: 8px; }
  .search-submit .ui-icon { width: 21px; height: 21px; }
  .search-mode-menu { max-width: calc(100vw - 72px); }
  .compact .search-mode-trigger { grid-template-columns: auto auto; }
  .compact .search-mode-trigger::after, .compact .search-mode-trigger > span:not(.mode-icon) { grid-column: 1; }
  .compact .search-mode-trigger > .mode-chevron { grid-column: 2; }
  .compact .search-mode-menu { padding: 4px; }
  .compact .search-mode-option { padding-inline: 3px; }
  .compact .search-mode-option > .ui-icon:first-child { display: none; }
  .compact .search-mode-option .mode-check { width: 12px; height: 12px; }
  .compact .mode-option-title { font-size: 11px; }
  .search-app .compact { padding: 13px; }
  .search-app .compact textarea { min-height: 42px; font-size: 16px; }
}
@media (max-width: 360px) {
  .search-app .site-header { padding-inline: 16px; }
  .header-motto { font-size: 11px; }
  .search-app .home { margin-inline: 16px; }
  .search-app .home .query-actions { flex-wrap: wrap; row-gap: 12px; }
  .home .query-submit-tools { margin-left: auto; }
}
.search-app[data-page="home"] :is(.search-submit, .search-mode-trigger, .mode-chevron) { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .search-app :is(.query-form, .query-icon, .search-submit, .search-mode-trigger, .mode-chevron),
  .search-app .home :is(.query-form, .query-icon) { transition: none; }
}

/* A quiet reading workspace, in the same ice-blue family as the homepage. */
.search-app:not([data-page="home"]) {
  --ink: #172b50; --muted: #73839b; --paper: #f2f7fd; --line: #e1eaf5;
  --workspace-header-height: 64px; --workspace-gutter: clamp(10px, 1vw, 24px);
  background: radial-gradient(ellipse at 95% 0, #dfedfe 0, #edf5fe 34%, #f5f9fe 78%);
  background-attachment: fixed;
}
/* The source preview uses the approved ice-blue palette for the workspace only. */
.search-app[data-page="results"] {
  --workspace-ink: #142b50;
  --workspace-text: #324d72;
  --workspace-muted: #506987;
  --workspace-accent: #0664e0;
  --workspace-accent-hover: #0758c4;
  --workspace-border: #b9d5f6;
  --ink: var(--workspace-ink);
  --muted: var(--workspace-muted);
  --green: var(--workspace-accent);
  --green-dark: var(--workspace-accent-hover);
  --line: #d3e3f6;
  --soft: #e5f0ff;
  background: radial-gradient(ellipse at 0 0, #edf7ff 0, transparent 65%), linear-gradient(125deg, #dfedfc, #c8e3fc);
  background-attachment: fixed;
}
.search-app:not([data-page="home"]) .site-header { height: var(--workspace-header-height); max-width: none; padding: 8px var(--workspace-gutter); align-items: center; gap: 18px; }
.search-app:not([data-page="home"]) .brand-wordmark { width: 189px; }
.search-app:not([data-page="home"]) .header-rule { padding-bottom: 0; border: 0; font-size: 14px; gap: 20px; font-weight: 400; }
.search-app:not([data-page="home"]) .header-domain { padding-left: 20px; border-color: #cadcf2; }
.search-app:not([data-page="home"]) :is(button, a, input, select):focus-visible { outline-color: #73adff; }
.search-app:not([data-page="home"]) .site-footer { display: none; }
.search-app:not([data-page="home"]) main { min-height: 0; }
.search-app:not([data-page="home"]) :is(.search-submit, .search-mode-trigger, .mode-chevron) { transition: none; }
.search-app .results-layout { display: flex; flex-direction: column; width: 100%; max-width: none; height: calc(100svh - var(--workspace-header-height)); min-height: 0; margin: 0; padding: 0 var(--workspace-gutter) 10px; }
.search-app .header-search > .query-form { display: flex; align-items: center; gap: 22px; padding: 13px 16px 13px 23px; flex-shrink: 0; border-radius: 14px; border-color: var(--workspace-border); box-shadow: 0 4px 18px #286ac016; z-index: 3; }
.search-app .header-search .query-field { flex: 1; min-width: 0; gap: 13px; align-items: center; }
.search-app .header-search .query-icon { width: 21px; height: 21px; margin: 0; color: #446b9b; }
.search-app .header-search textarea { min-height: 30px; max-height: 70px; line-height: 1.7; font-size: 16px; padding: 1px 0; }
.search-app .header-search .query-actions { flex-shrink: 0; margin: 0; gap: 14px; }
.search-app .header-search .search-mode-trigger { min-height: 39px; border: 0; border-radius: 8px; padding: 0 12px; background: #e8f2ff; font-size: 12px; color: #305b91; font-weight: 500; }
.search-app .header-search .mode-icon .ui-icon { color: #2988ef; width: 16px; height: 16px; }
.search-app .header-search .search-submit { min-width: 105px; min-height: 40px; padding: 8px 17px; border: 0; border-radius: 9px; background: linear-gradient(120deg, #086fee, var(--workspace-accent)); font-size: 14px; box-shadow: 0 3px 9px #0868e82b; }
.search-app .header-search .search-submit:hover:not(:disabled) { background: var(--workspace-accent-hover); }
.results-workspace { display: flex; flex: 1; min-height: 0; align-items: stretch; }
.results-column { flex: 0 0 calc(42% - 5px); min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--workspace-border); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 5px 20px #286ac012; }
.results-toolbar { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 0 10px; min-height: 45px; padding: 0 12px; border-bottom: 1px solid #e6edf7; }
.result-scopes { display: flex; flex: none; flex-wrap: nowrap; gap: 14px; min-height: 44px; }
.scope-label { align-self: center; font-size: 13px; color: var(--workspace-muted); }
.search-app .result-scopes .scope-option { display: inline-flex; align-items: center; width: auto; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin: 0; padding: 0; background: transparent; font-size: 13px; white-space: nowrap; color: var(--workspace-muted); }
.search-app .result-scopes .scope-option.active { border-bottom-color: var(--workspace-accent); color: var(--workspace-accent); font-weight: 600; }
.result-count { flex: none; font-size: 11px; color: var(--workspace-muted); margin-left: auto; line-height: 1.5; white-space: nowrap; }
.search-app .result-status { min-height: 0; padding: 0; flex: none; display: block; font-size: 12px; }
.search-app .result-status:not(:empty) { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.search-app .result-status .notice { margin: 0; padding: 9px 12px; font-size: 12px; }
.search-app .result-status .button { margin-top: 7px; }
.results-column .paper-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #afc9e6 transparent; }
.search-app .compact-paper { position: relative; padding: 12px 16px 12px 38px; border-top: 0; border-bottom: 1px solid #e1ebf7; background: #fff; }
.search-app .compact-paper:hover { background: #f1f7ff; }
.search-app .compact-paper.is-selected { background: linear-gradient(105deg, #deecff, #e8f2ff); }
.search-app .compact-paper.is-selected::before { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--workspace-accent); content: ""; }
.paper-rank { position: absolute; left: 13px; top: 16px; color: var(--workspace-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.search-app .compact-paper h2 { margin: 0 0 5px; font-size: 14px; font-weight: 600; line-height: 1.55; }
.search-app .compact-paper .paper-title { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; color: var(--workspace-ink); overflow-wrap: anywhere; }
.search-app .compact-paper .paper-title:hover { color: var(--workspace-accent); }
.search-app .compact-paper .translated-title { font-size: 12px; color: var(--workspace-text); margin: 0 0 7px; line-height: 1.6; }
.paper-meta-line { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; color: var(--workspace-muted); font-size: 11px; line-height: 1.6; }
.search-app .compact-paper .paper-byline { font-size: 11px; margin: 5px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-app .compact-paper .paper-bottom { justify-content: flex-start; gap: 17px; margin-top: 6px; min-height: 20px; }
.preview-link { border: 0; padding: 0; background: transparent; color: var(--workspace-accent); font-size: 11px; }
.preview-link[aria-pressed="true"] { font-weight: 600; }
.search-app .compact-paper .source-tag { color: var(--workspace-muted); font-size: 10px; }
.search-app .badge { background: #e9f1fc; color: #49668c; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.search-app .badge.starred { background: #faf0db; color: #806021; }
.search-app .badge.exact { background: #e7f3ff; color: #1675cf; }
.search-app .badge.concern { background: #fff0e9; color: #a55b3d; }
.search-app .pagination { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 3px; align-items: center; padding: 5px 0; margin: 0 0 0 auto; border: 0; font-size: 11px; background: #fff; }
.pagination-range { margin-right: auto; font-variant-numeric: tabular-nums; color: var(--workspace-muted); white-space: nowrap; }
.page-size { border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font-size: 11px; height: 31px; background: #fff; color: var(--workspace-text); }
.page-buttons { display: flex; align-items: center; gap: 3px; }
.page-button { min-width: 27px; height: 30px; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--workspace-muted); font-size: 12px; }
.page-button:hover:not(:disabled) { background: #f0f6ff; color: #0878f9; }
.page-button[aria-current="page"] { color: #0878f9; background: #eaf3ff; font-weight: 600; }
.page-ellipsis { padding: 0 3px; }
.page-jump { display: flex; align-items: center; gap: 4px; }
.page-jump input { width: 41px; height: 29px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; color: var(--workspace-text); font-size: 11px; background: #fff; }
.page-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 901px) {
  .results-toolbar, .search-app .results-toolbar .pagination { flex-wrap: nowrap; }
}
.results-splitter { position: relative; z-index: 1; flex: 0 0 10px; width: 10px; border: 0; padding: 0; background: transparent; color: #397ac9; cursor: col-resize; touch-action: none; }
.results-splitter::after { position: absolute; inset: 0 -3px; content: ""; }
.results-splitter::before { position: absolute; top: 15px; bottom: 15px; left: calc(50% - 1px); width: 2px; background: transparent; border-radius: 2px; content: ""; }
.results-splitter:hover::before, .is-resizing .results-splitter::before { background: #aed2fc; }
.splitter-grip { position: relative; display: inline-block; border-radius: 4px; font-size: 17px; line-height: 30px; width: 10px; }
.is-resizing { user-select: none; cursor: col-resize; }
.result-preview { flex: 1; min-width: 0; min-height: 0; border: 1px solid var(--workspace-border); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 5px 20px #286ac012; }
.preview-empty { padding: 45px 24px; font-size: 13px; color: var(--workspace-muted); line-height: 1.9; text-align: center; }
.paper-reader { display: flex; flex-direction: column; min-width: 0; height: 100%; background: #fff; }
.reader-header { flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; min-height: 45px; padding: 0 18px; border-bottom: 1px solid #e6edf7; }
.reader-tabs { display: flex; align-items: stretch; align-self: stretch; gap: 23px; min-height: 44px; }
.reader-tab { border: 0; border-bottom: 2px solid transparent; padding: 0 1px; background: transparent; color: var(--workspace-muted); font-size: 13px; white-space: nowrap; }
.reader-tab[aria-pressed="true"] { border-color: var(--workspace-accent); color: var(--workspace-accent); font-weight: 600; }
.reader-depth { border: 1px solid #e0eaf6; border-radius: 6px; padding: 5px 7px; color: #5579a7; font-size: 11px; background: #f6faff; min-width: 68px; }
.reader-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #afc9e6 transparent; padding: 14px 18px; }
.reader-scroll > h2 { font-size: 16px; font-weight: 600; line-height: 1.65; margin: 0 0 9px; }
.preview-title { overflow-wrap: anywhere; }
.preview-meta { color: #7d8fa7; font-size: 11px; line-height: 1.7; margin: 0 0 24px; }
.reader-language { display: flex; flex: none; flex-wrap: wrap; gap: 4px; padding: 8px 18px 0; }
.language-button { border: 0; border-radius: 5px; padding: 5px 11px; background: transparent; color: var(--workspace-muted); font-size: 12px; }
.language-button[aria-pressed="true"] { background: #e5f0ff; color: var(--workspace-accent); }
.search-app .reader-abstract .abstract-text, .search-app .reader-insight .summary-text { color: #506786; font-size: 13px; line-height: 1.95; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.search-app .reader-abstract .is-empty { color: var(--workspace-muted); }
.reader-progress:empty { display: none; }
.reader-progress { margin-bottom: 15px; }
.search-app .reader-progress .notice { font-size: 12px; line-height: 1.8; padding: 10px 12px; margin: 0 0 6px; }
.reader-translate:not(:empty) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.reader-information { overflow-wrap: anywhere; }
.information-title { margin: 0 0 10px; font-size: 18px; line-height: 1.6; color: var(--workspace-ink); }
.information-translation { color: var(--workspace-text); font-size: 14px; line-height: 1.8; }
.information-translation p { margin: 0 0 10px; }
.information-fields { margin: 16px 0 0; font-size: 13px; line-height: 1.9; }
.information-fields > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid #edf2f8; }
.information-fields dt { color: var(--workspace-muted); }
.information-fields dd { margin: 0; color: var(--workspace-text); }
.information-fields .badges { padding-top: 3px; }
.reader-source { margin: 0 0 15px; color: var(--workspace-muted); font-size: 11px; }
.reader-footer { flex: none; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 10px; min-height: 43px; border-top: 1px solid #edf2f8; padding: 10px 18px; color: #8395ac; background: #fcfdff; font-size: 10px; line-height: 1.6; }
.reader-back { border: 0; padding: 0; background: transparent; color: #4085d8; font-size: 11px; white-space: nowrap; }
.search-app .detail-page { width: 100%; max-width: 1380px; padding: 3px 3.2vw 60px; margin: 0 auto; }
.detail-breadcrumb { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #8aa0ba; margin: 9px 0 21px; }
.search-app .detail-breadcrumb .text-button { font-size: 12px; margin: 0; color: #5d82b0; padding: 7px 0; }
.detail-overview { border: 1px solid #dfe9f5; border-radius: 16px; padding: 28px 32px 30px; background: linear-gradient(115deg, #fff, #fbfdff); box-shadow: 0 7px 30px #32598708; }
.detail-publication { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.search-app .detail-journal { color: #6284ae; font-size: 12px; margin: 0; }
.search-app .detail-title { max-width: none; font-size: clamp(22px, 1.9vw, 28px); line-height: 1.5; font-weight: 550; margin: 14px 0 12px; color: #1a3356; }
.search-app .title-translation .section-heading h2 { font-size: 11px; color: #869bb7; }
.search-app .title-translation .abstract-text { color: #647e9f; font-size: 15px; margin: 5px 0 0; line-height: 1.8; }
.search-app .detail-grid { display: grid; grid-template-columns: minmax(210px, .32fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 20px; padding: 0; border: 0; }
.detail-information { padding: 24px; border: 1px solid #e0eaf6; border-radius: 14px; background: #ffffffd9; min-width: 0; }
.detail-information h2 { margin: 0 0 22px; font-size: 14px; font-weight: 600; }
.detail-information h3 { color: #879bb4; font-size: 11px; font-weight: 400; margin: 20px 0 7px; }
.search-app .detail-authors { margin: 0; font-size: 12px; color: #56708f; overflow-wrap: anywhere; }
.detail-authors p { margin: 0; line-height: 1.85; }
.search-app .detail-authors .affiliations { font-size: 11px; color: #6e84a0; }
.search-app .detail-information .doi-link { font-size: 11px; color: #5487c3; line-height: 1.8; }
.detail-grid > .paper-reader { border: 1px solid #dfe9f5; border-radius: 14px; overflow: hidden; height: auto; min-height: 470px; box-shadow: 0 7px 24px #32598706; }
.detail-grid .reader-scroll { padding: 26px 30px 34px; overflow: visible; }
.detail-grid .reader-header { padding-inline: 28px; min-height: 59px; }
.detail-grid .reader-tabs { min-height: 57px; }
.search-app .detail-grid .abstract-text, .search-app .detail-grid .summary-text { font-size: 14px; line-height: 2.05; }
.detail-grid .reader-footer { padding-inline: 28px; }

@media (max-width: 1100px) {
  .results-toolbar { padding-inline: 10px; gap: 0 8px; }
  .result-scopes { gap: 15px; }
  .result-count { font-size: 10px; }
  .search-app .pagination { gap: 3px; padding-inline: 0; }
  .reader-header { padding-inline: 15px; }
  .reader-tabs { gap: 17px; }
  .reader-scroll { padding: 14px 16px; }
}
@media (max-width: 900px) {
  .search-app .results-layout { height: auto; min-height: 0; padding-bottom: 28px; }
  .results-workspace { display: flex; flex-direction: column; gap: 16px; }
  .results-column { flex-basis: auto !important; }
  .results-column .paper-list { flex: auto; max-height: 520px; }
  .results-splitter { display: none; }
  .result-preview { flex: none; height: 570px; scroll-margin-top: 16px; }
  .search-app .detail-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 15px; }
  .detail-information { padding: 20px; }
}
@media (max-width: 640px) {
  .search-app:not([data-page="home"]) .site-header { height: 72px; padding-inline: 18px; gap: 12px; }
  .search-app:not([data-page="home"]) .brand { font-size: 16px; }
  .search-app:not([data-page="home"]) .brand-mark { font-size: 35px; width: 31px; }
  .search-app:not([data-page="home"]) .header-rule { font-size: 12px; align-self: center; }
  .search-app .results-layout { padding-inline: 12px; gap: 12px; }
  .search-app .header-search > .query-form { flex-wrap: wrap; padding: 13px 14px; gap: 9px; border-radius: 12px; }
  .search-app .header-search .query-field { flex-basis: 100%; }
  .search-app .header-search textarea { min-height: 34px; font-size: 16px; }
  .search-app .header-search .query-actions { width: 100%; justify-content: space-between; }
  .search-app .header-search .search-mode-trigger, .search-app .header-search .search-submit { min-height: 42px; }
  .results-toolbar { padding: 0 12px; }
  .result-count { margin-left: auto; padding: 0; }
  .result-scopes { min-height: 46px; }
  .search-app .compact-paper { padding: 14px 13px 13px 37px; }
  .paper-rank { left: 12px; top: 17px; }
  .search-app .compact-paper h2 { font-size: 14px; }
  .search-app .compact-paper .paper-byline { font-size: 11px; }
  .search-app .compact-paper .translated-title { font-size: 12px; }
  .paper-meta-line { gap: 5px 8px; }
  .search-app .pagination { gap: 3px; padding: 4px 0 7px; }
  .page-jump input, .page-size { font-size: 16px; }
  .page-buttons { gap: 2px; }
  .reader-header { padding-inline: 17px; }
  .reader-tabs { gap: 22px; }
  .reader-depth { font-size: 13px; }
  .preview-link { min-height: 30px; min-width: 40px; text-align: left; }
  .search-app .detail-page { padding: 0 13px 35px; }
  .detail-breadcrumb { padding-inline: 5px; margin: 4px 0 14px; }
  .detail-overview { padding: 21px 20px; border-radius: 13px; }
  .search-app .detail-title { font-size: 21px; }
  .search-app .title-translation .abstract-text { font-size: 14px; }
  .search-app .detail-grid { grid-template-columns: 1fr; margin-top: 14px; }
  .detail-grid > .paper-reader { order: -1; }
  .detail-grid .reader-scroll { padding: 21px; }
  .detail-grid .reader-header, .detail-grid .reader-footer { padding-inline: 20px; }
}
@media (pointer: coarse) {
  .preview-link, .reader-back, .language-button { min-height: 44px; min-width: 44px; }
  .reader-depth, .page-size, .page-jump input { min-height: 44px; }
  .page-button { min-width: 38px; min-height: 44px; }
  .results-splitter { flex-basis: 34px; width: 34px; }
}

.query-submit-tools { display: flex; align-items: center; gap: 17px; }
.voice-trigger { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #b7cbe1; border-radius: 50%; background: linear-gradient(145deg, #f7faff, #e0eaf7); color: #355e8a; box-shadow: inset 0 1px 0 #fff, 0 3px 9px -5px #294e7866; padding: 0; }
.voice-trigger:hover:not(:disabled), .voice-popover.voice-active .voice-trigger:hover { background: linear-gradient(145deg, #eef5ff, #d0e2f6); border-color: #8faed0; color: #214d7e; }
.voice-trigger:active:not(:disabled) { box-shadow: inset 0 2px 4px #294e7826; }
.mic-glyph { display: block; width: 25px; height: 25px; }
/* Equal-size home controls share one flat surface; the discussion controls keep their own style. */
.search-app .home :is(.voice-trigger, .search-submit) {
  box-sizing: border-box; flex: none; display: grid; place-items: center;
  width: 56px; height: 56px; min-width: 56px; min-height: 56px; padding: 0; gap: 0;
  border: 1px solid #a9c7ed;
  background: #dcebff;
  color: #315d9a;
  box-shadow: none;
  transition: none;
}
.search-app .home .search-submit { border-radius: 14px; }
.search-app .home :is(.voice-trigger, .search-submit):hover:not(:disabled),
.search-app .home .voice-popover.voice-active .voice-trigger:hover {
  background: #cfe2fc;
  border-color: #8bafe1; color: #294f87;
}
.search-app .home :is(.voice-trigger, .search-submit):active:not(:disabled) {
  background: #c2daf9; border-color: #7da5da; color: #244879;
  box-shadow: none;
}
.search-app .home :is(.voice-trigger, .search-submit):focus-visible { outline: 2px solid #347ce1; outline-offset: 4px; }
.search-app .home :is(.voice-trigger .mic-glyph, .search-submit .ui-icon) { width: 32px; height: 32px; margin: 0; }
.search-app .home .voice-trigger .mic-glyph { stroke-width: 2.3; }
.voice-active:not(.voice-popover) .query-field > textarea, .voice-active:not(.voice-popover) .query-field > .query-icon { display: none; }
.voice-panel { width: 100%; min-width: 0; }
.voice-heading { display: flex; justify-content: space-between; gap: 12px; color: #4c7fac; font-size: 14px; }
.voice-clock { color: #87a1bc; font-size: 12px; font-variant-numeric: tabular-nums; }
.voice-wave { width: 100%; height: 62px; overflow: hidden; margin: 5px 0; }
.voice-actions { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.voice-stop { border: 0; background: #2285f1; color: #fff; padding: 9px 17px; border-radius: 18px; font-size: 12px; }
.voice-cancel { border: 0; padding: 8px 2px; background: transparent; color: #8095ae; font-size: 12px; }
.voice-feedback { margin: 0; padding: 0 28px 17px; color: #6f89a7; font-size: 12px; line-height: 1.8; }
.voice-popover-anchor { position: relative; }
.voice-popover.voice-active .voice-popover-anchor > :is(.voice-trigger, .search-submit):disabled { opacity: 1; }
.voice-popover-panel { position: absolute; z-index: 40; right: 0; bottom: calc(100% + 12px); display: flex; align-items: center; gap: 14px; width: 262px; max-width: calc(100vw - 64px); padding: 10px 14px; border: 1px solid #cddff4; border-radius: 14px; background: #fffffffc; box-shadow: 0 12px 28px -8px #254d7226, 0 2px 8px #254d720d; }
/* Announce status and errors to assistive technology without visible text. */
.voice-popover-panel :is(.voice-heading, .voice-feedback) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.voice-popover-panel .voice-wave { position: relative; flex: 1; width: 0; min-width: 0; height: 40px; margin: 0; color: #3d83e2; }
.voice-bars { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.voice-level-bar { flex: 0 1 4px; min-width: 2px; height: calc(4px + 34px * var(--voice-level, 0) * var(--voice-bar-weight)); border-radius: 999px; background: currentColor; transition: height 90ms ease-out; }
.voice-popover-panel[data-voice-state="error"] .voice-wave { color: #c26254; }
.voice-popover-panel .voice-actions { flex: none; gap: 8px; padding-left: 12px; border-left: 1px solid #d5e3f5; }
.voice-popover-panel .voice-stop, .voice-popover-panel .voice-cancel { display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 50%; background: #eaf4ff; color: #355e8a; }
.voice-popover-panel .voice-stop { background: #2f78ed; color: #fff; }
.voice-popover-panel .voice-stop:hover:not(:disabled) { background: #2266d5; color: #fff; }
.voice-popover-panel .voice-cancel:hover { background: #dcecff; color: #244879; }
.voice-action-icon { display: block; width: 22px; height: 22px; }
.voice-popover-panel .voice-stop .voice-action-icon { stroke-width: 2.5; }
@media (prefers-reduced-motion: reduce) {
  .voice-level-bar { transition: none; }
}
.account-dock { position: relative; flex: none; align-self: center; z-index: 30; }
.account-avatar { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 6px; width: 156px; min-width: 156px; max-width: 156px; height: 50.4px; min-height: 50.4px; border: 1px solid #c4ddf7; border-radius: 999px; background: #f8fcffed; color: #267ad2; padding: 9px 14px 9px 28px; font-size: 20px; font-weight: 600; }
.account-trigger-icon { display: grid; place-items: center; width: 22px; height: 22px; }
.account-trigger-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.account-avatar:hover, .account-avatar[aria-expanded="true"] { background: #eaf4ff; border-color: #91bfea; }
.account-avatar svg { width: 22px; height: 22px; flex: none; }
.account-menu { position: absolute; top: calc(100% + 12px); right: 0; width: 280px; padding: 9px; border: 1px solid #d6e4f2; border-radius: 18px; background: #fffffffa; box-shadow: 0 12px 40px #254d721c; }
.account-dock .account-menu.is-guest { top: calc(100% + 6px); display: grid; gap: 4px; padding: 8px; }
.account-menu-heading { display: flex; flex-direction: column; gap: 5px; padding: 13px 12px 18px; margin-bottom: 5px; border-bottom: 1px solid #eaf0f6; overflow-wrap: anywhere; }
.account-menu-heading strong { font-size: 14px; font-weight: 600; color: #213456; }
.account-menu-heading span { font-size: 11px; color: #7a8ca6; }
.account-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; color: #405677; background: transparent; border: 0; border-radius: 10px; font-size: 13px; text-align: left; }
.account-menu.is-guest .account-menu-item { min-height: 46px; padding: 8px 14px; font-size: 20px; font-weight: 400; line-height: 1.5; }
.account-menu-item:hover, .account-menu-item:focus-visible { background: #edf6ff; color: #1774d8; }
.account-menu-item svg { width: 17px; height: 17px; }
.account-menu-error { font-size: 12px; color: #a74949; padding: 0 12px; }
.account-dialog { width: min(460px, calc(100vw - 28px)); max-width: none; max-height: calc(100svh - 32px); margin: auto; padding: 26px 36px 32px; border: 1px solid #d9e7f4; border-radius: 23px; background: #fcfeff; color: #192e50; box-shadow: 0 24px 100px #153e662b; overflow-y: auto; }
.account-dialog::backdrop { background: #243e6636; backdrop-filter: blur(7px); }
.account-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 21px; }
.account-wordmark { font-size: 14px; letter-spacing: 3px; font-weight: 650; color: #2584ec; }
.account-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 7px; border: 0; border-radius: 50%; background: #edf4fb; color: #7790ae; }
.account-close svg { width: 100%; height: 100%; }
.account-dialog h2 { font-size: 26px; font-weight: 600; line-height: 1.35; letter-spacing: -.5px; margin: 0 0 8px; }
.account-dialog-sub { margin: 0 0 21px; font-size: 12px; line-height: 1.8; color: #8192a8; }
.account-tabs { display: flex; gap: 24px; margin-bottom: 22px; border-bottom: 1px solid #e4edf6; }
.account-tabs button { padding: 0 2px 11px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: #8392a9; font-size: 13px; }
.account-tabs button.active { color: #217ddc; border-bottom-color: #2584ec; font-weight: 600; }
.account-form { display: grid; gap: 15px; }
.account-field { display: grid; gap: 7px; margin: 0; min-width: 0; }
.account-label { font-size: 12px; font-weight: 550; color: #4d6383; }
.account-optional { font-size: 10px; margin-left: 7px; color: #899bb0; font-weight: 400; }
.account-field input { width: 100%; min-width: 0; height: 43px; padding: 10px 13px; border: 1px solid #dce7f2; border-radius: 9px; background: #fff; color: #233b5a; outline: none; font: inherit; font-size: 13px; }
.account-field input::placeholder { color: #9aaac0; }
.account-field input:focus { border-color: #78b1ec; box-shadow: 0 0 0 3px #e7f3ff; }
.account-password { position: relative; }
.account-password input { padding-right: 56px; }
.account-reveal { position: absolute; inset: 1px 5px 1px auto; width: 45px; border: 0; background: transparent; color: #758ea9; font-size: 11px; }
.account-primary { min-height: 44px; width: 100%; margin-top: 4px; border: 1px solid #2082ed; border-radius: 10px; background: #2485ef; box-shadow: 0 3px 7px #2882df17; color: #fff; font: inherit; font-size: 14px; font-weight: 550; }
.account-primary:hover:not(:disabled) { background: #1977dd; }
.account-primary:disabled { opacity: .65; }
.account-note, .account-verification { font-size: 11px; line-height: 1.85; color: #8a99ad; margin: 0; }
.account-password-notice { margin: 0; color: #b42318; font-size: 12px; font-weight: 700; line-height: 1.85; }
.account-verification { margin: 23px 0 17px; padding: 12px 14px; border-radius: 10px; background: #f0f6fc; color: #7289a4; }
.account-feedback { margin: 0; color: #526f96; font-size: 12px; line-height: 1.8; }
.account-help { border: 0; background: transparent; padding: 0; justify-self: center; color: #7b93af; font-size: 11px; }
.account-profile { margin: 0; }
.account-profile > div { display: grid; grid-template-columns: 65px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eaf0f6; font-size: 13px; }
.account-profile dt { color: #8595ab; }
.account-profile dd { margin: 0; overflow-wrap: anywhere; color: #395270; }
@media (max-width: 640px) {
  .query-submit-tools { gap: 9px; }
  .voice-trigger { width: 49px; height: 49px; }
  .voice-stop, .voice-cancel { min-height: 44px; }
  .voice-feedback { padding-inline: 18px; }
  .account-avatar { height: 52.8px; min-height: 52.8px; }
  .account-menu { width: min(280px, calc(100vw - 32px)); }
  .account-dialog { padding: 22px 24px 27px; }
  .account-dialog h2 { font-size: 24px; }
  .account-field input { font-size: 16px; height: 46px; }
  .account-close { width: 38px; height: 38px; }
  .account-tabs button, .account-help { min-height: 38px; }
}

/* Account routes use complete pages; the user menu stays in the header. */
.search-app[data-page="account"] .header-search { display: none; }
.search-app[data-page="account"] .site-footer { display: none; }
.account-page { width: 100%; padding: 36px 20px 72px; }
.account-card { width: min(100%, 560px); margin: 0 auto; padding: 30px 38px 38px; border: 1px solid #d9e7f4; border-radius: 22px; background: #fff; box-shadow: 0 16px 60px #214b7410; }
.account-back { display: inline-block; margin-bottom: 25px; color: #6783a9; font-size: 13px; text-decoration: none; }
.account-card h1 { margin: 0 0 10px; color: #192e50; font-size: 27px; font-weight: 600; line-height: 1.4; }
.account-page-sub { margin: 0 0 23px; color: #7a8ea9; font-size: 13px; line-height: 1.8; }
.account-page-tabs { display: flex; gap: 24px; margin-bottom: 26px; border-bottom: 1px solid #e4edf6; }
.account-page-tabs a { padding: 0 0 12px; color: #7a8fa9; font-size: 13px; text-decoration: none; border-bottom: 2px solid transparent; }
.account-page-tabs a.active { color: #217ddc; border-bottom-color: #2584ec; font-weight: 600; }
.account-code-row { display: flex; align-items: stretch; gap: 10px; min-width: 0; }
.account-code-row input { flex: 1; min-width: 0; width: 0; }
.account-send-code, .account-secondary { flex: none; border: 1px solid #bcd8f5; border-radius: 9px; background: #edf6ff; color: #267ad2; padding: 10px 13px; font-size: 12px; }
.account-send-code { min-width: 112px; white-space: nowrap; }
.account-send-code:disabled { color: #6c819d; background: #f1f5fa; cursor: default; }
.account-field-hint { font-size: 11px; color: #768ba7; line-height: 1.8; }
.account-password-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.6; color: #8594a8; }
.account-password-rules .is-met { color: #20714c; }
.account-feedback.is-error { color: #b42318; }
.account-card .account-password-notice { font-size: 13px; }
.account-page .account-help { margin-top: 5px; font-size: 13px; text-decoration: none; }
@media (max-width: 760px) {
  .search-app .header-rule { display: none; }
  .search-app:not([data-page="results"]) .site-header { justify-content: space-between; }
  .account-page { padding: 18px 14px 50px; }
  .account-card { padding: 25px 22px 28px; border-radius: 18px; }
  .account-card h1 { font-size: 24px; }
  .account-code-row { gap: 8px; }
  .account-send-code { min-width: 106px; padding-inline: 10px; }
}
@media (max-width: 390px) {
  .home .search-mode-trigger { gap: 4px; padding-inline: 8px; }
  .home .search-mode-trigger .mode-icon { display: none; }
  .home .search-mode-trigger { grid-template-columns: auto auto; }
  .home .search-mode-trigger::after, .home .search-mode-trigger > span:not(.mode-icon) { grid-column: 1; }
  .home .search-mode-trigger > .mode-chevron { grid-column: 2; }
  .home .search-mode-option > .ui-icon:first-child { display: none; }
  .home .search-mode-option { gap: 4px; padding-inline: 4px; }
}
