:root {
      --ink: #17313a;
      --muted: #60747b;
      --paper: #ffffff;
      --page: #eef4f2;
      --line: #d5e1de;
      --teal: #176f6a;
      --teal-dark: #0f514e;
      --teal-soft: #e2f1ee;
      --blue: #246a8d;
      --orange: #b56824;
      --orange-soft: #fff1df;
      --red: #a43a39;
      --red-soft: #fbe8e6;
      --green: #31704a;
      --green-soft: #e7f3ea;
      --shadow: 0 18px 42px rgba(20, 58, 63, 0.08);
      --radius: 18px;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--ink);
      background:
        radial-gradient(circle at 10% 0%, rgba(36, 106, 141, 0.12), transparent 30rem),
        radial-gradient(circle at 90% 12%, rgba(23, 111, 106, 0.12), transparent 28rem),
        var(--page);
      font-family: "Microsoft YaHei", "Noto Sans CJK SC", "PingFang SC", Arial, sans-serif;
      line-height: 1.55;
    }

    button, input, select { font: inherit; }

    .page {
      width: min(1380px, calc(100% - 32px));
      margin: 0 auto;
      padding: 28px 0 52px;
    }

    .hero {
      position: relative;
      overflow: hidden;
      padding: 34px 38px;
      color: #f7fffd;
      border-radius: 24px;
      background:
        linear-gradient(125deg, rgba(11, 59, 58, 0.98), rgba(23, 111, 106, 0.94)),
        #176f6a;
      box-shadow: var(--shadow);
    }

    .hero::after {
      content: "";
      position: absolute;
      right: -90px;
      top: -115px;
      width: 330px;
      height: 330px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 50%;
      box-shadow:
        0 0 0 36px rgba(255, 255, 255, 0.045),
        0 0 0 74px rgba(255, 255, 255, 0.035);
    }

    .eyebrow {
      margin: 0 0 7px;
      color: #b9e8de;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
    }

    h1 {
      position: relative;
      z-index: 1;
      margin: 0;
      max-width: 900px;
      font-size: clamp(28px, 4vw, 48px);
      line-height: 1.17;
      letter-spacing: -0.025em;
    }

    .hero p:last-child {
      position: relative;
      z-index: 1;
      max-width: 880px;
      margin: 16px 0 0;
      color: #d8eeea;
      font-size: 15px;
    }

    .hero-tags {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 20px;
    }

    .hero-tag {
      padding: 6px 10px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 999px;
      color: #f2fffc;
      background: rgba(255, 255, 255, 0.08);
      font-size: 12px;
      font-weight: 700;
    }

    .notice {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      margin-top: 18px;
      padding: 17px 19px;
      border: 1px solid #efd0a8;
      border-radius: 14px;
      background: var(--orange-soft);
      color: #724414;
    }

    .notice-icon {
      display: grid;
      width: 28px;
      height: 28px;
      place-items: center;
      border-radius: 50%;
      color: white;
      background: var(--orange);
      font-weight: 800;
    }

    .notice strong { display: block; margin-bottom: 3px; }
    .notice p { margin: 0; font-size: 13px; }

    .layout {
      display: grid;
      grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
      gap: 20px;
      margin-top: 20px;
      align-items: start;
    }

    .card {
      border: 1px solid rgba(213, 225, 222, 0.92);
      border-radius: var(--radius);
      background: rgba(255, 255, 255, 0.96);
      box-shadow: var(--shadow);
    }

    .card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 23px 25px 17px;
      border-bottom: 1px solid var(--line);
    }

    .card-head h2 {
      margin: 0;
      font-size: 20px;
      line-height: 1.35;
    }

    .card-head p {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .step {
      flex: none;
      padding: 5px 9px;
      border-radius: 999px;
      color: var(--teal-dark);
      background: var(--teal-soft);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.06em;
    }

    .section {
      padding: 22px 25px;
      border-bottom: 1px solid var(--line);
    }

    .section:last-child { border-bottom: 0; }

    .section-title {
      display: flex;
      align-items: center;
      gap: 9px;
      margin: 0 0 14px;
      font-size: 15px;
    }

    .section-title span {
      display: grid;
      width: 24px;
      height: 24px;
      place-items: center;
      border-radius: 8px;
      color: white;
      background: var(--teal);
      font-size: 12px;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 13px;
    }

    .field label {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
      color: #29444b;
      font-size: 12px;
      font-weight: 700;
    }

    .unit {
      color: #839398;
      font-size: 10px;
      font-weight: 600;
    }

    input[type="number"],
    select {
      width: 100%;
      min-height: 43px;
      padding: 9px 11px;
      border: 1px solid #cbd8d5;
      border-radius: 10px;
      outline: none;
      color: var(--ink);
      background: #fbfdfc;
      transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
    }

    input[type="number"]:focus,
    select:focus {
      border-color: var(--teal);
      background: #fff;
      box-shadow: 0 0 0 3px rgba(23, 111, 106, 0.12);
    }

    input[readonly] {
      color: #526a70;
      background: #f2f6f5;
      cursor: default;
    }

    .input-note {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 11px;
    }

    .compound-inputs {
      display: grid;
      gap: 9px;
    }

    .compound-row {
      display: grid;
      grid-template-columns: 82px 1fr 1fr;
      gap: 10px;
      align-items: end;
      padding: 12px;
      border: 1px solid #dce7e4;
      border-radius: 12px;
      background: #f9fbfa;
    }

    .compound-name {
      align-self: center;
      color: var(--teal-dark);
      font-size: 14px;
      font-weight: 900;
    }

    .action-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 20px 25px 24px;
    }

    .action-row p {
      margin: 0;
      max-width: 58%;
      color: var(--muted);
      font-size: 11px;
    }

    .primary-button,
    .secondary-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 10px 18px;
      border-radius: 11px;
      cursor: pointer;
      font-weight: 800;
      transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    }

    .primary-button {
      border: 1px solid var(--teal);
      color: white;
      background: var(--teal);
      box-shadow: 0 8px 18px rgba(23, 111, 106, 0.22);
    }

    .secondary-button {
      border: 1px solid #bfd1cd;
      color: var(--teal-dark);
      background: white;
    }

    button:hover { transform: translateY(-1px); }
    button:disabled { cursor: wait; opacity: 0.62; transform: none; }

    .method-card {
      position: sticky;
      top: 18px;
      overflow: hidden;
    }

    .formula {
      margin: 10px 0 0;
      padding: 13px 14px;
      border-left: 3px solid var(--blue);
      border-radius: 0 10px 10px 0;
      color: #244a5b;
      background: #edf5f8;
      font-family: Consolas, "Microsoft YaHei", monospace;
      font-size: 12px;
      line-height: 1.7;
    }

    .evidence-list {
      display: grid;
      gap: 9px;
      margin-top: 12px;
    }

    .evidence-row {
      padding: 12px 13px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fbfdfc;
    }

    .evidence-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .evidence-top strong { font-size: 13px; }

    .grade {
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 10px;
      font-weight: 800;
    }

    .grade-screen { color: #1f5d3b; background: var(--green-soft); }
    .grade-explore { color: #814a16; background: var(--orange-soft); }

    .evidence-row p {
      margin: 7px 0 0;
      color: var(--muted);
      font-size: 11px;
    }

    .model-metric {
      display: flex;
      flex-wrap: wrap;
      gap: 5px 12px;
      margin-top: 7px;
      color: #3e5a61;
      font-size: 10px;
    }

    .result-card {
      display: none;
      margin-top: 20px;
    }

    .result-card.visible { display: block; }

    .result-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 22px 25px 8px;
    }

    .detail-toggle-row {
      display: flex;
      justify-content: center;
      padding: 8px 25px 2px;
    }

    .detail-toggle-row .secondary-button { min-width: 128px; }

    .metric {
      min-height: 112px;
      padding: 15px;
      border: 1px solid var(--line);
      border-radius: 13px;
      background: #fafcfb;
    }

    .metric-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .metric-value {
      margin-top: 8px;
      color: var(--teal-dark);
      font-size: clamp(20px, 2.5vw, 31px);
      font-weight: 900;
      line-height: 1.15;
      word-break: break-word;
    }

    .metric-unit {
      margin-top: 6px;
      color: #75878c;
      font-size: 10px;
    }

    .risk-medium { background: #fff4d6; color: #966000; border-color: #e8b84a; }
    .risk-low {
      color: var(--green);
      background: var(--green-soft);
      border-color: #c9e2d0;
    }

    .risk-high {
      color: var(--red);
      background: var(--red-soft);
      border-color: #efc9c4;
    }

    .result-table-wrap {
      overflow-x: auto;
      padding: 15px 25px 8px;
    }

    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      min-width: 1120px;
      font-size: 11px;
    }

    th {
      padding: 10px 9px;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      color: #536970;
      background: #f1f6f4;
      text-align: left;
      white-space: nowrap;
    }

    th:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 0; }
    th:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 0 0; }

    td {
      padding: 11px 9px;
      border-bottom: 1px solid #e2eae8;
      background: white;
      vertical-align: top;
    }

    td:first-child { border-left: 1px solid #e2eae8; font-weight: 900; }
    td:last-child { border-right: 1px solid #e2eae8; }
    tr:last-child td:first-child { border-radius: 0 0 0 10px; }
    tr:last-child td:last-child { border-radius: 0 0 10px 0; }

    .tag {
      display: inline-block;
      padding: 3px 7px;
      border-radius: 999px;
      white-space: nowrap;
      font-size: 10px;
      font-weight: 800;
    }

    .tag-measured { color: #1f5d3b; background: var(--green-soft); }
    .tag-model { color: #315c71; background: #e7f1f6; }
    .tag-central { color: #1f5d3b; background: var(--green-soft); }
    .tag-edge { color: #814a16; background: var(--orange-soft); }
    .tag-outside { color: var(--red); background: var(--red-soft); }

    .warning-panel {
      margin: 16px 25px 25px;
      padding: 16px 18px;
      border: 1px solid #efd0a8;
      border-radius: 13px;
      background: #fff8ed;
    }

    .warning-panel h3 {
      margin: 0 0 8px;
      color: #764719;
      font-size: 14px;
    }

    .warning-panel ul {
      margin: 0;
      padding-left: 19px;
      color: #78552d;
      font-size: 11px;
    }

    .warning-panel li + li { margin-top: 5px; }

    .error-box {
      display: none;
      margin: 0 25px 22px;
      padding: 13px 15px;
      border: 1px solid #e7b9b4;
      border-radius: 11px;
      color: var(--red);
      background: var(--red-soft);
      font-size: 12px;
      font-weight: 700;
    }

    .error-box.visible { display: block; }

    .footer {
      margin-top: 17px;
      color: #708288;
      font-size: 11px;
      text-align: center;
    }

    @media (max-width: 1060px) {
      .layout { grid-template-columns: 1fr; }
      .method-card { position: static; }
      .summary-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 720px) {
      .page { width: min(100% - 18px, 1380px); padding-top: 10px; }
      .hero { padding: 25px 21px; border-radius: 18px; }
      .card-head, .section { padding-left: 17px; padding-right: 17px; }
      .grid { grid-template-columns: repeat(2, 1fr); }
      .compound-row { grid-template-columns: 1fr 1fr; }
      .compound-name { grid-column: 1 / -1; }
      .action-row { align-items: stretch; flex-direction: column; padding: 18px 17px; }
      .action-row p { max-width: none; }
      .summary-grid { padding-left: 17px; padding-right: 17px; }
      .result-table-wrap { padding-left: 17px; padding-right: 17px; }
      .warning-panel { margin-left: 17px; margin-right: 17px; }
    }

    @media (max-width: 480px) {
      .grid, .summary-grid { grid-template-columns: 1fr; }
      .compound-row { grid-template-columns: 1fr; }
      .compound-name { grid-column: auto; }
      .result-actions { flex-direction: column; align-items: stretch; }
    }

    /* Reference-image layout: compact scientific form on a pale grey canvas. */
    body {
      color: #24374b;
      background: #f3f6fa;
      font-size: 12px;
    }

    .page {
      width: min(1120px, calc(100% - 36px));
      padding: 24px 0 42px;
    }

    .hero {
      overflow: visible;
      padding: 0 0 15px;
      color: #24374b;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .hero::after,
    .eyebrow,
    .hero-tags { display: none; }

    .title-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 11px;
    }

    .hero h1 {
      margin: 0;
      color: #1e3349;
      font-size: 23px;
      line-height: 1.25;
      letter-spacing: -0.02em;
    }

    .pfas-badge {
      padding: 4px 7px;
      border-radius: 4px;
      color: #13576c;
      background: #e7f1f5;
      font-size: 9px;
      font-weight: 900;
      letter-spacing: 0.04em;
    }

    .hero p.hero-description {
      max-width: none;
      margin: 7px 0 0;
      color: #6f7f90;
      font-size: 11px;
      line-height: 1.65;
    }

    .notice { display: none; }

    .layout {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-top: 0;
    }

    .card {
      border: 1px solid #d5dee8;
      border-radius: 7px;
      background: #fff;
      box-shadow: 0 4px 14px rgba(31, 54, 79, 0.06);
    }

    #predict-form {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 20px;
    }

    #predict-form > .card-head { display: none; }

    #predict-form > .section {
      position: relative;
      padding: 17px 14px 12px;
      border: 1px solid #d5dee8;
      border-radius: 6px;
      background: #fff;
    }

    #predict-form > .section-kind { order: 1; }
    #predict-form > .section-concentration { order: 2; }
    #predict-form > .section-product { order: 3; }
    #predict-form > .section-environment { order: 4; }
    #predict-form > .section-exposure { order: 5; }
    #predict-form > .error-box { order: 6; }
    #predict-form > .action-row { order: 7; }

    #predict-form .section-title {
      position: absolute;
      top: -10px;
      left: 12px;
      margin: 0;
      padding: 0 5px;
      color: #233b50;
      background: white;
      font-size: 12px;
      font-weight: 800;
      line-height: 19px;
    }

    #predict-form .section-title span { display: none; }

    #predict-form .grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    #predict-form .section-environment .grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .static-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 1fr; }
    .section-kind .static-field-wrap { max-width: 520px; }

    #predict-form .field label {
      justify-content: flex-start;
      gap: 4px;
      margin-bottom: 5px;
      color: #415366;
      font-size: 10px;
      font-weight: 600;
    }

    #predict-form .unit {
      color: #738394;
      font-size: 9px;
      font-weight: 500;
    }

    #predict-form input[type="number"],
    #predict-form select,
    .static-field {
      min-height: 35px;
      padding: 8px 10px;
      border: 1px solid #cbd6e2;
      border-radius: 4px;
      color: #263b4e;
      background: white;
      font-size: 11px;
      line-height: 17px;
    }

    .static-field {
      color: #365064;
      background: #f8fafc;
    }

    #predict-form input[type="number"]:focus,
    #predict-form select:focus {
      border-color: #1d7897;
      box-shadow: 0 0 0 2px rgba(29, 120, 151, 0.11);
    }

    #predict-form .section-product .grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    #predict-form input::placeholder {
      color: #9ba8b5;
      font-size: 9px;
    }

    #predict-form .input-note {
      margin: 7px 0 0;
      color: #7d8b99;
      font-size: 9px;
      line-height: 1.5;
    }

    .compound-inputs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }

    .compound-row {
      display: grid;
      grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
      padding: 9px 10px;
      border: 1px solid #e0e6ed;
      border-radius: 5px;
      background: #fafbfd;
    }

    .compound-name {
      align-self: center;
      color: #176f8d;
      font-size: 11px;
      font-weight: 900;
    }

    .action-row {
      display: flex;
      justify-content: flex-end;
      padding: 0;
      border: 0;
    }

    .action-row p { display: none; }

    .primary-button {
      min-width: 125px;
      min-height: 39px;
      padding: 8px 18px;
      border-color: #167493;
      border-radius: 4px;
      background: #167493;
      box-shadow: none;
      font-size: 11px;
    }

    .primary-button:hover { background: #105f79; }

    .error-box {
      margin: 0;
      padding: 10px 12px;
      border-radius: 4px;
      font-size: 10px;
    }

    details.method-card {
      position: static;
      overflow: hidden;
      margin: 0;
      box-shadow: none;
    }

    details.method-card > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 16px;
      color: #40566a;
      background: #fbfcfd;
      cursor: pointer;
      list-style: none;
      font-size: 11px;
      font-weight: 800;
    }

    details.method-card > summary::-webkit-details-marker { display: none; }
    details.method-card > summary::after {
      content: "＋";
      color: #167493;
      font-size: 16px;
      font-weight: 500;
    }

    details.method-card[open] > summary::after { content: "－"; }

    details.method-card summary small {
      margin-left: auto;
      color: #82909e;
      font-size: 9px;
      font-weight: 500;
    }

    .method-content {
      display: grid;
      grid-template-columns: 0.75fr 1.25fr;
      border-top: 1px solid #e0e6ed;
    }

    .method-content > .section {
      padding: 16px;
      border: 0;
      border-right: 1px solid #e0e6ed;
    }

    .method-content > .section:last-child { border-right: 0; }
    .method-content .section-title { margin-bottom: 10px; font-size: 12px; }
    .method-content .section-title span { width: 21px; height: 21px; border-radius: 4px; }

    .formula {
      margin-top: 0;
      padding: 10px 11px;
      border-left-width: 2px;
      border-radius: 0 4px 4px 0;
      font-size: 10px;
    }

    .evidence-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
      margin-top: 0;
    }

    .evidence-row {
      padding: 9px 10px;
      border-radius: 4px;
    }

    .evidence-row p { margin-top: 5px; font-size: 9px; }
    .model-metric { margin-top: 5px; font-size: 9px; }

    .result-card {
      margin-top: 14px;
      border-radius: 7px;
    }

    .result-card .card-head {
      padding: 15px 18px 11px;
    }

    .result-card .card-head h2 { font-size: 15px; }
    .result-card .card-head p { font-size: 9px; }

    .secondary-button {
      min-height: 34px;
      padding: 7px 12px;
      border-radius: 4px;
      font-size: 10px;
    }

    .summary-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 9px;
      padding: 14px 18px 4px;
    }

    .metric {
      min-height: 86px;
      padding: 11px 12px;
      border-radius: 5px;
    }

    .metric-label { font-size: 9px; }
    .metric-value { margin-top: 5px; font-size: 22px; }
    .metric-unit { margin-top: 4px; font-size: 8px; }

    .result-table-wrap { padding: 11px 18px 5px; }
    .result-table-wrap table { font-size: 9px; }
    .result-table-wrap th,
    .result-table-wrap td { padding: 8px 7px; }

    .detail-toggle-row { padding: 8px 18px 0; }

    .warning-panel {
      margin: 12px 18px 17px;
      padding: 12px 14px;
      border-radius: 5px;
    }

    .warning-panel h3 { font-size: 11px; }
    .warning-panel ul { font-size: 9px; }

    .footer {
      margin-top: 12px;
      font-size: 9px;
    }

    @media (max-width: 850px) {
      .page { width: min(100% - 18px, 1120px); padding-top: 16px; }
      #predict-form { padding: 16px 13px; }
      #predict-form .grid,
      #predict-form .section-product .grid,
      #predict-form .section-environment .grid { grid-template-columns: repeat(2, 1fr); }
      .compound-inputs { grid-template-columns: 1fr; }
      .method-content { grid-template-columns: 1fr; }
      .method-content > .section { border-right: 0; border-bottom: 1px solid #e0e6ed; }
      .method-content > .section:last-child { border-bottom: 0; }
      .summary-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 520px) {
      .title-line { align-items: flex-start; flex-direction: column; gap: 6px; }
      .hero h1 { font-size: 20px; }
      #predict-form .grid,
      #predict-form .section-product .grid,
      #predict-form .section-environment .grid,
      .static-grid { grid-template-columns: 1fr; }
      .compound-row { grid-template-columns: 1fr; }
      .compound-name { margin-bottom: 2px; }
      .summary-grid { grid-template-columns: 1fr; }
      details.method-card summary small { display: none; }
    }
      #water-warning { padding-bottom: 12px !important; }
    #muscle-results { padding: 0 24px 4px; }
    #muscle-results h3 { margin: 0 0 10px; }
    #muscle-results .summary-grid { padding: 0; gap: 10px; }
    #muscle-results .metric { min-height: 76px; padding: 10px 12px; }
    .residue-input-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-top:14px; }
    .residue-input-grid input { margin-top:5px; }
    #residue-results { padding:16px 24px 4px; }
    #residue-results h3 { margin:0 0 10px; }
    #residue-results .result-table-wrap { padding:0; margin-top:12px; }
    .residue-status { display:flex; flex-wrap:wrap; gap:10px; padding:12px; border-radius:5px; }
    @media(max-width:720px) { .residue-input-grid {grid-template-columns:repeat(2,minmax(0,1fr));} }
    .risk-block { margin: 20px 16px; border: 1px solid #cbdedb; border-radius: 14px; overflow: hidden; background: #fff; }
    .risk-block + .risk-block { margin-top: 32px; }
    .risk-block-heading { padding: 20px 24px; background: #edf6f4; border-bottom: 1px solid #cbdedb; }
    .risk-block-heading h2 { margin: 0; font-size: 22px; color: #176f6a; }
    .risk-block-heading p { margin: 6px 0 0; color: #526b69; }
    #prediction-heading { color: #335c83; }
    #muscle-results { padding-top: 20px; }
    .risk-block[hidden] { display: none !important; }
    .action-row { flex-direction: row; align-items: center; justify-content: flex-end; gap: 18px; }
    .result-options { display: flex; align-items: center; gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
    .result-options legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .action-row .primary-button { flex-shrink: 0; }
    @media (max-width: 480px) { .action-row { gap: 10px; } .result-options { gap: 8px; flex-wrap: wrap; } }
    .result-options label { display: inline-flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; cursor: pointer; }
    .result-options input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: #176f6a; }

[hidden] { display: none !important; }
.result-card:not([hidden]) { display: block; }
.page { min-width: 0; }
.compound-name small { display: block; color: #61768a; font-size: 10px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.compound-row { grid-template-columns: minmax(65px, 0.52fr) minmax(0, 1fr) minmax(0, 1fr); }
.reference-grid { margin-top: 12px; }
.reference-note { margin-top: 4px; color: #63778a; font-size: 10px; line-height: 1.5; }
.source-list { padding-left: 17px; margin: 9px 0 0; color: #4d6478; font-size: 11px; }
.source-list li + li { margin-top: 4px; }
.source-list a { color: #176f8d; }
.method-copy { margin: 0; color: #4d6478; font-size: 11px; }
.result-details { margin: 16px 24px 20px; }
.result-details summary { color: #246a8d; font-weight: 700; cursor: pointer; }
.result-details[open] summary { margin-bottom: 8px; }
#water-warning { padding: 16px 24px; }
#water-warning h3, #muscle-results h3, #residue-results h3 { margin: 12px 0 8px; color: #31495e; font-size: 15px; }
#muscle-results { padding-top: 8px; }
.result-table-wrap { padding: 0 0 6px; }
.result-table-wrap table { min-width: 510px; font-size: 12px; }
.result-table-wrap th { white-space: normal; }
.result-table-wrap th, .result-table-wrap td { padding: 8px; }
.result-table-wrap td { overflow-wrap: anywhere; }
.result-table-wrap td.note-cell { max-width: 360px; min-width: 100px; }
.result-note { margin: 7px 0 12px; color: #53697c; line-height: 1.6; }
.result-card .card-head p { font-size: 12px; }
.tag-neutral { color: #4c6375; background: #edf1f5; }
.tag.attention { color: #874429; background: #fff0e6; }
.tag.exceeds { color: #943535; background: #fbe8e6; }
.tag.lower { color: #235940; background: #e7f3ea; }
#result-view .warning-panel ul { font-size: 12px; }
#export-error { margin: 12px 18px; }
.action-row .result-options { margin-right: auto; }
.field > select { width: 100%; }
.field input { width: 100%; min-width: 0; }
#predict-form .input-note { font-size: 11px; color: #607487; }
#predict-form .field label { font-size: 12px; }
#predict-form .unit { font-size: 10px; }
#predict-form input[type="number"], #predict-form select, .static-field { font-size: 12px; }
@media (max-width: 520px) {
  .action-row { flex-wrap: wrap; }
  .action-row .result-options { flex-basis: 100%; }
  .compound-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compound-name { grid-column: 1 / -1; }
  .compound-name small { display: inline; padding-left: 7px; }
  #water-warning, #muscle-results, #residue-results, .risk-block-heading { padding-left: 12px; padding-right: 12px; }
  .risk-block { margin-left: 8px; margin-right: 8px; }
  .result-details { margin-left: 12px; margin-right: 12px; }
}
