/* Match the Analysis step while keeping all context styles scoped. */
#contextSetup { margin-top:28px; font-size:18px; line-height:1.5; color:#202b33; }
#contextSetup * { box-sizing:border-box; }
#contextSetup [hidden] { display:none !important; }
#contextSetup h3 { margin:0 0 8px; font-size:26px; line-height:1.25; }
#contextSetup p { margin:0 0 16px; }
#contextSetup .context-intro { color:#52616c; margin-bottom:22px; }
#contextSetup .context-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
#contextSetup .context-card { min-width:0; border:1px solid #d9dfe4; border-radius:12px; background:white; display:flex; flex-direction:column; }
#contextSetup .context-choice { display:flex; gap:14px; align-items:flex-start; flex:1; padding:20px 18px 14px; cursor:pointer; font-size:18px; font-weight:400; }
#contextSetup .context-choice strong { display:block; margin-bottom:8px; color:#12171c; font-size:20px; }
#contextSetup .context-description { display:block; font-size:17px; line-height:1.5; color:#52616c; }
#contextSetup input[type="checkbox"] { appearance:auto; flex:0 0 20px; width:20px; height:20px; margin:4px 0 0; accent-color:#8c193e; }
#contextSetup .context-card-footer { padding:0 18px 18px 52px; }
#contextSetup .context-badge { display:inline-block; font-size:16px; font-weight:600; padding:4px 9px; border-radius:5px; background:#f0f2f4; color:#46545e; line-height:1.4; }
#contextSetup .context-badge[data-tone="ready"] { background:#e6f3eb; color:#1c603e; }
#contextSetup .context-badge[data-tone="attention"] { background:#fff1d5; color:#765000; }
#contextSetup .context-count { font-size:16px; color:#52616c; margin:8px 0 0; overflow-wrap:anywhere; }
#contextSetup .context-link { display:block; margin-top:8px; padding:8px 0; border:0; background:none; color:#8c193e; font:inherit; font-size:16px; font-weight:650; text-decoration:underline; cursor:pointer; text-align:left; }
#contextSetup .context-consent { margin:24px 0 18px; }
#contextSetup .context-check { display:flex; gap:12px; align-items:flex-start; margin:16px 0; font-weight:400; font-size:18px; }
#contextSetup .context-action-row { display:flex; align-items:center; flex-wrap:wrap; gap:14px 20px; }
#contextSetup .context-action-row p { margin:0; flex:1; min-width:200px; font-size:17px; }
#contextSetup .context-prepare-followup { flex-direction:column; align-items:flex-start; margin-top:16px; }
#contextSetup .context-prepare-followup > p { flex:none; min-width:0; width:100%; margin:0; }
#contextSetup .btn.context-primary { background:#8c193e; color:#fff; border:1px solid #8c193e; border-radius:8px; padding:12px 22px; min-height:48px; font-family:inherit; font-weight:700; font-size:18px; cursor:pointer; }
#contextSetup .btn:disabled { opacity:.55; cursor:wait; }
#contextSetup .context-note { color:#52616c; font-size:16px; margin:12px 0 0; line-height:1.5; }
#contextSetup .context-advanced { border-top:1px solid #d9dfe4; margin-top:24px; padding-top:6px; }
#contextSetup summary { padding:14px 0; font-size:18px; font-weight:650; cursor:pointer; }
#contextSetup .context-nested { border-top:1px solid #e5e9ed; margin-top:14px; }
#contextSetup .context-nested p, #contextSetup .context-nested li { font-size:17px; }
#contextSetup .context-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#contextSetup .field { margin:12px 0 18px; }
#contextSetup .field label { display:block; margin-bottom:8px; font-size:18px; font-weight:650; }
#contextSetup input[type="number"], #contextSetup input[type="text"] { font:inherit; color:inherit; border:1px solid #aeb9c2; border-radius:8px; min-height:48px; padding:10px 12px; max-width:100%; background:#fff; }
#contextSetup input[type="number"] { width:130px; }
#contextSetup input[type="text"] { width:100%; }
#contextSetup code { font-size:16px; overflow-wrap:anywhere; }
#contextSetup :is(input,button,summary,a):focus-visible { outline:3px solid #3769b5; outline-offset:4px; }
#contextSetup ul { padding-left:24px; }
@media(max-width:1100px) { #contextSetup .context-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) { #contextSetup .context-card-grid, #contextSetup .context-settings-grid { grid-template-columns:1fr; } #contextSetup .context-action-row { align-items:stretch; flex-direction:column; } }
/* Share description/footer tracks so status badges line up within each row.
   Footer text can wrap without pushing only that card's badge upwards. */
@supports (grid-template-rows:subgrid) {
  #contextSetup .context-card {
    display:grid;
    grid-row:span 2;
    grid-template-rows:subgrid;
    row-gap:0;
  }
}
/* Native chooser triggers and the accessible server-side folder browser. */
#contextSetup select { font:inherit; color:inherit; background:white; border:1px solid #aeb9c2; border-radius:8px; padding:10px 12px; min-height:48px; max-width:100%; }
#contextSetup .context-picker-field { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
#contextSetup .context-picker-field input { flex:1; width:auto; min-width:180px; }
#contextSetup .context-picker-field .btn, #contextSetup dialog .btn { font-size:17px; font-family:inherit; padding:10px 14px; min-height:44px; border:1px solid #8c193e; border-radius:8px; color:#8c193e; background:#fff; cursor:pointer; }
#contextSetup .context-picker-field .context-link { margin:0; padding:10px 0; }
#contextSetup dialog { width:min(700px,calc(100vw - 32px)); max-height:85vh; padding:24px; border:1px solid #d9dfe4; border-radius:14px; color:#202b33; background:white; box-shadow:0 16px 50px #0003; overflow:auto; }
#contextSetup dialog::backdrop { background:#12202c88; }
#contextSetup dialog .context-primary { color:#fff; background:#8c193e; }
#contextSetup .context-folder-navigation, #contextSetup .context-folder-actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
#contextSetup .context-folder-actions { justify-content:flex-end; }
#contextSetup .context-folder-path { font-size:16px; overflow-wrap:anywhere; color:#52616c; }
#contextSetup .context-folder-entries { max-height:35vh; overflow:auto; border-block:1px solid #e0e5e9; }
#contextSetup .context-folder-entry { display:block; width:100%; padding:12px; text-align:left; background:white; border:0; border-bottom:1px solid #eef0f2; font:inherit; font-size:17px; color:#8c193e; cursor:pointer; overflow-wrap:anywhere; }
#contextSetup .context-folder-entry:hover { background:#f5f7f9; }
#contextSetup dialog button:disabled { opacity:.5; cursor:default; }
