:root {
    /* The Trust Palette */
    --primary-navy: #0F4C81;
    /* Deep Blue - "Official" */
    --primary-text: #2C3E50;
    /* Dark Grey - Readable */
    --bg-grey: #F4F7F9;
    /* Light Blue-Grey - Background */
    --card-white: #FFFFFF;
    /* Clean White */

    /* Action Colors */
    --action-green: #218838;
    /* "Go" Button */
    --alert-red: #D32F2F;
    /* Error/Important */

    /* Spacing & Structure */
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
    --radius-soft: 8px;
    --font-heading: 'Merriweather', serif;
    /* Institutional Serif */
    --font-body: 'Open Sans', sans-serif;
    /* Readable Sans */
}

body {
    background-color: var(--bg-grey);
    font-family: var(--font-body);
    color: var(--primary-text);
    margin: 0;
    line-height: 1.6;
}

/* Container Widths */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* The Header Bar */
.site-header {
    background-color: var(--primary-navy);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.site-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
}

.secure-badge {
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* The Calculator Card (The Core) */
.calc-card {
    background: var(--card-white);
    width: 100%;
    max-width: 500px;
    /* Limits width so it looks like a tool */
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    /* Keeps header corners rounded */
    border: 1px solid #E1E8ED;
}

.card-header {
    background: #F8F9FA;
    padding: 25px 25px 15px 25px;
    border-bottom: 1px solid #EEE;
    text-align: center;
}

.card-header h1 {
    font-family: var(--font-heading);
    color: var(--primary-navy);
    font-size: 1.6rem;
    margin: 0 0 5px 0;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.card-body {
    padding: 25px;
}

/* Inputs */
.input-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.input-group {
    flex: 1;
}

/* Give "Coverage" more space, "Age" less */
.input-group:first-child {
    flex: 0.7;
    /* Age needs less space */
}

.input-group:last-child {
    flex: 1.3;
    /* Coverage needs more space */
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #DFE6E9;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    /* Fixes padding width issues */
}

.form-control:focus {
    border-color: var(--primary-navy);
    outline: none;
}

/* The "Price Reveal" */
.result-box {
    background: #F0FFF4;
    border: 1px solid #C3E6CB;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}

.price-large {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--action-green);
}

/* The Big Button */
.btn-main {
    width: 100%;
    box-sizing: border-box;
    /* Prevents padding from causing overflow */
    background-color: var(--action-green);
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 0 #155724;
    /* A "3D" pressable look */
    transition: transform 0.1s;
}

.btn-main:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #155724;
}

/* Footer Link */
.card-footer {
    background: #FAFAFA;
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    border-top: 1px solid #EEE;
}

.site-footer {
    padding: 20px;
    text-align: center;
    background: var(--primary-navy);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 40px;
}

.site-footer small {
    display: block;
    margin-top: 5px;
    opacity: 0.6;
}

/* Homepage Styles */
.home-container {
    flex-direction: column;
}

.hero-section {
    background: var(--primary-navy);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    margin: 0;
    font-size: 2.5rem;
}

.trust-signals {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    text-align: center;
    width: 100%;
    justify-content: space-around;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.trust-item {
    flex: 1;
    padding: 0 10px;
}

.trust-item h3 {
    color: var(--primary-navy);
    margin-bottom: 10px;
}

.state-directory {
    width: 100%;
    text-align: center;
    /* Center the heading and subtext */
}

.state-directory p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: #666;
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    /* Slightly wider cards */
    gap: 20px;
}

.state-card {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    /* Softer radius */
    text-decoration: none;
    color: var(--primary-navy);
    border: 1px solid #E1E8ED;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.state-card:hover {
    border-color: var(--action-green);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Add hover shadow */
}

.state-card .arrow {
    color: var(--action-green);
    font-weight: bold;
}

@media (max-width: 768px) {
    .trust-signals {
        flex-direction: column;
        gap: 40px;
        padding-bottom: 40px;
    }
}

/* About Page Styles */
.skinny-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    display: block;
    /* Overrides .main-content flex */
}

.skinny-layout h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--primary-navy);
}

.lead {
    font-size: 1.4rem;
    color: #555;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 50px;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.editor-note {
    background: #F0F7FF;
    /* Light Blue */
    padding: 25px;
    border-radius: 8px;
    margin: 40px 0;
    border-left: 5px solid var(--primary-navy);
}

.editor-note h3 {
    margin-top: 0;
    color: var(--primary-navy);
    font-size: 1.1rem;
}