.btn {
    text-transform: none;
    white-space: normal;
    line-height: 1.35;
    box-sizing: border-box;
}

a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:active,
a.btn-primary:focus {
    color: var(--clean);
}

.table-wrapper table {
    min-width: 600px;
}

.biff-hero {
    padding: 1rem 0 1.5rem;
    gap: 1rem;
}

.shield-disclaimer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--brand-blue-200);
    border-left: 4px solid var(--mint);
    border-radius: 14px;
    padding: 0.875rem 1.15rem;
    box-shadow: 0 4px 18px rgba(18, 38, 72, 0.06);
}

.shield-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(5, 183, 125, 0.12);
    color: #066949;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(5, 183, 125, 0.3);
    letter-spacing: 0.01em;
}

.shield-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    flex-shrink: 0;
}

.shield-copy {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--abyss);
    margin: 0;
    flex: 1 1 320px;
}

.shield-copy strong {
    color: var(--abyss);
}

.non-legal-note {
    width: 100%;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--slate);
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(18, 38, 72, 0.08);
}

.biff-hero h1 {
    font-size: clamp(1.9rem, 4vw + 0.5rem, 3rem);
    margin: 0.15rem 0 0.25rem;
    color: var(--abyss);
}

.biff-hero-lead {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
    color: var(--slate);
    margin: 0;
    max-width: 840px;
    line-height: 1.6;
}

.builder-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 0.5rem;
}

@media (min-width: 980px) {
    .builder-workspace {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 1.75rem;
    }

    .builder-output-panel {
        position: sticky;
        top: 5.25rem;
    }
}

.builder-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 8px 28px rgba(18, 38, 72, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    box-sizing: border-box;
}

.control-block {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.control-step-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.control-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--royal);
    margin: 0;
}

.control-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--abyss);
    margin: 0;
    line-height: 1.35;
}

.control-hint {
    font-size: 0.88rem;
    color: var(--slate);
    margin: 0;
    line-height: 1.45;
}

.provocation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

@media (min-width: 600px) {
    .provocation-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.provocation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--clean);
    border: 1.5px solid var(--cloud);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    margin: 0;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.38;
    color: var(--abyss);
}

.provocation-item:hover {
    border-color: var(--brand-blue-400);
    background: var(--brand-blue-50);
}

.provocation-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0.1rem 0 0;
    accent-color: var(--royal);
    flex-shrink: 0;
    cursor: pointer;
}

.provocation-item.is-checked {
    background: var(--brand-blue-50);
    border-color: var(--brand-blue-500);
    box-shadow: 0 2px 8px rgba(34, 94, 173, 0.1);
}

.topic-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .topic-options-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topic-btn-wide {
        grid-column: 1 / -1;
    }
}

.topic-btn {
    background: var(--clean);
    color: var(--abyss);
    border: 1.5px solid var(--cloud);
    border-radius: 11px;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.topic-btn:hover {
    background: var(--brand-blue-50);
    border-color: var(--brand-blue-400);
    color: var(--abyss);
    transform: none;
}

.topic-btn[aria-checked="true"] {
    background: var(--abyss);
    color: var(--clean);
    border-color: var(--abyss);
    box-shadow: 0 3px 10px rgba(18, 38, 72, 0.18);
}

.topic-btn-pure-bait[aria-checked="true"] {
    background: #6b2d5c;
    border-color: #6b2d5c;
    color: var(--clean);
}

.mode-toggle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 600px) {
    .mode-toggle-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.mode-card-btn {
    background: var(--clean);
    color: var(--abyss);
    border: 2px solid var(--cloud);
    border-radius: 13px;
    padding: 0.85rem 1rem;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    transition: all 0.18s ease;
}

.mode-card-btn:hover {
    background: var(--brand-blue-50);
    border-color: var(--brand-blue-400);
    transform: none;
}

.mode-card-btn[aria-checked="true"] {
    background: var(--brand-blue-50);
    border-color: var(--royal);
    box-shadow: 0 4px 14px rgba(34, 94, 173, 0.14);
}

.mode-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.mode-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--abyss);
    line-height: 1.3;
}

.mode-card-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(34, 94, 173, 0.12);
    color: var(--royal);
    flex-shrink: 0;
}

.mode-card-tag-minimal {
    background: rgba(82, 97, 122, 0.14);
    color: var(--slate);
}

.mode-card-optics {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--slate);
    line-height: 1.42;
}

.optics-explainer-banner {
    background: rgba(239, 245, 254, 0.9);
    border: 1px solid var(--brand-blue-200);
    border-radius: 11px;
    padding: 0.75rem 0.95rem;
    font-size: 0.85rem;
    line-height: 1.48;
    color: var(--abyss);
}

.optics-explainer-banner.is-grey-mode {
    background: rgba(255, 248, 238, 0.95);
    border-color: rgba(224, 148, 78, 0.45);
}

.audit-block {
    border-top: 1px solid rgba(18, 38, 72, 0.1);
    padding-top: 1.15rem;
}

.sample-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.sample-pill-btn {
    background: rgba(18, 38, 72, 0.06);
    color: var(--abyss);
    border: 1px solid rgba(18, 38, 72, 0.14);
    border-radius: 999px;
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: normal;
    cursor: pointer;
}

.sample-pill-btn:hover {
    background: var(--brand-blue-100);
    border-color: var(--brand-blue-400);
    color: var(--abyss);
    transform: none;
}

.draft-textarea {
    width: 100%;
    min-height: 112px;
    box-sizing: border-box;
    border: 1.5px solid var(--cloud);
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    font-size: 0.95rem;
    line-height: 1.5;
    background: var(--clean);
    color: var(--abyss);
}

.draft-textarea:focus {
    border-color: var(--royal);
    box-shadow: 0 0 0 3px rgba(34, 94, 173, 0.12);
}

.draft-metrics-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: var(--slate);
}

.word-counter-pill {
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: rgba(18, 38, 72, 0.07);
    color: var(--abyss);
}

.word-counter-pill.is-good {
    background: rgba(5, 183, 125, 0.15);
    color: #066949;
}

.word-counter-pill.is-over {
    background: rgba(194, 74, 125, 0.15);
    color: #962856;
}

.flagged-phrases-box {
    background: #fff5f8;
    border: 1px solid var(--brand-pink-200);
    border-radius: 11px;
    padding: 0.75rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.flagged-phrases-box.is-clean {
    background: rgba(5, 183, 125, 0.08);
    border-color: rgba(5, 183, 125, 0.28);
}

.flagged-phrases-box.is-idle {
    background: rgba(239, 245, 254, 0.65);
    border-color: var(--brand-blue-200);
}

.flagged-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--abyss);
    margin: 0;
}

.flagged-chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.flagged-chip {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.24rem 0.6rem;
    border-radius: 999px;
    background: rgba(194, 74, 125, 0.14);
    color: #8b1e4b;
    margin: 0;
}

.biff-badges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

@media (max-width: 480px) {
    .biff-badges-grid {
        grid-template-columns: 1fr;
    }
}

.biff-status-card {
    background: var(--clean);
    border: 1.5px solid var(--cloud);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.biff-status-card.status-pass {
    border-color: rgba(5, 183, 125, 0.55);
    background: rgba(242, 253, 249, 0.95);
}

.biff-status-card.status-polish {
    border-color: rgba(224, 148, 78, 0.65);
    background: rgba(255, 250, 243, 0.96);
}

.biff-status-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.biff-pillar-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--abyss);
}

.biff-verdict-pill {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(82, 97, 122, 0.12);
    color: var(--slate);
}

.biff-status-card.status-pass .biff-verdict-pill {
    background: rgba(5, 183, 125, 0.18);
    color: #056847;
}

.biff-status-card.status-polish .biff-verdict-pill {
    background: rgba(224, 148, 78, 0.22);
    color: #934d11;
}

.biff-status-reason {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--slate);
    margin: 0;
}

.output-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(18, 38, 72, 0.08);
    padding-bottom: 0.85rem;
}

.output-panel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--abyss);
    margin: 0;
}

.share-link-btn {
    background: var(--clean);
    color: var(--royal);
    border: 1.5px solid var(--brand-blue-300);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: normal;
    cursor: pointer;
}

.share-link-btn:hover {
    background: var(--brand-blue-50);
    border-color: var(--royal);
    color: var(--abyss);
    transform: none;
}

.share-link-btn.is-copied {
    background: rgba(5, 183, 125, 0.14);
    border-color: var(--mint);
    color: #056847;
}

.darvo-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 560px) {
    .darvo-breakdown-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.darvo-box {
    border-radius: 13px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.darvo-box-strip {
    background: rgba(255, 240, 248, 0.75);
    border: 1px solid var(--brand-pink-200);
}

.darvo-box-answer {
    background: rgba(240, 252, 247, 0.85);
    border: 1px solid rgba(5, 183, 125, 0.35);
}

.darvo-box-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.darvo-box-strip .darvo-box-heading {
    color: #9b2959;
}

.darvo-box-answer .darvo-box-heading {
    color: #066949;
}

.darvo-strip-list {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.darvo-strip-list li {
    font-size: 0.84rem;
    line-height: 1.42;
    color: var(--abyss);
    margin: 0;
}

.darvo-fact-text {
    font-size: 0.88rem;
    line-height: 1.48;
    color: var(--abyss);
    margin: 0;
}

.pure-bait-alert {
    background: #fdf4f9;
    border: 1.5px solid #d48bb8;
    border-left: 5px solid #8f52c5;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pure-bait-alert[hidden] {
    display: none;
}

.pure-bait-alert strong {
    font-size: 0.92rem;
    color: var(--abyss);
}

.pure-bait-alert p {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--slate);
    margin: 0;
}

.templates-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.templates-section-header h3 {
    font-size: 1.02rem;
    margin: 0;
    color: var(--abyss);
}

.templates-context-note {
    font-size: 0.83rem;
    color: var(--slate);
    margin: 0;
    line-height: 1.42;
}

.templates-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.response-template-card {
    background: var(--clean);
    border: 1.5px solid var(--brand-blue-200);
    border-radius: 13px;
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 10px rgba(18, 38, 72, 0.04);
}

.template-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.template-scenario-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--royal);
}

.template-word-badge {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--slate);
    background: var(--brand-blue-50);
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
}

.template-script-body {
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--abyss);
    margin: 0;
    background: rgba(239, 245, 254, 0.45);
    border-left: 3px solid var(--brand-blue-400);
    padding: 0.65rem 0.8rem;
    border-radius: 0 8px 8px 0;
}

.template-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.copy-script-btn {
    background: var(--royal);
    color: var(--clean);
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: normal;
    cursor: pointer;
}

.copy-script-btn:hover {
    background: var(--abyss);
    transform: none;
}

.copy-script-btn.is-copied {
    background: var(--mint);
    color: var(--clean);
}

.audit-load-btn {
    background: transparent;
    color: var(--slate);
    border: 1px solid var(--cloud);
    border-radius: 8px;
    padding: 0.42rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: normal;
    cursor: pointer;
}

.audit-load-btn:hover {
    background: var(--brand-blue-50);
    color: var(--abyss);
    border-color: var(--brand-blue-400);
    transform: none;
}

.builder-cta-box {
    background: linear-gradient(135deg, rgba(255, 240, 248, 0.92), rgba(239, 245, 254, 0.95));
    border: 1.5px solid var(--brand-pink-200);
    border-radius: 15px;
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.builder-cta-box .btn-large {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 0.95rem 1.25rem;
}

.builder-cta-sub {
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--slate);
    margin: 0;
    text-align: center;
}

.deep-guide-wrapper {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.guide-section-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: 0 4px 22px rgba(18, 38, 72, 0.07);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-section-card h2 {
    font-size: clamp(1.45rem, 2.6vw + 0.5rem, 2.15rem);
    margin: 0 0 0.25rem;
}

.guide-section-card h3 {
    font-size: clamp(1.15rem, 1.5vw + 0.65rem, 1.45rem);
    margin: 0.6rem 0 0.15rem;
}

.guide-section-card p,
.guide-section-card li {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--slate);
}

.guide-section-card strong {
    color: var(--abyss);
}

.biff-pillars-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0.5rem 0;
}

@media (min-width: 700px) {
    .biff-pillars-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pillar-detail-card {
    background: var(--clean);
    border: 1px solid var(--brand-blue-200);
    border-top: 4px solid var(--royal);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
}

.pillar-detail-card h3 {
    margin-top: 0;
    font-size: 1.12rem;
}

.pillar-detail-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.diagram-frame {
    background: var(--clean);
    border: 1px solid var(--brand-blue-200);
    border-radius: 16px;
    padding: 1.1rem;
    margin: 0.5rem 0;
}

.diagram-caption {
    font-size: 0.86rem;
    color: var(--slate);
    text-align: center;
    margin: 0.65rem 0 0;
}

.rewrite-bad-cell {
    background: rgba(255, 240, 248, 0.45);
}

.rewrite-good-cell {
    background: rgba(240, 252, 247, 0.55);
}

.mid-cta-banner {
    background: linear-gradient(135deg, rgba(18, 38, 72, 0.96), rgba(34, 94, 173, 0.94));
    border-radius: 18px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--clean);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: 0 10px 28px rgba(18, 38, 72, 0.16);
}

.mid-cta-banner h2 {
    color: var(--clean);
    font-size: clamp(1.35rem, 2.2vw + 0.5rem, 1.9rem);
    margin: 0;
}

.mid-cta-banner p {
    color: rgba(252, 253, 255, 0.9);
    margin: 0;
    font-size: 1rem;
    max-width: 760px;
}

.mid-cta-banner .btn {
    align-self: flex-start;
}

.sources-section {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    padding: clamp(1.25rem, 3vw, 2rem);
    gap: 1rem;
    margin: 1.5rem 0;
}

.sources-section h2 {
    font-size: clamp(1.35rem, 2.2vw + 0.5rem, 1.85rem);
    margin: 0;
}

.sources-list {
    margin: 0;
    padding-left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sources-list li {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--slate);
    margin: 0;
}

@media (max-width: 768px) {
    .builder-card {
        padding: 1.15rem;
    }

    .mid-cta-banner .btn {
        width: 100%;
        box-sizing: border-box;
    }
}
