:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --border: #e3e6ea;
  --accent: #1a73e8;
  --err: #c5221f;
  --ordered: #4b7bec;
  --disordered: #d6dae0;
  --domain: #7c5cbf;
  --exp: #1e9e6a;
  --patch: #e8873a;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
/* Module tabs. They scroll sideways on a phone rather than wrapping, and the
   negative margin lets the active underline sit on the top bar's border. */
.tabs {
  display: flex; gap: 4px; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  margin: -12px 0;
}
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 14px 10px 12px; font: inherit; font-weight: 550; color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.spacer { flex: 1; }
.account { display: flex; align-items: center; gap: 12px; }
.account .email { color: var(--muted); font-size: 13px; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.card.centred { max-width: 440px; margin: 64px auto; text-align: center; }
.card.warn { border-color: #f0d48a; background: #fffaf0; }

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 0 0 2px; letter-spacing: -0.01em; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--muted); margin: 0 0 16px; font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.muted { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
a { color: var(--accent); }

.status {
  padding: 10px 14px; border-radius: 8px; background: #eef1f4;
  color: var(--muted); font-size: 13px; margin-bottom: 16px;
}
.status.error { background: #fdeded; color: var(--err); }

.btn {
  padding: 9px 18px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { opacity: 0.92; }
.btn-ghost { background: #eceff3; color: var(--text); padding: 6px 12px; font-size: 13px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer;
        font: inherit; padding: 0; font-family: var(--mono); font-size: 12px; }

.searchbar { display: flex; gap: 10px; margin-bottom: 8px; }
.searchbar input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-family: var(--mono); background: #fff;
}
.searchbar input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.examples { font-size: 12px; color: var(--muted); margin-bottom: 20px; }

.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.badge {
  border: 2px solid var(--border); border-radius: 10px;
  padding: 8px 14px; text-align: center; flex-shrink: 0;
}
.badge-value { font-size: 20px; font-weight: 650; font-family: var(--mono); }
.badge-label { font-size: 10px; color: var(--muted); text-transform: uppercase;
               letter-spacing: 0.05em; }
.interpretation { margin: 14px 0 0; font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
}
.tile-value { font-size: 26px; font-weight: 650; font-family: var(--mono);
              letter-spacing: -0.02em; }
.tile-label { font-size: 11px; color: var(--muted); text-transform: uppercase;
              letter-spacing: 0.06em; margin-top: 2px; }

.row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.row-label {
  width: 150px; flex-shrink: 0; text-align: right;
  font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; line-height: 1.3;
}
.row-note { display: block; text-transform: none; letter-spacing: 0; font-size: 10px; opacity: 0.75; }
.row-body { flex: 1; min-width: 0; }

.strip { width: 100%; height: 22px; display: block; border-radius: 3px;
         image-rendering: pixelated; }

.track { position: relative; height: 22px; background: #f1f3f5; border-radius: 3px; }
.track.domains { height: 26px; }
.span {
  position: absolute; top: 0; bottom: 0; border-radius: 3px;
  font-size: 10px; color: #fff; line-height: 22px; padding: 0 5px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.span.ordered { background: var(--ordered); }
.span.disordered { background: var(--disordered); }
.span.domain { background: var(--domain); line-height: 26px; }
.span.exp { background: var(--exp); opacity: 0.55; }
.span.patch { background: var(--patch); }

.ruler { position: relative; height: 16px; font-size: 10px;
         color: var(--muted); font-family: var(--mono); }
.ruler span { position: absolute; transform: translateX(-50%); }
.ruler .end { transform: translateX(-100%); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px;
          padding-left: 164px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
            margin-right: 5px; vertical-align: -1px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px;
     text-transform: uppercase; letter-spacing: 0.05em;
     padding: 6px 10px; border-bottom: 1px solid var(--border); }
td { padding: 7px 10px; border-bottom: 1px solid #f1f3f5; font-family: var(--mono); font-size: 12px; }
tr:last-child td { border-bottom: 0; }

ul { margin: 0; padding-left: 20px; font-size: 13px; }

@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: stretch; gap: 4px; }
  .row-label { width: auto; text-align: left; }
  .legend { padding-left: 0; }
}

/* ---- Mol* viewer ---- */
.modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mode {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--muted); font-size: 12px; cursor: pointer;
}
.mode:hover { border-color: #c3c9d1; color: var(--text); }
.mode.active { background: var(--text); border-color: var(--text); color: #fff; }

.viewer {
  position: relative;
  width: 100%; height: 460px;
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #fff;
}
.viewer-status {
  font-size: 12px; color: var(--muted); padding: 6px 0;
}
.viewer-links { margin: 12px 0 0; }

/* Mol* injects absolutely positioned children that need a sized parent. */
.viewer > * { position: absolute; inset: 0; }

@media (max-width: 720px) {
  .viewer { height: 340px; }
}

/* ---- Foldseek search ---- */
.fs-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.fs-filter { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.fs-filter b { font-family: var(--mono); color: var(--text); }
.fs-filter[hidden] { display: none; }   /* display:flex above would override hidden */
.fs-slider { width: 200px; }
.fs-status { font-size: 12px; color: var(--muted); padding: 6px 0; }
.fs-status.error { color: var(--err); }

.fs-results { max-height: 420px; overflow-y: auto; }
.fs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fs-table th {
  position: sticky; top: 0; background: var(--card); z-index: 1;
  text-align: left; font-weight: 600; color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 8px; border-bottom: 1px solid var(--border);
}
.fs-table td { padding: 5px 8px; border-bottom: 1px solid #f1f3f5; font-family: var(--mono); }
.fs-table tbody tr { cursor: pointer; }
.fs-table tbody tr:hover { background: #f6f8fa; }
.fs-table tbody tr.sel { background: #fdf0e4; }
.fs-table tbody tr.sel td { font-weight: 600; }
.fs-table .desc {
  font-family: inherit; max-width: 320px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- multi-hit selection ---- */
.fs-clear { font-family: inherit; font-size: 12px; }

.fs-table .chip-cell { width: 20px; padding-right: 0; }
.chip {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 3px; vertical-align: -1px;
}
.chip.off { background: transparent; border: 1px solid var(--border); }
.fs-table tbody tr.sel { background: #f3f6f9; }
.fs-table tbody tr.sel td { font-weight: 600; }

/* ---- alignment viewer ---- */
.aln-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.aln-wrap { display: flex; align-items: flex-start; border: 1px solid var(--border);
            border-radius: 8px; overflow: hidden; background: #fff; }
.aln-labels { flex-shrink: 0; width: 96px; border-right: 1px solid var(--border); }
/* Row heights must match ROW_H / RULER_H in alignment.js or rows drift. */
.aln-lbl {
  height: 17px; line-height: 17px; padding: 0 8px;
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aln-lbl.ruler { height: 15px; }
.aln-lbl.q { color: var(--text); font-weight: 700; }

.aln-scroll { overflow-x: auto; overflow-y: hidden; flex: 1; }
.aln-canvas { display: block; }

.aln-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px;
              font-size: 11px; color: var(--muted); align-items: center; }
.aln-legend i { display: inline-block; width: 10px; height: 10px;
                border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.aln-tip { height: 18px; margin-top: 8px; font-size: 11px;
           color: var(--muted); font-family: var(--mono); }

/* ---- database picker + source badges ---- */
.fs-dbs { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.fs-db { display: flex; align-items: center; gap: 5px; font-size: 12px;
         color: var(--muted); cursor: pointer; }
.fs-db input { cursor: pointer; }

.src {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.03em;
  font-family: var(--mono);
}
.src.pdb  { background: #e3f0e8; color: #1e6b47; }
.src.afdb { background: #e5e9f7; color: #33459c; }
.self { font-size: 9px; color: var(--muted); font-family: var(--mono);
        border: 1px solid var(--border); border-radius: 3px; padding: 0 3px; }

/* ---- experimental structures: UniProt column ---- */
.ups { font-family: var(--mono); font-size: 11px; line-height: 1.7; max-width: 240px; }
.ups a { display: inline-block; padding: 0 3px; border-radius: 3px;
         text-decoration: none; }
.up-query { background: #eef1f4; color: var(--muted); }
.up-partner { background: #e8f0fb; color: var(--accent); }
.ups a:hover { text-decoration: underline; }
.ups .ch { font-size: 9px; opacity: 0.7; margin-left: 2px; }

/* ---- residue range control ---- */
.range-ctl { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.range-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.range-label { font-size: 11px; color: var(--muted); text-transform: uppercase;
               letter-spacing: 0.05em; }
.range-value { font-family: var(--mono); font-size: 12px; }
.range-reset { font-family: inherit; font-size: 11px; }
.range-note { margin: 8px 0 0; font-size: 11px; }

/* Two inputs stacked in one track; only the thumbs receive pointer events, so
   whichever sits on top does not block the other's handle. */
.range-sliders { position: relative; height: 24px; margin-left: 164px; }
.range-sliders input {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; margin: 0;
  -webkit-appearance: none; appearance: none;
  background: none; pointer-events: none; height: 24px;
}
.range-sliders input::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: var(--border);
}
.range-sliders input::-moz-range-track {
  height: 4px; border-radius: 2px; background: var(--border);
}
.range-sliders input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; margin-top: -6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); cursor: grab;
}
.range-sliders input::-moz-range-thumb {
  pointer-events: auto;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); cursor: grab;
}

@media (max-width: 720px) { .range-sliders { margin-left: 0; } }

/* ---- viewer legend ---- */
.viewer-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px;
                 font-size: 11px; color: var(--muted); align-items: center; }
.viewer-legend i { display: inline-block; width: 12px; height: 10px;
                   margin: 0 1px; vertical-align: -1px; }
.viewer-legend i:first-of-type { border-radius: 2px 0 0 2px; }
.viewer-legend i:last-of-type { border-radius: 0 2px 2px 0; }
.mode:disabled { opacity: 0.4; cursor: not-allowed; }
.mode:disabled:hover { border-color: var(--border); color: var(--muted); }

/* ---- viewer control rows ---- */
.ctl-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ctl-label { width: 74px; flex-shrink: 0; font-size: 10px; color: var(--muted); white-space: nowrap;
             text-transform: uppercase; letter-spacing: 0.05em; }
.reps, .modes, .extras { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
@media (max-width: 720px) {
  .ctl-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ctl-label { width: auto; }
}

/* ---- representation size ---- */

/* ---- AlphaPulldown module ---- */
.ap-form { display: flex; flex-direction: column; gap: 12px; }
.ap-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ap-field[hidden] { display: none; }
.ap-field input, .ap-field select, .ap-chain textarea, .ap-chain input {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 13px; background: #fff; color: var(--text);
}
.ap-chains { display: flex; flex-direction: column; gap: 8px; }
.ap-chain { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-chain textarea {
  flex: 1 1 320px; min-width: 0; resize: vertical;
  font-family: var(--mono); font-size: 12px;
}
.ap-chain label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ap-chain input[type=number] { width: 72px; padding: 6px 8px; }
.ap-actions { display: flex; align-items: center; gap: 10px; }

.ap-table tbody tr { cursor: pointer; }
.ap-table tbody tr:hover td { background: #f6f8fb; }
.ap-table tr.selected td { background: #eaf1fd; }
.ap-name { font-family: inherit; font-size: 13px; }
.ap-pill { font-family: inherit; font-size: 11px; padding: 2px 8px; border-radius: 999px;
           background: #eef1f4; color: var(--muted); }
.ap-pill.results { background: #e3f4ec; color: #157a52; }
.ap-pill.running { background: #e8f0fe; color: #1a56c4; }
.ap-pill.failed { background: #fdeded; color: var(--err); }

.ap-chainlist { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.ap-chainlist i { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
                  margin-right: 6px; vertical-align: -1px; }
.ap-steps { margin: 0 0 16px; padding-left: 20px; font-size: 13px; }
.ap-steps li { margin-bottom: 8px; }
.ap-cmd, .ap-file {
  background: #f6f7f9; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-family: var(--mono); font-size: 12px;
  overflow-x: auto; margin: 6px 0 0; white-space: pre;
}
.ap-file { max-height: 360px; overflow: auto; }
.ap-filetabs { align-items: center; margin-bottom: 0; }

/* 3D view and PAE side by side, their lower edges aligned: controls above the
   viewer (left only), then viewer | PAE title + plot (bottom-aligned), then the
   legend | the PAE colour scale. One column on narrow screens. */
.ap-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
           grid-template-areas: "ctl ." "view pae" "below scale";
           column-gap: 20px; margin-top: 16px; align-items: start; }
.ap-3d-controls { grid-area: ctl; }
.ap-view .ap-viewer { grid-area: view; }
.ap-pae { grid-area: pae; align-self: end; }
.ap-3d-below { grid-area: below; }
.ap-view .ap-pae-scale { grid-area: scale; }
.ap-pae-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; min-height: 2.6em; }
.ap-pae-canvas { width: 100%; aspect-ratio: 1; image-rendering: pixelated;
                 border: 1px solid var(--border); border-radius: 4px; display: block; }
.ap-pae-scale { display: flex; align-items: center; gap: 8px; font-size: 11px;
                color: var(--muted); margin-top: 6px; }
.ap-pae-scale i { flex: 1; height: 8px; border-radius: 2px;
                  background: linear-gradient(90deg, rgb(15, 94, 43), rgb(245, 246, 247));
                  border: 1px solid var(--border); }
.ap-expres-legend { margin-top: 6px; }
.ap-expres-scale { display: inline-flex; align-items: center; gap: 5px; }
.ap-expres-scale i { width: 80px; height: 8px; margin: 0; border-radius: 2px;
                     background: linear-gradient(90deg, rgb(241, 243, 245), rgb(52, 58, 64));
                     border: 1px solid var(--border); }
@media (max-width: 820px) {
  .ap-view { grid-template-columns: 1fr;
             grid-template-areas: "ctl" "view" "below" "pae" "scale"; }
}

.ap-msa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
               gap: 20px; }
.ap-msa { margin: 0; }
.ap-msa figcaption { font-size: 13px; margin-bottom: 6px; }
.ap-msa canvas { width: 100%; height: 240px; display: block;
                 border: 1px solid var(--border); border-radius: 4px; }
.ap-msa-scale { max-width: 420px; margin-top: 12px; }
.ap-msa-scale i { background: linear-gradient(90deg, rgb(255, 0, 0), rgb(255, 180, 98),
                  rgb(128, 255, 180), rgb(0, 180, 236), rgb(128, 0, 255)); }

.ap-runsteps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-runsteps li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px;
                  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.ap-runsteps li.pending { opacity: 0.6; }
.ap-runmsg { flex-basis: 100%; font-size: 12px; color: var(--muted); font-family: var(--mono);
             overflow-wrap: anywhere; }
.ap-bar { display: inline-block; width: 120px; height: 6px; background: #eef1f4; border-radius: 3px;
          overflow: hidden; }
.ap-bar i { display: block; height: 100%; background: var(--accent); }
.ap-gpu { flex-direction: row; align-items: center; gap: 8px; }
.ap-timing { font-size: 12px; font-family: var(--mono); }
.ap-num { text-align: right; white-space: nowrap; }
.ap-table tfoot td { border-top: 1px solid var(--border); border-bottom: 0; font-size: 12px; }
.ap-earlier { color: #9a6700; background: #fff8e1; border-radius: 6px; padding: 6px 10px; }
.ap-seqmap-card { margin-top: 16px; }
.ap-seqmap-chain { margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid #f1f3f5; }
.ap-seqmap-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ap-seqmap-title i { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
                     margin-right: 6px; vertical-align: -1px; }

/* AP 3D legend: one swatch per item, so no joined-ramp corners */
.ap-legend i { margin: 0 5px 0 0; border-radius: 2px; }
.ap-legend i:first-of-type, .ap-legend i:last-of-type { border-radius: 2px; }
/* the conservation ramp: joined swatches, rounded only at the ends */
.ap-legend .ap-ramp i { margin: 0 1px; border-radius: 0; }
.ap-legend .ap-ramp i:first-of-type { margin-left: 4px; border-radius: 2px 0 0 2px; }
.ap-legend .ap-ramp i:last-of-type { margin-right: 4px; border-radius: 0 2px 2px 0; }
.fs-table td.method { white-space: nowrap; }

/* AP secondary-structure figures (server-rendered SVG, one per chain) */
.ap-sse-card { margin-top: 16px; }
.ap-sse-fig { margin: 8px 0 16px; }
.ap-sse-fig figcaption { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.ap-sse-fig figcaption a { font-weight: 400; margin-left: 8px; font-size: 11px; }
.ap-sse-img img { width: 100%; height: auto; display: block; }
.ap-sse-img > span { font-size: 12px; }

/* collapsible card header (AP "Run on your cluster") */
.ap-collapsible { display: flex; align-items: baseline; gap: 10px; }
.ap-collapsible .link { font-size: 11px; text-transform: none; letter-spacing: 0; }
.ap-cluster h3.ap-collapsible { margin-bottom: 0; }
.ap-cluster-body { margin-top: 14px; }

/* SVG / PNG download links next to a figure title */
.ap-figlinks a { font-size: 11px; font-weight: 400; margin-left: 8px; text-transform: none; letter-spacing: 0; }
.ap-export { margin: 0; }
.aln-downloads { margin: -4px 0 10px; } .aln-downloads a { margin-left: 8px; }

/* cloud-run requests (non-admins request, admins approve) */
.ap-pill.requested { background: #fff4d6; color: #8a6100; }
.ap-pill.demo { background: #efe7fb; color: #6a3fb5; vertical-align: middle; }
.ap-reqnote { margin: 4px 0 10px; }
.ap-requests { margin: 0 0 10px; color: #8a6100; }

/* Users tab (admins) */
.users-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.users-add input[name=email] { flex: 1 1 240px; }
.users-add input[name=note] { flex: 1 1 200px; }
.users-fixed td { color: var(--muted); }

/* sign-in card: logo, name, one button */
.gate-logo { display: block; width: 160px; height: auto; margin: 0 auto 12px; }
#gate h1 { margin: 0 0 20px; }

/* Monomer report: candidate interaction partners (STRING) */
.pp-table { width: 100%; }
.pp-table td.num, .pp-table th.num { text-align: right; white-space: nowrap; }
.pp-table .pp-name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-bar { display: inline-block; width: 40px; height: 6px; margin-right: 6px; vertical-align: middle;
          background: #eef1f4; border-radius: 3px; overflow: hidden; }
.pp-bar i { display: block; height: 100%; background: var(--accent); }
.pp-predict { white-space: nowrap; }
.ap-pae-clear { font-size: 11px; margin-left: 6px; }

/* Mol*: hide the top-left state-snapshot player ("[1/1] <date> ⇕ ▶"). Every
   MolViewSpec load is stored as a snapshot, which makes it appear; the app
   rebuilds its scene on each change and never uses snapshots. There is no
   viewer option for it, hence CSS (scoped to the app's two viewers). */
.viewer .msp-state-snapshot-viewport-controls,
.ap-viewer .msp-state-snapshot-viewport-controls { display: none !important; }

/* AP inter-chain contact list; possible salt bridges (gapTrick rule) highlighted */
.ap-contacts-card h3.ap-collapsible { margin-bottom: 0; }
.ap-contacts-body { margin-top: 12px; }
.ap-contact-table td { font-family: var(--mono); }
.ap-contact-table tr.ap-sb-row td { background: #fff4e5; }
.ap-sb { background: #ffe1b8; color: #8a4b00; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.ap-sb-count { color: #8a4b00; font-weight: 600; }
.ap-contact-table tbody tr { cursor: pointer; }
.ap-contact-table tbody tr.selected td { background: #ece6fd; }
.ap-contacts-copy { margin-left: 4px; }

/* job discussion */
.ap-pill.unread { background: #fde8e8; color: #b42318; vertical-align: middle; }
.ap-ncomments { font-size: 12px; }
.ap-comments { list-style: none; margin: 0 0 12px; padding: 0; max-height: 420px; overflow-y: auto; }
.ap-comments li { border-left: 3px solid var(--border); padding: 6px 10px; margin-bottom: 8px; }
.ap-comments li.new { border-left-color: #b42318; background: #fff8f7; }
.ap-comment-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ap-comment-head .link { font-size: 12px; }
.ap-comment-body { font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.ap-comment-form textarea, .ap-comment-body textarea { width: 100%; box-sizing: border-box; font: inherit;
  font-size: 14px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; resize: vertical; }
.ap-comment-form .ap-actions, .ap-comment-body .ap-actions { margin-top: 6px; }

/* How it works */
.howto p, .howto li { font-size: 14px; line-height: 1.55; }
.howto ul { margin: 0 0 12px; padding-left: 20px; }
.howto li { margin-bottom: 6px; }
.howto-steps { margin: 12px 0 0; padding-left: 20px; }
.howto-steps li { margin-bottom: 4px; }
.howto-foot { font-size: 13px; color: var(--muted); text-align: center; margin: 4px 0 24px; }
