:root {
      --bg: #f7f8fb;
      --panel: #ffffff;
      --border: #e2e7f0;
      --blue: #b85d86;
      --blue2: #d8749a;
      --text: #202635;
      --muted: #6f7788;
      --soft-blue: #f8edf3;
      --soft-red: #fff1f3;
      --soft-yellow: #fff8e8;
      --soft-green: #f0faf4;
      --red: #c93f5f;
      --yellow: #b98213;
      --green: #2b8a57;
      --shadow: 0 8px 24px rgba(15, 38, 75, .08);
      --radius: 14px;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-width: 1360px;
    }
    header {
      height: 72px;
      background: linear-gradient(90deg, #9b5f7b, #c982a1);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      box-shadow: var(--shadow);
      position: sticky;
      top: 0;
      z-index: 10;
    }
    header h1 { margin: 0; font-size: 26px; letter-spacing: 1px; }
    header .tag { font-size: 13px; opacity: .86; }
    .app {
      min-height: calc(100vh - 72px + 280px);
      height: auto;
      display: grid;
      grid-template-columns: 240px minmax(470px, 1fr) minmax(470px, 1fr);
      grid-template-areas:
        "sidebar client article"
        "sidebar comparison comparison"
        "sidebar score score"
        "sidebar report report";
      gap: 18px;
      padding: 18px;
      align-items: start;
    }
    .sidebar, .main, .right {
      min-height: 0;
    }
    .card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }
    .sidebar {
      grid-area: sidebar;
      display: flex;
      flex-direction: column;
      gap: 12px;
      position: sticky;
      top: 88px;
      align-self: start;
      max-height: calc(100vh - 104px);
      overflow: auto;
    }
    .project-card { padding: 16px; height: 100%; display: flex; flex-direction: column; }
    .section-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      color: var(--blue);
      font-weight: 700;
      font-size: 16px;
    }
    .btn {
      border: 0;
      border-radius: 9px;
      padding: 9px 12px;
      background: var(--blue);
      color: #fff;
      cursor: pointer;
      font-size: 13px;
      transition: .15s ease;
      white-space: nowrap;
    }
    .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
    .btn.secondary { background: #f7f8fb; color: var(--blue); border: 1px solid #e2e7f0; }
    .btn.danger { background: #d95779; }
    .btn.small { padding: 6px 8px; font-size: 12px; border-radius: 7px; }
    .project-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-right: 2px; }
    .project-item {
      border: 1px solid var(--border);
      background: #fbfcff;
      border-radius: 12px;
      padding: 12px;
      cursor: pointer;
      transition: .15s;
    }
    .project-item.active { border-color: var(--blue2); background: #fbf1f6; }
    .project-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
    .project-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-actions { display: flex; gap: 4px; flex-shrink: 0; }
    .project-actions .btn { padding: 4px 6px; font-size: 11px; border-radius: 6px; }
    .project-meta { color: var(--muted); font-size: 12px; line-height: 1.5; }
    .main, .right { display: contents; }
    .main > section:nth-of-type(1) { grid-area: client; }
    .main > section:nth-of-type(2) { grid-area: article; }
    .right > section:nth-of-type(1) { grid-area: comparison; }
    .right > section:nth-of-type(2) { grid-area: score; }
    .right > section:nth-of-type(3) { grid-area: report; }
    .panel { padding: 18px; overflow: visible; }
    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
      gap: 12px;
    }
    .panel-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 17px;
      color: var(--blue);
      font-weight: 800;
    }
    .badge {
      padding: 4px 8px;
      border-radius: 999px;
      background: var(--soft-blue);
      color: var(--blue);
      font-size: 12px;
      font-weight: 700;
    }
    .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .form-row { margin-bottom: 12px; }
    label { display: block; font-size: 13px; font-weight: 700; color: #3d4658; margin-bottom: 6px; }
    input[type="text"], textarea, select {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 11px;
      background: #fff;
      font-size: 13px;
      color: var(--text);
      outline: none;
    }
    textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
    .upload-box {
      border: 1.5px dashed #d9dfe9;
      background: #fbfcff;
      border-radius: 13px;
      padding: 14px;
      min-height: 82px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 8px;
    }
    .upload-box input { font-size: 13px; }
    .hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
    .file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
    .file-chip {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 9px;
      padding: 7px 9px;
      font-size: 12px;
    }
    .file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .score-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .score-box {
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px;
      background: #fbfcff;
    }
    .score-num { font-size: 28px; color: var(--blue); font-weight: 800; line-height: 1; }
    .score-label { margin-top: 6px; font-size: 12px; color: var(--muted); }
    .risk-low { color: var(--green); }
    .risk-mid { color: var(--yellow); }
    .risk-high { color: var(--red); }
    .progress-row { display: grid; grid-template-columns: 34px 1fr 40px; gap: 8px; align-items: center; margin: 9px 0; font-size: 12px; }
    .bar { height: 8px; border-radius: 999px; background: #e9edf5; overflow: hidden; }
    .bar span { display: block; height: 100%; background: linear-gradient(90deg, #b85d86, #d88aa9); border-radius: 999px; }
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th { background: var(--blue); color: #fff; font-weight: 700; text-align: left; padding: 8px; }
    td { border: 1px solid var(--border); padding: 8px; vertical-align: top; line-height: 1.5; }
    tr:nth-child(even) td { background: #fbfcff; }
    .report-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
    .report {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      line-height: 1.65;
      font-size: 13px;
      max-height: 520px;
      overflow: auto;
      overscroll-behavior: contain;
    }
    .optimize-box {
      margin-top: 14px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: #fbfcff;
      padding: 14px;
    }
    .optimized-rich-preview {
      min-height: 220px;
      max-height: 620px;
      overflow: auto;
      margin-top: 12px;
      padding: 24px 28px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: #fff;
      color: #1f2937;
      line-height: 1.82;
      font-size: 14px;
    }
    .optimized-rich-preview h1 { margin: 0 0 18px; font-size: 26px; line-height: 1.35; color: #1f2937; }
    .optimized-rich-preview h2 { margin: 22px 0 10px; font-size: 20px; line-height: 1.4; color: #26364d; }
    .optimized-rich-preview h3 { margin: 18px 0 8px; font-size: 17px; line-height: 1.45; color: #34445c; }
    .optimized-rich-preview p { margin: 0 0 12px; }
    .optimized-rich-preview strong, .optimized-rich-preview b { font-weight: 700; color: #111827; }
    .optimized-rich-preview table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; }
    .optimized-rich-preview th, .optimized-rich-preview td { border: 1px solid #cfd8e5; padding: 8px 10px; vertical-align: top; }
    .optimized-rich-preview th { background: #f3f6fa; font-weight: 700; }
    .optimized-rich-preview img { display: block; max-width: 100%; height: auto; margin: 14px auto; }
    .optimized-rich-preview ul, .optimized-rich-preview ol { margin: 8px 0 14px; padding-left: 24px; }
    .optimized-text-editor { margin-top: 12px; }
    .optimized-text-editor summary { cursor: pointer; color: var(--blue); font-weight: 700; }
    .optimized-text-editor textarea { width: 100%; min-height: 220px; margin-top: 10px; }
    .optimize-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
    }
    .optimize-title {
      color: var(--blue);
      font-weight: 800;
      font-size: 15px;
    }
    .optimize-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    #optimizedText {
      min-height: 260px;
      max-height: 480px;
      font-size: 13px;
      background: #fff;
    }
    #clientRawText { min-height: 220px; }
    #changeNotes { min-height: 120px; }
    #articleText { min-height: 500px !important; }
    .article-text-row {
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    .article-text-row textarea {
      flex: 1;
      min-height: 500px !important;
    }
    .main > section:nth-of-type(1),
    .main > section:nth-of-type(2) {
      min-height: 760px;
      align-self: stretch;
      display: flex;
      flex-direction: column;
    }
    .main > section:nth-of-type(1) .panel-head,
    .main > section:nth-of-type(2) .panel-head {
      min-height: 38px;
      margin-bottom: 14px;
    }
    .main > section:nth-of-type(1) .footer-actions,
    .main > section:nth-of-type(2) .footer-actions {
      margin-top: auto;
    }
    .right > section:nth-of-type(1) {
      min-height: 180px;
    }
    .right > section:nth-of-type(2) {
      min-height: 250px;
    }
    .right > section:nth-of-type(3) {
      min-height: 620px;
    }
    .main > section:nth-of-type(1) .upload-box,
    .main > section:nth-of-type(2) .upload-box {
      margin-top: 0;
    }

    .report h2 { margin: 0 0 8px; color: var(--blue); font-size: 20px; }
    .report h3 { margin: 18px 0 8px; color: var(--blue); font-size: 16px; border-left: 4px solid var(--blue); padding-left: 8px; }
    .client-requirement-table { table-layout: fixed; }
    .client-requirement-table th:nth-child(1) { width: 42px; }
    .client-requirement-table th:nth-child(3) { width: 105px; }
    .client-requirement-table th:nth-child(4) { width: 72px; }
    .client-requirement-table td { overflow-wrap: anywhere; word-break: break-word; }
    .client-requirement-table .requirement-pass td:nth-child(4) { color: #16803b; background: #eefbf2; }
    .client-requirement-table .requirement-fail td:nth-child(4),
    .client-requirement-table .requirement-fail td:nth-child(5) { color: #b42340; background: #fff1f4; }
    .client-requirement-table .requirement-neutral td:nth-child(4),
    .client-requirement-table .requirement-neutral td:nth-child(5) { color: #526072; background: #f5f7fa; }
    .client-requirement-table .requirement-partial td:nth-child(4),
    .client-requirement-table .requirement-partial td:nth-child(5) { color: #8a5a00; background: #fff8e6; }
    .notice {
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 13px;
      line-height: 1.5;
      margin-bottom: 12px;
    }
    .notice.blue { background: var(--soft-blue); border: 1px solid #ead5df; color: #8a4866; }
    .notice.yellow { background: var(--soft-yellow); border: 1px solid #f0d99b; color: #7a5416; }
    .notice.red { background: var(--soft-red); border: 1px solid #efc3cb; color: #8a2940; }
    .notice.green { background: var(--soft-green); border: 1px solid #bde5c8; color: #1c6632; }
    .tabs { display: flex; gap: 6px; margin-bottom: 12px; }
    .tab { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; color: var(--muted); font-size: 12px; }
    .tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
    .kw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .pill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-height: 130px; overflow: auto; padding-right: 4px; }
    .pill { padding: 4px 8px; border-radius: 999px; background: #f8edf3; color: var(--blue); font-size: 12px; max-width: 100%; word-break: break-word; }
    .empty {
      border: 1px dashed #d9dfe9;
      border-radius: 12px;
      padding: 18px;
      color: var(--muted);
      text-align: center;
      background: #fbfcff;
    }
    .footer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

    .parse-status {
      margin-top: 8px;
      padding: 9px 10px;
      border-radius: 10px;
      border: 1px solid #e2e7f0;
      background: #fbfcff;
      color: #3d4658;
      font-size: 12px;
      line-height: 1.5;
      white-space: pre-wrap;
    }
    .parse-status.working { background: #fff7e6; border-color: #f0d99b; color: #7a5416; }
    .parse-status.ok { background: #f0fbf5; border-color: #bde5c8; color: #1c6632; }
    .parse-status.warn { background: #fff1f3; border-color: #efc3cb; color: #8a2940; }
    .file-chip .file-info { display:flex; flex-direction:column; gap:2px; min-width:0; overflow:hidden; }
    .file-chip .file-status { color: var(--muted); font-size: 11px; }

    /* O2BP-inspired visual refresh: clean blue SaaS surface, soft cards, lighter chrome. */
    :root {
      --bg: #f5f9ff;
      --panel: #ffffff;
      --border: #dbe7f6;
      --blue: #007bff;
      --blue2: #0056b3;
      --text: #1f2937;
      --muted: #64748b;
      --soft-blue: #eef6ff;
      --soft-red: #fff1f3;
      --soft-yellow: #fff8e8;
      --soft-green: #effbf4;
      --red: #d83f5f;
      --yellow: #b7791f;
      --green: #23825a;
      --shadow: 0 18px 45px rgba(15, 82, 186, .10);
      --radius: 16px;
    }
    body {
      background:
        linear-gradient(135deg, #f5f9ff 0%, #ffffff 44%, #eef6ff 100%);
      color: var(--text);
    }
    header {
      height: 76px;
      background: rgba(255, 255, 255, .88);
      color: var(--text);
      border-bottom: 1px solid rgba(219, 231, 246, .85);
      box-shadow: 0 12px 34px rgba(15, 82, 186, .08);
      backdrop-filter: blur(16px);
    }
    header h1 {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 24px;
      font-weight: 900;
      color: #111827;
      letter-spacing: 0;
    }
    header h1::before {
      content: "O₂";
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      border-radius: 14px;
      background: linear-gradient(135deg, #007bff, #0056b3);
      color: #fff;
      font-size: 16px;
      font-weight: 900;
      box-shadow: 0 12px 24px rgba(0, 123, 255, .24);
    }
    header .tag {
      color: #64748b;
      opacity: 1;
      font-weight: 600;
    }
    .app { gap: 20px; padding: 20px; }
    .card {
      border-color: rgba(219, 231, 246, .92);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }
    .card:hover {
      border-color: #c6defb;
      box-shadow: 0 24px 54px rgba(15, 82, 186, .13);
    }
    .project-card,
    .panel,
    .score-box,
    .report,
    .optimize-box,
    .upload-box {
      background: rgba(255, 255, 255, .94);
      backdrop-filter: blur(10px);
    }
    .section-title,
    .panel-title,
    .optimize-title,
    .report h2,
    .report h3 {
      color: var(--blue2);
    }
    .panel-title::before {
      content: "";
      width: 8px;
      height: 24px;
      border-radius: 999px;
      background: linear-gradient(180deg, #007bff, #5bb4ff);
      box-shadow: 0 8px 18px rgba(0, 123, 255, .22);
    }
    .btn {
      background: linear-gradient(135deg, #007bff, #0056b3);
      border-radius: 12px;
      box-shadow: 0 10px 22px rgba(0, 123, 255, .18);
      font-weight: 700;
    }
    .btn:hover {
      filter: none;
      transform: translateY(-1px);
      box-shadow: 0 14px 28px rgba(0, 123, 255, .24);
    }
    .btn.secondary {
      background: #fff;
      color: var(--blue);
      border: 1px solid #cfe0f5;
      box-shadow: 0 8px 18px rgba(15, 82, 186, .07);
    }
    .btn.danger {
      background: linear-gradient(135deg, #ef476f, #c92f55);
    }
    .badge,
    .pill {
      background: #eef6ff;
      color: var(--blue2);
      border: 1px solid #d6e8ff;
      font-weight: 800;
    }
    .project-item {
      background: #ffffff;
      border-radius: 14px;
      border-color: #dbe7f6;
      box-shadow: 0 8px 20px rgba(15, 82, 186, .05);
    }
    .project-item:hover {
      transform: translateY(-1px);
      border-color: #b8d8ff;
      box-shadow: 0 14px 28px rgba(15, 82, 186, .10);
    }
    .project-item.active {
      border-color: #79b7ff;
      background: linear-gradient(135deg, #eef6ff, #ffffff);
    }
    input[type="text"], textarea, select {
      border-color: #dbe7f6;
      border-radius: 12px;
      background: #ffffff;
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    input[type="text"]:focus,
    textarea:focus,
    select:focus {
      border-color: #79b7ff;
      box-shadow: 0 0 0 4px rgba(0, 123, 255, .10);
    }
    .upload-box {
      border-color: #b8d8ff;
      background: linear-gradient(135deg, #f8fbff, #ffffff);
    }
    .score-box {
      background: linear-gradient(135deg, #f8fbff, #ffffff);
      border-color: #dbe7f6;
      box-shadow: 0 14px 28px rgba(15, 82, 186, .07);
      transition: transform .18s ease, box-shadow .18s ease;
    }
    .score-box:hover,
    .upload-box:hover,
    .optimize-box:hover {
      transform: translateY(-2px);
      box-shadow: 0 20px 38px rgba(15, 82, 186, .12);
    }
    .score-num {
      color: var(--blue);
      font-weight: 900;
    }
    .bar { background: #e6effa; }
    .bar span { background: linear-gradient(90deg, #007bff, #5bb4ff); }
    th { background: linear-gradient(135deg, #007bff, #0056b3); }
    td { border-color: #dbe7f6; }
    tr:nth-child(even) td { background: #f8fbff; }
    .notice.blue { background: #eef6ff; border-color: #cfe0f5; color: #14539a; }
    .notice.yellow { background: #fff8e8; border-color: #f1d998; color: #7a5416; }
    .notice.red { background: #fff1f3; border-color: #efc3cb; color: #8a2940; }
    .notice.green { background: #effbf4; border-color: #bde5c8; color: #1c6632; }
    .report,
    #optimizedText {
      scrollbar-width: thin;
      scrollbar-color: #9ccaff #eef6ff;
    }
    .report::-webkit-scrollbar,
    #optimizedText::-webkit-scrollbar,
    .project-list::-webkit-scrollbar {
      width: 8px;
    }
    .report::-webkit-scrollbar-track,
    #optimizedText::-webkit-scrollbar-track,
    .project-list::-webkit-scrollbar-track {
      background: #eef6ff;
      border-radius: 999px;
    }
    .report::-webkit-scrollbar-thumb,
    #optimizedText::-webkit-scrollbar-thumb,
    .project-list::-webkit-scrollbar-thumb {
      background: #9ccaff;
      border-radius: 999px;
    }

    @media (max-width: 1359px) {
      body { min-width: 0; }
      .app {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-areas:
          "sidebar client"
          "sidebar article"
          "sidebar score"
          "sidebar report";
      }
      .main > section:nth-of-type(1),
      .main > section:nth-of-type(2) {
        min-height: auto;
      }
    }

    @media (max-width: 760px) {
      header {
        height: auto;
        min-height: 64px;
        padding: 12px 14px;
        align-items: flex-start;
        gap: 6px;
        flex-direction: column;
      }
      header h1 { font-size: 20px; }
      header .tag { font-size: 12px; }
      .app {
        min-height: auto;
        display: block;
        padding: 12px;
      }
      .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 12px;
      }
      .card { margin-bottom: 12px; }
      .grid2, .kw-grid, .score-summary {
        grid-template-columns: 1fr;
      }
      .panel-head {
        align-items: flex-start;
        flex-direction: column;
      }
      .report-toolbar, .footer-actions {
        width: 100%;
      }
      .optimize-head {
        align-items: flex-start;
        flex-direction: column;
      }
      .optimize-actions {
        width: 100%;
        justify-content: flex-start;
      }
      .btn {
        max-width: 100%;
        white-space: normal;
      }
      table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
      }
      #articleText, .article-text-row textarea {
        min-height: 320px !important;
      }
    }

    @media print {
      body { background: #fff; min-width: unset; }
      header, .app > .sidebar, .app > .main, .right .card:nth-child(-n+2), .report-toolbar, .optimize-box { display: none !important; }
      .app { display: block; height: auto; padding: 0; }
      .right { display: block; min-width: unset; }
      .card { box-shadow: none; border: 0; }
      .panel { overflow: visible; padding: 0; }
      .report { border: 0; max-height: none; overflow: visible; }
    }
  

    /* v37 portal + simplified knowledge base */
    body.portal-mode { min-width: 1180px; }
    .login-screen { min-height: 100vh; display: none; align-items: center; justify-content: center; padding: 42px; background: radial-gradient(circle at 20% 10%, rgba(0,123,255,.18), transparent 34%), linear-gradient(135deg,#f5f9ff 0%,#ffffff 52%,#eef6ff 100%); }
    .login-screen.active { display: flex; }
    .login-card { width: min(1080px, 100%); min-height: 560px; display: grid; grid-template-columns: 1.2fr .8fr; overflow: hidden; background: rgba(255,255,255,.92); border: 1px solid #dbe7f6; border-radius: 30px; box-shadow: 0 34px 90px rgba(15,82,186,.16); }
    .login-hero { padding: 58px; background: linear-gradient(135deg,#eef6ff,#ffffff); display: flex; flex-direction: column; justify-content: center; }
    .brand-mark { display:inline-flex; align-items:center; gap:10px; font-weight:900; color:#0f172a; }
    .brand-mark span:first-child { width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border-radius:14px; color:#fff; background:linear-gradient(135deg,#007bff,#0056b3); box-shadow:0 14px 28px rgba(0,123,255,.24); }
    .login-hero h1 { margin:26px 0 16px; font-size:48px; line-height:1.12; letter-spacing:-1.5px; color:#0f172a; }
    .login-hero p { margin:0; max-width:620px; color:#64748b; font-size:17px; line-height:1.8; }
    .metric-row { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:38px; }
    .metric { padding:16px; border-radius:18px; background:#fff; border:1px solid #dbe7f6; box-shadow:0 12px 30px rgba(15,82,186,.08); }
    .metric b { display:block; color:#007bff; font-size:26px; }
    .metric span { color:#64748b; font-size:12px; font-weight:700; }
    .login-panel { padding:48px; display:flex; flex-direction:column; justify-content:center; background:#fff; }
    .login-panel h2 { margin:0 0 10px; font-size:28px; color:#0f172a; }
    .login-panel .hint { margin-bottom:26px; }
    .login-error { min-height:24px; margin:8px 0 12px; color:#d83f5f; font-size:13px; }
    .portal-shell { display:none; min-height:100vh; background:linear-gradient(135deg,#f5f9ff 0%,#fff 45%,#eef6ff 100%); }
    .portal-shell.active { display:block; }
    .portal-nav { position:sticky; top:0; z-index:100; min-height:76px; padding:0 34px; display:flex; align-items:center; justify-content:space-between; background:rgba(255,255,255,.88); backdrop-filter: blur(16px); border-bottom:1px solid rgba(219,231,246,.9); box-shadow:0 12px 34px rgba(15,82,186,.08); }
    .portal-links { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .nav-link { border:0; background:transparent; color:#475569; padding:9px 13px; border-radius:999px; cursor:pointer; font-weight:800; }
    .nav-link.active, .nav-link:hover { color:#0056b3; background:#eef6ff; }
    .logout-link { color:#64748b; font-size:12px; margin-left:8px; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .page-screen { display:none; padding:28px; }
    .page-screen.active { display:block; }
    .home-page { max-width:1220px; margin:0 auto; }
    .home-hero { min-height:520px; display:grid; grid-template-columns:1.08fr .92fr; gap:26px; align-items:center; }
    .home-copy h1 { margin:0 0 18px; font-size:54px; line-height:1.08; letter-spacing:-1.8px; color:#0f172a; }
    .home-copy p { max-width:690px; color:#64748b; font-size:17px; line-height:1.85; margin:0; }
    .hero-actions { margin-top:28px; display:flex; gap:12px; }
    .home-card { background:rgba(255,255,255,.92); border:1px solid #dbe7f6; border-radius:26px; box-shadow:0 24px 60px rgba(15,82,186,.12); padding:28px; }
    .home-section { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:28px; }
    .home-card h3 { margin:0 0 10px; color:#0056b3; font-size:18px; }
    .home-card p { margin:0; color:#64748b; line-height:1.7; font-size:14px; }
    .visual-grid { display:grid; gap:14px; }
    .visual-item { padding:18px; border-radius:20px; background:linear-gradient(135deg,#f8fbff,#fff); border:1px solid #dbe7f6; }
    .visual-item b { color:#0056b3; display:block; margin-bottom:6px; }
    .review-page { padding:0; }
    .review-inner-header { position:relative; top:auto; }
    #reviewPage .main > section:nth-of-type(1) > .upload-box,
    #reviewPage #clientParseStatus,
    #reviewPage #clientFileList,
    #reviewPage .client-hidden-store,
    #reviewPage .article-text-row { display:none !important; }
    #kbClientLinkNotice { margin-top: 4px; }
    .kb-page { max-width:1320px; margin:0 auto; }
    .kb-layout { display:grid; grid-template-columns:280px minmax(420px,.9fr) minmax(460px,1.1fr); gap:20px; align-items:start; }
    .kb-sidebar, .kb-upload-panel, .kb-preview-panel { padding:20px; min-height:calc(100vh - 132px); }
    .kb-project-list { display:flex; flex-direction:column; gap:10px; }
    .kb-item { border:1px solid #dbe7f6; background:#fff; border-radius:16px; padding:14px; cursor:pointer; box-shadow:0 10px 22px rgba(15,82,186,.06); transition:.16s ease; }
    .kb-item.active, .kb-item:hover { border-color:#79b7ff; background:linear-gradient(135deg,#eef6ff,#fff); transform:translateY(-1px); }
    .kb-item b { display:block; color:#0f172a; margin-bottom:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .kb-file-list { margin-top:14px; display:flex; flex-direction:column; gap:10px; max-height:52vh; overflow:auto; padding-right:4px; }
    .kb-file-list .file-chip { cursor:pointer; border-radius:14px; }
    .kb-file-list .file-chip.active { border-color:#79b7ff; background:#eef6ff; }
    .kb-preview-box { min-height:560px; max-height:calc(100vh - 220px); overflow:auto; border:1px solid #dbe7f6; border-radius:18px; background:#fbfdff; padding:18px; white-space:normal; line-height:1.75; font-size:13px; color:#1f2937; }
    .kb-doc-preview { max-width:820px; margin:0 auto; background:#fff; border:1px solid #e6eef9; border-radius:14px; padding:26px 30px; box-shadow:0 14px 32px rgba(15,82,186,.06); color:#111827; line-height:1.82; font-size:14px; }
    .kb-doc-preview h1, .kb-doc-preview h2, .kb-doc-preview h3 { color:#0b55b7; margin:18px 0 10px; line-height:1.35; }
    .kb-doc-preview p { margin:0 0 10px; }
    .kb-doc-preview table { border-collapse:collapse; width:100%; margin:12px 0; font-size:13px; }
    .kb-doc-preview td, .kb-doc-preview th { border:1px solid #dbe7f6; padding:8px 10px; vertical-align:top; }
    .kb-doc-preview img { max-width:100%; height:auto; }
    .kb-sheet-preview { margin:0 auto 18px; background:#fff; border:1px solid #e6eef9; border-radius:14px; padding:18px; box-shadow:0 14px 32px rgba(15,82,186,.06); overflow:auto; }
    .kb-sheet-preview h3 { margin:0 0 12px; color:#0056b3; font-size:16px; }
    .kb-sheet-preview table { border-collapse:collapse; width:100%; font-size:12px; background:#fff; }
    .kb-sheet-preview td, .kb-sheet-preview th { border:1px solid #dbe7f6; padding:7px 9px; vertical-align:top; white-space:pre-wrap; }
    .kb-sheet-preview tr:first-child td { background:#eef6ff; color:#0f3f7a; font-weight:700; }
    .kb-slide-preview { margin:0 auto 16px; background:#fff; border:1px solid #dbe7f6; border-radius:18px; padding:18px 20px; box-shadow:0 14px 32px rgba(15,82,186,.06); }
    .kb-slide-preview h3 { margin:0 0 10px; color:#0056b3; font-size:16px; }
    .kb-slide-preview p { margin:0 0 8px; white-space:pre-wrap; line-height:1.75; }
    .kb-text-preview { white-space:pre-wrap; font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif; line-height:1.75; margin:0; }
    .kb-image-preview { max-width:100%; height:auto; border-radius:14px; display:block; margin:0 auto; box-shadow:0 14px 34px rgba(15,82,186,.12); }
    .kb-pdf-preview { width:100%; min-height:660px; border:0; border-radius:14px; background:#fff; }
    .kb-preview-tip { margin-bottom:12px; padding:10px 12px; border-radius:12px; background:#eef6ff; border:1px solid #cfe0f5; color:#14539a; font-size:12px; line-height:1.6; }
    .kb-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
    .kb-preview-title h2, .kb-upload-title h2 { margin:0 0 6px; color:#0056b3; }
    .kb-preview-title p, .kb-upload-title p { margin:0; color:#64748b; line-height:1.6; font-size:13px; }
    .kb-minimal-note { margin-top:12px; color:#64748b; font-size:12px; line-height:1.65; }
    @media (max-width: 980px) {
      body.portal-mode { min-width:0; }
      .login-card, .home-hero, .home-section, .kb-layout { grid-template-columns:1fr; }
      .login-hero h1, .home-copy h1 { font-size:36px; }
      .page-screen { padding:16px; }
      .portal-nav { padding:12px 16px; align-items:flex-start; flex-direction:column; }
      .kb-sidebar, .kb-upload-panel, .kb-preview-panel { min-height:auto; }
    }



    /* v47 refined homepage visual: more premium portal landing */
    .home-page {
      position: relative;
      max-width: 1280px;
      padding-top: 28px;
      padding-bottom: 56px;
    }
    .home-page::before {
      content: "";
      position: absolute;
      inset: 18px -40px auto auto;
      width: 420px;
      height: 420px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(0,123,255,.18), rgba(91,180,255,.06) 48%, transparent 70%);
      filter: blur(4px);
      pointer-events: none;
      z-index: 0;
    }
    .home-page::after {
      content: "";
      position: absolute;
      left: -80px;
      top: 240px;
      width: 360px;
      height: 360px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(0,86,179,.12), transparent 68%);
      pointer-events: none;
      z-index: 0;
    }
    .home-hero,
    .home-section { position: relative; z-index: 1; }
    .home-hero {
      min-height: 560px;
      grid-template-columns: 1.02fr .98fr;
      gap: 42px;
    }
    .home-copy h1 {
      max-width: 760px;
      font-size: 58px;
      line-height: 1.04;
      letter-spacing: -2.4px;
      background: linear-gradient(90deg, #0f172a 0%, #123e7a 52%, #007bff 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    .home-copy p {
      max-width: 720px;
      color: #52637a;
      font-size: 18px;
      line-height: 1.95;
    }
    .hero-badge {
      letter-spacing: .4px;
      text-transform: uppercase;
      box-shadow: 0 10px 26px rgba(0,123,255,.10);
    }
    .hero-actions .btn {
      min-width: 128px;
      height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .home-visual.home-card {
      position: relative;
      padding: 34px;
      border-radius: 32px;
      background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,251,255,.88)),
        radial-gradient(circle at 84% 12%, rgba(0,123,255,.15), transparent 30%);
      box-shadow: 0 36px 90px rgba(15,82,186,.16);
      overflow: hidden;
    }
    .home-visual.home-card::before {
      content: "GEO";
      position: absolute;
      right: 26px;
      top: 10px;
      font-size: 72px;
      font-weight: 900;
      letter-spacing: -3px;
      color: rgba(0,123,255,.055);
    }
    .visual-grid { gap: 16px; }
    .visual-item {
      position: relative;
      padding: 22px 22px 22px 24px;
      border-radius: 22px;
      background: rgba(255,255,255,.88);
      border: 1px solid rgba(198,222,251,.95);
      box-shadow: 0 12px 28px rgba(15,82,186,.07);
    }
    .visual-item::before {
      content: "";
      position: absolute;
      left: 0;
      top: 18px;
      bottom: 18px;
      width: 4px;
      border-radius: 999px;
      background: linear-gradient(180deg, #007bff, #5bb4ff);
    }
    .visual-item b {
      font-size: 18px;
      margin-bottom: 8px;
    }
    .home-section {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 22px;
      margin-top: 14px;
    }
    .home-card.feature-card {
      position: relative;
      min-height: 158px;
      padding: 26px 28px;
      overflow: hidden;
    }
    .home-card.feature-card::after {
      content: "";
      position: absolute;
      right: -42px;
      bottom: -42px;
      width: 120px;
      height: 120px;
      border-radius: 999px;
      background: rgba(0,123,255,.07);
    }
    .home-card.feature-card h3 {
      font-size: 19px;
      color: #0056b3;
    }
    .home-card.feature-card p {
      font-size: 14px;
      color: #52637a;
      line-height: 1.8;
    }
    .portal-nav .brand-mark span:last-child {
      font-size: 16px;
      letter-spacing: .2px;
    }

    /* v50 fourth module: article comparison */
    .home-section { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .compare-page { max-width: 1540px; margin: 0 auto; }
    .compare-page-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin: 4px 0 22px;
    }
    .compare-page-head h1 {
      margin: 12px 0 8px;
      color: #0f172a;
      font-size: 34px;
      letter-spacing: -1px;
    }
    .compare-page-head .badge { display: inline-flex; }
    .compare-page-head p,
    .compare-column-title p,
    .compare-result-head p {
      margin: 0;
      color: #64748b;
      line-height: 1.7;
      font-size: 13px;
    }
    .compare-threshold-note {
      min-width: 210px;
      padding: 16px 18px;
      display: flex;
      align-items: center;
      gap: 12px;
      border: 1px solid #f2c7cf;
      border-radius: 18px;
      background: linear-gradient(135deg, #fff4f6, #fff);
      box-shadow: 0 12px 30px rgba(216,63,95,.08);
    }
    .compare-threshold-note b { color: #d83f5f; font-size: 26px; white-space: nowrap; }
    .compare-threshold-note span { color: #8f4354; font-size: 12px; line-height: 1.5; }
    .compare-layout {
      display: grid;
      grid-template-columns: 300px minmax(680px, 1fr);
      gap: 18px;
      align-items: start;
    }
    .compare-sidebar,
    .compare-result-panel {
      min-height: calc(100vh - 190px);
      padding: 20px;
    }
    .compare-project-list,
    .compare-saved-list,
    .compare-results { display: flex; flex-direction: column; gap: 10px; }
    .compare-directory-head { align-items: center; gap: 8px; }
    .compare-directory-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
    .compare-directory-actions { display: inline-flex; align-items: center; gap: 6px; }
    .compare-directory-actions .btn { padding: 6px 9px; }
    .compare-project-list { max-height: 31vh; overflow: auto; padding-right: 3px; }
    .compare-saved-list { max-height: 37vh; overflow: auto; padding-right: 3px; }
    .compare-project-item,
    .compare-draft-item {
      border: 1px solid #dbe7f6;
      border-radius: 15px;
      background: #fff;
      padding: 12px 13px;
      cursor: pointer;
      transition: .16s ease;
    }
    .compare-project-item:hover,
    .compare-project-item.active,
    .compare-draft-item:hover,
    .compare-draft-item.active {
      border-color: #79b7ff;
      background: linear-gradient(135deg, #eef6ff, #fff);
      transform: translateY(-1px);
    }
    .compare-project-item b,
    .compare-draft-title {
      display: block;
      color: #0f172a;
      font-size: 13px;
      line-height: 1.55;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .compare-project-item b { white-space: nowrap; }
    .compare-project-meta,
    .compare-draft-meta { margin-top: 5px; color: #64748b; font-size: 11px; line-height: 1.5; }
    .compare-saved-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 20px 0 10px;
      padding-top: 16px;
      border-top: 1px solid #e4edf8;
      color: #334155;
      font-weight: 800;
      font-size: 13px;
    }
    .compare-history-upload-btn {
      display: flex;
      width: 100%;
      justify-content: center;
      box-sizing: border-box;
      margin: 10px 0 6px;
      cursor: pointer;
    }
    .compare-history-upload-status {
      margin-bottom: 10px;
      line-height: 1.5;
    }
    .compare-draft-row { display: flex; align-items: flex-start; gap: 8px; }
    .compare-draft-main { min-width: 0; flex: 1; }
    .compare-draft-delete {
      border: 0;
      background: transparent;
      color: #a65b6a;
      cursor: pointer;
      font-size: 12px;
      padding: 1px 2px;
    }
    .compare-column-title h2,
    .compare-result-head h2 { margin: 0 0 7px; color: #0056b3; font-size: 21px; }
    .compare-result-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 14px;
    }
    .compare-result-summary {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 14px;
    }
    .compare-stat {
      padding: 12px;
      border: 1px solid #dbe7f6;
      border-radius: 14px;
      background: #f8fbff;
    }
    .compare-stat b { display: block; color: #0056b3; font-size: 20px; }
    .compare-stat span { color: #64748b; font-size: 11px; }
    .compare-results { max-height: calc(100vh - 330px); overflow: auto; padding-right: 4px; }
    .review-comparison-result { display: flex; flex-direction: column; gap: 9px; }
    .review-compare-hit {
      padding: 11px 12px;
      border: 1px solid #dbe7f6;
      border-radius: 13px;
      background: #f8fbff;
    }
    .review-compare-hit b { color: #0f172a; font-size: 13px; }
    .review-compare-hit span { float: right; color: #c62849; font-size: 11px; font-weight: 900; }
    .review-compare-hit p { margin: 7px 0 0; color: #475569; font-size: 12px; line-height: 1.65; }
    #reviewComparisonBadge.danger { color: #b42340; background: #ffe5eb; }
    .compare-result-card {
      border: 1px solid #dbe7f6;
      border-radius: 17px;
      background: #fff;
      padding: 15px;
      box-shadow: 0 10px 24px rgba(15,82,186,.05);
    }
    .compare-result-card.critical {
      border-color: #ef9baa;
      background: linear-gradient(135deg, #fff1f4, #fff);
      box-shadow: 0 12px 30px rgba(216,63,95,.09);
    }
    .compare-result-card.moderate { border-color: #e8d39c; background: linear-gradient(135deg, #fffaf0, #fff); }
    .compare-result-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }
    .compare-result-card-head b { color: #0f172a; line-height: 1.5; }
    .compare-result-score {
      flex: 0 0 auto;
      color: #0056b3;
      font-size: 12px;
      font-weight: 900;
    }
    .critical .compare-result-score { color: #c62849; }
    .compare-excerpt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .compare-excerpt {
      min-width: 0;
      padding: 11px 12px;
      border-radius: 12px;
      background: #f7faff;
      color: #475569;
      font-size: 12px;
      line-height: 1.72;
      word-break: break-word;
      white-space: pre-wrap;
    }
    .compare-excerpt b { display: block; margin-bottom: 6px; color: #64748b; font-size: 11px; }
    .critical .compare-excerpt { background: #ffe8ed; color: #9b2039; }
    .kb-docx-original-preview {
      min-width: 0;
      max-width: 100%;
      padding: 10px 0 24px;
      overflow-x: hidden;
    }
    .kb-docx-original-preview .docx-wrapper {
      background: #eef2f7;
      padding: 18px;
    }
    .kb-docx-original-preview .docx {
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box;
      overflow-wrap: anywhere;
      box-shadow: 0 10px 28px rgba(15,82,186,.12);
      margin: 0 auto 18px;
    }
    .compare-no-project {
      padding: 20px 14px;
      border: 1px dashed #c9d9ee;
      border-radius: 15px;
      color: #64748b;
      line-height: 1.7;
      font-size: 12px;
      text-align: center;
    }
    @media (max-width: 1180px) {
      .home-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .compare-layout { grid-template-columns: 240px 1fr; }
      .compare-result-panel { min-height: auto; }
      .compare-results { max-height: none; }
    }
    @media (max-width: 760px) {
      .home-section,
      .compare-layout,
      .compare-excerpt-grid,
      .compare-result-summary { grid-template-columns: 1fr; }
      .compare-result-panel { grid-column: auto; }
      .compare-page-head { align-items: stretch; flex-direction: column; }
      .compare-threshold-note { min-width: 0; }
      .compare-sidebar, .compare-result-panel { min-height: auto; }
    }

  

    /* v48 premium interface polish: review workspace + knowledge base + login */
    :root {
      --premium-blue: #006DFF;
      --premium-blue-deep: #004FB5;
      --premium-blue-soft: #EAF4FF;
      --premium-ink: #0B1220;
      --premium-slate: #52647A;
      --premium-line: rgba(151, 190, 239, .42);
      --premium-card: rgba(255, 255, 255, .86);
      --premium-glow: 0 28px 80px rgba(0, 91, 187, .16);
      --premium-glow-soft: 0 18px 48px rgba(15, 82, 186, .10);
    }
    html { scroll-behavior: smooth; }
    body { -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }

    .portal-shell {
      min-height: 100vh;
      background:
        radial-gradient(circle at 10% 4%, rgba(0, 123, 255, .12), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(91, 180, 255, .14), transparent 34%),
        linear-gradient(180deg, #f7fbff 0%, #ffffff 42%, #f3f8ff 100%);
    }
    .portal-nav {
      height: 70px;
      padding: 0 22px;
      background: rgba(255, 255, 255, .78);
      border-bottom: 1px solid rgba(219, 231, 246, .92);
      box-shadow: 0 18px 44px rgba(15, 82, 186, .08);
      backdrop-filter: blur(22px);
    }
    .portal-nav .brand-mark span:first-child,
    .login-hero .brand-mark span:first-child {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      box-shadow: 0 16px 32px rgba(0, 109, 255, .28), inset 0 1px 0 rgba(255,255,255,.45);
    }
    .portal-nav .brand-mark span:last-child { font-weight: 900; color: #0b1220; letter-spacing: .1px; }
    .portal-links { gap: 8px; }
    .nav-link {
      height: 38px;
      padding: 0 16px;
      border-radius: 999px;
      border: 1px solid transparent;
      background: transparent;
      color: #334155;
      font-weight: 800;
      transition: .18s ease;
    }
    .nav-link:hover { background: rgba(0, 123, 255, .07); color: var(--premium-blue-deep); transform: translateY(-1px); }
    .nav-link.active { background: linear-gradient(135deg, #eaf4ff, #ffffff); color: var(--premium-blue-deep); border-color: rgba(0, 123, 255, .16); box-shadow: 0 10px 26px rgba(0, 109, 255, .10); }
    .logout-link { color: #64748b; font-weight: 700; }

    .page-screen { animation: premiumFade .28s ease both; }
    @keyframes premiumFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    .login-screen {
      background:
        radial-gradient(circle at 18% 18%, rgba(0, 109, 255, .20), transparent 30%),
        radial-gradient(circle at 82% 76%, rgba(67, 160, 255, .18), transparent 32%),
        linear-gradient(135deg, #f5f9ff 0%, #ffffff 50%, #edf6ff 100%);
    }
    .login-card {
      border-radius: 34px;
      border: 1px solid rgba(207, 224, 245, .95);
      box-shadow: 0 40px 120px rgba(0, 72, 170, .18);
      background: rgba(255,255,255,.76);
      backdrop-filter: blur(20px);
    }
    .login-hero {
      position: relative;
      overflow: hidden;
      background:
        linear-gradient(135deg, rgba(234,244,255,.96), rgba(255,255,255,.9)),
        radial-gradient(circle at 12% 12%, rgba(0, 123, 255, .25), transparent 30%);
    }
    .login-hero::after {
      content: "";
      position: absolute;
      width: 320px;
      height: 320px;
      right: -130px;
      bottom: -120px;
      background: radial-gradient(circle, rgba(0, 123, 255, .18), transparent 68%);
      pointer-events: none;
    }
    .login-hero h1 { font-size: 50px; letter-spacing: -2px; color: #0b1220; }
    .login-hero p { color: #52647a; font-size: 18px; }
    .metric {
      background: rgba(255,255,255,.76);
      border: 1px solid rgba(207, 224, 245, .92);
      box-shadow: 0 14px 32px rgba(15,82,186,.08);
      border-radius: 18px;
    }
    .metric b { color: var(--premium-blue); }
    .login-panel { background: rgba(255,255,255,.94); }
    .login-panel h2 { font-size: 30px; letter-spacing: -.5px; }
    .login-panel input {
      height: 48px;
      border-radius: 14px;
      font-size: 15px;
      background: #f8fbff;
    }

    .review-inner-header {
      height: 84px;
      background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,247,255,.92));
      border-bottom: 1px solid rgba(207,224,245,.94);
      box-shadow: 0 16px 38px rgba(15,82,186,.07);
      backdrop-filter: blur(16px);
    }
    .review-inner-header h1 { color: #0b1220; font-size: 25px; }
    .review-inner-header .tag { color: #64748b; opacity: 1; font-weight: 700; }
    .review-page .app {
      padding: 24px;
      gap: 22px;
      background:
        radial-gradient(circle at 1% 0%, rgba(0,123,255,.08), transparent 28%),
        radial-gradient(circle at 96% 20%, rgba(91,180,255,.09), transparent 31%);
    }
    .review-page .card,
    .kb-page .card {
      position: relative;
      border: 1px solid rgba(207, 224, 245, .95);
      background: var(--premium-card);
      box-shadow: var(--premium-glow-soft);
      backdrop-filter: blur(18px);
    }
    .review-page .card::before,
    .kb-page .card::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(255,255,255,.72), transparent 42%);
      opacity: .72;
    }
    .review-page .panel,
    .review-page .project-card,
    .kb-page .kb-sidebar,
    .kb-page .kb-upload-panel,
    .kb-page .kb-preview-panel { padding: 22px; }
    .review-page .panel > *,
    .review-page .project-card > *,
    .kb-page .card > * { position: relative; z-index: 1; }
    .section-title,
    .panel-title,
    .kb-preview-title h2,
    .kb-upload-title h2 {
      color: var(--premium-blue-deep);
      letter-spacing: -.2px;
    }
    .panel-title { font-size: 18px; }
    .panel-title::before {
      width: 9px;
      height: 28px;
      background: linear-gradient(180deg, #006DFF, #75BDFF);
      box-shadow: 0 10px 22px rgba(0,109,255,.22);
    }
    label { color: #243247; font-weight: 900; }
    input[type="text"], textarea, select {
      border: 1px solid rgba(179, 207, 241, .86);
      background: rgba(255,255,255,.88);
      border-radius: 14px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    }
    input[type="text"]:focus, textarea:focus, select:focus {
      border-color: #60a5fa;
      box-shadow: 0 0 0 5px rgba(0,109,255,.10), inset 0 1px 0 rgba(255,255,255,.85);
    }
    .upload-box {
      border: 1.5px dashed rgba(96, 165, 250, .72);
      background:
        linear-gradient(135deg, rgba(248,251,255,.98), rgba(255,255,255,.88));
      border-radius: 18px;
      min-height: 112px;
    }
    .parse-status {
      border-color: rgba(207,224,245,.95);
      border-radius: 14px;
      background: rgba(248,251,255,.86);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    }
    .btn {
      border-radius: 14px;
      background: linear-gradient(135deg, #006DFF, #004FB5);
      box-shadow: 0 14px 28px rgba(0, 109, 255, .22);
      font-weight: 900;
    }
    .btn.secondary {
      background: rgba(255,255,255,.86);
      border: 1px solid rgba(179, 207, 241, .9);
      color: var(--premium-blue-deep);
      box-shadow: 0 10px 22px rgba(15,82,186,.08);
    }
    .btn.danger { background: linear-gradient(135deg, #f0446d, #c82b52); }
    .badge,
    .pill {
      border-radius: 999px;
      background: linear-gradient(135deg, #ecf6ff, #ffffff);
      color: var(--premium-blue-deep);
      border: 1px solid rgba(179, 207, 241, .88);
    }
    .project-item,
    .kb-item,
    .file-chip {
      border-radius: 16px;
      border-color: rgba(207,224,245,.95);
      background: rgba(255,255,255,.86);
      box-shadow: 0 12px 26px rgba(15,82,186,.06);
    }
    .project-item.active,
    .kb-item.active,
    .kb-file-list .file-chip.active {
      background: linear-gradient(135deg, #eaf4ff, #ffffff);
      border-color: rgba(0, 109, 255, .42);
      box-shadow: 0 18px 36px rgba(0,109,255,.12);
    }
    .score-summary { gap: 14px; }
    .score-box {
      border-radius: 20px;
      background:
        linear-gradient(145deg, rgba(234,244,255,.96), rgba(255,255,255,.92));
      border: 1px solid rgba(179,207,241,.88);
      min-height: 116px;
    }
    .score-num { font-size: 36px; color: var(--premium-blue); letter-spacing: -1px; }
    .bar { height: 10px; background: #e5f0fb; }
    .bar span { background: linear-gradient(90deg, #006DFF, #72BDFF); }
    .notice {
      border-radius: 14px;
      border-width: 1px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
    }
    .report {
      border-radius: 18px;
      border-color: rgba(207,224,245,.95);
      background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
      font-size: 13.5px;
    }
    .report h2 { font-size: 23px; color: #0b55b7; letter-spacing: -.4px; }
    .report h3 {
      color: #0b55b7;
      border-left: 5px solid #006DFF;
      background: linear-gradient(90deg, rgba(234,244,255,.9), transparent);
      padding: 8px 0 8px 12px;
      border-radius: 10px;
    }
    th { background: linear-gradient(135deg, #006DFF, #004FB5); font-size: 12.5px; }
    td { border-color: #dce9f8; }
    tr:nth-child(even) td { background: #f8fbff; }
    .optimize-box {
      border-radius: 18px;
      border-color: rgba(207,224,245,.95);
      background: linear-gradient(135deg, rgba(248,251,255,.96), rgba(255,255,255,.92));
    }
    .optimize-title { font-size: 17px; color: var(--premium-blue-deep); }
    #optimizedText { border-radius: 16px; background: #ffffff; }

    .kb-page {
      max-width: 1680px;
      padding: 28px 24px 40px;
      position: relative;
    }
    .kb-page::before {
      content: "知识库";
      display: block;
      margin: 0 0 18px;
      font-size: 34px;
      line-height: 1;
      font-weight: 950;
      color: #0b1220;
      letter-spacing: -1px;
    }
    .kb-page::after {
      content: "沉淀甲方资料、产品边界与审稿口径，上传即解析，审稿时自动读取同名项目。";
      display: block;
      margin: -10px 0 24px;
      color: #64748b;
      font-size: 15px;
      position: relative;
      z-index: 1;
    }
    .kb-layout { grid-template-columns: 220px minmax(300px,360px) minmax(700px,1fr); gap: 18px; }
    .kb-sidebar, .kb-upload-panel, .kb-preview-panel { border-radius: 24px; }
    .kb-project-list { gap: 12px; }
    .kb-item { padding: 16px; }
    .kb-item b { font-size: 15px; }
    .kb-preview-box {
      min-height: 620px;
      overflow-x: hidden;
      overflow-y: auto;
      overflow-wrap: anywhere;
      border-radius: 20px;
      background:
        linear-gradient(180deg, #fbfdff, #ffffff);
      border-color: rgba(207,224,245,.95);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    }
    .kb-doc-preview {
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      overflow-x: hidden;
      border-radius: 18px;
      border-color: rgba(207,224,245,.95);
      box-shadow: 0 18px 46px rgba(15,82,186,.10);
    }
    .kb-doc-preview table,
    .kb-sheet-preview table { width: 100% !important; max-width: 100%; table-layout: fixed; }
    .kb-doc-preview td,
    .kb-doc-preview th,
    .kb-sheet-preview td,
    .kb-sheet-preview th { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
    .kb-preview-tip {
      border-radius: 14px;
      background: linear-gradient(135deg, #eaf4ff, #ffffff);
      border-color: rgba(179,207,241,.88);
    }
    .kb-minimal-note {
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(234,244,255,.65);
      border: 1px solid rgba(207,224,245,.86);
    }

    @media (max-width: 1359px) {
      .review-page .app { padding: 16px; }
      .kb-layout { grid-template-columns: 1fr; }
    }
    @media (max-width: 760px) {
      .portal-nav { height: auto; padding: 12px; flex-direction: column; align-items: flex-start; }
      .portal-links { flex-wrap: wrap; }
      .login-card { grid-template-columns: 1fr; border-radius: 24px; }
      .login-hero, .login-panel { padding: 30px; }
      .login-hero h1 { font-size: 36px; }
      .review-inner-header { height: auto; padding: 14px; align-items: flex-start; }
      .review-page .panel, .review-page .project-card, .kb-page .card { padding: 16px; }
      .kb-page::before { font-size: 28px; }
    }

    .site-compliance-footer {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 18px;
      flex-wrap: wrap;
      padding: 18px 24px;
      color: #64748b;
      background: #fff;
      border-top: 1px solid rgba(207,224,245,.95);
      font-size: 13px;
      text-align: center;
    }
