/* ==========================================================================
   PaperCheck · Academic Deep Navy + Crimson Institutional Design System
   100% Microsoft YaHei Typography (Site + A4 Reports) · Distinct from PaperPass/PaperYY
   ========================================================================== */

:root {
  --brand: #1D3B5E;
  --brand-hover: #142B46;
  --brand-soft: #EEF3F8;
  --brand-border: #C3D3E5;

  --accent: #A8242C;
  --accent-hover: #8B1C23;

  --ink-dark: #162230;
  --ink: #22262C;
  --ink-2: #4E5663;
  --ink-3: #7E8794;

  --bg: #F4F5F7;
  --white: #FFFFFF;
  --sub-bg: #FAFAFB;
  --border: #E3E6EC;
  --border-dark: #CDD3DC;

  /* Report Marking Semantics */
  --pp-red: #D93025;
  --pp-red-hl: #FDE2E1;
  --pp-orange: #E87A14;
  --pp-orange-hl: #FCE5C8;
  --pp-purple: #7C3AED;
  --pp-green: #15803D;
  --pp-green-hl: #E8F7EE;
  --pp-gray: #8C8C8C;

  --font-main: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.65;
}

.hidden { display: none !important; }
.tabular { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--ink-3); }
.text-red { color: var(--pp-red); }
.text-orange { color: var(--pp-orange); }
.text-green { color: var(--pp-green); }

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top Horizontal Navigation Header (Min 20px Scale) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1380px;
  margin: 0 auto;
  height: 82px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 23px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.nav-link {
  position: relative;
  height: 82px;
  padding: 0 16px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-main);
  font-size: 19px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.12s;
}

.nav-link:hover {
  color: var(--brand);
}

.nav-link.active {
  color: var(--brand);
  font-weight: 700;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--accent);
}

.nav-num {
  font-size: 19px;
  font-weight: 600;
  padding: 0 6px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-size: 19px;
}

.user-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 19px;
}

.site-user .text-btn,
.site-user .btn {
  font-size: 19px;
  height: 42px;
}

.site-main { flex: 1; }

.page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

/* ---------- Footer (Min 20px Scale) ---------- */
.site-footer {
  background: #182738;
  color: #AEBCCB;
  padding: 36px 24px;
  font-size: 19px;
}

.site-footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.footer-brand {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  color: #CFD9E4;
  font-size: 19px;
}

.footer-copy {
  color: #A6B6C7;
  font-size: 19px;
}

/* ---------- Buttons & Inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-family: var(--font-main);
  font-size: 14.5px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }

.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); }

.btn-default {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border-dark);
}
.btn-default:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-danger {
  background: var(--white);
  color: var(--pp-red);
  border-color: #F5B7B1;
}
.btn-danger:hover:not(:disabled) {
  background: #FEF2F2;
  border-color: var(--pp-red);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.78);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { height: 46px; padding: 0 36px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }

.text-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--brand);
  font-family: var(--font-main);
  font-size: 14px;
  cursor: pointer;
}
.text-btn:hover { text-decoration: underline; }

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  padding: 9px 12px;
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
}

/* ==========================================================================
   HOMEPAGE (Min 20px Typography Scaled Proportionally)
   ========================================================================== */
.hero-banner {
  background-color: #162B44;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  color: #FFFFFF;
  padding: 64px 24px 68px;
  text-align: center;
  border-bottom: 4px solid var(--accent);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 18px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.35;
}

.hero-sub {
  margin: 0 0 34px;
  font-size: 19px;
  color: #D4E0EB;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-actions .btn-lg {
  height: 50px;
  padding: 0 36px;
  font-size: 19px;
}

.stats-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.stats-strip-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.25;
}

.stat-item-label {
  font-size: 19px;
  color: var(--ink-2);
  margin-top: 6px;
}

.home-section {
  max-width: 1360px;
  margin: 0 auto;
  padding: 46px 24px 12px;
}

.home-sec-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-dark);
  margin: 0 0 10px;
}

.home-sec-sub {
  text-align: center;
  font-size: 19px;
  color: var(--ink-3);
  margin: 0 0 32px;
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.entry-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--brand);
  border-radius: 3px;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.entry-card.secondary-accent {
  border-top-color: var(--accent);
}

.entry-card h3 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--ink-dark);
}

.entry-card p {
  margin: 0 0 20px;
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.85;
}

.entry-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  font-size: 19px;
  color: var(--ink-2);
}

.entry-points li::before {
  content: "▪";
  color: var(--accent);
  margin-right: 8px;
}

.entry-card .btn {
  height: 46px;
  padding: 0 24px;
  font-size: 19px;
}

.feature-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 52px;
}

.feature-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 28px 32px;
}

.feature-box h4 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--ink-dark);
}

.feature-box p {
  margin: 0;
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.85;
}

/* ---------- Panels & Forms ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.panel-head {
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ink-dark);
}

.panel-body {
  padding: 24px 26px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.pp-form-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.pp-form-label {
  text-align: right;
  padding-top: 9px;
  font-size: 15px;
  color: var(--ink-2);
}

.req { color: var(--pp-red); margin-right: 2px; }

.radio-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 8px;
  flex-wrap: wrap;
}

.radio-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 15px;
}

.upload-box {
  border: 1px dashed #B5C1D0;
  border-radius: 3px;
  background: #FAFBFD;
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.15s, background 0.15s;
}

.upload-box:hover, .upload-box.dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.upload-box-title {
  font-size: 15.5px;
  color: var(--ink);
  margin: 8px 0 5px;
}

.upload-box-sub {
  font-size: 13.5px;
  color: var(--ink-3);
}

.file-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 12px;
}

.paper-editor {
  min-height: 290px;
  resize: vertical;
  line-height: 1.85;
  padding: 13px;
  font-size: 15px;
}

.editor-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.privacy-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  padding-top: 8px;
}

.guide-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.9;
}

.guide-list li { margin-bottom: 8px; }

.legend-mini {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.95;
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

/* ---------- Reports Table & Queue ---------- */
.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box { width: 280px !important; height: 36px; font-size: 14.5px; }

.table-wrap { overflow-x: auto; }

.pp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.pp-table th {
  text-align: left;
  padding: 13px 14px;
  background: #F6F7FA;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.pp-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.pp-table tbody tr:hover { background: #FAFBFD; }

.status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 13px;
  white-space: nowrap;
}
.st-done { background: #E8F7EE; color: #15803D; }
.st-run { background: var(--brand-soft); color: var(--brand); }

.queue-box { min-width: 190px; }

.queue-bar {
  height: 7px;
  background: #E5E8EE;
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0;
}

.queue-bar-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.6s linear;
}

.queue-stage {
  font-size: 13px;
  color: var(--ink-3);
}

.rate-num {
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty-box {
  text-align: center;
  padding: 54px 20px;
  color: var(--ink-3);
  font-size: 15px;
}

/* ==========================================================================
   A4 REPORT VIEW (100% Microsoft YaHei · Enlarged Crisp Typography)
   ========================================================================== */
.report-action-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 73px;
  z-index: 20;
}

.report-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.a4-sheet {
  background: #FFFFFF;
  border: 1px solid #D5D8DE;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  max-width: 900px;
  margin: 0 auto;
  padding: 44px 56px 56px;
  color: #000000;
  font-family: var(--font-main);
  font-size: 17.5px;
  line-height: 2;
}

.a4-top-rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #000000;
  margin-bottom: 30px;
  font-size: 14.5px;
  color: #000000;
  font-family: var(--font-main);
}

.a4-top-rule a {
  color: #000000;
  text-decoration: none;
}
.a4-top-rule a:hover { text-decoration: underline; }

.a4-brand-mark {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.4px;
}

.a4-main-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: #000000;
  margin: 10px 0 8px;
  letter-spacing: 0.5px;
}

.a4-sub-title {
  text-align: center;
  font-size: 23px;
  color: #000000;
  margin: 0 0 28px;
}

.a4-sec-heading {
  font-size: 18.5px;
  font-weight: 700;
  color: #000000;
  margin: 24px 0 12px;
}

.a4-kv-line {
  margin: 4px 0;
  font-size: 16.5px;
  color: #000000;
  line-height: 1.95;
}

.a4-kv-line .muted-note {
  color: #000000;
  font-size: 14.5px;
  margin-left: 8px;
}

.a4-kv-indent {
  display: grid;
  grid-template-columns: 225px 1fr;
  max-width: 700px;
  margin: 4px 0;
  font-size: 16.5px;
  color: #000000;
  line-height: 1.95;
}

.a4-verify-link {
  color: #000000;
  text-decoration: none;
  word-break: break-all;
}
.a4-verify-link:hover { text-decoration: underline; }

/* Grayscale Distribution Strip */
.dist-strip-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 12px 0 24px;
}

.dist-y-scale {
  display: flex;
  align-items: stretch;
  gap: 6px;
  font-size: 13.5px;
  color: #000000;
  flex-shrink: 0;
}

.dist-grad-bar {
  width: 11px;
  height: 44px;
  border: 1px solid #555;
  background: linear-gradient(to bottom, #222222 0%, #888888 55%, #FFFFFF 100%);
}

.dist-y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  line-height: 1;
}

.dist-chart-col {
  flex: 1;
  min-width: 0;
}

.dist-rect {
  position: relative;
  height: 44px;
  border: 1px solid #888888;
  background: #FFFFFF;
  overflow: hidden;
}

.dist-bar-slot {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #727272;
}

.dist-x-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #000000;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* Similar Sources List */
.a4-source-list {
  list-style: none;
  margin: 10px 0 24px;
  padding: 0;
  font-size: 16px;
  color: #000000;
  line-height: 1.9;
}

.a4-source-list li { margin-bottom: 10px; }

.a4-source-sub {
  padding-left: 20px;
  color: #000000;
  font-size: 15px;
}

.a4-source-sub a {
  color: #000000;
  text-decoration: underline;
  margin-left: 10px;
}
.a4-source-sub a:hover { color: var(--brand); }

.a4-color-legend {
  list-style: none;
  margin: 10px 0 20px;
  padding: 0;
  font-size: 16px;
  color: #000000;
  line-height: 2;
}

.a4-footnote {
  font-size: 15.5px;
  color: #000000;
  line-height: 1.9;
  margin-top: 16px;
}

.a4-divider {
  border: none;
  border-top: 1px dashed #CCCCCC;
  margin: 34px 0 28px;
}

/* Full Text Body in A4 Sheet */
.a4-paper-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 22px;
  color: #000000;
}

.a4-para {
  margin: 0 0 16px;
  text-indent: 2em;
  text-align: justify;
  word-break: break-word;
  color: #000000;
  font-size: 17.5px;
  line-height: 2.15;
}

.pp-mark-wrap {
  position: relative;
  display: inline;
  cursor: pointer;
  padding: 2px 0;
}

.pp-mark-mid { background-color: var(--pp-orange-hl); color: #000000; }
.pp-mark-high { background-color: var(--pp-red-hl); color: #991B1B; }
.pp-mark-cite { background-color: var(--pp-green-hl); color: #14532D; }
.pp-mark-selected { outline: 1.5px solid var(--brand); }

.pp-pct-badge {
  position: relative;
  display: inline-block;
  vertical-align: super;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  margin-right: 4px;
  border-radius: 2px;
  color: #FFFFFF;
  background: #EB6E1F;
  user-select: none;
}

.pp-mark-high .pp-pct-badge { background: #D93025; }
.pp-mark-cite .pp-pct-badge { background: #15803D; }

.aigc-red { color: #D93025; cursor: pointer; }
.aigc-orange { color: #E87A14; cursor: pointer; }
.aigc-purple { color: #7C3AED; cursor: pointer; }
.aigc-black { color: #000000; }
.aigc-gray { color: #8C8C8C; }
.aigc-selected { background: var(--brand-soft); outline: 1px solid var(--brand); }

/* Right Inspector */
.inspector-sticky {
  position: sticky;
  top: 136px;
  max-height: calc(100vh - 154px);
  overflow-y: auto;
}

.insp-quote {
  padding: 11px 13px;
  background: var(--sub-bg);
  border-left: 3px solid var(--brand);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.insp-src-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 11px 13px;
  margin-bottom: 10px;
  font-size: 14px;
}

.insp-tip {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: 3px;
  padding: 11px 13px;
  font-size: 14px;
  color: #162B44;
}

/* ---------- Corpus & Verify Pages ---------- */
.two-col {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.corpus-row {
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.corpus-row:last-child { border-bottom: none; }

.verify-box { max-width: 680px; margin: 14px auto; }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 3px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--ink-3);
  cursor: pointer;
}

.modal-body { padding: 20px 22px; }

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px;
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--brand);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.field-item { margin-bottom: 14px; }
.field-item label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }

.field-err {
  padding: 8px 11px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--pp-red);
  font-size: 13.5px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.auth-quick { text-align: center; margin-top: 12px; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  top: 82px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp-toast {
  padding: 11px 16px;
  border-radius: 3px;
  background: var(--brand);
  color: #fff;
  font-size: 14.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  max-width: 360px;
}
.pp-toast.success { background: #15803D; }
.pp-toast.warning { background: #B45309; }
.pp-toast.error { background: #B91C1C; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .upload-layout,
  .report-view-grid,
  .two-col,
  .entry-cards { grid-template-columns: 1fr; }
  .feature-grid-4,
  .stats-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .inspector-sticky { position: static; max-height: none; }
}

@media (max-width: 780px) {
  .site-header-inner { height: auto; padding: 10px 14px; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; height: 46px; }
  .nav-link { height: 46px; padding: 0 12px; font-size: 15px; }
  .pp-form-row { grid-template-columns: 1fr; gap: 4px; }
  .pp-form-label { text-align: left; padding-top: 0; }
  .a4-sheet { padding: 24px 20px; }
  .hero-title { font-size: 28px; }
  .feature-grid-4,
  .stats-strip-inner,
  .entry-points { grid-template-columns: 1fr; }
}

/* ---------- Print-to-PDF ---------- */
@media print {
  body { background: #FFFFFF !important; }
  .site-header,
  .site-footer,
  .report-action-bar,
  .inspector-sticky,
  .toast-stack { display: none !important; }
  .page-container { padding: 0 !important; max-width: none !important; }
  .report-view-grid { display: block !important; }
  .a4-sheet {
    max-width: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 10mm !important;
  }
  .pp-mark-mid, .pp-mark-high, .pp-mark-cite, .pp-pct-badge, .dist-bar-slot, .dist-grad-bar {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
