* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* Paragraph spacing */
p {
    margin-bottom: 0.75em;
}

/* List styling */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75em;
}

li {
    margin-bottom: 0.25em;
}

/* Global h2 styling */
h2 {
    color: #ff8c00;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wider container for evaluation tables */
.container.wide {
    max-width: 1400px;
}

/* Table wrapper for horizontal scroll on smaller screens */
.table-wrapper {
    margin: 1rem 0;
    position: relative;
    overflow: visible;
}

.table-wrapper table {
    margin: 0;
}

/* Navigation */
.navbar {
    background-color: #1a3a6b;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    flex: 0 1 auto;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-img {
    width: 120px;
    height: 80px;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

/* Color Classes */
.color-purple {
    color: #C8BFE7;
}

.color-green {
    color: #B5E61D;
}

.color-pink {
    color: #FFAEC9;
}

.color-orange {
    color: #ff8c00;
}

.color-white {
    color: white;
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #2d5aa3;
}

/* Contact link in nav - text style with hover effect */
.nav-links a.nav-survey {
    background-color: transparent;
    color: #ff8c00;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a.nav-survey:hover {
    background-color: rgba(255, 140, 0, 0.15);
    color: #ffb347;
}

/* Nav icon styling */
.nav-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a3a6b 0%, #2d5aa3 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ff8c00;
}

.hero p:not(.quote-attribution) {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background-color: #ff8c00;
    color: white;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e67e00;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

.intro {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.intro h2 {
    color: #ff8c00;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.intro p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quick-link-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e9e9e9 100%);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #2d5aa3;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quick-link-card h3 {
    color: #ff8c00;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.quick-link-card a {
    color: #2d5aa3;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    display: inline-block;
    margin-top: 1rem;
}

.quick-link-card a:hover {
    color: #1a3a6b;
}

/* Two-column grid layout for content pages */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.two-column-layout > .content-block {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 1.05rem;
}

.two-column-layout > .content-block a {
    color: #2d5aa3;
    text-decoration: none;
}

.two-column-layout > .content-block a:hover {
    text-decoration: underline;
}

.two-column-layout > .content-block h2:first-child {
    margin-top: 0;
}

.two-column-layout > .content-block.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

/* Anchor scroll offset to account for sticky navbar */
:root {
    --nav-scroll-offset: 100px;
}

h2[id], h3[id], h4[id] {
    scroll-margin-top: calc(var(--nav-scroll-offset) + 10px);
}

@media (max-width: 900px) {
    h2[id], h3[id], h4[id] {
        scroll-margin-top: 80px;
    }
}

/* Toolkit Section Layout */
.toolkit-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}
.toolkit-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.toolkit-content h2:first-child {
    margin-top: 0;
    color: #ff8c00;
}

.toolkit-content a {
    color: #2d5aa3;
    text-decoration: none;
}

.toolkit-content a:hover {
    text-decoration: underline;
}

.toolkit-subnav {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px;
}

.toolkit-subnav h3 {
    color: #ff8c00;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff8c00;
}

.toolkit-subnav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toolkit-subnav ul li {
    margin-bottom: 0.5rem;
}

.toolkit-subnav ul li a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #1a3a6b;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.toolkit-subnav ul li a:hover {
    background-color: #f0f4f8;
    color: #ff8c00;
}

.toolkit-subnav ul li.active a {
    background-color: #1a3a6b;
    color: white;
}

.subnav-back {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.subnav-back a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.subnav-back a:hover {
    color: #ff8c00;
}

.toolkit-topics {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fact-topic-card {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff8c00;
}

.fact-topic-card h3 {
    margin: 0 0 0.5rem 0;
}

.fact-topic-card h3 a {
    color: #1a3a6b;
    text-decoration: none;
}

.fact-topic-card h3 a:hover {
    color: #ff8c00;
}

.fact-topic-card p {
    margin: 0;
    color: #666;
}

/* Fact sheet specific styles */
.fact-quote {
    background-color: #f0f4f8;
    border-left: 4px solid #1a3a6b;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #333;
}

.content-callout {
    background-color: #fff3cd;
    border-left: 4px solid #d4a017;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #333;
}

.fact-sources {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.fact-sources a {
    color: #1a3a6b;
}

.fact-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.fact-table th,
.fact-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.fact-table th {
    background-color: #1a3a6b;
    color: white;
    font-weight: 600;
}

.fact-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.fact-table .highlight-row {
    background-color: #fff3cd !important;
}

.fact-table .total-row {
    background-color: #e3f2fd !important;
    border-top: 2px solid #1a3a6b;
}

/* Keep fact-tables as regular tables on mobile (don't convert to cards) */
@media (max-width: 768px) {
    .fact-table {
        display: table;
        border-collapse: collapse;
        border-spacing: 0;
    }
    
    .fact-table thead,
    .fact-table tfoot {
        display: table-header-group;
    }
    
    .fact-table tr {
        display: table-row;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-bottom: 0;
        box-shadow: none;
    }
    
    .fact-table td {
        display: table-cell;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #ddd;
    }
    
    .fact-table td:first-child {
        padding-bottom: 0.75rem;
        margin-bottom: 0;
        border-bottom: 1px solid #ddd;
    }
    
    .fact-table td:first-child:after {
        content: none;
    }
}

.trope-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.trope-item h4 {
    color: #1a3a6b;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.trope-item p {
    margin: 0;
}

.three-ds {
    font-size: 1.2rem;
    margin: 1rem 0 1rem 2rem;
}

.side-by-side-images {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.side-by-side-images img {
    max-width: 48%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #ff8c00;
}

@media (max-width: 600px) {
    .side-by-side-images {
        flex-direction: column;
    }
    
    .side-by-side-images img {
        max-width: 100%;
    }
}

.three-ds li {
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .toolkit-layout {
        grid-template-columns: 1fr;
    }
    
    .toolkit-subnav {
        position: static;
        order: -1;
    }
}

/* Featured Evaluations */
.featured-evaluations {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.featured-evaluations h2 {
    color: #ff8c00;
    margin-bottom: 1rem;
}

.featured-evaluations a {
    color: #2d5aa3;
    font-weight: bold;
    text-decoration: none;
}

.featured-evaluations a:hover {
    text-decoration: underline;
}

/* Mission and Evaluations Section Layout - Home Page Only */
.our-mission-section, .featured-evaluations {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.our-mission-section h2, .featured-evaluations h2 {
    color: #ff8c00;
    margin-bottom: 1rem;
    border-bottom: 3px solid #ff8c00;
    padding-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .our-mission-section, .featured-evaluations {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}



/* Page Sections */
section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Full-width sections for dedicated pages */
main.container > section:not(.our-mission-section):not(.featured-evaluations) {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 3rem;
    box-shadow: none;
}

.hero section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

section h2 {
    color: #ff8c00;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #ff8c00;
    padding-bottom: 0.5rem;
}

section h3 {
    color: #2d5aa3;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.section-heading {
    color: #2d5aa3;
    font-size: 1.17em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

section a {
    color: #2d5aa3;
    text-decoration: none;
}

section a:hover {
    text-decoration: underline;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.85rem;
    overflow: visible;
    scroll-margin-top: 100px;
}

th {
    background-color: #1a3a6b;
    color: white;
    padding: 0.5rem 0.4rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
}

th a {
    color: white;
    text-decoration: none;
}

th a:hover {
    text-decoration: underline;
    color: #ff8c00;
}

th:first-child {
    text-align: left;
    padding-left: 0.75rem;
}

td {
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 0.8rem;
    overflow: visible;
}

/* Hide mobile candidate links on desktop */
td .mobile-candidate-link {
    display: none;
}

td:first-child {
    text-align: left;
    padding-left: 0.75rem;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0f0f0;
}

/* Mobile-friendly table */
@media (max-width: 768px) {
    table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 1rem;
    }

    thead,
    tfoot {
        display: none;
    }

    tr {
        display: block;
        background: white;
        border: 2px solid #ddd;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    td {
        display: block;
        padding: 0.25rem 0;
        border: none;
        text-align: left;
    }

    td:first-child {
        font-weight: bold;
        color: #1a3a6b;
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
        border-bottom: 2px solid #ff8c00;
    }

    /* Hide the pseudo-element label on mobile, use the link instead */
    td[data-label]:before {
        display: none;
    }
    
    /* Show mobile candidate link */
    td .mobile-candidate-link {
        display: inline;
        font-weight: bold;
        color: #2d5aa3;
        font-size: 0.9rem;
        text-decoration: none;
    }
    
    td .mobile-candidate-link:hover {
        text-decoration: underline;
        color: #ff8c00;
    }
    
    td .mobile-candidate-link:after {
        content: ": ";
        color: #2d5aa3;
        text-decoration: none;
    }

    tr:nth-child(even) {
        background-color: white;
    }

    tr:hover {
        background-color: #f9f9f9;
        border-color: #ff8c00;
    }
}

/* Evaluation Scale */
.strongly-support {
    color: #27ae60;
    font-weight: bold;
}

.support {
    color: #2874a6;
    font-weight: bold;
}

.support-caveat {
    color: #3d85c6;
    font-weight: bold;
}

.weakly-support {
    color: #9fc5e8;
    font-weight: bold;
}

.neutral {
    color: #d48aa0;
    font-weight: bold;
}

.weakly-oppose {
    color: #e57373;
    font-weight: bold;
}

.oppose {
    color: #c0392b;
    font-weight: bold;
}

.limited-support {
    color: #e67e22;
    font-weight: bold;
}

.equivocates {
    color: #e74c3c;
    font-weight: bold;
}

.disavows {
    color: #27ae60;
    font-weight: bold;
}

.uses-language {
    color: #c0392b;
    font-weight: bold;
}

.does-not-accept {
    color: #c0392b;
    font-weight: bold;
}

.does-not-appreciate {
    color: #c0392b;
    font-weight: bold;
}

.will-not-support {
    color: #c0392b;
    font-weight: bold;
}

.no-support {
    color: #c0392b;
    font-weight: bold;
}

.na {
    color: #95a5a6;
    font-weight: bold;
}

/* Candidate Evaluation Bar */
.evaluation-bar {
    display: flex;
    gap: 2px;
    margin: 0.75rem 0;
    margin-top: 2rem;
    height: 20px;
    border-radius: 4px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.evaluation-bar .bar-block {
    flex: 1;
    min-width: 18px;
    display: block;
    cursor: pointer;
    position: relative;
    height: 20px;
}

.evaluation-bar .bar-block:first-child {
    border-radius: 4px 0 0 4px;
}

.evaluation-bar .bar-block:last-child {
    border-radius: 0 4px 4px 0;
}

.evaluation-bar .bar-strongly-support { background-color: #43DE42; }
.evaluation-bar .bar-support { background-color: #00A2E8; }
.evaluation-bar .bar-support-caveat { background-color: #99D9EA; }
.evaluation-bar .bar-weakly-support { background-color: #C6E0ED; }
.evaluation-bar .bar-neutral { background-color: #ffd4e3; }
.evaluation-bar .bar-weakly-oppose { background-color: #e57373; }
.evaluation-bar .bar-oppose { background-color: #c0392b; }
.evaluation-bar .bar-no-support { background-color: #c0392b; }
.evaluation-bar .bar-does-not-accept { background-color: #c0392b; }
.evaluation-bar .bar-will-not-support { background-color: #c0392b; }
.evaluation-bar .bar-uses-language { background-color: #c0392b; }
.evaluation-bar .bar-na { background-color: #95a5a6; }
.evaluation-bar .bar-disavows { background-color: #27ae60; }

/* Mobile tooltip for bar blocks */
.evaluation-bar .bar-block.show-tooltip::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: normal;
    width: max-content;
    max-width: min(250px, 80vw);
    text-align: left;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.3;
}

/* Left-aligned tooltips for bars 1-7 */
.evaluation-bar .bar-block:nth-child(-n+7).show-tooltip::after {
    left: 0;
    right: auto;
}

/* Right-aligned tooltips for bars 8-13 */
.evaluation-bar .bar-block:nth-child(n+8).show-tooltip::after {
    right: 0;
    left: auto;
}

/* Evaluation Notes */
.evaluation-note {
    background-color: #f0f8ff;
    border-left: 4px solid #2d5aa3;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.evaluation-note sup {
    color: #e74c3c;
}

/* Footer */
footer {
    background-color: #1a3a6b;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer a {
    color: #ff8c00;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Evaluation Notes */
.evaluation-note {
    background-color: #f0f7ff;
    border-left: 4px solid #2d5aa3;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    scroll-margin-top: 120px;
}

/* Tooltip Styles */
.tooltip-trigger {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #2d5aa3;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 1;
    cursor: help;
}

.tooltip-icon::before {
    content: "?";
}

/* Ellipsis tooltip for truncated text */
.tooltip-icon-ellipsis::before {
    content: "...";
    font-size: 0.65rem;
}

.tooltip-text {
    visibility: hidden;
    width: 500px;
    max-width: 90vw;
    background-color: #1a3a6b;
    color: white;
    text-align: left;
    border-radius: 6px;
    padding: 0.75rem;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: normal;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.tooltip-text a {
    color: #ff8c00;
    text-decoration: underline;
}

.tooltip-text a:hover {
    color: #ffb347;
}

.tooltip-text::after {
    display: none;
}

.tooltip-trigger:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Touch/click activated tooltips for mobile */
.tooltip-trigger.active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Interactive Tooltip - stays open so you can click links */
.tooltip-interactive {
    position: relative;
    display: inline;
    cursor: help;
}

.tooltip-interactive .tooltip-icon {
    margin-left: 0.25rem;
}

.tooltip-interactive .tooltip-content {
    visibility: hidden;
    width: 350px;
    max-width: 90vw;
    background-color: #1a3a6b;
    color: white;
    text-align: left;
    border-radius: 6px;
    padding: 0.75rem;
    position: absolute;
    z-index: 9999;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: normal;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Arrow pointing down */
.tooltip-interactive .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #1a3a6b transparent transparent transparent;
}

.tooltip-interactive .tooltip-content a {
    color: #ff8c00;
    text-decoration: underline;
}

.tooltip-interactive .tooltip-content a:hover {
    color: #ffb347;
}

/* Show tooltip on hover of trigger OR tooltip itself */
.tooltip-interactive:hover .tooltip-content,
.tooltip-interactive .tooltip-content:hover {
    visibility: visible;
    opacity: 1;
}

/* Touch/click activated interactive tooltips for mobile */
.tooltip-interactive.active .tooltip-content {
    visibility: visible;
    opacity: 1;
}

@media (hover: none) and (pointer: coarse) {
    .tooltip-interactive .tooltip-content {
        padding-top: 2rem;
    }
}

/* Candidate Summary Styles */
.candidate-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 4px solid #ff8c00;
    background-color: #f9f9f9;
    border-radius: 4px;
}

#evaluation-results {
    scroll-margin-top: 100px;
}

.candidate-summary h4 {
    margin-top: 0;
    color: #ff8c00;
    font-size: 1.25rem;
    scroll-margin-top: 120px;
}

/* Ensure proper scroll offset on mobile for summary anchors */
@media (max-width: 768px) {
    .candidate-summary h4 {
        scroll-margin-top: 200px;
    }
    
    #evaluation-results {
        scroll-margin-top: 200px;
    }
    
    /* General headings and anchor targets on mobile */
    h2, h3, h4, section, .evaluation-note {
        scroll-margin-top: 200px;
    }
}

.candidate-summary p {
    margin-bottom: 0;
    line-height: 1.6;
}

.candidate-summary .back-to-top {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: right;
}

.candidate-summary .back-to-top a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.candidate-summary .back-to-top a:hover {
    color: #ff8c00;
}

/* Hide table-specific instructions on mobile */
.table-only {
    display: block;
}

@media (max-width: 768px) {
    .table-only {
        display: none;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-section {
        margin-right: 0;
    }

    .nav-links {
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Three Column Layout */
.three-column-layout {
    display: grid;
    grid-template-columns: 1fr 1.65fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    align-items: start;
}

.column-left, .column-middle, .column-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.horseshoe-section, .hero-quote {
    padding: 0.8rem;
    background-color: #E8F0F7;
    border-left: 2px solid #6b3fa0;
    border-radius: 8px;
    box-shadow: none;
    color: #333;
    font-size: 0.8rem;
}

.horseshoe-section {
    text-align: center;
    padding: 0.5rem;
}

.horseshoe-image {
    max-width: 50%;
    height: auto;
    margin-bottom: -0.5rem;
    margin-top: -0.25rem;
}

.horseshoe-labels {
    font-weight: bold;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.horseshoe-section blockquote p, .hero-quote blockquote p {
    color: #1a1a1a;
    font-style: italic;
    font-size: 0.8rem !important;
    margin: 0.5rem 0;
}

.hero-quote h3 {
    color: #6b3fa0;
    margin: 0.5rem;
    font-size: 0.8rem;
}

.hero-quote blockquote {
    font-style: italic;
    margin: 0.5rem 0;
    padding-left: 0;
    border-left: none;
    color: #1a1a1a;
}

.quote-attribution {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.3;
}

.quote-attribution a {
    color: #6b3fa0;
    text-decoration: none;
}

.quote-attribution a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .three-column-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
