/* Thesis writer page */
.th .th-made { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #fff4e0; color: #8a5300; white-space: nowrap; }
.th .th-hyp { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 14px; }
.th .th-hyp legend { font-weight: 600; padding: 0 6px; }
.th .th-h3 { font-size: 16.5px; margin: 22px 0 6px; }
.th .th-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.th .th-amount { font-size: 30px; font-weight: 700; color: var(--accent); }
.th .th-launch { color: var(--muted); font-size: 14px; }
.th .th-incl { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.th .th-chtab { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.th .th-chtab th, .th .th-chtab td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.th .th-chtab input[data-title] { width: 100%; min-width: 0; }
.th .th-chtab input[data-words] { width: 100px; }
.th .th-chtab .gate-check { margin: 0; }
.th .th-style { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); margin: 8px 0; font-size: 14px; }
.th .th-style ul { margin: 4px 0 8px; padding-left: 18px; }
.th .th-ids { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: end; }
.th .th-ids label { grid-column: 1 / -1; }
.th .th-poolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 12px 0 6px; font-size: 14px; }
.th .th-poolbar input { margin-left: auto; min-width: 200px; padding: 6px 9px; }
.th .th-pool { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.th .th-pool table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.th .th-pool th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 7px 8px; z-index: 1; }
.th .th-pool td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.th .th-pool td:first-child, .th .th-pool td:last-child { width: 1%; white-space: nowrap; text-align: center; }
.th .th-pool .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* workspace */
.th-work { margin: 28px 0 40px; }
.th .th-bar { position: sticky; top: var(--hd-h, 64px); z-index: 20; background: var(--bg, #f5f6fa); padding: 8px 0; flex-wrap: wrap; }
.th .th-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.th .th-side { position: sticky; top: calc(var(--hd-h, 64px) + 64px); max-height: calc(100vh - 150px); overflow: auto; }
.th .th-side ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.th .th-side button { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.th .th-side button:hover { border-color: var(--accent); }
.th .th-side b { display: block; font-size: 14px; font-weight: 600; }
.th .th-side small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.th .th-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--line-strong); }
.th .th-s-done .th-dot { background: #1f8a4c; } .th .th-s-open .th-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .th .th-s-stale .th-dot { background: #c27a00; }
.th .th-s-wait button { opacity: .72; }
.th .th-sidehint { margin-top: 10px; font-size: 12.5px; }
.th .th-doc { background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-radius: 10px; padding: 8px 40px 40px; min-height: 60vh; font-family: "Times New Roman", Georgia, serif; font-size: 16.5px; line-height: 1.75; }
.th .th-ch { padding-top: 26px; border-top: 1px dashed #d9dbe3; margin-top: 18px; scroll-margin-top: 140px; }
.th .th-ch:first-child { border-top: 0; margin-top: 0; }
.th .th-chh { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; font-family: var(--font, "IBM Plex Sans", sans-serif); }
.th .th-chh h2 { margin: 0; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; color: #1b1b1b; }
.th .th-chno { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.th .th-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.th .th-note { font-family: var(--font, sans-serif); font-size: 13px; min-height: 0; margin: 4px 0; }
.th .th-stalemsg { font-family: var(--font, sans-serif); font-size: 13.5px; background: #fff4e0; color: #7a4a00; padding: 6px 10px; border-radius: 8px; }
.th .th-empty { font-family: var(--font, sans-serif); }
.th .th-hrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 18px 0 4px; }
.th .th-h { margin: 0; font-size: 17.5px; font-weight: 700; color: #1b1b1b; }
.th h4.th-h { font-size: 16.5px; font-style: italic; }
.th .th-hno { color: #555; }
.th .th-aisec { font-family: var(--font, sans-serif); font-size: 12.5px; opacity: 0; transition: opacity .15s; }
.th .th-hrow:hover .th-aisec, .th .th-aisec:focus { opacity: 1; }
.th .th-p { margin: 0 0 12px; text-align: justify; }
.th .th-ed { outline: none; border-radius: 4px; }
.th .th-ed:hover { background: #f6f8fd; } .th .th-ed:focus { background: #eef3ff; box-shadow: 0 0 0 2px #c9d6f5; }
.th .cite { color: #2b4fa6; cursor: default; } .th .cite sup { font-size: 70%; }
.th .th-list { margin: 0 0 12px; }
.th .th-study { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px; margin: 0 0 12px; align-items: start; }
.th .th-study p { margin: 0; text-align: justify; }
.th .th-sno { font-weight: 700; }
.th .th-study .linkbtn { font-family: var(--font, sans-serif); font-size: 12px; opacity: 0; } .th .th-study:hover .linkbtn { opacity: 1; }
.th .th-table, .th .th-fig { margin: 16px 0 18px; font-family: var(--font, sans-serif); font-size: 13.5px; line-height: 1.5; position: relative; }
.th .th-table figcaption, .th .th-fig figcaption { margin: 4px 0 6px; }
.th .th-table table { border-collapse: collapse; width: 100%; }
.th .th-table th, .th .th-table td { border: 1px solid #c8cbd6; padding: 4px 6px; text-align: left; vertical-align: top; }
.th .th-table th { background: #f2f4f8; }
.th .th-figbox { text-align: center; } .th .th-figbox svg, .th .th-figbox img { max-width: 100%; height: auto; }
.th .th-fig figcaption { text-align: center; }
.th .th-btools { display: flex; gap: 10px; justify-content: flex-end; opacity: 0; transition: opacity .15s; font-size: 12px; }
.th .th-table:hover .th-btools, .th .th-fig:hover .th-btools { opacity: 1; }
.th .th-refs { padding-left: 26px; } .th .th-refs-az { list-style: none; padding-left: 0; } .th .th-refs li { margin-bottom: 6px; }
.th .th-refnote { font-family: var(--font, sans-serif); font-size: 12.5px; } .th .th-r-ok { color: #1f8a4c; } .th .th-r-retracted { color: #b3261e; font-weight: 600; } .th .th-r-differs, .th .th-r-missing, .th .th-r-unchecked { color: #8a5300; }
.th .th-removed { font-family: var(--font, sans-serif); font-size: 13px; margin: 8px 0; } .th .th-removed li { margin: 4px 0; }
.th .th-prog { font-family: var(--font, sans-serif); font-size: 14px; padding-left: 20px; } .th .th-prog li { margin: 4px 0; }
.th-tb { position: absolute; right: 0; top: -34px; z-index: 5; display: flex; gap: 2px; background: #1f2b5e; border-radius: 8px; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.18); font-family: "IBM Plex Sans", sans-serif; }
.th-tb button { background: transparent; color: #fff; border: 0; font-size: 12.5px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.th-tb button:hover { background: rgba(255,255,255,.16); }
/* dialog */
.th-dlg { border: 0; border-radius: 10px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink, #1b1b1b); background: var(--surface, #fff); }
.th-dlg::backdrop { background: rgba(15, 20, 40, .45); }
.th-dlg-in { padding: 20px 22px 16px; }
.th-dlg h3 { margin: 0 0 8px; font-size: 18px; }
.th-dlg-foot { justify-content: flex-end; margin-top: 12px; }
.th-wide { width: 100%; padding: 8px 10px; }
.th-picks { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.th-pick { text-align: left; border: 1px solid var(--line, #ddd); background: var(--surface, #fff); border-radius: 8px; padding: 7px 10px; cursor: pointer; font: inherit; font-size: 13.5px; color: inherit; }
.th-pick:hover { border-color: var(--accent, #2b4fa6); }
.th-figq { display: flex; gap: 8px; } .th-figq input { flex: 1; }
.th-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 46vh; overflow: auto; margin: 8px 0; }
.th-figc { border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 8px; font-size: 12.5px; display: grid; gap: 4px; align-content: start; }
.th-figc img { width: 100%; height: 130px; object-fit: contain; background: #fafafa; border-radius: 6px; }
.th-figc p { margin: 0; }
.th-vers { list-style: none; padding: 0; display: grid; gap: 6px; } .th-vers li { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.th-viva { padding-left: 22px; max-height: 60vh; overflow: auto; } .th-viva li { margin: 6px 0; } .th-viva summary { cursor: pointer; } .th-viva .tag { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--accent-soft, #e6eefb); color: var(--accent, #2b4fa6); }
@media (max-width: 900px) {
  .th .th-grid { grid-template-columns: minmax(0, 1fr); }
  .th .th-side { position: static; max-height: none; }
  .th .th-side ol { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .th .th-doc { padding: 6px 16px 28px; font-size: 16px; }
  .th .th-aisec, .th .th-btools, .th .th-study .linkbtn { opacity: 1; }
}
@media print {
  body.th-print .site-header, body.th-print .site-footer, body.th-print .ai-intro, body.th-print .syn-steps, body.th-print .sl-card, body.th-print .th-bar, body.th-print .th-side, body.th-print .th-acts, body.th-print .th-note, body.th-print .th-removed, body.th-print .th-aisec, body.th-print .th-btools, body.th-print .th-stalemsg, body.th-print .banner, body.th-print .th-study .linkbtn, body.th-print .th-empty { display: none !important; }
  body.th-print .th-grid { display: block; } body.th-print .th-doc { border: 0; padding: 0; }
  body.th-print .th-ch { page-break-before: always; border: 0; }
}
/* page borders */
.th-borders .th-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.th-bsw { width: 44px; height: 58px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.th-bsw span { display: block; width: 100%; height: 100%; box-sizing: border-box; }
.th-bsw[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.th-bcol { margin: 8px 0 0; font-weight: 600; }
/* papers by year */
.th-spread { margin: 6px 0 10px; }
.th-ybars { display: flex; align-items: flex-end; gap: 4px; height: 62px; }
.th-ybar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; min-width: 14px; }
.th-ybar i { display: block; width: 100%; max-width: 22px; background: var(--accent); border-radius: 3px 3px 0 0; }
.th-ybar small { font-size: 10.5px; color: var(--muted); }
.th-dedfor { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 4px 0 8px; }
