html, body {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
}

a, .btn-link {
    color: #0659AE;
}

.btn-primary {
    color: #fff;
    background-color: #0659AE;
    border-color: #14304D;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #2AB7EF;
}

.content {
    padding-top: 1.1rem;
}

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: #b32121;
    padding: 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* === Language Switcher === */
.language-switcher {
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid #ccc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
}

.lang-btn.active {
    background: #0659AE;
    color: white;
    border-color: #0659AE;
}

.lang-btn:hover:not(.active) {
    border-color: #0659AE;
    color: #0659AE;
}

/* === Tagline === */
.tagline {
    font-style: italic;
    color: #0659AE;
    margin-right: 1rem;
}

/* === Tagline Hero === */
.tagline-hero {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #0659AE;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

/* === Loop Page === */
.loop-page {
    max-width: 900px;
}

.loop-subtitle {
    color: #666;
    margin-bottom: 1.5rem;
}

.loop-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.loop-diagram {
    width: 100%;
    height: auto;
    max-height: 500px;
}

.loop-position {
    cursor: pointer;
    transition: opacity 0.15s;
}

.loop-position:hover rect {
    stroke-width: 3;
    filter: brightness(0.95);
}

.loop-position.selected rect {
    stroke-width: 3;
}

.loop-detail-panel, .loop-info-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.loop-detail-panel h3, .loop-info-panel h3 {
    color: #0659AE;
    margin-bottom: 0.5rem;
}

.loop-detail-panel h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #555;
}

.position-description {
    line-height: 1.6;
    color: #555;
}

/* === Plan Cards === */
.plan-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.plan-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f0f4fb;
    border: 1px solid #d0dced;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
}

.plan-card:hover {
    background: #dce6f3;
    text-decoration: none;
    color: #333;
}

.plan-code {
    font-weight: bold;
    color: #0659AE;
    font-size: 0.85rem;
}

.plan-title {
    font-size: 0.9rem;
}

/* === Plan Level Badges === */
.plan-level {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.level-d1 { background: #ffecd2; color: #bf6c00; }
.level-d2 { background: #d4edda; color: #28713e; }
.level-d3 { background: #cce5ff; color: #004085; }
.level-d4 { background: #d5e2f5; color: #0659AE; }

/* === Development Level Cards === */
.dl-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dl-card {
    background: white;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dl-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.dl-card.expanded {
    grid-column: 1 / -1;
    border-color: #0659AE;
}

.dl-card.level-d1 { border-left: 4px solid #bf6c00; }
.dl-card.level-d2 { border-left: 4px solid #28713e; }
.dl-card.level-d3 { border-left: 4px solid #004085; }
.dl-card.level-d4 { border-left: 4px solid #0659AE; }

.dl-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dl-badge {
    font-weight: bold;
    font-size: 1.1rem;
    color: #0659AE;
}

.dl-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.dl-toggle {
    margin-left: auto;
    font-size: 1.2rem;
    color: #999;
    font-weight: bold;
}

.dl-card-subtitle {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.dl-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.dl-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.dl-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dl-meta-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.dl-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.dl-detail h5 {
    color: #0659AE;
    font-size: 0.95rem;
    margin: 1rem 0 0.5rem;
}

.dl-detail p {
    line-height: 1.6;
    color: #555;
    font-size: 0.9rem;
}

.style-pointers {
    padding-left: 1.25rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.7;
}

.dl-plans-link {
    margin-top: 1rem;
}

.btn-filter-level {
    background: #0659AE;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-filter-level:hover {
    background: #14304D;
}

.will-reminder {
    background: #f2f6fc;
    border-left: 4px solid #0659AE;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #555;
    border-radius: 0 8px 8px 0;
}

@media (max-width: 768px) {
    .dl-cards {
        grid-template-columns: 1fr;
    }
}

/* === Plans Grid === */
.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.filter-group select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.plan-card-large {
    display: block;
    padding: 1.25rem;
    background: white;
    border: 1px solid #d8e2ef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.plan-card-large:hover {
    box-shadow: 0 4px 12px rgba(0,52,155,0.12);
    border-color: #0659AE;
    text-decoration: none;
    color: #333;
}

.plan-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.plan-card-large h4 {
    margin: 0.25rem 0;
    color: #333;
    font-size: 1.05rem;
}

.plan-diagnosis {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.plan-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.match-score {
    font-size: 0.8rem;
    color: #0659AE;
    font-weight: 600;
}

/* === Tags === */
.tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.tag-loop {
    background: #d5e2f5;
    color: #0659AE;
}

.tag-loop.primary {
    background: #0659AE;
    color: white;
}

.tag-cluster {
    background: #fff3cd;
    color: #856404;
}

.tag-behaviour {
    background: #f0f0f0;
    color: #555;
}

.no-results {
    color: #888;
    font-style: italic;
    padding: 2rem 0;
}

/* === Coaching Intention === */
.coaching-intention {
    padding: 1rem 1.5rem;
    background: #f2f6fc;
    border-left: 4px solid #2AB7EF;
    border-radius: 0 10px 10px 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    font-style: italic;
}

/* === Plan Detail === */
.plan-detail {
    max-width: 800px;
}

.back-link {
    font-size: 0.85rem;
    text-decoration: none;
    color: #0659AE;
}

.back-link:hover {
    text-decoration: underline;
}

.plan-detail-title {
    margin-top: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.plan-code-large {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0659AE;
}

.plan-detail-title h2 {
    margin: 0;
}

.plan-detail-meta {
    margin: 1rem 0 1.5rem;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.plan-section {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.plan-section h3 {
    color: #0659AE;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.section-hint {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.plan-section ul {
    padding-left: 1.25rem;
}

.plan-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.plan-section p {
    line-height: 1.6;
}

.experiment-card {
    padding: 1rem 1.25rem;
    background: #f2f6fc;
    border-left: 4px solid #0659AE;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
}

.experiment-number {
    font-weight: bold;
    color: #0659AE;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.25rem;
}

.experiment-card p {
    margin: 0;
    font-size: 0.95rem;
}

.behaviour-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* === Diagnose Page === */
.diagnose-page {
    max-width: 1100px;
}

.diagnose-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.tag-selector {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tag-selector h3 {
    color: #0659AE;
}

.tag-group {
    margin-bottom: 1rem;
}

.tag-group h4 {
    font-size: 0.85rem;
    color: #0659AE;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e0eaf5;
    padding-bottom: 0.25rem;
}

.tag-checkbox {
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.1s;
}

.tag-checkbox:hover {
    background: #f0f4fb;
}

.tag-checkbox.checked {
    background: #d5e2f5;
    font-weight: 600;
}

.tag-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #0659AE;
}

.diagnose-results {
    position: sticky;
    top: 1rem;
}

.diagnose-results h3 {
    color: #0659AE;
}

.match-summary {
    padding: 1rem;
    background: #f2f6fc;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.diagnose-empty {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    text-align: center;
    color: #888;
}

.diagnose-empty h3 {
    color: #0659AE;
}

/* === Situational Leadership Page === */
.sl-page {
    max-width: 850px;
}

.sl-intro {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.sl-link {
    display: block;
    margin-top: 0.5rem;
    color: #0659AE;
    font-weight: 600;
    text-decoration: none;
}

.sl-link:hover {
    text-decoration: underline;
}

.sl-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.sl-table th {
    background: #0659AE;
    color: white;
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.85rem;
}

.sl-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.sl-table tr {
    cursor: pointer;
    transition: background 0.1s;
}

.sl-table tbody tr:hover {
    background: #f2f6fc;
}

.sl-table ol {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.6;
}

.sl-yes {
    color: #28713e;
    font-weight: bold;
}

.sl-no {
    color: #999;
}

.sl-note {
    background: #fff8e1;
    border-left: 4px solid #bf6c00;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
}

.sl-dev-table {
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.dl-row-d1 { background: #fff5eb; }
.dl-row-d2 { background: #ebf5eb; }
.dl-row-d3 { background: #ebf0fa; }
.dl-row-d4 { background: #ebf0fa; }

.dl-descriptions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dl-desc-card {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #eee;
}

.dl-desc-card.level-d1 { border-left: 4px solid #bf6c00; }
.dl-desc-card.level-d2 { border-left: 4px solid #28713e; }
.dl-desc-card.level-d3 { border-left: 4px solid #004085; }
.dl-desc-card.level-d4 { border-left: 4px solid #0659AE; }

.dl-desc-card h5 {
    color: #0659AE;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.dl-desc-card p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.smart-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.smart-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: #f2f6fc;
    border-radius: 8px;
}

.smart-letter {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0659AE;
    min-width: 2rem;
    text-align: center;
    line-height: 1;
    padding-top: 0.2rem;
}

.smart-item strong {
    color: #333;
    font-size: 0.95rem;
}

.smart-item p {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

.trigger-action {
    background: white;
    border: 1px solid #d8e2ef;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}

.trigger-action h4 {
    color: #0659AE;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.ta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ta-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.ta-label {
    font-weight: bold;
    font-size: 1rem;
    color: #0659AE;
}

.ta-arrow {
    color: #0659AE;
    font-size: 1.1rem;
}

.ta-desc {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.ta-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0.25rem 0 0;
    flex-basis: 100%;
}

/* === Attribution === */
.attribution {
    background: #f8f8f8;
    border: none;
    box-shadow: none;
}

.attribution p {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.5;
    margin: 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .diagnose-layout {
        grid-template-columns: 1fr;
    }
    .plans-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
}
