/* Section Width Alignment */
#core-metrics,
#breach-checks,
#ui-ux,
#privacy-by-design,
#education {
    max-width: 64rem; /* Corresponds to max-w-5xl */
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background-color: #FFFFFF;
    color: #1E293B;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.stat-card.flex-center-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0369A1;
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}
.sub-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0284C7; /* UPDATED: Was #047857 */
    margin-top: 0;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}
.sub-title i.fas {
    margin-right: 0.5rem;
    color: #0369A1;
    font-size: 0.9em;
    line-height: 1;
}
.standards-text-dimmer { color: #334155; transition: color 0.3s ease;}
.standards-text-muted { color: #475569; transition: color 0.3s ease;}
.accent-text { color: #27ae60; transition: color 0.3s ease; }

.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
    max-height: 350px;
}
@media (min-width: 768px) {
    .chart-container {
        height: 350px;
        max-height: 400px;
    }
}

.zxcvbn-score-grid {
    display: flex;
    justify-content: space-around;
    margin: 1.25rem 0;
    gap: 0.625rem;
}
.zxcvbn-score-item {
    flex: 1;
    padding: 1rem 0.625rem;
    border-radius: 0.5rem;
    font-weight: bold;
    text-align: center;
    cursor: help;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.25em;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.zxcvbn-score-item[data-score="0"] { background-color: #e74c3c; color: white; }
.zxcvbn-score-item[data-score="1"] { background-color: #e67e22; color: white; }
.zxcvbn-score-item[data-score="2"] { background-color: #f1c40f; color: white; }
.zxcvbn-score-item[data-score="3"] { background-color: #27ae60; color: white; }
.zxcvbn-score-item[data-score="4"] { background-color: #3b82f6; color: white; }
.zxcvbn-score-legend {
    text-align: center;
    font-style: italic;
    font-size: 0.95em;
    color: #475569;
    margin-top: 1.25rem;
}

.password-comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .password-comparison-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.password-comparison-item {
    background-color: #F1F5F9;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid #CBD5E1;
}
.password-comparison-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #047857;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.password-comparison-item p {
    color: #334155;
}
.eff-details-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}
.eff-details-content {
    background-color: #F9FAFB;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px dashed #10B981;
    text-align: center;
    margin-top: 1rem;
}
.eff-details-content p {
    color: #334155;
    margin-bottom: 1rem;
}
.eff-button {
    display: inline-block;
    background-color: #10B981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.eff-button:hover {
    background-color: #059669;
    transform: translateY(-2px);
}
.eff-button i.fas {
    margin-right: 0.5rem;
}

.custom-accordion-item {
    border: 1px solid #CBD5E1;
    border-radius: 0.5rem;
    margin-bottom: 0.625rem;
    overflow: hidden;
    background-color: #FFFFFF;
}
.custom-accordion-header {
    background-color: #E2E8F0;
    color: #1E293B;
    padding: 0.75rem 1.25rem;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.custom-accordion-header:hover {
    background-color: #CBD5E1;
}
.custom-accordion-header i.fas {
    margin-right: 0.625rem;
    color: #0369A1;
}
.custom-accordion-header .arrow {
    font-size: 1em;
    transition: transform 0.3s ease;
    color: #475569;
}
.custom-accordion-item.active .custom-accordion-header .arrow {
    transform: rotate(180deg);
}
.custom-accordion-content {
    max-height: 0;
    padding: 0 1.25rem;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    color: #334155;
}
.custom-accordion-item.active .custom-accordion-content {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.custom-accordion-content p {
    margin-top: 0;
    margin-bottom: 0.625rem;
    line-height: 1.6;
}
.highlight-rate {
    font-weight: bold;
    color: #DC2626;
}
.accordion-note {
    font-style: italic;
    color: #475569;
    font-size: 0.9em;
    border-left: 3px solid #059669;
    padding-left: 0.625rem;
    margin-top: 1.25rem;
    background-color: #F0FDF4;
    padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.accordion-note i.fas {
    margin-right: 0.25rem;
    color: #059669;
}


html.dark .stat-card {
    background-color: #1E293B;
    color: #F8FAFC;
}
html.dark .section-title {
    color: #38BDF8;
}
html.dark .sub-title {
    color: #38BDF8; /* UPDATED: Was #34D399 */
}
html.dark .sub-title i.fas {
    color: #38BDF8;
}
html.dark .standards-text-dimmer { color: #CBD5E1; }
html.dark .standards-text-muted { color: #94A3B8; }
html.dark .accent-text { color: ##27ae60; }

html.dark .zxcvbn-score-item {
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.05);
}
html.dark .zxcvbn-score-item[data-score="2"] { color: #white; }
html.dark .zxcvbn-score-legend {
    color: #94A3B8;
}

html.dark .password-comparison-item {
    background-color: #0F172A;
    border-color: #334155;
}
html.dark .password-comparison-item h3 {
    color: #34D399;
}
html.dark .password-comparison-item p {
    color: #CBD5E1;
}

html.dark .eff-details-wrapper {
    border-top-color: #334155;
}
html.dark .eff-details-content {
    background-color: #1F2937;
    border-color: #34D399;
}
html.dark .eff-details-content p {
    color: #CBD5E1;
}
html.dark .eff-button {
    background-color: #34D399;
}
html.dark .eff-button:hover {
    background-color: #10B981;
}

html.dark .custom-accordion-item {
    border-color: #334155;
    background-color: #1E293B;
}
html.dark .custom-accordion-header {
    background-color: #334155;
    color: #E2E8F0;
}
html.dark .custom-accordion-header:hover {
    background-color: #475569;
}
html.dark .custom-accordion-header i.fas {
    color: #38BDF8;
}
html.dark .custom-accordion-header .arrow {
    color: #94A3B8;
}
html.dark .custom-accordion-content {
    color: #CBD5E1;
}
html.dark .highlight-rate {
    color: #F87171;
}
html.dark .accordion-note {
    color: #94A3B8;
    border-left-color: #34D399;
    background-color: #064E3B;
}
html.dark .accordion-note i.fas {
    color: #34D399;
}

.k-anonymity-step {
    background-color: #E2E8F0;
    padding: 1rem;
    border-radius: 0.375rem; 
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}
.k-anonymity-step-icon {
    margin-right: 0.75rem;
    color: #0369A1; 
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

html.dark .k-anonymity-step {
    background-color: #334155; 
}
html.dark .k-anonymity-step-icon {
    color: #38BDF8; 
}

html.dark .text-emerald-500 {
    color: #34D399; 
}
html.dark .text-emerald-600 {
    color: #34D399;
}

/* === D3 CHART STYLES === */
.axis path,
.axis line {
    fill: none;
    stroke: #9ca3af; 
    shape-rendering: crispEdges;
}
.axis text {
    font-size: 12px;
    fill: #4b5563; 
}
.grid-line {
    stroke: #e5e7eb; 
    stroke-dasharray: 2,2;
    shape-rendering: crispEdges;
}
.donut-arc path {
    stroke: #ffffff;
    stroke-width: 2px;
}
.donut-text {
    font-size: 14px;
    fill: #374151;
    text-anchor: middle;
    pointer-events: none;
}

/* Dark mode styles for D3 charts */
html.dark .axis path,
html.dark .axis line {
    stroke: #64748b; 
}
html.dark .axis text {
    fill: #cbd5e1; 
}
html.dark .grid-line {
    stroke: #334155;
}
html.dark .donut-arc path {
    stroke: #1e293b; 
}
html.dark .donut-text {
    fill: #e2e8f0; 
}
