:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #19212b;
  --muted: #6f7885;
  --line: #dce1e7;
  --blue: #ec001c;
  --blue-dark: #bf0018;
  --soft: #fff0f2;
  --green: #16825a;
  --green-bg: #e2f6ec;
  --red: #be0925;
  --red-bg: #fff0f2;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); }
.container { max-width: 1440px; padding-left: 28px; padding-right: 28px; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); box-shadow: 0 5px 25px #15212a0c; }
.header-inner { min-height: 78px; height: auto; display: flex; gap: 24px; }
.nt-brand { display: inline-flex; align-items: baseline; position: relative; flex: none; color: var(--ink); font-size: 28px; font-weight: 950; letter-spacing: -.095em; line-height: 1; white-space: nowrap; }
.nt-brand:hover { color: var(--ink); text-decoration: none; }
.nt-brand span { color: var(--blue); }
.nt-brand small { display: block; position: absolute; top: 27px; left: 2px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nt-main-nav { display: flex; align-items: center; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nt-main-nav::-webkit-scrollbar { display: none; }
.nt-main-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 11px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.nt-main-nav a:hover,.nt-main-nav a.active { color: var(--blue); background: var(--soft); text-decoration: none; }
.nt-main-nav b { min-width: 22px; padding: 1px 6px; border-radius: 100px; background: #edf0f4; color: #6b7481; text-align: center; font-size: 11px; }
.nt-main-nav em { padding: 2px 6px; border-radius: 100px; background: var(--green-bg); color: var(--green); font-size: 10px; font-style: normal; }
.nt-profile { position: relative; flex: none; }
.nt-profile summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; border-radius: 10px; padding: 5px 7px; }
.nt-profile summary::-webkit-details-marker { display: none; }
.nt-profile summary:hover,.nt-profile[open] summary { background: var(--soft); }
.nt-avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; background: var(--blue); color: white; border-radius: 50%; font-weight: 800; }
.nt-profile-label { line-height: 1.2; min-width: 0; }
.nt-profile-label strong,.nt-profile-label small { display: block; overflow: hidden; white-space: nowrap; max-width: 115px; text-overflow: ellipsis; }
.nt-profile-label strong { font-size: 13px; }
.nt-profile-label small { color: var(--muted); font-size: 10px; }
.nt-profile-menu { position: absolute; z-index: 40; top: calc(100% + 13px); right: 0; width: 276px; max-height: calc(100vh - 95px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 22px 60px #16212a28; }
.nt-profile-intro { padding: 10px 12px 13px; }
.nt-profile-intro strong,.nt-profile-intro small { display: block; }
.nt-profile-intro small { color: var(--muted); }
.nt-profile-menu a,.nt-profile-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font: 600 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; cursor: pointer; }
.nt-profile-menu a:hover,.nt-profile-menu button:hover { color: var(--blue); background: var(--soft); text-decoration: none; }
.nt-profile-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.nt-profile-menu input[type=hidden] { display: none; }
.nt-section-source { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.nt-section-source strong { color: var(--ink); }
.nt-seo-intro { padding: 26px; margin: 24px 0 48px; }
.nt-seo-intro .empty { margin-top: 18px; }
.nt-seo-list { display: grid; margin-top: 20px; border-top: 1px solid var(--line); }
.nt-seo-list a { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.nt-seo-list a:hover { color: var(--blue); text-decoration: none; }
.nt-seo-list small { flex: none; color: var(--muted); }
.nt-monitor-filter { display: flex; align-items: end; gap: 12px; padding: 16px 18px; margin: 20px 0 0; }
.nt-monitor-filter>div { flex: 1; max-width: 520px; }
.nt-monitor-filter label { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.nt-monitor-filter select { margin: 0; }
.nt-monitor-filter .button { margin: 0; min-height: 49px; }
.nt-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 55px; border-top: 1px solid var(--line); }
.nt-footer-logo { font-size: 20px; font-weight: 950; color: var(--ink); letter-spacing: -.08em; }
.nt-footer-logo b { color: var(--blue); }
.page-intro { max-width: 1000px; margin-top: 40px; }
.eyebrow { color: var(--blue); }
.nt-intro h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.05; }
.card { background: var(--card); box-shadow: 0 9px 28px #14202d08; }
.button { background: var(--blue); border-color: var(--blue); }
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.secondary { color: var(--blue); border-color: #e8b5bc; }
.button.secondary:hover { background: var(--soft); }
a { color: var(--blue); }
input:focus,textarea:focus,select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--soft); outline: none; }
.category-tab.active { background: var(--blue); border-color: var(--blue); }
.small-button { background: var(--blue); border-color: var(--blue); }
.small-button:hover { background: var(--blue-dark); }
.badge-running { background: var(--soft); color: var(--blue); }
.nt-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 28px 0; }
.nt-stat { display: block; padding: 22px; color: var(--ink); }
.nt-stat:hover { border-color: #eaa7b1; text-decoration: none; }
.nt-stat span,.nt-stat small { display: block; color: var(--muted); font-size: 13px; }
.nt-stat strong { display: block; margin: 8px 0 3px; color: var(--ink); font-size: 37px; line-height: 1; letter-spacing: -.04em; }
.nt-overview-panel { margin: 22px 0; padding: 28px; }
.nt-overview-panel h2 { margin: 5px 0 20px; }
.nt-overview-grid,.nt-wiki-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.nt-overview-grid>div { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8f9fb; }
.nt-overview-grid p { color: var(--muted); margin: 7px 0 0; font-size: 14px; }
.nt-status-row { display: grid; grid-template-columns: 1fr auto 150px; align-items: center; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.nt-status-row small { color: var(--muted); text-align: right; }
.nt-pill { display: inline-flex; width: fit-content; align-items: center; border-radius: 100px; padding: 5px 10px; background: #edf1f5; color: #596675; font-size: 11px; font-weight: 800; white-space: nowrap; }
.nt-pill.ok { background: var(--green-bg); color: var(--green); }
.nt-pill.warn { background: var(--soft); color: var(--blue); }
.nt-filter-card { padding: 18px; margin: 25px 0 15px; }
.nt-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto auto; align-items: end; gap: 12px; }
.nt-filters label { margin: 0 0 5px; font-size: 12px; color: var(--muted); }
.nt-filters input,.nt-filters select { min-width: 0; height: 45px; }
.nt-filters .button { height: 45px; margin: 0; }
.nt-reset { align-self: center; font-size: 13px; font-weight: 700; }
.nt-queue-meta { display: flex; justify-content: space-between; gap: 15px; margin: 18px 2px 12px; font-size: 13px; }
.nt-queue-meta span { color: var(--muted); }
.nt-card-list { display: grid; gap: 9px; }
.nt-news-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 170px auto; align-items: center; gap: 12px; min-height: 76px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid #c9d0d8; border-radius: 15px; box-shadow: 0 4px 15px #16212a07; }
.nt-news-row.is-new { border-left-color: var(--green); }
.nt-type { display: inline-grid; place-items: center; max-width: 130px; min-height: 34px; padding: 5px 7px; border-radius: 100px; background: #f0f2f5; color: #4d5967; text-align: center; font-size: 11px; font-weight: 800; }
.nt-card-title { display: block; width: 100%; overflow: hidden; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f8f9fb; color: var(--ink); text-align: left; text-overflow: ellipsis; white-space: nowrap; font: 700 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; cursor: pointer; }
.nt-card-title:hover { border-color: #e9a5af; color: var(--blue); background: var(--soft); }
.nt-card-source { min-width: 0; }
.nt-card-source strong,.nt-card-source small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-card-source strong { font-size: 13px; }
.nt-card-source small { color: var(--muted); font-size: 11px; }
.nt-row-actions { display: flex; gap: 7px; }
.nt-row-actions .button { margin: 0; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.nt-load-more { display: flex; justify-content: center; margin: 22px 0; }
.nt-panel-open { overflow: hidden; }
.nt-side-panel { position: fixed; inset: 0 0 0 auto; width: min(900px,78vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 22px 0 0 22px; background: var(--card); color: var(--ink); box-shadow: -20px 0 60px #0a162440; }
.nt-side-panel::backdrop { background: #15213699; backdrop-filter: blur(3px); }
.nt-panel-head { position: relative; padding: 24px 32px 20px; border-bottom: 1px solid var(--line); }
.nt-panel-head h2 { max-width: 94%; margin: 13px 0; font-size: 30px; line-height: 1.25; }
.nt-panel-close { position: absolute; top: 19px; right: 22px; border: 0; background: transparent; color: var(--muted); font-size: 21px; cursor: pointer; }
.nt-panel-badges { display: flex; gap: 8px; }
.nt-panel-scroll { height: calc(100dvh - 175px); overflow: auto; padding: 20px 32px 50px; }
.nt-panel-section { margin-bottom: 16px; padding: 23px; border: 1px solid var(--line); border-radius: 14px; }
.nt-panel-section h3 { margin: 0 0 17px; font-size: 18px; }
.nt-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nt-detail-grid>div { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8f9fb; }
.nt-detail-grid small,.nt-detail-grid strong { display: block; }
.nt-detail-grid small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.nt-detail-grid strong { margin-top: 3px; font-size: 13px; }
.nt-description { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #f8f9fb; white-space: pre-wrap; }
.nt-stored-body { margin-top: 13px; white-space: pre-wrap; line-height: 1.6; font-size: 14px; }
.nt-panel-section details { margin-top: 15px; }
.nt-panel-section summary { color: var(--blue); cursor: pointer; font-weight: 700; }
.nt-panel-section .button { margin-top: 12px; }
.nt-feedback-item { padding: 10px 0; border-top: 1px solid var(--line); }
.nt-feedback-item small { color: var(--muted); }
.nt-feedback-item p { margin: 5px 0; white-space: pre-wrap; }
.nt-source-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.nt-source-form,.nt-source-list { padding: 26px; margin: 22px 0; }
.nt-source-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin: 16px 0 20px; }
.nt-source-filters label { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.nt-source-filters input,.nt-source-filters select { min-width: 0; }
.nt-source-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: end; }
.nt-source-fields label { margin: 0 0 5px; font-size: 12px; }
.nt-source-fields .button { width: fit-content; margin: 0; }
.nt-table-wrap { overflow-x: auto; }
.nt-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nt-table-wrap th,.nt-table-wrap td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.nt-table-wrap th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.nt-table-wrap td strong,.nt-table-wrap td a,.nt-table-wrap td small { display: block; }
.nt-table-wrap td a { max-width: 310px; margin-top: 3px; overflow-wrap: anywhere; }
.nt-table-wrap td small { color: var(--muted); }
.nt-source-error { max-width: 220px; color: var(--red) !important; overflow-wrap: anywhere; }
.nt-source-note { max-width: 260px; margin-top: 5px; line-height: 1.4; }
.nt-table-actions { display: flex; gap: 10px; }
.nt-table-actions button { border: 0; background: transparent; color: var(--blue); font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.nt-backlog-create { padding: 25px; margin: 22px 0; }
.nt-backlog-create form { max-width: 850px; }
.nt-backlog-tabs { display: flex; gap: 5px; overflow-x: auto; margin: 26px 0 15px; padding: 5px; border-radius: 12px; background: #e9edf2; }
.nt-backlog-tabs a { display: inline-flex; gap: 7px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-size: 13px; font-weight: 700; }
.nt-backlog-tabs a.active { background: var(--blue); color: white; }
.nt-backlog-tabs a:hover { text-decoration: none; }
.nt-backlog-tabs b { padding: 1px 6px; border-radius: 50px; background: #ffffffaf; color: var(--ink); }
.nt-backlog-list { display: grid; gap: 12px; }
.nt-backlog-card { padding: 22px; border-left: 4px solid #a0abb8; }
.nt-backlog-card h2 { margin: 8px 0; }
.nt-backlog-card p { white-space: pre-wrap; }
.nt-backlog-card form { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.nt-backlog-card form label { margin: 0; font-size: 12px; }
.nt-backlog-card form select { width: auto; }
.nt-backlog-card .button { margin: 0; }
.nt-wiki-grid { margin: 25px 0; }
.nt-wiki-grid .card { padding: 22px; }
.nt-wiki-grid p { color: var(--muted); }
.monitor-windows button.active { color: var(--blue); }
.monitor-legend .legend-system { background: var(--blue); }
.monitor-legend .legend-qwen { background: #343f4a; }
[data-theme="dark"] { --bg: #11161d; --card: #1a222c; --ink: #f0f2f5; --muted: #a3adba; --line: #343e49; --soft: #431e27; --green-bg: #183e31; --red-bg: #481f29; }
[data-theme="dark"] .site-header,[data-theme="dark"] .nt-overview-grid>div,[data-theme="dark"] .nt-detail-grid>div,[data-theme="dark"] .nt-description,[data-theme="dark"] .nt-card-title,[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select,[data-theme="dark"] .job-list,[data-theme="dark"] .category-tab,[data-theme="dark"] .collected-row,[data-theme="dark"] .research-dialog { background: var(--card); color: var(--ink); }
[data-theme="dark"] .nt-main-nav b,[data-theme="dark"] .nt-backlog-tabs { background: #28323e; }
[data-theme="dark"] .nt-backlog-tabs b { background: #35404d; color: var(--ink); }
@media(max-width:1260px) { .header-inner { flex-wrap: wrap; padding-top: 12px; padding-bottom: 9px; gap: 7px; } .nt-main-nav { order: 3; flex-basis: 100%; margin-left: 0; } .nt-profile { margin-left: auto; } .nt-news-row { grid-template-columns: 120px minmax(0,1fr) auto; } .nt-card-source { grid-column: 2; grid-row: 2; } .nt-row-actions { grid-column: 3; grid-row: 1 / 3; } }
@media(max-width:800px) { .nt-filters,.nt-source-filters { grid-template-columns: 1fr 1fr; } .nt-filters>div:first-child,.nt-source-filters>div:first-child { grid-column: 1 / -1; } .nt-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .nt-overview-grid,.nt-wiki-grid { grid-template-columns: 1fr; } .nt-source-fields { grid-template-columns: 1fr; } .nt-side-panel { width: min(100%,800px); border-radius: 0; } }
@media(max-width:700px) { .container { padding-left: 16px; padding-right: 16px; } .nt-profile-label { display: none; } .nt-main-nav { gap: 2px; } .nt-main-nav a { font-size: 12px; padding: 8px; } .nt-seo-list a { align-items: flex-start; flex-direction: column; gap: 2px; } .nt-monitor-filter { align-items: stretch; flex-direction: column; } .nt-news-row { grid-template-columns: 1fr; gap: 8px; } .nt-type,.nt-card-title,.nt-card-source,.nt-row-actions { grid-column: 1; grid-row: auto; } .nt-card-title { white-space: normal; } .nt-row-actions { width: 100%; } .nt-row-actions form,.nt-row-actions .button { flex: 1; width: 100%; } .nt-panel-head { padding: 18px; } .nt-panel-head h2 { font-size: 23px; } .nt-panel-scroll { padding: 15px; height: calc(100dvh - 148px); } .nt-detail-grid { grid-template-columns: 1fr; } .nt-status-row { grid-template-columns: 1fr auto; } .nt-status-row small { grid-column: 1 / -1; text-align: left; } .nt-backlog-card form { flex-wrap: wrap; } .nt-footer { flex-direction: column; align-items: flex-start; } }

/* Research configuration and accounting share NewTimes theme variables. */
#research { margin-bottom: 32px; }
#research h1 { font-size: clamp(28px, 3vw, 42px); margin: 8px 0 16px; }
.research-fields { display: grid; grid-template-columns: repeat(5, minmax(140px,1fr)); gap: 16px; margin: 20px 0; }
.research-fields label, .research-fields label:not(:first-of-type) { margin:0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.research-fields select, .research-fields input { width: 100%; min-width: 0; }
.research-control-form textarea { width:100%; box-sizing: border-box; font-family: monospace; font-size: 13px; line-height:1.6; }
.research-control-form > small { margin-left: 12px; }
.research-rates { font-size:13px; line-height:1.7; margin:20px 0; }
.research-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
.research-kpis strong { font-size:22px; overflow-wrap:anywhere; }
.research-table-wrap { overflow-x:auto; }
.research-accounting { min-width:960px; }
.research-accounting td:first-child { max-width:280px; }
.research-accounting small { display:block; margin-top:6px; line-height:1.5; }
.research-accounting td { vertical-align:top; }
.research-accounting details { margin-top:8px; }
.research-request-json { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.6; max-height:600px; overflow:auto; padding:18px; background:var(--soft); border:1px solid var(--line); border-radius:12px; }
.research-preview-settings { margin-top:24px; }
@media(max-width:1100px) { .research-fields { grid-template-columns: repeat(3,minmax(0,1fr)); } .research-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .research-fields { grid-template-columns:1fr; } .research-kpis { grid-template-columns:1fr; } }
