/* ============================================================

   RELIABLE RESIDENTIAL - TECH HUB

   Brand Colors: Green #00523d, Navy #003057, Gold #e7d2ad

   ============================================================ */



/* --- Reset & Base --- */

*, *::before, *::after {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}



/* --- Lock Screen --- */

.lock-screen {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;

    justify-content: center;

    background: linear-gradient(135deg, #00392b 0%, #003057 100%);

}

.lock-box {

    background: var(--white, #fff);

    border-radius: 12px;

    padding: 2.5rem 2rem;

    width: 340px;

    max-width: 90vw;

    text-align: center;

    box-shadow: 0 20px 60px rgba(0,0,0,.35);

}

.lock-title {

    font-size: 1.25rem;

    font-weight: 700;

    color: #1f2937;

    margin-bottom: .25rem;

}

.lock-sub {

    font-size: .85rem;

    color: #6b7280;

    margin-bottom: 1.5rem;

}

.lock-input {

    width: 100%;

    padding: .7rem 1rem;

    font-size: 1rem;

    border: 2px solid #e2e4e9;

    border-radius: 8px;

    outline: none;

    transition: border-color .2s;

    text-align: center;

    letter-spacing: .08em;

}

.lock-input:focus {

    border-color: #00523d;

}

.lock-btn {

    width: 100%;

    margin-top: .75rem;

    padding: .7rem;

    font-size: 1rem;

    font-weight: 600;

    color: #fff;

    background: #00523d;

    border: none;

    border-radius: 8px;

    cursor: pointer;

    transition: background .2s;

}

.lock-btn:hover { background: #00392b; }

.lock-error {

    margin-top: .75rem;

    font-size: .85rem;

    color: #dc2626;

    min-height: 1.2em;

}



:root {

    --accent: #00523d;

    --accent-dark: #00392b;

    --navy: #003057;

    --navy-light: #0A4070;

    --navy-lighter: #154B7C;

    --white: #ffffff;

    --gray-50: #f7f8fa;

    --gray-100: #f0f1f4;

    --gray-200: #e2e4e9;

    --gray-300: #cdd1d9;

    --gray-400: #9ca3af;

    --gray-500: #6b7280;

    --gray-600: #4b5563;

    --gray-700: #374151;

    --gray-800: #1f2937;

    --green: #047857;

    --green-bg: #ecfdf5;

    --amber: #b45309;

    --amber-bg: #fffbeb;

    --blue: #1d4ed8;

    --blue-bg: #eff6ff;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;

    --radius: 4px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);

    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);

}



html {

    font-size: 15px;

    -webkit-text-size-adjust: 100%;

}



body {

    font-family: var(--font);

    color: var(--gray-800);

    background: var(--gray-50);

    line-height: 1.5;

    min-height: 100vh;

    display: flex;

    flex-direction: column;

}



/* --- Header --- */

.site-header {

    background: var(--navy);

    border-bottom: 3px solid var(--accent);

    position: sticky;

    top: 0;

    z-index: 100;

}



.header-inner {

    max-width: 1280px;

    margin: 0 auto;

    padding: 0 1rem;

    display: flex;

    align-items: center;

    justify-content: space-between;

    height: 56px;

}



.brand {

    display: flex;

    align-items: center;

    gap: 0.6rem;

    flex-shrink: 0;

}



.brand-mark {

    background: var(--accent);

    color: var(--white);

    font-weight: 800;

    font-size: 0.85rem;

    letter-spacing: 0.05em;

    padding: 0.25rem 0.5rem;

    border-radius: 2px;

    line-height: 1;

}



.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1.15;

}



.brand-name {

    color: var(--white);

    font-weight: 700;

    font-size: 0.9rem;

}



.brand-sub {

    color: var(--gray-400);

    font-size: 0.7rem;

    text-transform: uppercase;

    letter-spacing: 0.12em;

    font-weight: 500;

}



/* Navigation */

.main-nav {

    display: flex;

    gap: 2px;

    align-items: center;

}



.nav-btn {

    background: transparent;

    border: none;

    color: var(--gray-400);

    font-family: var(--font);

    font-size: 0.82rem;

    font-weight: 500;

    padding: 0.5rem 0.9rem;

    cursor: pointer;

    border-radius: var(--radius);

    transition: color 0.15s, background 0.15s;

    white-space: nowrap;

}



.nav-btn:hover {

    color: var(--white);

    background: var(--navy-light);

}



.nav-btn.active {

    color: var(--white);

    background: var(--navy-lighter);

}



.nav-toggle {

    display: none;

    background: none;

    border: none;

    cursor: pointer;

    padding: 0.5rem;

    flex-direction: column;

    gap: 4px;

}



.nav-toggle span {

    display: block;

    width: 20px;

    height: 2px;

    background: var(--gray-400);

    border-radius: 1px;

    transition: background 0.15s;

}



.nav-toggle:hover span {

    background: var(--white);

}



/* --- Main Content --- */

main {

    flex: 1;

    max-width: 1280px;

    width: 100%;

    margin: 0 auto;

    padding: 0 1rem 2rem;

}



.content-section {

    display: none;

}



.content-section.active {

    display: block;

}



/* --- Home Dashboard --- */

.home-hero {

    text-align: center;

    padding: 2.5rem 1rem 1.5rem;

}



.home-brand-mark {

    width: 64px;

    height: 64px;

    font-size: 1.5rem;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0 auto 0.75rem;

    border-radius: 14px;

}



.home-title {

    font-size: 1.5rem;

    font-weight: 800;

    color: var(--navy);

    margin-bottom: 0.1rem;

}



.home-sub {

    font-size: 0.9rem;

    color: var(--gray-500);

    font-weight: 500;

    text-transform: uppercase;

    letter-spacing: 0.12em;

}



.home-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 0.75rem;

    max-width: 480px;

    margin: 0 auto;

    padding: 0.5rem 1rem 2rem;

}



.home-tile {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 0.35rem;

    width: 100%;

    background: var(--white);

    border: 2px solid var(--gray-200);

    border-radius: 14px;

    padding: 1.5rem 0.75rem 1.25rem;

    cursor: pointer;

    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;

    text-align: center;

    -webkit-tap-highlight-color: transparent;

}



.home-tile:hover {

    border-color: var(--accent);

    box-shadow: 0 4px 16px rgba(0, 82, 61, 0.12);

}



.home-tile:active {

    transform: scale(0.97);

}



.home-tile-icon {

    font-size: 2rem;

    color: var(--accent);

    line-height: 1;

}



.home-tile-label {

    font-size: 0.95rem;

    font-weight: 700;

    color: var(--gray-800);

}



.home-tile-desc {

    font-size: 0.75rem;

    color: var(--gray-500);

    line-height: 1.3;

}



/* Last tile spans full width on 2-col grid when odd count */

.home-grid .home-tile:last-child:nth-child(odd) {

    grid-column: 1 / -1;

}



/* Back-to-home button */

.back-home-btn {

    display: inline-flex;

    align-items: center;

    gap: 0.3rem;

    background: none;

    border: none;

    color: var(--accent);

    font-family: var(--font);

    font-size: 0.85rem;

    font-weight: 600;

    cursor: pointer;

    padding: 0.75rem 0 0.25rem;

    transition: color 0.15s;

}



.back-home-btn:hover {

    color: var(--accent-dark);

}



.back-home-btn .material-symbols-rounded {

    font-size: 1.1rem;

}



.section-bar {

    padding: 1.25rem 0 1rem;

    border-bottom: 1px solid var(--gray-200);

    margin-bottom: 1.25rem;

}



.section-bar h1 {

    font-size: 1.35rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.15rem;

}



.section-bar p {

    color: var(--gray-500);

    font-size: 0.85rem;

}



/* --- Calculator Layout --- */

.calc-layout {

    display: grid;

    grid-template-columns: 380px 1fr;

    gap: 1.25rem;

    align-items: start;

}



.input-panel {

    background: var(--white);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1.25rem;

}



.input-panel h2 {

    font-size: 0.95rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 1rem;

    padding-bottom: 0.5rem;

    border-bottom: 2px solid var(--accent);

}



.panel-desc {

    font-size: 0.8rem;

    color: var(--gray-500);

    margin-top: -0.6rem;

    margin-bottom: 1rem;

}



.form-row {

    display: flex;

    gap: 0.75rem;

    margin-bottom: 0.85rem;

}



.form-group {

    flex: 1;

    display: flex;

    flex-direction: column;

    min-width: 0;

}



.form-group.full-width {

    flex: 1 1 100%;

}

.advanced-body .form-row > .form-group:only-child {

    flex: 0 1 calc(50% - 0.375rem);

}



.form-group label {

    font-size: 0.75rem;

    font-weight: 600;

    color: var(--gray-600);

    margin-bottom: 0.3rem;

    text-transform: uppercase;

    letter-spacing: 0.02em;

}



.form-group input,

.form-group select {

    font-family: var(--font);

    font-size: 0.9rem;

    padding: 0.5rem 0.6rem;

    border: 1px solid var(--gray-300);

    border-radius: var(--radius);

    background: var(--white);

    color: var(--gray-800);

    transition: border-color 0.15s;

    width: 100%;

    min-width: 0;

    box-sizing: border-box;

}



.form-group input:focus,

.form-group select:focus {

    outline: none;

    border-color: var(--accent);

    box-shadow: 0 0 0 2px rgba(0, 82, 61, 0.15);

}



.input-note {

    font-size: 0.7rem;

    color: var(--gray-400);

    margin-top: 0.2rem;

}



.btn-calc {

    width: 100%;

    padding: 0.65rem;

    font-family: var(--font);

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--white);

    background: var(--accent);

    border: none;

    border-radius: var(--radius);

    cursor: pointer;

    transition: background 0.15s;

    margin-top: 0.25rem;

}



.btn-calc:hover {

    background: var(--accent-dark);

}



.btn-calc.btn-secondary {

    background: var(--navy);

}



.btn-calc.btn-secondary:hover {

    background: var(--navy-light);

}



/* --- Advanced Options Panel --- */

.advanced-panel {

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    margin: 0.85rem 0;

    background: var(--gray-50);

}



.advanced-panel summary {

    cursor: pointer;

    padding: 0.6rem 0.8rem;

    font-size: 0.8rem;

    font-weight: 700;

    color: var(--navy);

    text-transform: uppercase;

    letter-spacing: 0.04em;

    list-style: none;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 0.5rem;

    user-select: none;

}



.advanced-panel summary::-webkit-details-marker { display: none; }



.advanced-panel summary::after {

    content: '\25BE';

    font-size: 0.85rem;

    color: var(--gray-500);

    transition: transform 0.15s;

}



.advanced-panel[open] summary::after {

    transform: rotate(180deg);

}



.adv-hint {

    font-size: 0.7rem;

    font-weight: 500;

    color: var(--gray-500);

    text-transform: none;

    letter-spacing: 0;

    margin-left: auto;

    margin-right: 0.4rem;

}



.advanced-body {

    padding: 0.6rem 0.8rem 0.85rem;

    border-top: 1px solid var(--gray-200);

}



.adv-note {

    font-size: 0.72rem;

    color: var(--gray-500);

    margin-top: 0.5rem;

    line-height: 1.4;

    font-style: italic;

}



/* --- Setup chips (drum/radius/lift display) --- */

.setup-chips {

    display: flex;

    flex-wrap: wrap;

    gap: 0.4rem;

    margin: 0.5rem 0 1rem;

}



.setup-chips .chip {

    background: var(--navy);

    color: var(--white);

    font-size: 0.72rem;

    font-weight: 600;

    padding: 0.2rem 0.55rem;

    border-radius: 999px;

    letter-spacing: 0.02em;

}



/* --- Alt-count note --- */

.alt-count-note {

    font-size: 0.78rem;

    color: var(--gray-600);

    margin-bottom: 0.6rem;

    padding: 0.45rem 0.6rem;

    background: var(--blue-bg);

    border-left: 3px solid var(--blue);

    border-radius: var(--radius);

}



/* --- Results Panel --- */

.calc-results {

    background: var(--white);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1.25rem;

    min-height: 400px;

}



.results-placeholder {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 3rem 1rem;

    color: var(--gray-400);

}



.placeholder-icon {

    margin-bottom: 1rem;

    opacity: 0.3;

}



.results-placeholder p {

    font-size: 0.9rem;

    max-width: 300px;

}



/* Results Content */

.results-summary {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 0.75rem;

    margin-bottom: 1.25rem;

}



.summary-stat {

    padding: 0.75rem;

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    text-align: center;

}



.summary-stat .stat-value {

    font-size: 1.4rem;

    font-weight: 800;

    color: var(--navy);

    line-height: 1.2;

}



.summary-stat .stat-label {

    font-size: 0.7rem;

    color: var(--gray-500);

    text-transform: uppercase;

    letter-spacing: 0.04em;

    font-weight: 600;

}



.results-heading {

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.75rem;

    margin-top: 1rem;

    padding-bottom: 0.35rem;

    border-bottom: 1px solid var(--gray-200);

}



.match-card {

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1rem;

    margin-bottom: 0.75rem;

    position: relative;

    transition: border-color 0.15s;

}



.match-card.best-match {

    border-color: var(--green);

    border-width: 2px;

    background: var(--green-bg);

}



.match-card.close-match {

    border-color: var(--amber);

    background: var(--amber-bg);

}



.match-badge {

    position: absolute;

    top: -0.5rem;

    right: 0.75rem;

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.06em;

    padding: 0.15rem 0.5rem;

    border-radius: 2px;

    color: var(--white);

}



.best-match .match-badge {

    background: var(--green);

}



.close-match .match-badge {

    background: var(--amber);

}



.warn-match {

    border-color: #dc2626;

    background: #fef2f2;

}



.warn-match .match-badge {

    background: #dc2626;

}



.match-spring-name {

    font-size: 1.05rem;

    font-weight: 700;

    color: var(--gray-800);

    margin-bottom: 0.5rem;

}



.match-details {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 0.3rem 0.75rem;

    font-size: 0.8rem;

}



.match-detail {

    display: flex;

    justify-content: space-between;

    align-items: baseline;

    padding: 0.15rem 0;

    gap: 0.5rem;

    min-width: 0;

}



.match-detail .detail-label {

    color: var(--gray-500);

    font-weight: 500;

    white-space: nowrap;

}



.match-detail .detail-value {

    color: var(--gray-800);

    font-weight: 600;

    font-family: var(--mono);

    font-size: 0.78rem;

    white-space: nowrap;

    text-align: right;

}



.match-bar {

    margin-top: 0.6rem;

    height: 6px;

    background: var(--gray-200);

    border-radius: 3px;

    overflow: hidden;

}



.match-bar-fill {

    height: 100%;

    border-radius: 3px;

    transition: width 0.4s ease;

}



.match-bar-fill.green { background: var(--green); }

.match-bar-fill.amber { background: var(--amber); }

.match-bar-fill.accent { background: var(--accent); }



.match-percent {

    font-size: 0.72rem;

    color: var(--gray-500);

    margin-top: 0.25rem;

    text-align: right;

    font-weight: 500;

}



.no-match-msg {

    padding: 2rem 1rem;

    text-align: center;

    color: var(--gray-500);

    font-size: 0.9rem;

}



.results-note {

    margin-top: 1rem;

    padding: 0.75rem;

    background: var(--blue-bg);

    border: 1px solid #bfdbfe;

    border-radius: var(--radius);

    font-size: 0.78rem;

    color: var(--blue);

    line-height: 1.5;

}



/* Reverse Lookup Results */

.reverse-results {

    margin-top: 1rem;

    padding: 1rem;

    background: var(--gray-50);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

}



.reverse-results h3 {

    font-size: 0.85rem;

    color: var(--navy);

    margin-bottom: 0.5rem;

}



.reverse-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 0.4rem 1rem;

    font-size: 0.8rem;

}



.reverse-item {

    display: flex;

    justify-content: space-between;

    padding: 0.2rem 0;

    border-bottom: 1px dotted var(--gray-200);

}



.reverse-item .lbl {

    color: var(--gray-500);

}



.reverse-item .val {

    font-weight: 600;

    font-family: var(--mono);

    font-size: 0.78rem;

}



/* --- Mismatch Spring Blocks --- */

.mismatch-spring-block {

    margin-bottom: 0.75rem;

    padding: 0.75rem;

    background: var(--gray-50);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

}



.mismatch-label {

    font-size: 0.78rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.35rem;

    text-transform: uppercase;

    letter-spacing: 0.03em;

}



/* --- Spring Lookup Summary --- */

.lookup-summary {

    background: var(--navy);

    color: var(--white);

    border-radius: var(--radius);

    padding: 0.75rem 1rem;

    margin-bottom: 0.75rem;

}



.lookup-summary-row {

    display: flex;

    justify-content: space-between;

    padding: 0.25rem 0;

    font-size: 0.82rem;

}



.lookup-summary-row + .lookup-summary-row {

    border-top: 1px solid rgba(255,255,255,0.15);

}



.lookup-summary-label {

    opacity: 0.8;

}



.lookup-summary-value {

    font-weight: 700;

    font-family: var(--mono);

}



.lookup-warning {

    background: var(--accent);

    color: var(--white);

    margin: 0.4rem -1rem -0.75rem;

    padding: 0.4rem 1rem;

    border-radius: 0 0 var(--radius) var(--radius);

}



.spring-detail-heading {

    font-size: 0.82rem;

    color: var(--navy);

    margin: 0.75rem 0 0.35rem;

    padding-bottom: 0.25rem;

    border-bottom: 2px solid var(--accent);

}



.lookup-warn-box {

    background: #fef2f2;

    border: 1px solid #fca5a5;

    color: #991b1b;

    padding: 0.4rem 0.6rem;

    border-radius: var(--radius);

    font-size: 0.78rem;

    margin-top: 0.4rem;

}



.results-heading {

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.5rem;

}



.no-match-msg {

    background: var(--amber-bg);

    border: 1px solid var(--amber);

    color: var(--amber);

    padding: 0.6rem 0.8rem;

    border-radius: var(--radius);

    font-size: 0.82rem;

}



/* --- Mixed Pair Display --- */

.mixed-pair-springs {

    margin-bottom: 0.5rem;

}



.mixed-spring-item {

    font-size: 0.82rem;

    padding: 0.2rem 0;

    color: var(--gray-700);

}



.mixed-spring-label {

    font-weight: 700;

    color: var(--navy);

    display: inline-block;

    min-width: 3rem;

}



.mixed-spring-lift {

    color: var(--gray-500);

    font-family: var(--mono);

    font-size: 0.78rem;

}



/* --- Spring Chart / Inventory Table --- */

.chart-controls {

    display: flex;

    gap: 1rem;

    margin-bottom: 1rem;

    flex-wrap: wrap;

}



.chart-controls .form-group {

    flex: 0 1 200px;

}



.chart-scroll-hint {

    display: none;

    text-align: center;

    font-size: 0.75rem;

    color: var(--gray-400);

    padding: 0.25rem 0 0.5rem;

}



.chart-wrapper {

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    position: relative;

}



/* Scroll hint shadow on right edge */

.chart-wrapper::after {

    content: '';

    position: sticky;

    right: 0;

    top: 0;

    display: block;

    width: 0;

    height: 100%;

    box-shadow: -16px 0 24px -8px rgba(0,0,0,.08);

    pointer-events: none;

    float: right;

    margin-top: -100%;

}



.spring-table {

    width: 100%;

    min-width: 620px;

    border-collapse: collapse;

    font-size: 0.82rem;

    white-space: nowrap;

}



.spring-table thead {

    background: var(--navy);

    color: var(--white);

}



.spring-table th {

    padding: 0.6rem 0.75rem;

    text-align: left;

    font-weight: 600;

    font-size: 0.72rem;

    text-transform: uppercase;

    letter-spacing: 0.04em;

}



.spring-table td {

    padding: 0.5rem 0.75rem;

    border-bottom: 1px solid var(--gray-200);

    font-family: var(--mono);

    font-size: 0.8rem;

}



.spring-table tbody tr:hover {

    background: var(--blue-bg);

}



.spring-table tbody tr:nth-child(even) {

    background: var(--gray-50);

}



.spring-table tbody tr:nth-child(even):hover {

    background: var(--blue-bg);

}



.chart-note {

    margin-top: 1rem;

    font-size: 0.78rem;

    color: var(--gray-500);

    padding: 0.75rem;

    background: var(--gray-100);

    border-radius: var(--radius);

}



.chart-note code {

    background: var(--gray-200);

    padding: 0.1rem 0.35rem;

    border-radius: 2px;

    font-family: var(--mono);

    font-size: 0.75rem;

}



.chart-image-section {

    margin-top: 1.5rem;

}



.chart-image-section h3 {

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.75rem;

}



.chart-image {

    max-width: 100%;

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

}



/* --- Weight Guide --- */

.weight-layout {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1.25rem;

    align-items: start;

}



.weight-ref-panel {

    background: var(--white);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1.25rem;

}



.weight-ref-panel h2 {

    font-size: 0.95rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.75rem;

}



.weight-result {

    margin-top: 1rem;

    padding: 1rem;

    background: var(--green-bg);

    border: 1px solid #a7f3d0;

    border-radius: var(--radius);

}



.weight-result .weight-value {

    font-size: 1.6rem;

    font-weight: 800;

    color: var(--green);

}



.weight-result .weight-label {

    font-size: 0.78rem;

    color: var(--gray-600);

    margin-top: 0.25rem;

}



.weight-result .weight-range {

    font-size: 0.82rem;

    color: var(--gray-700);

    margin-top: 0.5rem;

    padding-top: 0.5rem;

    border-top: 1px solid #a7f3d0;

}



.how-to-weigh {

    padding-top: 0.5rem;

}



.how-to-weigh ol {

    padding-left: 1.2rem;

    font-size: 0.82rem;

    color: var(--gray-700);

}



.how-to-weigh li {

    margin-bottom: 0.5rem;

    line-height: 1.5;

}



/* --- Quick Reference --- */

.ref-layout {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 1.25rem;

    align-items: start;

}



.ref-card {

    background: var(--white);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1.25rem;

}



.ref-card h2 {

    font-size: 0.9rem;

    font-weight: 700;

    color: var(--navy);

    margin-bottom: 0.75rem;

    padding-bottom: 0.4rem;

    border-bottom: 2px solid var(--accent);

}



.ref-table {

    width: 100%;

    border-collapse: collapse;

    font-size: 0.8rem;

}



.ref-table thead {

    background: var(--gray-100);

}



.ref-table th {

    padding: 0.45rem 0.6rem;

    text-align: left;

    font-weight: 600;

    font-size: 0.72rem;

    text-transform: uppercase;

    letter-spacing: 0.03em;

    color: var(--gray-600);

    border-bottom: 1px solid var(--gray-200);

}



.ref-table td {

    padding: 0.4rem 0.6rem;

    border-bottom: 1px solid var(--gray-100);

    font-size: 0.8rem;

}



.ref-table.compact td {

    font-family: var(--mono);

    font-size: 0.78rem;

}



.ref-table tbody tr:hover {

    background: var(--gray-50);

}



.ref-formula {

    margin-top: 0.75rem;

    padding: 0.6rem 0.75rem;

    background: var(--gray-50);

    border-left: 3px solid var(--navy);

    font-size: 0.78rem;

    color: var(--gray-600);

    line-height: 1.6;

}



.formula-list {

    display: flex;

    flex-direction: column;

    gap: 0.75rem;

}



.formula-item {

    padding: 0.6rem 0.75rem;

    background: var(--gray-50);

    border-radius: var(--radius);

    border-left: 3px solid var(--accent);

}



.formula-label {

    font-size: 0.72rem;

    font-weight: 700;

    color: var(--gray-600);

    text-transform: uppercase;

    letter-spacing: 0.04em;

    margin-bottom: 0.15rem;

}



.formula-expr {

    font-family: var(--mono);

    font-size: 0.85rem;

    color: var(--navy);

    font-weight: 600;

}



.formula-vars {

    font-size: 0.7rem;

    color: var(--gray-500);

    margin-top: 0.2rem;

}



.tips-list {

    list-style: none;

    padding: 0;

}



.tips-list li {

    font-size: 0.8rem;

    padding: 0.5rem 0;

    border-bottom: 1px solid var(--gray-100);

    line-height: 1.5;

    color: var(--gray-700);

}



.tips-list li:last-child {

    border-bottom: none;

}



.tips-list li strong {

    color: var(--gray-800);

}



/* --- Motor Guides --- */

.guides-shell {

    background: var(--white);

    border: 1px solid var(--gray-200);

    border-radius: var(--radius);

    padding: 1.1rem;

}



.guides-toolbar {

    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 0.85rem;

    margin-bottom: 0.9rem;

}



.guides-search-group input,

.guides-filter-group select {

    width: 100%;

}



.guides-quick-tags {

    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    margin-bottom: 1rem;

}



.guide-tag {

    border: 1px solid var(--gray-300);

    background: var(--gray-50);

    color: var(--gray-700);

    padding: 0.35rem 0.65rem;

    border-radius: 999px;

    font-size: 0.76rem;

    font-weight: 600;

    cursor: pointer;

}



.guide-tag.active {

    background: var(--accent);

    border-color: var(--accent);

    color: var(--white);

}



.guides-results-head {

    display: flex;

    justify-content: space-between;

    align-items: baseline;

    margin-bottom: 0.8rem;

}



.guides-results-head h2 {

    font-size: 0.95rem;

    font-weight: 700;

    color: var(--navy);

}



#guideResultsCount {

    font-size: 0.78rem;

    color: var(--gray-500);

    font-weight: 600;

}



.guides-grid {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0.85rem;

}



.guide-card {

    border: 1px solid var(--gray-200);

    border-radius: 10px;

    padding: 0.95rem;

    background: var(--white);

    transition: border-color 0.15s, box-shadow 0.15s;

}



.guide-card:hover {

    border-color: var(--accent);

    box-shadow: 0 4px 16px rgba(0, 82, 61, 0.12);

}



.guide-card header {

    margin-bottom: 0.55rem;

}



.guide-kicker {

    display: inline-flex;

    align-items: center;

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.05em;

    line-height: 1;

    color: var(--accent);

    background: var(--green-bg);

    border: 1px solid #bbf7d0;

    border-radius: 999px;

    padding: 0.25rem 0.5rem;

}



.guide-card h3 {

    font-size: 0.95rem;

    color: var(--gray-800);

    line-height: 1.35;

}



.guide-card ol {

    margin: 0.25rem 0 0;

    padding-left: 1.15rem;

}



.guide-card li {

    font-size: 0.8rem;

    color: var(--gray-700);

    margin-bottom: 0.32rem;

    line-height: 1.45;

}



.guide-note {

    margin-top: 0.5rem;

    font-size: 0.76rem;

    color: var(--gray-600);

    background: var(--gray-50);

    border-left: 3px solid var(--navy);

    padding: 0.45rem 0.55rem;

    border-radius: 2px;

}



.guide-card.hidden {

    display: none;

}

.guide-header-row {

    display: flex;

    align-items: center;

    gap: 0.4rem;

    flex-wrap: wrap;

    margin-bottom: 0.42rem;

}

.guide-scope {

    display: inline-flex;

    align-items: center;

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.05em;

    line-height: 1;

    border-radius: 999px;

    padding: 0.25rem 0.5rem;

    border: 1px solid transparent;

}

.guide-scope.style {

    color: #92400e;

    background: #fef3c7;

    border-color: #fde68a;

}

.guide-scope.model {

    color: #1e3a8a;

    background: #dbeafe;

    border-color: #bfdbfe;

}

.guide-applies {

    margin-top: 0.55rem;

    font-size: 0.72rem;

    color: var(--gray-600);

    line-height: 1.4;

}

.guide-applies strong {

    color: var(--gray-700);

    font-weight: 600;

}

.guide-applies code {

    background: var(--gray-50);

    border: 1px solid var(--gray-200);

    border-radius: 4px;

    padding: 0.05rem 0.32rem;

    margin: 0 0.18rem 0.18rem 0;

    display: inline-block;

    font-size: 0.7rem;

    color: var(--gray-700);

}

.guide-panel {

    margin: 0.55rem 0 0.4rem;

    padding: 0.5rem 0.55rem;

    background: linear-gradient(180deg, #fafafa, #f3f4f6);

    border: 1px solid var(--gray-200);

    border-radius: 8px;

    display: flex;

    justify-content: center;

    align-items: center;

}

.guide-panel svg {

    width: 100%;

    max-width: 440px;

    height: auto;

    display: block;

}



/* --- Footer --- */

.site-footer {

    border-top: 1px solid var(--gray-200);

    background: var(--white);

    margin-top: 2rem;

}



.footer-inner {

    max-width: 1280px;

    margin: 0 auto;

    padding: 0.75rem 1rem;

    text-align: center;

    font-size: 0.75rem;

    color: var(--gray-400);

}



.footer-inner code {

    background: var(--gray-100);

    padding: 0.1rem 0.3rem;

    border-radius: 2px;

    font-family: var(--mono);

    font-size: 0.7rem;

}



/* ============================================================

   RESPONSIVE

   ============================================================ */



@media (max-width: 1024px) {

    .calc-layout {

        grid-template-columns: 1fr;

    }



    .weight-layout {

        grid-template-columns: 1fr;

    }



    .ref-layout {

        grid-template-columns: 1fr;

    }



    .guides-grid {

        grid-template-columns: 1fr;

    }



    .guides-toolbar {

        grid-template-columns: 1fr;

    }



    .results-summary {

        grid-template-columns: repeat(3, 1fr);

    }



    .header-inner {

        height: 50px;

    }



    .main-nav {

        display: none;

        position: absolute;

        top: 53px;

        left: 0;

        right: 0;

        background: var(--navy);

        flex-direction: column;

        padding: 0.5rem;

        border-bottom: 3px solid var(--accent);

        gap: 2px;

    }



    .main-nav.open {

        display: flex;

    }



    .nav-btn {

        text-align: left;

        padding: 0.7rem 0.9rem;

        font-size: 0.9rem;

    }



    .nav-toggle {

        display: flex;

    }



    .brand-name {

        font-size: 0.8rem;

    }

}



@media (max-width: 768px) {

    html {

        font-size: 14px;

    }



    .results-summary {

        grid-template-columns: 1fr 1fr 1fr;

        gap: 0.5rem;

    }



    .summary-stat .stat-value {

        font-size: 1.1rem;

    }



    .match-details {

        grid-template-columns: 1fr 1fr;

    }



    .chart-controls {

        flex-direction: column;

    }



    .chart-controls .form-group {

        flex: 1 1 100%;

    }



    .spring-table th {

        padding: 0.5rem 0.5rem;

        font-size: 0.65rem;

    }



    .spring-table td {

        padding: 0.4rem 0.5rem;

        font-size: 0.72rem;

    }



    .chart-scroll-hint {

        display: block;

    }



    .footer-inner {

        flex-direction: column;

        gap: 0.25rem;

        text-align: center;

    }

}



@media (max-width: 480px) {

    .form-row {

        flex-direction: column;

        gap: 0.6rem;

    }



    .results-summary {

        grid-template-columns: 1fr;

    }



    .match-details {

        grid-template-columns: 1fr;

    }



    .reverse-grid {

        grid-template-columns: 1fr;

    }



    .section-bar h1 {

        font-size: 1.15rem;

    }



    .home-hero {

        padding: 2rem 1rem 1rem;

    }



    .home-tile {

        padding: 1.25rem 0.5rem 1rem;

    }



    .home-tile-icon {

        font-size: 1.75rem;

    }

}



/* Wider screens: jump straight to 5-col */

@media (min-width: 700px) {

    .home-grid {

        grid-template-columns: repeat(3, minmax(0, 180px));

        justify-content: center;


        max-width: 760px;

        gap: 0.75rem;

    }



    .home-grid .home-tile:last-child:nth-child(odd) {

        grid-column: auto;

    }

}



@media (min-width: 900px) {

    .home-grid {

        grid-template-columns: repeat(6, minmax(0, 145px));

        max-width: 1000px;

        gap: 1rem;

    }



    .home-tile {

        padding: 2rem 1rem 1.5rem;

    }

}

