/* Shared tokens, nav, hero, tabs and the code viewer are in shared/site.css. */

.tab-content { display: none; animation: fadeUp 0.35s ease both; }
.tab-content.active { display: block; }
.tab-note { font-size: 0.875rem; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }

/* ── Digit panel ── */
.digit-panel {
    border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface);
}
.digit-toolbar {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
}
.digit-ctrl-btn {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 14px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.digit-ctrl-btn:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.digit-status { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-left: auto; }

.digit-body { display: grid; grid-template-columns: 400px 1fr; gap: 0; }
.digit-canvas-wrap { border-right: 1px solid var(--border); background: #000; }
#drawCanvas {
    display: block; width: 100%; aspect-ratio: 1; height: auto;
    cursor: crosshair; touch-action: none; background: #000;
}

.digit-results { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.digit-pred {
    display: flex; align-items: baseline; gap: 16px;
}
.digit-pred-num {
    font-family: var(--font-display); font-weight: 800; font-size: 3.5rem;
    color: var(--accent); letter-spacing: -0.03em; line-height: 1;
}
.digit-pred-conf { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.digit-pred-conf b { color: var(--text); font-weight: 400; }

.prob-bars { display: flex; flex-direction: column; gap: 6px; }
.prob-row { display: grid; grid-template-columns: 16px 1fr 42px; align-items: center; gap: 8px; }
.prob-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-align: right; }
.prob-label.top { color: var(--accent); font-weight: 700; }
.prob-track { display: block; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.prob-fill { display: block; height: 100%; background: var(--border); border-radius: 4px; transition: width 0.25s ease; }
.prob-fill.top { background: var(--accent); }
.prob-pct { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-align: right; }

/* ── Architecture cards ── */
.ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ds-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: border-color 0.2s; }
.ds-card:hover { border-color: var(--accent); }
.ds-icon { font-size: 1.4rem; margin-bottom: 12px; }
.ds-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; color: var(--text); }
.ds-desc { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.ds-desc code { color: var(--accent); background: var(--accent-dim); padding: 1px 6px; border-radius: 4px; font-size: 0.875rem; }

/* ── Network diagram ── */
.net-diagram {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: 1px solid var(--border); border-radius: 14px; padding: 28px 20px; margin-bottom: 24px;
    background: var(--surface); overflow-x: auto;
}
.net-layer { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.net-layer-box {
    font-family: var(--font-mono); font-size: 0.75rem; color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px;
    background: rgba(255,255,255,0.03); white-space: nowrap;
}
.net-layer-box.output { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.net-layer-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.net-arrow { color: var(--muted); font-size: 1.1rem; flex-shrink: 0; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 760px) {
    .ds-grid { grid-template-columns: 1fr; }
    .digit-body { grid-template-columns: 1fr; }
    .digit-canvas-wrap { border-right: none; border-bottom: 1px solid var(--border); }
    .net-diagram { justify-content: flex-start; }
}
