* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}
body {
    background-color: #f5f5f5;
    padding: 8px 2.5vw;
    line-height: 1.6;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}
.container {
    max-width: 1008px;
    margin: 0 auto;
    background-color: white;
    border: 2px solid #000;
    padding: 14px 24px 6px 24px;
    height: calc(100vh - 16px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.page-title {
    position: absolute;
    top: 8px;
    left: 20px;
    line-height: 1.2;
    z-index: 10;
}
.page-title .brand {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 2px;
    display: block;
}
.page-title .tagline {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 3px;
    display: block;
    font-variant: small-caps;
}

/* ── Input Section ── */
.input-section { display: flex; gap: 10px; margin-bottom: 10px; flex-shrink: 0; }
/* ── NEW: Prompt wrapper with inline reset button ── */
.prompt-wrapper {
    flex: 3;
    position: relative;
    border: 2px solid #000;
    display: flex;
    flex-direction: column;
}
.prompt-input-inner {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    padding: 10px;
    padding-bottom: 32px;
    border: none;
    resize: vertical;
    min-height: 45px;
    background: white;
    outline: none;
    flex: 1;
}
.prompt-input-inner::placeholder { font-size: 11px; color: #999; text-transform: uppercase; }

.prompt-inline-reset {
    position: absolute;
    bottom: 0;
    right: 0;
    border: none;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.prompt-inline-reset:hover { background: #f0f0f0; }
.prompt-inline-reset .pi-icon { font-size: 13px; font-weight: bold; line-height: 1; }
.controls { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.control-box { flex: 1; border: 2px solid #000; padding: 4px; background: white; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 45px; }
.control-label-wrapper { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; width: 100%; }
.control-extremes { font-weight: 400; font-size: 11px; color: #555; text-transform: uppercase; }
.control-label { font-size: 11px; font-weight: bold; text-transform: uppercase; flex-shrink: 0; }
.slider { width: 100%; height: 3px; border-radius: 2px; background: #ddd; outline: none; -webkit-appearance: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #000; cursor: pointer; border: 2px solid white; }
.slider::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #000; cursor: pointer; border: 2px solid white; }

/* ── Section Titles ── */
.section-title { font-size: 11px; font-weight: bold; text-transform: uppercase; margin-bottom: 3px; height: 14px; display: flex; align-items: center; }
.section-title span.non-bold { font-weight: normal; }

/* ── Selection Grids ── */
.models-grid, .workflows-grid, .pods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; flex-shrink: 0; }

.model-box, .workflow-box, .pod-box {
    border: 2px solid #000; padding: 0; text-align: center; cursor: pointer;
    background: white; transition: all 0.2s; height: 90px; display: flex;
    flex-direction: column; justify-content: center; align-items: center;
    overflow: hidden; position: relative;
}
.model-box:hover, .workflow-box:hover, .pod-box:hover { background: #f0f0f0; }
.model-box.selected, .workflow-box.selected, .pod-box.selected { background: #000; color: white; }
.model-box.selected .model-icon, .workflow-box.selected .workflow-icon, .pod-box.selected .pod-icon { filter: brightness(0) invert(1); }

.model-icon { width: 50px; height: 50px; object-fit: contain; margin-top: -4px; }
.model-name, .workflow-name, .pod-name { font-size: 11px; font-weight: bold; text-transform: uppercase; position: absolute; bottom: 4px; width: 100%; padding: 0 2px; }
.workflow-icon { width: 220px; height: 77px; object-fit: contain; margin-bottom: 5px; }
.pod-icon { width: 120px; height: 56px; object-fit: contain; margin-bottom: 5px; }

/* ── Execute ── */
.execute-section { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 2px; flex-shrink: 0; }
.execute-wrapper { grid-column: 4; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.execute-arrow { font-size: 50px; font-weight: 900; position: relative; top: -4px; }
.execute-btn { border: 2px solid #000; padding: 8px; background: #000; color: white; font-size: 13px; font-weight: bold; text-transform: uppercase; cursor: pointer; transition: all 0.2s; width: 229px; }
.execute-btn:hover { background: #333; }

/* ══════════════════════════════════════════════
   OUTPUT SECTION
   ══════════════════════════════════════════════ */

.section-title.output-title { margin-top: 4px; margin-bottom: 6px; }

.output-row {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 10px;
    width: 100%;
}

.output-box {
    border: 2px solid #000;
    padding: 0;
    background: white;
    font-size: 11px;
    overflow-y: auto;
    width: 100%;
    min-height: 200px;
    max-height: 500px;
}

.placeholder-text { color: #999; padding: 10px; font-size: 11px; text-transform: uppercase; display: block; }

/* ── Output Header ── */
.out-hdr { background: #000; color: #fff; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #000; }
.out-brand { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.out-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; }
.out-query { background: #f5f5f5; padding: 6px 12px; border-bottom: 2px solid #000; font-size: 11px; text-transform: uppercase; }
.out-query-lbl { font-weight: 700; }
.out-query-txt { color: #333; font-weight: 600; }
.out-pills { background: #f5f5f5; padding: 5px 12px; border-bottom: 2px solid #000; font-size: 11px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; text-transform: uppercase; }
.out-pill { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; padding: 2px 6px; border: 2px solid #000; text-transform: uppercase; }
.out-pill-blk { background: #000; color: #fff; }
.out-pill-wht { background: #fff; color: #000; }
.out-pill-lbl { font-weight: 700; color: #888; font-size: 10px; letter-spacing: 0.1em; }

/* ── Per-Output Block ── */
.out-block { border-bottom: 2px solid #000; }
.out-block:last-child { border-bottom: none; }
.out-block-hdr { background: #f0f0f0; padding: 6px 10px; border-bottom: 2px solid #000; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11px; text-transform: uppercase; }
.out-tag { font-weight: 700; letter-spacing: 0.05em; }
.out-arr { color: #888; }
.out-role { color: #888; font-weight: 400; }
.out-final { font-size: 10px; font-weight: 700; padding: 1px 6px; border: 2px solid #000; background: #000; color: #fff; letter-spacing: 0.05em; }
.out-failover { font-size: 10px; color: #8b2020; font-weight: 700; margin-left: auto; }

/* ── FIX #6: Output body — tight line spacing ── */
.out-block-body {
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.25;
    color: #333;
}
.out-block-body strong { display: inline; }
.out-block-body br + br { display: none; }
.out-block-body div[style] { margin: 0 !important; }
.out-block-body p { margin: 0; }

.out-error { padding: 12px; color: #8b2020; font-size: 11px; text-transform: uppercase; }

/* ── Action Controls ── */
.action-controls { display: flex; flex-direction: column; gap: 8px; }
.action-button { border: 2px solid #000; padding: 8px 12px; background: white; font-size: 11px; font-weight: bold; text-transform: uppercase; cursor: pointer; transition: all 0.2s; width: 70px; }
.action-button:hover { background: #f0f0f0; }

/* ══════════════════════════════════════════════
   RESULTS FORMAT SECTION
   ══════════════════════════════════════════════ */

.fmt-wrapper { border: 2px solid #000; background: white; }
.fmt-bar { display: flex; }

/* ── Format buttons — stacked icon above label like pod boxes ── */
.fmt-btn {
    flex: 1; padding: 6px 4px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; text-align: center; cursor: pointer;
    border: none; border-right: 2px solid #000; background: #fff; color: #000;
    font-family: 'Montserrat', sans-serif; transition: all 0.2s; letter-spacing: 0.05em;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 64px;
}
.fmt-btn:last-child { border-right: none; }
.fmt-btn:hover { background: #f0f0f0; }
.fmt-btn.active { background: #000; color: #fff; }
.fmt-btn.active .fmt-icon { filter: brightness(0) invert(1); }
.fmt-btn.disabled { opacity: 0.25; cursor: not-allowed; pointer-events: none; }
.fmt-icon {
    height: 34px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    flex-shrink: 0;
}
.fmt-area { font-size: 11px; }
.fmt-loading { padding: 12px; color: #999; font-size: 11px; text-transform: uppercase; }

/* ── Reset Button ── */
.reset-btn-wrapper { display: flex; align-items: flex-start; }
.reset-button {
    width: 70px; height: 64px; border: 2px solid #000; background: white; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 4px; font-family: 'Montserrat', sans-serif; transition: all 0.2s;
}
.reset-button:hover { background: #f0f0f0; }
.reset-icon { font-size: 18px; font-weight: bold; line-height: 1; }
.reset-text { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }


/* ══════════════════════════════════════════════
   COMPARE FORMAT
   FIX #2: Top dividing line via border-top on grid
   ══════════════════════════════════════════════ */

.cmp-grid { display: grid; width: 100%; border-top: 2px solid #000; align-items: stretch; }
.cmp-col { border-right: 2px solid #000; display: flex; flex-direction: column; }
.cmp-col:last-child { border-right: none; }
.cmp-col-hdr {
    background: #f0f0f0;
    padding: 6px 10px;
    border-bottom: 2px solid #000;
}
.cmp-role { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: #888; margin-bottom: 2px; }
.cmp-stance { font-size: 11px; font-weight: 700; color: #000; }
.cmp-body { padding: 8px 10px; font-size: 11px; line-height: 1.3; color: #333; flex: 1; }


/* ══════════════════════════════════════════════
   RANK FORMAT
   FIX #3: Approach column capped at 30% width
   ══════════════════════════════════════════════ */

.rnk-row {
    display: grid;
    grid-template-columns: 28px minmax(60px, 0.25fr) 46px 1fr;
    border-bottom: 1px solid #e0e0e0;
}
.rnk-row:last-child { border-bottom: none; }
.rnk-hdr {
    background: #f0f0f0;
    color: #000;
    font-weight: 700;
    border-bottom: 2px solid #000;
    border-top: 2px solid #000;
}
.rnk-hdr .rnk-cell { border-right: 2px solid #ddd; }
.rnk-hdr .rnk-cell:last-child { border-right: none; }
.rnk-cell {
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.rnk-num { text-align: center; font-weight: 700; background: #fafafa; border-right: 2px solid #000; }
.rnk-score { text-align: center; font-weight: 700; }


/* ══════════════════════════════════════════════
   CHECKBOX FORMAT
   FIX #4: Grey fill on model column headers,
           single-line factor labels
   ══════════════════════════════════════════════ */

.chk-row { display: grid; border-bottom: 1px solid #e0e0e0; }
.chk-row:last-child { border-bottom: none; }
.chk-hdr {
    background: #e0e0e0;
    color: #000;
    font-weight: 700;
    border-bottom: 2px solid #000;
    border-top: 2px solid #000;
}
.chk-hdr .chk-cell {
    border-right: 2px solid #ccc;
    background: #e0e0e0;
}
.chk-hdr .chk-cell:last-child { border-right: none; }
.chk-cell { padding: 5px 8px; font-size: 11px; text-align: center; }
.chk-cell:first-child {
    text-align: left;
    font-weight: 700;
    background: #fafafa;
    border-right: 2px solid #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chk-pos { color: #1a7a3c; font-weight: 700; }
.chk-neg { color: #8b2020; font-weight: 700; }
.chk-neu { color: #888; }


/* ══════════════════════════════════════════════
   REASONS FORMAT
   FIX #5: Grey fill model labels, black dividers,
           pros/cons non-bold black, conclusion bold
   ══════════════════════════════════════════════ */

.rsn-grid { display: grid; width: 100%; border-top: 2px solid #000; }
.rsn-col { border-right: 2px solid #000; padding: 0; }
.rsn-col:last-child { border-right: none; }
.rsn-hdr {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    background: #e0e0e0;
    border-bottom: 2px solid #000;
}
.rsn-body { padding: 8px 10px; }
.rsn-pro {
    color: #000;
    font-size: 11px;
    margin: 2px 0;
    font-weight: 400;
    line-height: 1.3;
}
.rsn-con {
    color: #000;
    font-size: 11px;
    margin: 2px 0;
    font-weight: 400;
    line-height: 1.3;
}
.rsn-conc {
    font-size: 11px;
    font-weight: 700;
    padding-top: 6px;
    border-top: 2px solid #000;
    margin-top: 6px;
    color: #000;
    line-height: 1.3;
}
