:root {
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --ink: #172033;
  --muted: #64748b;
  --line: #e5eaf2;
  --surface: #ffffff;
  --canvas: #f7f9fc;
  --green: #087f5b;
  --orange: #b45309;
  --shadow: 0 16px 45px rgba(31, 50, 85, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; padding-bottom: 76px; }
.topbar { display: flex; align-items: center; justify-content: space-between; max-width: 1160px; margin: 0 auto; padding: 18px 24px; }
.brand { display: inline-flex; gap: 11px; align-items: center; min-width: 44px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(145deg, #3b82f6, #1d4ed8); box-shadow: 0 7px 17px rgba(37,99,235,.23); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: .02em; }
.brand-copy small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.header-action { border: 1px solid var(--line); border-radius: 11px; padding: 9px 14px; color: var(--blue-deep); background: #fff; font-weight: 700; cursor: pointer; }
.section-pad { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.hero { position: relative; padding-top: clamp(32px, 8vw, 88px); padding-bottom: 42px; }
.hero::after { content: ""; width: 360px; height: 260px; position: absolute; z-index: -1; right: 0; top: 24px; background: radial-gradient(circle, rgba(219,234,254,.8), rgba(247,249,252,0) 68%); pointer-events: none; }
.hero-copy { max-width: 650px; }
.eyebrow, .section-kicker { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero h1 { margin: 13px 0 14px; font-size: clamp(37px, 6vw, 66px); line-height: 1.13; letter-spacing: -.055em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.75; font-size: 15px; }
.quick-search { display: flex; align-items: center; max-width: 670px; margin-top: 30px; padding: 7px 7px 7px 16px; border: 1px solid #dce5f4; border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.search-icon { color: var(--blue); font-size: 26px; line-height: 1; transform: rotate(-20deg); }
.quick-search input { flex: 1; min-width: 0; padding: 10px; color: var(--ink); border: 0; outline: 0; background: transparent; }
.quick-search input::placeholder { color: #94a3b8; }
.quick-search button, .primary-button { min-height: 44px; border: 0; border-radius: 11px; padding: 0 18px; color: #fff; background: var(--blue); font-weight: 700; cursor: pointer; box-shadow: 0 6px 13px rgba(37,99,235,.2); }
.quick-search button:hover, .primary-button:hover { background: var(--blue-deep); }
.hero-notes { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 12px; }
.hero-notes span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }.dot.blue { background: #60a5fa; }.dot.green { background: #34d399; }.dot.orange { background: #fbbf24; }
.filter-section { padding-top: 24px; padding-bottom: 30px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { margin: 6px 0 0; font-size: 25px; letter-spacing: -.035em; }
.text-button { min-height: 44px; padding: 0 2px; border: 0; color: var(--blue); background: transparent; font-size: 13px; cursor: pointer; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.filter-control { display: grid; gap: 7px; }
.filter-control > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-control select { width: 100%; min-height: 46px; padding: 0 32px 0 12px; appearance: none; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 4.5 3.8 3.8 3.8-3.8' fill='none' stroke='%2364758b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.filter-control select:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px #dbeafe; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; min-height: 22px; margin-top: 12px; }
.filter-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 20px; color: #1e40af; background: #eff6ff; font-size: 12px; }
.results-section { padding-top: 23px; padding-bottom: 34px; }
.results-heading { align-items: center; }
.result-count { color: var(--muted); font-size: 13px; }
.results-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.paper-card { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 7px 24px rgba(31,50,85,.035); transition: transform .18s ease, box-shadow .18s ease; }
.paper-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 7px; color: #1e40af; background: #eff6ff; font-size: 11px; font-weight: 700; }
.demo-badge { color: #92400e; background: #fff7ed; }
.card-date { color: var(--muted); font-size: 12px; }
.paper-card h3 { margin: 0; font-size: 17px; line-height: 1.45; letter-spacing: -.02em; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 11px 0 17px; color: var(--muted); font-size: 12px; }
.paper-meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta-dot { width: 4px; height: 4px; border-radius: 50%; background: #cbd5e1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid #f0f2f6; }
.file-status { display: flex; flex-wrap: wrap; gap: 5px; }
.file-pill { padding: 5px 7px; border-radius: 6px; color: var(--muted); background: #f8fafc; font-size: 11px; }.file-pill.ready { color: var(--green); background: #ecfdf5; }.file-pill.off { color: #94a3b8; background: #f8fafc; }
.detail-button { min-height: 40px; padding: 0 12px; border: 1px solid #bfdbfe; border-radius: 9px; color: var(--blue-deep); background: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.empty-state { padding: 46px 20px; border: 1px dashed #cbd5e1; border-radius: 17px; text-align: center; background: rgba(255,255,255,.56); }.empty-state-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; color: var(--blue); background: #eff6ff; font-size: 22px; }.empty-state h3 { margin: 0 0 6px; font-size: 17px; }.empty-state p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; gap: 25px; padding: 9px 18px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }.nav-item { display: grid; place-items: center; gap: 2px; min-width: 64px; min-height: 44px; color: #94a3b8; font-size: 20px; }.nav-item small { font-size: 11px; }.nav-item.active { color: var(--blue); }
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: end center; padding: 14px; background: rgba(15,23,42,.4); backdrop-filter: blur(3px); }.dialog-backdrop[hidden] { display: none; }.detail-dialog { position: relative; width: min(100%, 600px); max-height: min(720px, 92vh); overflow: auto; padding: 26px 22px 24px; border-radius: 24px 24px 14px 14px; background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.2); animation: rise .22s ease-out; }.dialog-close { position: absolute; top: 13px; right: 14px; width: 42px; height: 42px; border: 0; border-radius: 50%; color: var(--muted); background: #f8fafc; font-size: 24px; line-height: 1; cursor: pointer; }.detail-kicker { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .1em; }.detail-dialog h2 { max-width: 500px; margin: 10px 44px 8px 0; font-size: 24px; line-height: 1.35; }.detail-subtitle { margin: 0; color: var(--muted); font-size: 13px; }.detail-info { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 23px 0; }.info-item { padding: 12px; border-radius: 11px; background: #f8fafc; }.info-item span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }.info-item strong { font-size: 13px; }.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.detail-actions button { min-height: 46px; border-radius: 11px; font-weight: 700; cursor: pointer; }.detail-actions .secondary-button { border: 1px solid var(--line); color: var(--muted); background: #fff; }.detail-actions button:disabled { color: #a1aab8; background: #f8fafc; border-color: #edf0f5; cursor: not-allowed; }.detail-note { margin: 17px 0 0; padding: 11px 12px; border-radius: 10px; color: #475569; background: #f8fafc; font-size: 12px; line-height: 1.65; }
@keyframes rise { from { transform: translateY(20px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 820px) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.results-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .topbar { padding: 14px 16px; }.brand-copy small { display: none; }.section-pad { padding-inline: 16px; }.hero { padding-top: 38px; }.hero h1 { font-size: 40px; }.hero p { font-size: 14px; }.quick-search { margin-top: 23px; }.quick-search button { padding-inline: 14px; }.filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 9px; }.filter-control select { min-height: 48px; padding-left: 10px; }.results-section { padding-top: 16px; }.paper-card { padding: 17px; }.card-footer { align-items: flex-end; }.file-status { max-width: 60%; }.detail-dialog { padding: 26px 17px 20px; }.detail-dialog h2 { font-size: 21px; }.bottom-nav { gap: 15px; } }
@media (max-width: 360px) { .filter-grid { grid-template-columns: 1fr; }.quick-search { padding-left: 10px; }.quick-search input { width: 100%; }.hero-notes { gap: 10px; }.nav-item { min-width: 58px; } }

/* Header account controls */
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.admin-entry { text-decoration: none; }
.header-action { white-space: nowrap; }
.account-dialog { width: min(100%, 460px); }
.account-intro { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; margin: 18px 0 10px; border-radius: 12px; background: #f1f5f9; }
.account-tabs[hidden], .account-form[hidden], .account-signed-in[hidden] { display: none; }
.account-tab { min-height: 40px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 700; cursor: pointer; }
.account-tab.active { color: var(--blue-deep); background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.account-message { min-height: 0; margin: 0; font-size: 13px; line-height: 1.5; }
.account-message:not(:empty) { margin: 10px 0; padding: 10px 12px; border-radius: 9px; }
.account-message.error { color: #b42318; background: #fff1f0; }
.account-message.success { color: #087f5b; background: #ecfdf5; }
.account-form { display: grid; gap: 14px; margin-top: 14px; }
.account-form label { display: grid; gap: 7px; color: #475569; font-size: 13px; font-weight: 650; }
.account-form input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.account-form input:focus { border-color: #93b4ff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.account-submit { width: 100%; min-height: 46px; margin-top: 2px; }
.account-signed-in { margin-top: 18px; }
.account-signed-in p { margin: 0 0 16px; color: var(--ink); font-size: 14px; line-height: 1.7; }
.account-footnote { margin: 18px 0 0; color: #94a3b8; font-size: 11px; line-height: 1.65; }
@media (max-width: 560px) {
  .topbar-actions { gap: 6px; }
  .header-action { padding: 8px 10px; font-size: 12px; }
  .account-dialog { padding: 26px 17px 20px; }
}
