/* Restriction modes share one surface; spacing separates sections and results. */
body.modules-page.modules-tool .tools-main-wrapper > .tool-app-container.restriction-app {
    padding: clamp(20px, 3vw, 40px);
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--brand-dark);
}
body.modules-page.modules-tool .restriction-app .back-link-wrapper { padding: 0; margin: 0 0 24px; }
body .restriction-app .tool-hero { max-width: 960px; margin: 0 0 26px; }
body .restriction-app .tool-hero .tool-title { font-size: clamp(2.1rem, 3.7vw, 3.5rem); font-weight: 420; line-height: 1.05; margin-bottom: 12px; }
body .restriction-app .tool-hero .tool-desc { font-size: 18px; line-height: 1.45; color: #535964; max-width: 760px; }
body .restriction-app .restriction-mode-switch { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-bottom: 32px; }
body .restriction-app .restriction-mode-switch button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: #535964; font: 600 18px/1.3 var(--font-main), sans-serif; text-align: left; cursor: pointer; }
body .restriction-app .restriction-mode-switch button::before { content: ''; flex: none; width: 14px; height: 14px; border: 1px solid #aaa; border-radius: 50%; box-sizing: border-box; }
body .restriction-app .restriction-mode-switch button[aria-selected=true] { color: var(--magenta); }
body .restriction-app .restriction-mode-switch button[aria-selected=true]::before { border: 4px solid var(--magenta); }
body .restriction-app :is(button,summary,a):focus-visible { outline: 2px solid var(--magenta); outline-offset: 4px; }
body .restriction-app .rp-panel,
body .restriction-app .rp-manual { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; min-width: 0; }
body .restriction-app .rp-panel h2,
body .restriction-app .tool-flow-head h2 { font-size: 22px; font-weight: 650; line-height: 1.2; margin: 0 0 8px; text-wrap: pretty; }
body .restriction-app .rp-panel h3 { font-size: 20px; margin: 0 0 8px; line-height: 1.25; }
body .restriction-app .rp-panel p { margin: 8px 0; line-height: 1.45; }
body .restriction-app .rp-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 32px; align-items: start; }
body .restriction-app .rp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 12px 0; }
body .restriction-app .rp-panel button,
body .restriction-app .rp-file-label { border: 0; border-radius: 0; background: transparent; color: var(--magenta); padding: 8px 0; font: inherit; font-weight: 600; min-height: 44px; cursor: pointer; }
body .restriction-app .rp-panel button:hover { color: var(--brand-dark); }
body .restriction-app .rp-panel button:disabled { opacity: .55; cursor: default; }
body .restriction-app .rp-panel .rp-primary,
body .restriction-app .restriction-run-row .tool-btn-primary { background: var(--magenta); color: #fff; border: 0; border-radius: 8px; padding: 12px 22px; min-width: 0; min-height: 46px; font-size: 17px; }
body .restriction-app .rp-panel .rp-primary:hover { background: #cf007b; color: #fff; }
body .restriction-app :is(.tool-input,.tool-select,.mm-select-trigger),
body .restriction-app .rp-panel select { font: inherit; padding: 10px 12px; border: 1px solid #d3d3d7 !important; border-radius: 8px !important; background: #fff !important; color: var(--brand-dark) !important; box-shadow: none; max-width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; }
body .restriction-app :is(.tool-input,.tool-select):focus,
body .restriction-app .rp-panel select:focus { border-color: var(--magenta) !important; outline: 2px solid var(--magenta); outline-offset: 2px; box-shadow: none !important; }
body .restriction-app .rp-panel textarea { width: 100%; min-height: 112px; resize: vertical; font: 16px/1.45 monospace; }
body .restriction-app .rp-panel input[type=text] { width: 100%; }
body .restriction-app .rp-panel label { display: block; font-size: 16px; margin: 8px 0; }
body .restriction-app .rp-paste-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 18px; }
body .restriction-app .rp-paste-actions > div { flex: 1 1 220px; max-width: 350px; }
body .restriction-app .rp-paste-actions label span { font-weight: 600; color: #535964; }
body .restriction-app .rp-panel summary { cursor: pointer; font-size: 16px; font-weight: 600; padding: 12px 0; min-height: 24px; }
body .restriction-app .rp-stock-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; max-height: 250px; overflow: auto; }
body .restriction-app .rp-stock-grid label { display: flex; align-items: center; gap: 8px; min-height: 36px; margin: 0; overflow-wrap: anywhere; }
body .restriction-app .rp-stock-grid input { width: 18px; height: 18px; accent-color: var(--magenta); flex: none; }
body .restriction-app :is(.rp-status,.rp-input-note,.rp-quality,.restriction-sequence-meta,.restriction-gel-note) { font-size: 16px; color: #535964; line-height: 1.45; }
body .restriction-app .rp-status { min-height: 24px; overflow-wrap: anywhere; }
body .restriction-app .rp-error { color: #a52230; }
body .restriction-app .rp-records { display: grid; gap: 4px; margin: 20px 0; }
body .restriction-app .rp-record { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px 24px; align-items: center; padding: 10px 0; border: 0; border-radius: 0; }
body .restriction-app .rp-record strong { overflow-wrap: anywhere; }
body .restriction-app .rp-record small { display: block; font-size: 16px; color: #535964; }
body .restriction-app .rp-results { display: grid; gap: 40px; margin-top: 28px; }
body .restriction-app .rp-results:empty { display: none; }
body .restriction-app .rp-plasmid { min-width: 0; border: 0; padding: 0; overflow-wrap: anywhere; }
body .restriction-app .rp-strategies { display: grid; gap: 4px; margin: 16px 0; }
body .restriction-app .rp-strategy { display: grid; grid-template-columns: 110px minmax(140px,1fr) minmax(180px,1.3fr) auto; gap: 4px 20px; align-items: baseline; padding: 16px 12px; border: 0; border-radius: 0; min-width: 0; }
body .restriction-app .rp-strategy.is-selected { background: #fff5fb; box-shadow: none; }
body .restriction-app .rp-strategy.is-selected h3 { color: var(--magenta); }
body .restriction-app .rp-strategy h3 { grid-column: 1; margin: 0; }
body .restriction-app .rp-strategy .rp-fragments { grid-column: 2; margin: 0; font-size: 18px; font-variant-numeric: tabular-nums; }
body .restriction-app .rp-strategy .rp-assessment { grid-column: 3; }
body .restriction-app .rp-strategy summary { font-size: 16px; padding: 0; }
body .restriction-app .rp-strategy > button { grid-column: 4; grid-row: 1; padding: 0; min-width: 120px; }
body .restriction-app .rp-strategy > button[aria-pressed=true]::after { content: ' ✓'; }
body .restriction-app .rp-strategy .rp-product-link { grid-column: 1 / -1; font-size: 16px; margin: 0; }
body .restriction-app .rp-gel { margin: 20px 0; max-width: 520px; }
body .restriction-app .rp-gel svg { width: 100%; height: auto; display: block; border-radius: 8px; background: #25222e; }
body .restriction-app .rp-gel figcaption { font-size: 16px; color: #535964; margin-top: 8px; line-height: 1.4; }
body .restriction-app .rp-sites { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px 24px; margin: 12px 0; }
body .restriction-app .rp-sites button { display: flex; justify-content: space-between; gap: 8px; text-align: left; }
body .restriction-app .rp-panel a { color: var(--magenta); text-underline-offset: 3px; }
body .restriction-app .rp-panel input[type=file] { font: inherit; max-width: 100%; width: 100%; margin: 8px 0; box-sizing: border-box; }
body .restriction-app .rp-panel .rp-file-label { position: relative; display: inline-flex; align-items: center; margin: 0; }
body .restriction-app .rp-panel .rp-file-label:focus-within { outline: 2px solid var(--magenta); outline-offset: 4px; }
body .restriction-app .rp-panel input.rp-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; margin: 0; min-height: 0; overflow: hidden; }
body .restriction-app .restriction-flow-step { display: block; border: 0; margin: 0 0 28px; padding: 0; }
body .restriction-app .tool-flow-head { display: block; margin: 0 0 16px; }
body .restriction-app .tool-flow-number { display: none; }
body .restriction-app .tool-flow-content { min-width: 0; }
body .restriction-app .tool-flow-head > div > p { color: #535964; font-size: 16px; }
body .restriction-app .restriction-sequence-input { min-height: 112px !important; max-height: 250px; }
body .restriction-app .restriction-topology-options { display: flex; flex-wrap: wrap; max-width: none; gap: 16px 32px; }
body .restriction-app .restriction-topology-option { display: flex; align-items: center; gap: 10px; }
body .restriction-app .restriction-topology-option input { position: static; width: 18px; height: 18px; opacity: 1; pointer-events: auto; accent-color: var(--magenta); }
body .restriction-app .restriction-topology-copy { padding: 0; min-height: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body .restriction-app .restriction-topology-copy :is(strong,small) { font-size: 16px; }
body .restriction-app .restriction-topology-copy small { color: #535964; }
body .restriction-app .restriction-run-row { justify-content: flex-start; padding: 0; border: 0; }
body .restriction-app :is(.restriction-file-action,.restriction-custom-toggle,.restriction-save-enzyme) { border: 0; font-size: 16px; }
body .restriction-app .restriction-custom-enzyme { border: 0; }
body .restriction-app .restriction-result-toolbar { border: 0; font-size: 17px; }
body .restriction-app :is(.restriction-gel-panel,.restriction-fragments-panel,.restriction-sites-details,.restriction-product-recommendations,.restriction-map-help) { border: 0; background: transparent; box-shadow: none; }
body .restriction-app .restriction-map-help { margin-top: 32px; padding: 0; color: #535964; font-size: 16px; }
body .restriction-app .restriction-enzyme-grid .tool-label span { color: #535964; font-size: 16px; }
body .restriction-app .restriction-enzyme-grid .site-counter { font-size: 16px !important; }
body .restriction-app .restriction-enzyme-grid .mm-select-options { min-width: 0; }
body .lab-method-note { max-width: 780px; margin: 28px 0; font-size: 16px; line-height: 1.5; color: #535964; }
body .restriction-app [hidden] { display: none !important; }
@media(max-width:900px) {
    body .restriction-app .rp-strategy { grid-template-columns: 100px minmax(0,1fr) auto; }
    body .restriction-app .rp-strategy .rp-assessment { grid-column: 2; }
    body .restriction-app .rp-strategy > button { grid-column: 3; }
}
@media(max-width:760px) {
    body .restriction-app .rp-layout { grid-template-columns: 1fr; gap: 28px; }
    body .restriction-app .rp-record { grid-template-columns: minmax(0,1fr) auto; }
    body .restriction-app .rp-record select { grid-column: 1; max-width: 210px; }
    body .restriction-app .rp-record button { grid-column: 2; grid-row: 1/3; }
    body .restriction-app .rp-sites { grid-template-columns: repeat(2,minmax(0,1fr)); }
    body .restriction-app .restriction-mode-switch { gap: 4px; flex-direction: column; margin-bottom: 28px; }
    body .restriction-app .rp-strategy { grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 14px 8px; }
    body .restriction-app .rp-strategy .rp-fragments, body .restriction-app .rp-strategy .rp-assessment { grid-column: 1 / -1; }
    body .restriction-app .rp-strategy > button { grid-column: 2; }
    body .restriction-app .restriction-enzyme-grid { grid-template-columns: 1fr; }
    body .restriction-app .restriction-custom-enzyme { grid-template-columns: 1fr; }
    body .restriction-app .restriction-run-row .tool-btn-primary { width: 100%; }
}
@media print { body .restriction-app .rp-toolbar,body .restriction-app .rp-layout,body .restriction-app .rp-records { display: none; } body .restriction-app .rp-strategy { break-inside: avoid; } }

/* Compact numeric calculators. */
body .calc-reference-app .calc-field-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),290px));justify-content:start}
body .calc-reference-app .calc-field-grid-three{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),270px))}
body .calc-reference-app .calc-field-span-2{grid-column:1/-1;max-width:590px}
body .calc-reference-app .calc-field>.tool-input{max-width:270px}
body .calc-reference-app .input-group{max-width:290px}
body .calc-reference-app .input-group input{min-width:0;width:10ch;flex:1}
body .calc-reference-app .input-group select{max-width:145px}
body .calc-reference-app .calc-flow-step{grid-template-columns:32px minmax(0,1fr)}
body .calc-reference-app .calc-live-result{max-width:590px}
body .calc-reference-app .calc-example{margin:12px 0;font:inherit;background:#fff;border:1px solid #d0cdd2;border-radius:8px;padding:10px 14px;cursor:pointer;min-height:44px}
body .calc-reference-app .calc-field-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),250px))}
body .calc-reference-app .input-group{max-width:230px}
body .calc-reference-app .calc-mode-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){body .calc-reference-app .calc-mode-tabs{grid-template-columns:1fr}}
body .tool-app-container input[type=number]{max-width:14ch}
@media(max-width:760px){body .calc-reference-app .calc-flow-step{grid-template-columns:minmax(0,1fr)}body .calc-reference-app .tool-flow-index{display:none}}

/* Shared construction input precedes both analysis modes. */
body .restriction-app #rp-input { margin-bottom: 28px; }
body .restriction-app .rp-record-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; }
body .restriction-app .rp-record-actions button { font-size: 16px; }
body .restriction-app .rp-active-choice { max-width: 500px; margin-bottom: 24px; }
body .restriction-app .rp-active-choice .tool-label { display: block; margin-bottom: 8px; }
body .restriction-app .rp-active-choice select { width: 100%; }
body .restriction-app .rp-stock-column .restriction-custom-enzyme { grid-template-columns: 1fr; gap: 8px; }
body .restriction-app #rp-record-editor > .tool-input { max-width: 420px; margin-bottom: 20px; }
body .restriction-app .rp-import-errors { color: #a52230; overflow-wrap: anywhere; font-size: 16px; }
body .restriction-app #rp-import-status:empty { display: none; }
body .restriction-app #rp-input #rp-record-editor { margin-top: 16px; }
@media(max-width:760px) {
    body .restriction-app .rp-record-actions { grid-column: 2; grid-row: 1/3; display: grid; gap: 0; }
    body .restriction-app .rp-record-actions button { grid-column: auto; grid-row: auto; }
}

/* Optional target selection uses one shared map, loaded only on demand. */
body .restriction-app .rp-target-panel { margin:24px 0; padding:24px 0; min-width:0; }
body .restriction-app .rp-target-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
body .restriction-app .rp-target-coordinates { display:flex; flex-wrap:wrap; align-items:end; gap:12px 20px; }
body .restriction-app .rp-target-coordinates label { display:grid; gap:6px; }
body .restriction-app .rp-target-coordinates input { width:12ch; font-variant-numeric:tabular-nums; }
body .restriction-app .rp-target-coordinates button { min-height:44px; }
body .restriction-app .rp-target-map { width:100%; height:440px; min-width:0; overflow:hidden; margin:16px 0; }
body .restriction-app .rp-target-search { max-width:800px; }
body .restriction-app .rp-target-search textarea { min-height:90px; max-height:160px; }
body .restriction-app .rp-target-matches { display:flex; flex-wrap:wrap; gap:8px 24px; max-height:200px; overflow:auto; }
body .restriction-app .rp-target-summary { grid-column:1/-1; color:#6c2754; }
body .restriction-app #rp-target-map-status:empty { display:none; }
@media(max-width:760px){body .restriction-app .rp-target-heading {align-items:start;}body .restriction-app .rp-target-map {height:360px;}body .restriction-app .rp-record-actions {max-width:145px;}}

body .restriction-app .rp-strategy :is(.rp-target-summary,.rp-condition-note) { grid-column:1/-1; margin:0; }
body .restriction-app .rp-plasmid .crg-figure { margin:16px 0 24px; }

/* Restriction workflow: input first, persistent compact laboratory sidebar. */
body .restriction-app .restriction-workspace { display:grid; grid-template-columns:minmax(0,1fr) 270px; align-items:start; gap:32px; }
body .restriction-app .restriction-workspace-main { min-width:0; }
body .restriction-app .restriction-step-heading { display:flex; align-items:center; gap:12px; margin:24px 0 16px; }
body .restriction-app .restriction-step-heading h2 { margin:0; font-size:22px; }
body .restriction-app .restriction-step-heading>button { margin-left:auto; font-size:16px; }
body .restriction-app .restriction-step-number { display:inline-flex; align-items:center; justify-content:center; flex:none; width:30px; height:30px; border-radius:50%; background:#fff0f8; color:var(--magenta); font-size:17px; font-weight:650; }
body .restriction-app #rp-input>.restriction-step-heading { margin-top:0; }
body .restriction-app .rp-input-tabs { display:flex; gap:8px 24px; flex-wrap:wrap; margin-bottom:12px; }
body .restriction-app .rp-input-tabs button { color:#666; padding:6px 0; border-bottom:2px solid transparent; }
body .restriction-app .rp-input-tabs button[aria-selected=true] { color:var(--magenta); border-bottom-color:var(--magenta); }
body .restriction-app #rp-input :is(#rp-links,#rp-sequence) { min-height:78px; height:88px; max-height:180px; }
body .restriction-app .rp-paste-actions { gap:12px; }
body .restriction-app .rp-paste-actions>div { flex:0 1 200px; max-width:220px; }
body .restriction-app .rp-paste-actions>div:nth-child(2) { flex-basis:155px; }
body .restriction-app .rp-file-drop { background:#fafafa; padding:16px; }
body .restriction-app .rp-local-note { font-size:16px; color:#666; line-height:1.45; margin-top:16px; }
body .restriction-app .rp-benchling-help { max-width:74ch; }
body .restriction-app .rp-benchling-help li { margin:8px 0; }
body .restriction-app .rp-laboratory { position:sticky; top:125px; max-height:calc(100dvh - 150px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:0 8px 8px 0; min-width:0; }
body .restriction-app .rp-laboratory h2 { color:var(--magenta); font-size:21px; }
body .restriction-app .rp-laboratory p { font-size:16px; }
body .restriction-app .rp-laboratory .rp-stock-grid { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:225px; gap:0 8px; }
body .restriction-app .rp-laboratory .rp-stock-grid label { min-height:36px; font-size:16px; }
body .restriction-app #rp-stock-search { width:100%; max-width:250px; font:inherit; }
body .restriction-app .rp-stock-results { max-height:220px; overflow-y:auto; }
body .restriction-app .rp-stock-result { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:16px; min-height:40px; }
body .restriction-app .rp-stock-result button { min-height:40px; padding:4px 0; }
body .restriction-app #rp-stock-search-status:empty { display:none; }
body .restriction-app .rp-laboratory .restriction-custom-enzyme { display:grid; grid-template-columns:1fr; gap:8px; margin:4px 0; padding:0; }
body .restriction-app .rp-laboratory #ce_name { max-width:16ch; }
body .restriction-app .rp-laboratory #ce_site { max-width:24ch; }
body .restriction-app .rp-laboratory .tool-form-group { margin:0; }
body .restriction-app .rp-laboratory .tool-label { margin:4px 0; }
body .restriction-app .rp-laboratory #btn_toggle_custom_enz { margin:4px 0; padding:6px 0; }
body .restriction-app .rp-laboratory #rp-save-stock { border-radius:8px; background:#fff0f8; padding:10px 12px; margin-top:8px; }
body .restriction-app .rp-laboratory .rp-stock-transfer summary { font-size:16px; }
body .restriction-app .restriction-manual-row { display:grid; grid-template-columns:minmax(160px,1.45fr) repeat(3,minmax(112px,1fr)); gap:12px; align-items:start; margin:16px 0; }
body .restriction-app .restriction-manual-row .rp-active-choice { margin:0; max-width:none; }
body .restriction-app .restriction-manual-row .tool-form-group { min-width:0; margin:0; }
body .restriction-app .restriction-manual-row .tool-label { font-size:16px; margin:0 0 8px; min-height:24px; display:block; }
body .restriction-app .restriction-manual-row .mm-select-trigger { padding:8px 10px; }
body .restriction-app .restriction-manual-row .site-counter { font-size:14px !important; }
body .restriction-app .restriction-results-head { display:flex; align-items:start; gap:12px; }
body .restriction-app .rp-record { grid-template-columns:minmax(0,1fr) 170px; gap:8px 16px; }
body .restriction-app .rp-record-actions { grid-column:1/-1; grid-row:auto; display:flex; gap:6px 20px; }
body .restriction-app .rp-record-actions button { min-height:36px; padding:4px 0; }
body .restriction-app .rp-strategy { grid-template-columns:90px minmax(0,1fr) auto; gap:6px 12px; }
body .restriction-app .rp-strategy .rp-assessment { grid-column:2; }
body .restriction-app .rp-strategy>button { grid-column:3; }
@media(max-width:1050px) {
    body .restriction-app .restriction-workspace { grid-template-columns:minmax(0,1fr) 245px; gap:24px; }
    body .restriction-app .restriction-manual-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
    body .restriction-app .restriction-manual-row .rp-active-choice { grid-column:1/-1; max-width:260px; }
}
@media(max-width:900px) {
    body .restriction-app .restriction-workspace { grid-template-columns:minmax(0,1fr); gap:0; }
    body .restriction-app .restriction-workspace-main { display:contents; }
    body .restriction-app .rp-laboratory { position:static; max-height:430px; grid-row:2; margin:12px 0 24px; padding:0 8px 8px 0; max-width:380px; }
    body .restriction-app .rp-laboratory .rp-stock-grid { max-width:280px; }
    body .restriction-app .restriction-step-heading { align-items:start; flex-wrap:wrap; }
    body .restriction-app .restriction-step-heading>button { margin-left:42px; }
}
@media(max-width:540px) {
    body .restriction-app .rp-input-tabs { gap:4px 18px; }
    body .restriction-app .restriction-manual-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body .restriction-app .restriction-manual-row .rp-active-choice { max-width:none; }
    body .restriction-app .rp-record { grid-template-columns:minmax(0,1fr); }
    body .restriction-app .rp-record select { grid-column:1; }
    body .restriction-app .rp-record-actions { max-width:none; }
    body .restriction-app .rp-record-actions button { grid-row:auto; }
    body .restriction-app .rp-strategy { grid-template-columns:minmax(0,1fr) auto; }
    body .restriction-app .rp-strategy>button { grid-column:2; }
    body .restriction-app .rp-strategy :is(.rp-fragments,.rp-assessment) { grid-column:1/-1; }
}

/* Readability iteration: visible work, quiet references, independent record tiles. */
body .restriction-app .restriction-mode-switch { margin-bottom:12px; }
body .restriction-app .rp-laboratory { padding:6px 8px 10px; margin:-6px -8px 0; }
body .restriction-app .rp-laboratory h2 { color:#222; }
body .restriction-app .rp-laboratory #rp-stock-count { margin:14px 0 6px; font-weight:600; }
body .restriction-app .rp-laboratory #rp-save-stock { color:#27624a; background:#e5f3ee; margin-top:6px; }
body .restriction-app .rp-laboratory #rp-save-stock:hover { background:#d4eade; color:#1f4e3b; }
body .restriction-app .rp-stock-result button { color:#343434; }
body .restriction-app #rp-stock-status:empty,body .restriction-app .rp-status:empty { display:none; }
body .restriction-app .rp-stock-grid { padding:4px; margin:0 -4px; }
body .restriction-app :is(.tool-input,.tool-select):focus,body .restriction-app .rp-panel select:focus { outline-offset:-2px; border-color:transparent !important; }
body .restriction-app .rp-reference-row { display:flex; flex-wrap:wrap; align-items:center; gap:0 18px; font-size:16px; color:#666; }
body .restriction-app .rp-reference-row #rp-help-open { color:#555; text-decoration:underline; text-decoration-color:#bbb; text-underline-offset:4px; }
body .restriction-app .rp-local-note { color:#666; font-size:16px; font-weight:400; line-height:1.4; max-width:78ch; margin:6px 0 18px; }
body .restriction-app .rp-reference-row span { font-weight:400; }
body .restriction-app .rp-help-popover { position:fixed; z-index:1200; right:24px; top:130px; width:min(390px,calc(100vw - 32px)); max-height:calc(100dvh - 155px); overflow:auto; box-sizing:border-box; padding:22px; border:1px solid #ddd; border-radius:10px; background:#fff; box-shadow:0 12px 42px #0002; }
body .restriction-app .rp-help-popover h2 { font-size:20px; }
body .restriction-app .rp-help-popover ol { padding-left:22px; margin:12px 0; }
body .restriction-app .rp-help-popover li { font-size:16px; margin:8px 0; line-height:1.4; }
body .restriction-app .rp-records { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:20px 0 12px; }
body .restriction-app .rp-record { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:start; align-items:center; gap:8px 12px; padding:14px 16px; border:1px solid #e5e5e7; border-radius:8px; background:#fff; }
body .restriction-app .rp-record-info { grid-column:1/-1; padding-right:28px; min-width:0; }
body .restriction-app .rp-record strong { display:block; color:#222; font-size:18px; font-weight:650; line-height:1.25; }
body .restriction-app .rp-record small { display:inline-block; font-weight:400; margin-right:12px; line-height:1.4; }
body .restriction-app .rp-record-info a { font-size:16px; color:#555; text-decoration:underline; text-decoration-color:#bbb; }
body .restriction-app .rp-record select { grid-column:1; grid-row:2; width:100%; max-width:170px; padding:6px 8px; min-height:40px; font-size:16px; }
body .restriction-app .rp-record-actions { display:contents; }
body .restriction-app .rp-record-actions button[data-edit] { grid-column:2; grid-row:2; color:#555; font-size:16px; padding:6px 0; min-height:40px; }
body .restriction-app .rp-record-actions button[data-target] { grid-column:1/-1; grid-row:3; justify-self:start; color:#3f4852; font-size:16px; min-height:40px; text-align:left; padding:4px 0; }
body .restriction-app .rp-record-actions button[data-target]:hover { color:var(--magenta); }
body .restriction-app .rp-record .rp-record-remove { position:absolute; right:3px; top:3px; width:40px; height:40px; min-height:40px; padding:0; color:#777; font-size:24px; line-height:1; }
body .restriction-app .rp-record .rp-record-remove:hover { color:#a52230; }
body .restriction-app .rp-record .rp-target-summary { color:#555; font-weight:400; }
body .restriction-app .rp-dialog { margin:auto; padding:24px; width:min(1120px,calc(100vw - 40px)); max-width:none; max-height:calc(100dvh - 40px); overflow:auto; box-sizing:border-box; color:#222; background:#fff; border:0; border-radius:12px; box-shadow:0 16px 80px #0003; }
body .restriction-app .rp-dialog::backdrop { background:#0005; }
body:has(.restriction-app .rp-dialog[open]) { overflow:hidden; }
body .restriction-app .rp-dialog-heading,body .restriction-app .rp-target-heading { display:flex; align-items:center; gap:16px; justify-content:space-between; }
body .restriction-app .rp-dialog-heading h2,body .restriction-app .rp-target-heading h2 { margin:0; color:#222; }
body .restriction-app .rp-dialog-heading button,body .restriction-app #rp-target-close { color:#555; min-width:44px; flex:none; }
body .restriction-app #rp-editor-close,body .restriction-app #rp-help-close { font-size:26px; }
body .restriction-app .rp-editor-dialog { width:min(680px,calc(100vw - 32px)); }
body .restriction-app #rp-input #rp-record-editor { margin:auto; }
body .restriction-app #rp-record-editor #rp-edit-name { max-width:340px; margin-bottom:16px; }
body .restriction-app #rp-record-editor #restr_seq { min-height:112px; height:112px; max-height:240px; }
body .restriction-app #rp-record-editor .restriction-topology-options { display:flex; gap:16px; flex-wrap:wrap; margin:16px 0; }
body .restriction-app #rp-record-editor .restriction-topology-option { display:flex; align-items:center; gap:8px; border:0; padding:0; min-height:40px; background:transparent; }
body .restriction-app #rp-record-editor .restriction-topology-copy strong { font-size:16px; font-weight:500; }
body .restriction-app #rp-record-editor .restriction-topology-option input { width:18px; height:18px; accent-color:var(--magenta); }
body .restriction-app .rp-target-workspace { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
body .restriction-app .rp-target-controls { grid-column:2; grid-row:1; }
body .restriction-app .rp-target-workspace .rp-target-map { grid-column:1; grid-row:1; height:500px; margin:0; }
body .restriction-app .rp-target-coordinates { gap:12px; }
body .restriction-app .rp-target-coordinates label { margin:8px 0; flex:1; min-width:0; }
body .restriction-app .rp-target-coordinates input { width:100%; }
body .restriction-app .rp-target-controls p { font-size:16px; font-weight:400; }
body .restriction-app .rp-target-search textarea { height:70px; min-height:70px; max-height:140px; }
body .restriction-app .rp-target-matches { max-height:100px; gap:4px; }
body .restriction-app .rp-target-matches button { font-size:16px; }
body .restriction-app .rp-dialog-footer { display:flex; flex-wrap:wrap; gap:12px 24px; padding-top:16px; margin-top:12px; border-top:1px solid #eee; }
body .restriction-app .rp-results { gap:28px; margin-top:12px; }
body .restriction-app .rp-plasmid { border-top:1px solid #d8d8dc; padding-top:18px; }
body .restriction-app .rp-result-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 16px; margin-bottom:12px; }
body .restriction-app .rp-result-heading h3 { margin:0; font-size:22px; color:#222; }
body .restriction-app .rp-result-heading span { color:#666; font-size:16px; }
body .restriction-app .rp-result-columns,body .restriction-app .rp-strategy { display:grid; grid-template-columns:minmax(130px,1fr) minmax(150px,1.4fr) 116px; gap:4px 16px; padding:10px 8px; align-items:center; }
body .restriction-app .rp-result-columns { color:#666; font-size:16px; background:#f7f7f7; }
body .restriction-app .rp-strategies { display:block; margin:0; }
body .restriction-app .rp-strategy { border-bottom:1px solid #e9e9eb; }
body .restriction-app .rp-strategy h3 { grid-column:1; grid-row:1/3; font-size:18px; margin:0; }
body .restriction-app .rp-strategy h3 a { color:#222; text-decoration:none; }
body .restriction-app .rp-strategy h3 a:hover { text-decoration:underline; color:var(--magenta); }
body .restriction-app .rp-strategy .rp-fragments { grid-column:2; grid-row:1; font-size:18px; font-weight:600; margin:0; }
body .restriction-app .rp-strategy .rp-assessment { grid-column:2; grid-row:2; font-size:16px; color:#666; line-height:1.3; }
body .restriction-app .rp-strategy>button { grid-column:3; grid-row:1/3; min-width:0; min-height:44px; font-size:16px; color:#3f4852; text-align:left; }
body .restriction-app .rp-strategy>button[aria-pressed=true]::after { content:none; }
body .restriction-app .rp-strategy.is-selected { background:#f4f6f5; }
body .restriction-app .rp-strategy.is-selected h3 { color:#222; }
body .restriction-app .rp-condition-note,body .restriction-app .rp-site-reference summary { font-size:16px; color:#666; font-weight:400; }
body .restriction-app .rp-site-reference summary { padding:10px 0; }
@media(max-width:1050px) {
    body .restriction-app .rp-records { grid-template-columns:1fr; }
    body .restriction-app .rp-target-workspace { grid-template-columns:minmax(0,1fr) 260px; gap:16px; }
    body .restriction-app .rp-result-columns,body .restriction-app .rp-strategy { grid-template-columns:minmax(95px,1fr) minmax(110px,1.4fr) 100px; gap:4px 8px; }
}
@media(max-width:900px) {
    body .restriction-app .rp-records { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body .restriction-app .rp-laboratory { margin:8px -8px 24px; padding:6px 8px 10px; }
    body .restriction-app .rp-target-workspace { grid-template-columns:1fr; }
    body .restriction-app .rp-target-controls { grid-column:1; grid-row:1; }
    body .restriction-app .rp-target-workspace .rp-target-map { grid-column:1; grid-row:2; height:320px; }
    body .restriction-app .rp-target-search { max-width:none; }
}
@media(max-width:600px) {
    body .restriction-app .rp-records { grid-template-columns:1fr; }
    body .restriction-app .rp-record-actions { max-width:none; }
    body .restriction-app .rp-result-columns { display:none; }
    body .restriction-app .rp-strategy { grid-template-columns:minmax(0,1fr) 102px; padding:12px 0; gap:6px 10px; }
    body .restriction-app .rp-strategy h3 { grid-column:1; grid-row:1; }
    body .restriction-app .rp-strategy .rp-fragments { grid-column:1/-1; grid-row:2; }
    body .restriction-app .rp-strategy .rp-assessment { grid-column:1/-1; grid-row:3; }
    body .restriction-app .rp-strategy>button { grid-column:2; grid-row:1; }
    body .restriction-app .rp-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:16px; }
    body .restriction-app .rp-help-popover { right:16px; top:80px; max-height:calc(100dvh - 96px); }
}
body .restriction-app .rp-stock-transfer { display:flex; flex-wrap:wrap; gap:0 16px; margin-top:10px; }
body .restriction-app .rp-stock-transfer button { color:#666; font-size:16px; min-height:40px; }
@media(max-width:900px){body .restriction-app .rp-laboratory { max-height:none; }}
/* Final review: explicit transfer disclosure and a pinned gel beside results. */
body .restriction-app .rp-stock-transfer { display:block; margin-top:10px; }
body .restriction-app .rp-stock-transfer summary { color:#666; font-size:16px; font-weight:400; }
body .restriction-app .rp-stock-transfer-actions { display:flex; flex-wrap:wrap; gap:0 16px; }
body .restriction-app #planner>.lab-method-note { width:100%; max-width:none; box-sizing:border-box; }
body .restriction-app .rp-gel-popover { position:fixed; z-index:1200; top:120px; right:24px; width:min(430px,calc(100vw - 32px)); max-height:calc(100dvh - 144px); padding:18px; overflow:auto; overscroll-behavior:contain; box-sizing:border-box; border:1px solid #ddd; border-radius:10px; background:#fff; box-shadow:0 12px 42px #0002; }
body .restriction-app .rp-gel-popover h2 { font-size:20px; line-height:1.3; overflow-wrap:anywhere; margin:0; }
body .restriction-app #rp-gel-close { font-size:26px; color:#555; }
body .restriction-app #rp-gel-subtitle { color:#555; font-weight:500; margin:4px 0 12px; }
body .restriction-app #rp-gel-content .crg-figure { margin:0; }
@media(max-width:760px){body .restriction-app .rp-gel-popover { top:80px; right:16px; max-height:calc(100dvh - 96px); padding:14px; }}
