@layer reset, base, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p { margin: 0; }
  button, input, select, textarea { font: inherit; }
  button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
}
@layer base {
  :root { --ink:#232a30; --muted:#697078; --line:#dedfdc; --paper:#fff; --ground:#fafbf9; --accent:#23514b; --soft:#edf3ef; --red:#9a3535; --gold:#98712c; }
  html { color-scheme: light; scroll-behavior: smooth; }
  body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size:15px; line-height:1.65; color:var(--ink); background:var(--ground); }
  a { color:var(--accent); text-decoration:none; text-underline-offset:3px; }
  a:hover { text-decoration:underline; }
  h1,h2,h3 { line-height:1.25; font-weight:600; }
  h1 { font-family:Georgia,"Times New Roman",serif; font-weight:400; font-size:clamp(30px,3.6vw,44px); letter-spacing:-.035em; margin:12px 0 18px; }
  h2 { font-size:20px; letter-spacing:-.02em; }
  h3 { font-size:16px; }
  p { margin:0 0 16px; overflow-wrap:anywhere; }
  code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.85em; }
  :focus-visible { outline:3px solid #529082; outline-offset:4px; }
  input,textarea,select { background:#fff; color:var(--ink); border:1px solid #bdc4c0; border-radius:5px; padding:11px 13px; width:100%; min-width:0; }
  textarea { resize:vertical; line-height:1.65; }
  input[type=file] { padding:22px; border-style:dashed; background:#f7f9f7; }
  input[type=file]::file-selector-button { padding:8px 12px; margin-right:14px; border:1px solid var(--line); border-radius:3px; background:white; color:var(--ink); }
  input[type=radio] { width:auto; accent-color:var(--accent); }
  label { font-weight:600; }
  button,summary,select { cursor:pointer; }
  button:disabled { cursor:not-allowed; opacity:.45; }
  ul.errorlist { list-style:none; padding:0; margin:4px 0; }
}
@layer components {
  .site-header { background:#fff; border-bottom:1px solid var(--line); }
  .header-inner { max-width:1200px; margin:auto; min-height:84px; padding:16px 32px; display:flex; justify-content:space-between; align-items:center; gap:28px; }
  .wordmark { color:var(--ink); font-family:Georgia,serif; font-size:29px; font-weight:700; letter-spacing:-1.5px; white-space:nowrap; }
  .wordmark:hover { text-decoration:none; }
  .wordmark span { font-weight:400; }
  .wordmark i { font-style:normal; color:var(--accent); }
  nav { display:flex; align-items:center; gap:24px; }
  .header-inner nav { font-size:13px; gap:22px; flex-wrap:wrap; }
  .header-inner nav > a:not(.button) { color:var(--ink); }
  .account-name { color:var(--muted); border-left:1px solid var(--line); padding-left:20px; }
  .quiet-link,.nav-button { color:var(--muted)!important; }
  .nav-button { background:none; border:0; padding:0; font-size:13px; }
  .nav-button:hover { text-decoration:underline; }
  .inline-form { display:inline; }
  .main-shell { max-width:1136px; padding:46px 0 80px; margin:auto; min-height:calc(100vh - 175px); }
  .site-footer { max-width:1136px; margin:auto; padding:24px 0; border-top:1px solid var(--line); display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px 24px; color:var(--muted); font-size:12px; }
  .footer-links { display:flex; flex-wrap:wrap; gap:10px 20px; }
  .help-layout { display:grid; grid-template-columns:220px minmax(0,1fr); gap:56px; align-items:start; }
  .help-contents { display:flex; flex-direction:column; align-items:flex-start; gap:12px; position:sticky; top:24px; padding:20px 0; border-top:1px solid var(--line); font-size:13px; }
  .help-contents strong { color:var(--muted); font-size:12px; margin-bottom:4px; }
  .help-content { min-width:0; }
  .help-content > section { border-top:1px solid var(--line); padding:28px 0 36px; scroll-margin-top:24px; }
  .help-content > section > h2 { font:28px/1.3 Georgia,serif; margin-bottom:20px; }
  .help-content > section > h3 { margin:28px 0 12px; font-size:16px; }
  .help-content p,.help-content li { line-height:1.8; overflow-wrap:anywhere; }
  .help-content p { margin-bottom:16px; }
  .help-content ol { padding-left:24px; margin:0 0 20px; }
  .help-content li { padding-left:5px; margin:10px 0; }
  .help-content pre { padding:18px; overflow-x:auto; background:#f0f3f0; border:1px solid var(--line); border-radius:4px; font-size:12px; line-height:1.8; }
  .help-content code { overflow-wrap:anywhere; }
  .help-content pre code { overflow-wrap:normal; }
  .help-content .notice { margin:22px 0 0; }
  .help-details { padding:24px; }
  .button,button[type=submit] { display:inline-flex; align-items:center; justify-content:center; gap:12px; background:var(--accent); color:white; border:1px solid var(--accent); border-radius:5px; padding:10px 18px; font-size:14px; font-weight:600; cursor:pointer; text-align:center; line-height:1.6; }
  .button:hover { background:#183f3a; text-decoration:none; }
  .button.secondary { color:var(--ink); background:#fff; border-color:#c8cdca; }
  .button.secondary:hover { background:#f1f4f1; }
  .button.danger { background:white; color:var(--red); border-color:#d7b8b8; }
  .button.small { padding:7px 12px; font-size:12px; }
  .button.full { width:100%; }
  .eyebrow { font-size:10px; font-weight:650; letter-spacing:1.8px; color:var(--accent); }
  .lede { color:var(--muted); font-size:16px; max-width:750px; }
  .page-heading { margin:10px 0 34px; }
  .page-heading h1 { font-size:42px; }
  .search-bar { display:flex; gap:32px; justify-content:space-between; align-items:center; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:24px 0; }
  .search-input { display:flex; gap:8px; flex:1; max-width:650px; }
  .search-input input { background:#fff; }
  .search-input button { padding:9px 18px; }
  .sort-control { display:flex; align-items:center; gap:10px; }
  .sort-control label { white-space:nowrap; color:var(--muted); font-size:12px; font-weight:400; }
  .sort-control select { width:auto; font-size:12px; padding:11px 9px; }
  .results-heading { display:flex; align-items:center; justify-content:space-between; margin:28px 0 15px; font-size:12px; }
  .results-heading h2 { font-size:15px; }
  .paper-table-head,.paper-row { display:grid; grid-template-columns:minmax(0,1fr) 210px 105px 100px; gap:26px; align-items:center; }
  .paper-table-head { padding:11px 20px; font-size:10px; letter-spacing:1.1px; color:var(--muted); background:#f0f2ef; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
  .paper-row { padding:26px 20px; border-bottom:1px solid var(--line); background:#fff; }
  .paper-row:hover { background:#fcfdfb; }
  .paper-title { font-family:Georgia,serif; font-size:20px; line-height:1.4; display:block; color:#223e3a; }
  .authors-cell { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
  .rating-cell { font-size:13px; white-space:nowrap; }
  .rating-count { font-size:11px; padding-left:4px; }
  .star { color:var(--gold); }
  .unrated { color:#858b88; font-size:12px; }
  .read-link { font-size:12px; font-weight:600; white-space:nowrap; }
  .read-link span { padding-left:6px; }
  .muted,.help { color:var(--muted); }
  .small-text { font-size:12px; }
  .breadcrumb { font-size:13px; display:inline-block; margin:0 0 28px; color:var(--muted); }
  .paper-metadata h1 { max-width:1000px; }
  .author-list { font-size:17px; line-height:1.65; }
  .meta-line { display:flex; gap:12px 26px; flex-wrap:wrap; font-size:12px; color:var(--muted); align-items:center; }
  .abstract { margin:30px 0; max-width:900px; }
  .abstract h2 { font-size:14px; margin-bottom:12px; }
  .abstract p { line-height:1.9; }
  .actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
  .tabs { border-bottom:1px solid var(--line); gap:30px; margin-top:42px; }
  .tabs a { color:var(--muted); padding:14px 3px; border-bottom:2px solid transparent; font-size:14px; margin-bottom:-1px; }
  .tabs a.active { color:var(--accent); border-bottom-color:var(--accent); font-weight:650; }
  .tabs a:hover { text-decoration:none; color:var(--accent); }
  .tabs span { font-size:11px; background:#e9eeea; border-radius:20px; padding:2px 6px; margin-left:5px; }
  .section-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:30px 0 20px; }
  .section-heading p { font-size:13px; margin:8px 0 0; }
  .rating-summary { font-size:26px; white-space:nowrap; }
  .rating-summary small { font-size:12px; color:var(--muted); }
  .review { padding:24px 0; border-bottom:1px solid var(--line); }
  .review-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:13px; margin-bottom:12px; }
  .review-heading time { color:var(--muted); margin-left:auto; font-size:12px; }
  .review-score { font-size:12px; background:#f3efe4; padding:1px 7px; border-radius:3px; }
  .review p { margin:0; max-width:920px; }
  .form-panel { padding:26px; background:#f0f4f0; border:1px solid #dce4dd; border-radius:6px; margin-top:30px; }
  .form-panel h3 { margin-bottom:20px; }
  .form-panel form { max-width:800px; }
  .field { margin:0 0 22px; }
  .field > label { display:block; font-size:13px; margin-bottom:7px; }
  .field .help { margin-top:6px; }
  .help { font-size:12px; }
  .help ul { padding-left:18px; margin:5px 0; }
  .has-error input,.has-error textarea { border-color:var(--red); }
  .field-errors { color:var(--red); font-size:13px; }
  .auth-panel { max-width:450px; margin:24px auto 55px; }
  .auth-panel .lede { margin-bottom:28px; }
  .auth-panel h1 { font-size:36px; }
  .auth-bottom { margin-top:28px; padding-top:22px; border-top:1px solid var(--line); font-size:13px; text-align:center; }
  .auth-link { margin-top:17px; font-size:13px; text-align:center; }
  .auth-panel form + .help { margin-top:16px; }
  .form-layout { max-width:760px; margin:auto; }
  .upload-form { margin-top:28px; }
  .notice { padding:15px 18px; background:#edf4ee; border:1px solid #cfddd2; border-radius:4px; font-size:13px; margin-bottom:24px; }
  .notice p:last-child { margin-bottom:0; }
  .notice.warning { background:#fff8e8; border-color:#e6d6ae; }
  .notice.error { background:#fcf0ef; border-color:#e2c3c1; color:#823535; }
  .notice.success { background:#eaf4eb; }
  .empty-state { padding:60px 20px; text-align:center; border:1px solid var(--line); background:white; border-radius:5px; }
  .empty-state h2 { font-family:Georgia,serif; font-size:27px; font-weight:400; margin:8px 0 13px; }
  .empty-state p { color:var(--muted); }
  .empty-mark { color:#84988c; font-family:Georgia,serif; font-size:42px; }
  .empty-inline { padding:26px 0; color:var(--muted); }
  .empty-inline h3 { color:var(--ink); margin-bottom:8px; }
  .pagination { display:flex; justify-content:space-between; padding:24px 0; font-size:12px; }
  .status { display:inline-block; border-radius:30px; padding:3px 10px; font-size:11px; font-weight:650; line-height:1.6; border:1px solid transparent; white-space:nowrap; }
  .status.pending { color:#805f18; background:#fbf2d9; }
  .status.accepted { color:#24543b; background:#e5f0e7; }
  .status.rejected { color:#8a3434; background:#f7e9e7; }
  .status.withdrawn { color:#646b6a; background:#edeff0; }
  .history-row { display:flex; gap:20px; padding:24px 0; border-bottom:1px solid var(--line); align-items:flex-start; }
  .history-row > div { min-width:0; }
  .entry-title { font-size:16px; font-weight:550; margin-bottom:7px; overflow-wrap:anywhere; }
  .history-row p { font-size:12px; margin:6px 0; }
  .history-dot { width:10px; height:10px; background:#53766a; border-radius:50%; flex-shrink:0; margin-top:8px; }
  .inline-links { display:flex; flex-wrap:wrap; gap:10px 20px; align-items:center; font-size:12px; }
  .submission-heading { margin-bottom:26px; }
  .submission-info { background:#fff; border:1px solid var(--line); padding:24px; border-radius:5px; margin-bottom:22px; }
  .hash-info { display:grid; grid-template-columns:120px 1fr; gap:8px 18px; font-size:12px; margin:22px 0; }
  .hash-info dt { color:var(--muted); }
  .hash-info dd { margin:0; overflow-wrap:anywhere; }
  details { border:1px solid var(--line); border-radius:5px; overflow:hidden; background:white; margin:22px 0; }
  summary { padding:14px 20px; font-size:13px; font-weight:600; background:#f0f3f0; }
  details[open] > summary { border-bottom:1px solid var(--line); }
  .diff-panel { overflow:auto; max-height:70vh; border:1px solid var(--line); border-radius:3px; background:#fff; }
  details .diff-panel { border:0; border-radius:0; }
  .source-diff { margin:0; padding:8px 0; font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size:4; }
  .diff-line { display:block; min-height:1.8em; padding:0 14px; white-space:pre; width:max-content; min-width:100%; }
  .diff-line.addition { background:#e3f3e7; color:#174d2c; }
  .diff-line.deletion { background:#fbe7e6; color:#852f2f; }
  .diff-line.hunk { background:#edf1f7; color:#52667b; }
  .diff-empty { padding:20px; margin:0; }
  .metadata-diff { padding:20px; }
  .metadata-diff section { margin-bottom:15px; }
  .metadata-diff h3 { font-size:12px; margin-bottom:8px; }
  .diff-before,.diff-after { padding:8px 12px; font-size:13px; overflow-wrap:anywhere; }
  .diff-before { background:#fbe7e6; }
  .diff-after { background:#e3f3e7; }
  .decision-panel { padding:24px 0; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:20px; }
  .decision-panel h2 { font-size:17px; }
  .decision-panel p { margin:8px 0 0; font-size:13px; }
  .preview-metadata { padding:25px; border:1px solid var(--line); background:white; margin:28px 0; }
  .preview-metadata h2 { font:28px/1.3 Georgia,serif; margin-bottom:15px; }
  .preview-metadata h3 { font-size:13px; margin:20px 0 8px; }
  .render-preview .markdown-body { padding:25px; }
  .publish-confirm { margin-top:35px; padding:26px; border:1px solid #cfddd2; background:#edf4ee; border-radius:5px; }
  .publish-confirm h2 { margin-bottom:12px; }
  .compare-form { display:flex; align-items:end; gap:20px; margin:25px 0; }
  .compare-form .field { margin:0; flex:1; }
  .sr-only,.skip-link:not(:focus) { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .skip-link:focus { position:fixed; top:10px; left:10px; background:white; padding:10px; z-index:100; }
}
@layer responsive {
  @media(max-width:800px) { .help-layout { grid-template-columns:minmax(0,1fr); gap:12px; } .help-contents { position:static; flex-direction:row; flex-wrap:wrap; gap:10px 20px; padding:18px 0; } .help-contents strong { width:100%; } .help-details { padding:18px; } }
  @media(max-width:1200px) { .main-shell,.site-footer { margin-left:32px; margin-right:32px; } }
  @media(max-width:950px) { .paper-table-head,.paper-row { grid-template-columns:minmax(0,1fr) 150px 90px; gap:18px; } .paper-table-head > :last-child { display:none; } .paper-row > :last-child { grid-column:1; margin-top:-5px; } .search-bar { flex-wrap:wrap; gap:16px; } .search-input { max-width:none; min-width:100%; } .header-inner nav { gap:12px; } .account-name { display:none; } }
  @media(max-width:620px) { .header-inner { padding:14px 20px; flex-wrap:wrap; gap:10px; } .header-inner nav { width:100%; justify-content:space-between; gap:8px; } .main-shell { padding-top:28px; margin-left:20px; margin-right:20px; } .site-footer { margin:0 20px; } .page-heading h1 { font-size:34px; } .paper-table-head { display:none; } .paper-row { grid-template-columns:1fr auto; padding:22px 4px; gap:12px; } .paper-title-cell { grid-column:1/-1; } .authors-cell { grid-column:1; } .rating-cell { grid-column:2; grid-row:2; } .paper-title { font-size:21px; } .sort-control { width:100%; justify-content:space-between; } .section-heading { align-items:flex-start; flex-direction:column; gap:12px; } .form-panel { padding:18px; } .actions .button { flex-grow:1; } .review-heading time { margin-left:0; } .tabs { gap:22px; } .auth-panel { margin-top:5px; } .hash-info { grid-template-columns:1fr; gap:4px; } .hash-info dd { margin-bottom:10px; } .compare-form { flex-direction:column; align-items:stretch; } .history-row { gap:12px; } .history-row .inline-links { gap:10px; } .site-footer { font-size:11px; } }
  @media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
}

/* arXiv subjects remain outside the distraction-free reader. */
.search-bar { flex-wrap: wrap; }
.subject-filter { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.subject-filter select { max-width: 26rem; min-width: 0; width: 100%; }
.subject-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.subject-tags a { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: .3rem; font-size: .88rem; }
.cross-list-picker summary { cursor: pointer; font-weight: 600; margin-bottom: .7rem; }
.subject-checkboxes { max-height: 20rem; overflow: auto; padding: .7rem; margin-top: .5rem; border: 1px solid var(--line); border-radius: .3rem; }
.subject-checkboxes label { display: flex; align-items: baseline; gap: .5rem; font-size: .9rem; font-weight: normal; margin: .45rem 0; }
.subject-checkboxes input[type=checkbox] { width: auto; flex-shrink: 0; }
@media (max-width: 650px) {
  .subject-filter { display:grid; grid-template-columns:auto minmax(0,1fr); width:100%; }
  .subject-filter select { max-width:100%; }
}

/* Authenticator secrets stay readable without widening small screens. */
.security-panel svg.segno { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; }
.security-panel code { overflow-wrap: anywhere; }
.security-panel details { margin-bottom: 1.5rem; }
.security-panel .button + .button { margin-top: .75rem; }

/* A conventional, local Google button: no third-party script or font requests. */
.google-signin { width:100%; display:flex; align-items:center; justify-content:center; gap:12px; min-height:44px; padding:10px 16px; background:#fff; color:#1f1f1f; border:1px solid #747775; border-radius:4px; font:500 14px Arial,sans-serif; cursor:pointer; }
.google-signin:hover { background:#f5f7fa; }
.google-signin:focus-visible { outline:3px solid #4285f4; outline-offset:3px; }
.google-signin svg { flex:none; }
.auth-divider { display:flex; gap:12px; align-items:center; margin:24px 0; color:var(--muted); font-size:13px; }
.auth-divider::before,.auth-divider::after { content:""; flex:1; height:1px; background:var(--line); }
.help-page { max-width:800px; margin:36px auto 80px; }
.help-page h2 { margin-top:32px; }
