/* Dalīl al-kalima pages. Builds on /static/styles.css; uses only its tokens. */

/* The display face draws "īl" so that it reads as "t"; set only the ī in the reading serif. */
.display-title .macron { font-family: var(--font-serif); }

.kalima-section .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(8px, 2vw, 16px); }
.kalima-prose { max-width: 44rem; margin-top: 24px; }
.kalima-prose p { margin: 0 0 1.05em; font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.7; color: rgb(var(--c-ink-soft)); }
.kalima-prose p strong { color: rgb(var(--c-ink)); font-weight: 600; }

.case-list { max-width: 44rem; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: case; }
.case-list li { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid rgb(var(--c-line)); font-family: var(--font-serif); font-size: 1.04rem; line-height: 1.6; color: rgb(var(--c-ink-soft)); counter-increment: case; }
.case-list li::before { content: counter(case); position: absolute; left: 0; top: 12px; font-family: var(--font-mono); font-size: 0.8rem; color: rgb(var(--c-oxford)); }
.case-list li strong { color: rgb(var(--c-ink)); font-weight: 600; }

/* Tool cards on the overview */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); margin-top: 28px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid rgb(var(--c-line-strong)); border-radius: var(--radius); background: rgb(var(--c-paper)); }
.tool-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.24rem; color: rgb(var(--c-ink)); }
.tool-card p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: rgb(var(--c-ink-soft)); }
.tool-card .link-accent { margin-top: auto; font-family: var(--font-sans); font-size: 0.9rem; }

/* Status tags */
.status { display: inline-block; padding: 2px 8px; border: 1px solid currentColor; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: var(--track-mono); white-space: nowrap; }
.status-good { color: rgb(var(--c-good)); }
.status-warn { color: rgb(var(--c-warn)); }

/* Results table */
.table-scroll { max-width: 100%; overflow-x: auto; margin-top: 24px; }
.kalima-table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.92rem; }
.kalima-table th, .kalima-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid rgb(var(--c-line)); text-align: left; vertical-align: top; line-height: 1.55; color: rgb(var(--c-ink-soft)); }
.kalima-table th { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: rgb(var(--c-muted)); border-bottom-color: rgb(var(--c-ink)); }
.kalima-table td:first-child { color: rgb(var(--c-ink)); }

/* Problem cards (one per prover input) */
.problem-list { display: grid; gap: 20px; margin-top: 28px; }
.problem-card { padding: 22px; border: 1px solid rgb(var(--c-line-strong)); border-radius: var(--radius); }
.problem-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.problem-card h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.16rem; color: rgb(var(--c-ink)); }
.problem-card p { margin: 10px 0 0; max-width: 46rem; font-size: 0.95rem; line-height: 1.65; color: rgb(var(--c-ink-soft)); }
.problem-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 16px; font-size: 0.88rem; }
.problem-card details { margin-top: 14px; }
.problem-card summary { cursor: pointer; font-family: var(--font-sans); font-size: 0.86rem; color: rgb(var(--c-oxford)); }

/* Formal statements rendered from the proof guides */
.formal { max-width: 52rem; margin-top: 8px; }
.formal h3 { margin: 32px 0 8px; font-family: var(--font-serif); font-weight: 600; font-size: 1.14rem; color: rgb(var(--c-ink)); }
.formal h4 { margin: 24px 0 6px; font-family: var(--font-sans); font-weight: 600; font-size: 0.96rem; color: rgb(var(--c-ink)); }
.formal p, .formal li { font-size: 0.95rem; line-height: 1.65; color: rgb(var(--c-ink-soft)); }
.formal p { margin: 8px 0; }
.formal ul, .formal ol { margin: 8px 0; padding-left: 1.4em; }
.formal li { margin: 3px 0; }
.formal strong { color: rgb(var(--c-ink)); font-weight: 600; }
.formal table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 14px 0; font-size: 0.9rem; }
.formal th, .formal td { padding: 8px 12px 8px 0; border-bottom: 1px solid rgb(var(--c-line)); text-align: left; vertical-align: top; color: rgb(var(--c-ink-soft)); }
.formal th { color: rgb(var(--c-ink)); font-weight: 600; }
pre.code { max-width: 100%; overflow-x: auto; margin: 12px 0 6px; padding: 14px 16px; border-left: 2px solid rgb(var(--c-oxford)); background: rgb(var(--c-paper-2)); font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.6; color: rgb(var(--c-ink)); white-space: pre; }
pre.code.source { max-height: 420px; }
.formal :not(pre) > code, .kalima-prose code, .problem-card :not(pre) > code, .kalima-table code { font-family: var(--font-mono); font-size: 0.86em; overflow-wrap: anywhere; }

.premise-block { padding-top: 12px; border-top: 1px solid rgb(var(--c-line)); margin-top: 40px; }
.premise-block:first-of-type { border-top: 0; margin-top: 12px; }
.premise-block > h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: rgb(var(--c-ink)); }
.premise-block > .apparatus { margin: 6px 0 0; }

/* Embedded runner: reuses the homepage runner classes; only spacing here. */
.kalima-runner { margin-top: 24px; }
.kalima-runner textarea { min-height: 360px; }
.loaded-name { font-family: var(--font-mono); font-size: 0.74rem; color: rgb(var(--c-muted)); }

.z3-note { font-size: 0.82rem; color: rgb(var(--c-muted)); }
.back-link { display: inline-block; margin-top: 18px; font-family: var(--font-sans); font-size: 0.9rem; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
}
.section-subtitle { margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid rgb(var(--c-line)); font-family: var(--font-serif); font-weight: 600; font-size: 1.24rem; color: rgb(var(--c-ink)); }
