/* --- pane 1: score ---------------------------------------------------- */

.decision-card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: var(--s5);
    background: var(--surface-2);
}

.decision-card.approved {
    border-color: rgba(63, 191, 143, 0.35);
}

.decision-card.declined {
    border-color: rgba(229, 100, 110, 0.35);
}

.decision-head {
    display: flex;
    align-items: center;
    gap: var(--s3);
    margin-bottom: var(--s4);
}

.decision-word {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
}

.approved .decision-word {
    color: var(--approve);
}

.declined .decision-word {
    color: var(--decline);
}

.decision-head .dot {
    width: 9px;
    height: 9px;
}

/* The score gauge. The threshold tick is the entire narrative of this product:
   a decision is a score compared against a published cutoff. Make it visible. */
.gauge {
    margin: var(--s4) 0 var(--s5);
}

.gauge-track {
    position: relative;
    height: 34px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    opacity: 0.35;
    transition: width 500ms var(--ease);
}

.declined .gauge-fill {
    background: linear-gradient(90deg, rgba(229, 100, 110, 0.5), var(--decline));
}

.approved .gauge-fill {
    background: linear-gradient(90deg, rgba(63, 191, 143, 0.4), var(--approve));
}

.gauge-threshold {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--fg);
    z-index: 3;
}

.gauge-threshold::after {
    content: attr(data-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    font-size: 10.5px;
    color: var(--fg);
    white-space: nowrap;
    font-weight: 500;
}

.gauge-value {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    z-index: 4;
    text-shadow: 0 0 8px var(--bg), 0 0 4px var(--bg);
    white-space: nowrap;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--faint);
    margin-top: 22px;
}

.reasons {
    display: grid;
    gap: var(--s2);
    margin-top: var(--s2);
}

.reason {
    display: grid;
    grid-template-columns: 20px 1fr 96px;
    gap: var(--s3);
    align-items: center;
    padding: var(--s2) 0;
    border-bottom: 1px solid var(--line);
}

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

.reason .rank {
    font-size: 11px;
    font-weight: 600;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

.reason .text {
    font-size: 13px;
    color: var(--fg-dim);
}

.reason .code {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--faint);
    display: block;
    margin-top: 2px;
}

.contrib {
    position: relative;
    height: 16px;
}

.contrib .bar {
    position: absolute;
    right: 0;
    top: 3px;
    height: 10px;
    background: var(--decline);
    opacity: 0.75;
    border-radius: 2px;
    transition: width var(--base) var(--ease);
}

.contrib .val {
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.decision-id {
    display: flex;
    align-items: center;
    gap: var(--s2);
    margin-top: var(--s4);
    padding-top: var(--s4);
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.decision-id .mono {
    color: var(--fg);
}

/* --- pane 2: ledger --------------------------------------------------- */

.chain {
    display: grid;
    gap: 0;
    margin: var(--s4) 0;
}

.block {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: var(--s3) var(--s4);
    background: var(--surface-2);
    font-size: 12px;
}

.block.current {
    border-color: var(--accent-dim);
    background: var(--accent-wash);
}

.block .who {
    display: flex;
    justify-content: space-between;
    gap: var(--s3);
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 3px;
}

.block .hashes {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--fg-dim);
}

.link {
    height: 20px;
    margin-left: var(--s5);
    border-left: 2px dashed var(--line-strong);
    position: relative;
}

.link::after {
    content: "prev_hash";
    position: absolute;
    left: 10px;
    top: 2px;
    font-size: 9.5px;
    color: var(--faint);
    font-family: var(--mono);
}

.verify-steps {
    display: grid;
    gap: var(--s2);
    margin-top: var(--s4);
}

.step {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: var(--s3);
    align-items: center;
    padding: 11px var(--s3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-size: 13px;
    opacity: 0.4;
    transition: opacity var(--base) var(--ease), border-color var(--base) var(--ease);
}

.step.active {
    opacity: 1;
}

.step.pass {
    opacity: 1;
    border-color: rgba(63, 191, 143, 0.35);
}

.step.fail {
    opacity: 1;
    border-color: rgba(229, 100, 110, 0.45);
}

.step .mark {
    font-size: 14px;
    text-align: center;
    color: var(--faint);
}

.step.pass .mark {
    color: var(--approve);
}

.step.fail .mark {
    color: var(--decline);
}

.step .detail {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}

.override-box {
    margin-top: var(--s4);
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--warn);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: var(--s4);
}

.override-box .label {
    margin-bottom: var(--s2);
}

.override-box textarea {
    font-family: inherit;
    font-size: 13px;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    width: 100%;
    resize: vertical;
    line-height: 1.5;
}

.override-box textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.override-actor {
    border-top: 1px solid var(--line);
    padding-top: var(--s2);
    margin: var(--s2) 0 var(--s3);
}

/* --- pane 3: fairness ------------------------------------------------- */

.frontier-figure {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
}

.frontier-figure img {
    display: block;
    width: 100%;
}

.headline-claim {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.015em;
    line-height: 1.35;
    padding: var(--s4);
    border: 1px solid var(--accent-dim);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent-wash);
    margin-bottom: var(--s4);
}

.coef {
    font-variant-numeric: tabular-nums;
}

.coef.sig {
    color: var(--warn);
    font-weight: 600;
}

/* --- pane 4: pack ----------------------------------------------------- */

.progress-log {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
    display: grid;
    gap: 5px;
    margin-top: var(--s4);
    min-height: 60px;
}

.progress-log .line.done {
    color: var(--approve);
}

.download-card {
    display: flex;
    align-items: center;
    gap: var(--s4);
    border: 1px solid var(--accent-dim);
    background: var(--accent-wash);
    border-radius: var(--radius-sm);
    padding: var(--s4);
    margin-top: var(--s4);
}

.download-card .doc {
    font-size: 26px;
    line-height: 1;
}

.download-card .meta {
    flex: 1;
}

.download-card .fname {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg);
    word-break: break-all;
}

.download-card .sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 3px;
}

.progress-bar {
    height: 3px;
    background: var(--surface-3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--s3);
}

.progress-bar .fill {
    height: 100%;
    background: var(--accent);
    transition: width var(--base) var(--ease);
}

/* --- drop zone -------------------------------------------------------- */

.dropzone {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: var(--s6) var(--s5);
    text-align: center;
    transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
    cursor: pointer;
}

.dropzone:hover,
.dropzone.over {
    border-color: var(--accent);
    background: var(--accent-wash);
}

.dropzone .big {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: var(--s2);
}
