/* ReliefSignal custom brand layer — intentionally overrides default Bootstrap appearance. */
:root {
    --rs-ink: #10221f;
    --rs-muted: #5f716d;
    --rs-primary: #0f766e;
    --rs-secondary: #f97316;
    --rs-accent: #14b8a6;
    --rs-cream: #fff8ed;
    --rs-mint: #e7fbf5;
    --rs-surface: #ffffff;
    --rs-line: rgba(16, 34, 31, 0.12);
    --rs-shadow: 0 24px 80px rgba(15, 118, 110, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #fffdf7 0%, #f5fbf7 54%, #fff8ed 100%);
    color: var(--rs-ink);
    min-height: 100vh;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 2000;
    padding: .75rem 1rem;
    background: var(--rs-ink);
    color: #fff;
    border-radius: 999px;
    transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

.app-nav {
    background: rgba(255, 253, 247, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(16, 34, 31, 0.08);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--rs-ink) !important;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--rs-primary), var(--rs-secondary));
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.28);
    font-size: .82rem;
}

.nav-link {
    color: rgba(16, 34, 31, 0.72) !important;
    font-weight: 700;
}
.nav-link:hover, .nav-link:focus { color: var(--rs-primary) !important; }

.btn {
    border-radius: 999px;
    font-weight: 800;
    padding: .85rem 1.3rem;
}
.btn-sm { padding: .45rem .85rem; }
.btn-signal {
    background: linear-gradient(135deg, var(--rs-primary), #0d9488);
    color: #fff;
    border: 0;
    box-shadow: 0 14px 34px rgba(15, 118, 110, 0.24);
}
.btn-signal:hover, .btn-signal:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(15, 118, 110, 0.30);
}
.btn-ghost, .btn-outline-signal {
    border: 1px solid rgba(15, 118, 110, .22);
    color: var(--rs-primary);
    background: rgba(255,255,255,.68);
}
.btn-ghost:hover, .btn-outline-signal:hover { background: var(--rs-mint); color: var(--rs-ink); }

.message-stack { position: fixed; top: 5.5rem; right: 0; left: 0; z-index: 1080; pointer-events: none; }
.message-stack .alert { max-width: 760px; margin-left: auto; pointer-events: auto; border-radius: 1rem; }

.hero-section {
    background:
        radial-gradient(circle at 16% 10%, rgba(249, 115, 22, .18), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(20, 184, 166, .22), transparent 30%),
        linear-gradient(135deg, #fff8ed 0%, #ecfff9 100%);
}
.py-lg-6 { padding-top: 6rem !important; padding-bottom: 6rem !important; }

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: .75;
}
.orb-one { width: 18rem; height: 18rem; background: rgba(249,115,22,.16); left: -6rem; top: 6rem; }
.orb-two { width: 22rem; height: 22rem; background: rgba(20,184,166,.18); right: -8rem; bottom: -5rem; }

.eyebrow, .section-kicker, .small-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .77rem;
    font-weight: 900;
    color: var(--rs-primary);
}

.display-title, .page-title, .section-title {
    font-family: "Fraunces", Georgia, serif;
    color: var(--rs-ink);
    letter-spacing: -0.045em;
    line-height: .98;
}
.display-title { font-size: clamp(3rem, 7vw, 6.6rem); max-width: 960px; }
.page-title { font-size: clamp(2.5rem, 5vw, 4.8rem); max-width: 980px; }
.section-title { font-size: clamp(2rem, 4vw, 3.4rem); }
.hero-copy {
    max-width: 720px;
    color: var(--rs-muted);
    font-size: clamp(1.05rem, 1.4vw, 1.28rem);
    line-height: 1.7;
}
.text-muted-custom { color: var(--rs-muted); }

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.hero-proof div {
    min-width: 135px;
    padding: 1rem 1.15rem;
    border: 1px solid var(--rs-line);
    border-radius: 1.25rem;
    background: rgba(255,255,255,.64);
}
.hero-proof strong { display: block; font-size: 1.7rem; color: var(--rs-primary); }
.hero-proof span { color: var(--rs-muted); font-size: .88rem; font-weight: 700; }

.glass-card, .form-panel, .detail-panel, .history-shell, .empty-state, .call-card, .step-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(16, 34, 31, 0.10);
    box-shadow: var(--rs-shadow);
    backdrop-filter: blur(16px);
}
.live-card { border-radius: 2rem; padding: 1.3rem; transform: rotate(1deg); }
.pulse-dot {
    display: inline-block;
    width: .78rem;
    height: .78rem;
    margin-right: .45rem;
    border-radius: 999px;
    background: var(--rs-secondary);
    box-shadow: 0 0 0 .42rem rgba(249,115,22,.16);
}
.status-pill, .score-badge, .mini-flag, .alert-flag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
}
.status-pill { padding: .5rem .75rem; color: #8a3d00; background: #fff0d8; }
.score-badge { padding: .55rem .7rem; color: #07564f; background: var(--rs-mint); }

.transcript-box, .transcript-review {
    border-radius: 1.3rem;
    background: #10221f;
    color: #eaffe9;
    padding: 1rem;
    line-height: 1.65;
}
.transcript-box p:last-child, .transcript-review p:last-child { margin-bottom: 0; }
.metric-tile, .field-tile {
    border-radius: 1.2rem;
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid var(--rs-line);
}
.metric-tile span, .field-tile span { display: block; color: var(--rs-muted); font-size: .82rem; font-weight: 800; }
.metric-tile strong, .field-tile strong { display: block; color: var(--rs-ink); font-size: 1.25rem; margin-top: .25rem; }
.metric-tile.urgent { background: #fff0d8; border-color: rgba(249,115,22,.35); }

.section-pad { padding: 5rem 0; }
.step-card, .call-card, .empty-state { border-radius: 1.5rem; padding: 1.35rem; height: 100%; }
.step-card span { color: var(--rs-secondary); font-weight: 900; }
.step-card h3, .call-card h3 { margin: .7rem 0 .45rem; font-weight: 900; letter-spacing: -.03em; }
.step-card p, .call-card p { color: var(--rs-muted); }
.call-card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.call-card-link:hover .call-card { transform: translateY(-3px); border-color: rgba(15,118,110,.28); }
.call-card, .btn, .step-card { transition: .18s ease; }
.empty-state { text-align: center; max-width: 760px; margin: 0 auto; padding: 3rem; }

.page-hero {
    background: linear-gradient(135deg, #fff8ed 0%, #ecfff9 100%);
    padding: 5rem 0 3rem;
    border-bottom: 1px solid rgba(16,34,31,.08);
}
.page-hero.compact { padding-top: 4rem; }
.detail-hero { background: radial-gradient(circle at 78% 10%, rgba(249,115,22,.15), transparent 25%), linear-gradient(135deg, #ecfff9, #fff8ed); }

.form-panel, .detail-panel, .history-shell { border-radius: 1.6rem; padding: 1.4rem; }
.panel-heading {
    display: flex;
    align-items: baseline;
    gap: .8rem;
    margin-bottom: 1.2rem;
}
.panel-heading span { color: var(--rs-secondary); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; font-weight: 900; letter-spacing: -.03em; }
.form-label { font-weight: 850; color: var(--rs-ink); }
.form-control, .form-select {
    border-radius: 1rem;
    border: 1px solid rgba(16,34,31,.14);
    padding: .85rem 1rem;
    background-color: rgba(255,255,255,.82);
}
.form-control:focus, .form-select:focus {
    border-color: var(--rs-accent);
    box-shadow: 0 0 0 .22rem rgba(20,184,166,.18);
}
.form-hint, .invalid-note { color: var(--rs-muted); font-size: .9rem; margin-top: .5rem; }
.invalid-note { color: #b42318; font-weight: 800; }
.checks-grid { display: grid; gap: .9rem; }
.signal-check {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 1rem;
    background: #fffdf8;
    border: 1px solid var(--rs-line);
    font-weight: 850;
}
.form-check-input:checked { background-color: var(--rs-primary); border-color: var(--rs-primary); }

.history-table { margin: 0; }
.history-table thead th {
    color: var(--rs-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    border-bottom-color: var(--rs-line);
}
.history-table td { padding: 1rem .75rem; border-color: rgba(16,34,31,.08); }
.history-table td span { color: var(--rs-muted); font-size: .9rem; }
.mini-flag { padding: .35rem .55rem; margin: .1rem; color: #8a3d00; background: #fff0d8; }
.alert-flag { padding: .65rem .8rem; color: #8a3d00; background: #fff0d8; }
.flag-stack { display: flex; flex-wrap: wrap; gap: .5rem; }

.score-circle {
    width: 8.25rem;
    height: 8.25rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-align: center;
    background: conic-gradient(var(--rs-primary), var(--rs-accent), var(--rs-secondary), var(--rs-primary));
    color: #fff;
    box-shadow: var(--rs-shadow);
}
.score-circle strong { display: block; font-size: 2rem; line-height: 1; }
.score-circle span { display: block; font-size: .82rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.field-tile.missing { background: #fff7ed; border-color: rgba(249,115,22,.28); }
.field-tile.missing strong { color: #9a3412; }
.readiness-list, .missing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.readiness-list li, .missing-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(16,34,31,.08);
}
.readiness-list span { color: var(--rs-muted); font-weight: 800; }
.readiness-list strong { text-align: right; }
.missing-list li { display: block; color: #9a3412; font-weight: 900; }

.site-footer {
    padding: 2rem 0;
    color: var(--rs-muted);
    border-top: 1px solid rgba(16,34,31,.08);
    background: rgba(255,253,247,.74);
    font-weight: 700;
}

@media (max-width: 767px) {
    .section-pad { padding: 3.25rem 0; }
    .live-card { transform: none; }
    .hero-proof div { flex: 1 1 100%; }
    .empty-state { padding: 2rem 1.2rem; }
    .score-circle { width: 7rem; height: 7rem; }
}


.endpoint-box {
    display: grid;
    gap: .45rem;
    border-radius: 1.1rem;
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid var(--rs-line);
}
.endpoint-box span { color: var(--rs-muted); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.endpoint-box code, .endpoint-code code, .webhook-preview { color: var(--rs-ink); white-space: pre-wrap; word-break: break-word; }
.endpoint-code {
    border-radius: 1.15rem;
    padding: 1rem;
    background: #10221f;
    color: #ecfff9;
    border: 1px solid rgba(255,255,255,.08);
    overflow-x: auto;
}
.endpoint-code code { color: #ecfff9; font-size: .88rem; }
.webhook-preview { display: inline-block; max-width: 18rem; }


.audio-hero {
    background: radial-gradient(circle at 82% 18%, rgba(20,184,166,.22), transparent 28%), linear-gradient(135deg, #fff8ed 0%, #ecfff9 100%);
}
.audio-guardrail {
    border-radius: 1.4rem;
    padding: 1.25rem;
}
.audio-guardrail strong, .audio-tip strong { display: block; color: var(--rs-ink); margin-bottom: .35rem; }
.audio-guardrail p, .audio-tip p { color: var(--rs-muted); margin-bottom: 0; line-height: 1.6; }
.audio-console { border-radius: 1.8rem; padding: 1.45rem; }
.audio-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.audio-source-card {
    border: 1px solid var(--rs-line);
    border-radius: 1.35rem;
    background: #fffdf8;
    padding: 1rem;
}
.audio-source-card h3 {
    margin: .85rem 0 .35rem;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -.025em;
    color: var(--rs-ink);
}
.audio-source-card p { min-height: 3.2rem; color: var(--rs-muted); margin-bottom: .85rem; }
.status-pill.muted { color: var(--rs-muted); background: #f3f4f1; }
.status-pill.active { color: #07564f; background: var(--rs-mint); }
.status-pill.recording { color: #8a3d00; background: #fff0d8; }
.audio-meter {
    height: .78rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16,34,31,.08);
}
.audio-meter span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rs-primary), var(--rs-accent), var(--rs-secondary));
    transition: width .08s linear;
}
.audio-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-outline-signal {
    color: var(--rs-primary);
    border: 1px solid rgba(15,118,110,.28);
    background: rgba(255,255,255,.74);
    font-weight: 900;
    border-radius: 999px;
    padding: .8rem 1.05rem;
}
.btn-outline-signal:hover { color: #fff; background: var(--rs-primary); border-color: var(--rs-primary); }
.btn-outline-signal.danger { color: #9a3412; border-color: rgba(249,115,22,.35); }
.btn-outline-signal.danger:hover { color: #fff; background: var(--rs-secondary); border-color: var(--rs-secondary); }
.reset-btn { border-radius: 999px; padding: .8rem 1.05rem; font-weight: 900; }
.recording-result {
    display: grid;
    gap: 1rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(20,184,166,.22);
    background: #ecfff9;
    padding: 1rem;
}
.recording-result audio { width: 100%; }
.audio-note-list strong { max-width: 12rem; }
.audio-tip {
    border-radius: 1.1rem;
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid var(--rs-line);
}
.audio-tip.subtle { background: #f7fbf7; }
.audio-log {
    list-style-position: inside;
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    color: var(--rs-muted);
    font-weight: 700;
}
.audio-log li {
    border-bottom: 1px solid rgba(16,34,31,.08);
    padding-bottom: .7rem;
}
.audio-log li:last-child { border-bottom: 0; padding-bottom: 0; }

@media (max-width: 991px) {
    .audio-status-grid { grid-template-columns: 1fr; }
    .audio-source-card p { min-height: auto; }
}
