h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Minimal styling — spec-04 is a "minimal frontend" phase, so this is plain
   CSS rather than pulling in a full framework for a handful of screens. */

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    color: #1a1a1a;
}

.form-floating,
.form-control,
input[type="text"],
input[type="email"],
textarea.wide-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #bbb;
    border-radius: 6px;
}

.mt-1 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.5rem; }

.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary, .btn.btn-primary, button.btn-primary {
    background: #0b5ed7;
    color: white;
}

.btn-primary:disabled {
    background: #9db8e8;
    cursor: not-allowed;
}

.btn-secondary, .btn.btn-secondary {
    background: #eee;
    color: #1a1a1a;
}

.btn-lg { font-size: 1.1rem; padding: 0.7rem 1.4rem; }

.text-danger { color: #c62828; }

.template-hint {
    background: #f2f6fc;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #444;
}

.expectation-note {
    background: #f7f7f2;
    border-left: 3px solid #d8d0b0;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: #555;
}

.situation-list {
    list-style: none;
    padding: 0;
}

.situation-list li {
    border-bottom: 1px solid #eee;
    padding: 0.6rem 0;
}

.situation-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.situation-title { font-weight: 600; }
.situation-meta { color: #777; font-size: 0.9rem; white-space: nowrap; }

.fact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.fact-list li.fact {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border-radius: 6px;
    background: #f5f7fa;
}

.fact-list li.fact.low-confidence {
    background: #fbfbfb;
    border: 1px dashed #ccc;
    opacity: 0.75;
}

.fact-content { display: block; }

.fact-meta {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.15rem;
}

.low-confidence-badge, .acute-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.low-confidence-badge { background: #fff0d9; color: #8a5a00; }
.acute-badge { background: #fde8e8; color: #a02020; }
.recurrence-badge { background: #e6f2ea; color: #1f6b45; }

.shift-timeline { margin-bottom: 1.5rem; }
.shift-timeline ol { list-style: none; padding: 0; margin: 0; }
.shift-timeline li.fact {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    border-radius: 6px;
    background: #f5f7fa;
    border-left: 3px solid #b7c4d6;
}
.shift-timeline li.fact.low-confidence {
    background: #fbfbfb;
    border: 1px dashed #ccc;
    opacity: 0.75;
}
.shift-timeline .fact-meta {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.1rem;
}

/* Pattern cards (spec-06 Part D) — deliberately distinct from the ambient,
   always-on Theme/Recurrence display above: a solid border, a question-framed
   headline, and explicit actions mark this as a proposed claim awaiting the
   user's confirm/dismiss response, per DOMAIN_MODEL.md's Pattern delivery
   rule, not just more organized restatement of what the user said. */
.pattern-card {
    border: 1px solid #c9d6ea;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: #fbfcfe;
}

.pattern-question {
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.pattern-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.pattern-status-label {
    color: #555;
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

/* Insight cards (spec-07 Part D) — deliberately distinct from BOTH the
   ambient Theme/Recurrence display AND Pattern cards: Insight is the
   rarest, most interpretive claim level (DOMAIN_MODEL.md), so it reads as
   a hedged hypothesis first (italic claim + an explicit "hedged
   hypothesis" badge) rather than a plain noticed correlation. A dashed,
   warmer-toned border (vs. Pattern's solid blue-ish one) keeps all three
   tiers — plain facts, proposed patterns, rare hedged insights —
   legible at a glance next to each other. */
.insight-card {
    border: 1px dashed #cbb26a;
    border-left: 4px solid #b8934a;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: #fdf9f0;
}

.insight-claim {
    font-weight: 600;
    font-style: italic;
    margin: 0 0 0.5rem;
}

.insight-badge {
    display: inline-block;
    margin-left: 0.4rem;
    background: #f3e6c8;
    color: #7a5b12;
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
}

.insight-evidence-label {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0 0.2rem;
}

.insight-evidence-list {
    margin: 0 0 0.4rem;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: #444;
}

.insight-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.insight-status-label {
    color: #555;
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

/* Decision Support (spec-07 Part E) — structurally different from Insight
   cards: this isn't a confirmable claim, it's a requested summary, so it
   reads as plain organized sections rather than cards with actions. */
.decision-support section { margin-bottom: 1.25rem; }
.decision-support h2 { margin-bottom: 0.4rem; font-size: 1.1rem; }
.decision-support ul { padding-left: 1.2rem; margin: 0; }
.decision-support .unresolved {
    background: #f7f7f2;
    border-left: 3px solid #d8d0b0;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
}

/* Retrospective (spec-07 Part F) — a closing narrative, not a list of
   items, so it's rendered as plain prose with paragraph breaks preserved. */
.retrospective-narrative {
    white-space: pre-wrap;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Silence-check cards (spec-08.2 Part E) — a fourth visual tier, distinct
   from all three above: solid grey-green border (cooler and quieter than
   Pattern's blue-ish or Insight's warm dashed one), no evidence list (there
   is no "based on N entries" for an absence — DOMAIN_MODEL.md), and a
   free-text response field instead of Confirm/Dismiss, since this is a
   plain question, not a claim awaiting a yes/no. */
.silence-check-card {
    border: 1px solid #b9c9c2;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: #f6faf8;
}

.silence-check-question {
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.silence-check-meta {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.6rem;
}

.silence-check-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.silence-check-status-label {
    color: #555;
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}

.muted { color: #888; }

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: #0b5ed7;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}