/* ==========================================================================
   STUDENT TOOLS & CALCULATORS SUITE - MASTER OPTIMIZED DESIGN SYSTEM
   Follows Antigravity Global Rules: DRY, Lightweight, Reusable, Production-Ready.
   ========================================================================== */

:root {
    --tool-primary: #2b2a75;
    --tool-primary-hover: #4338ca;
    --tool-secondary: #06b6d4;
    --tool-accent-yellow: #ffb703;
    --tool-accent-amber: #f59e0b;
    --tool-dark-navy: #1e1b4b;
    --tool-slate-dark: #0f172a;
    --tool-card-bg: #ffffff;
    --tool-border-color: #e2e8f0;
}

/* Page Layout Wrapper */
.tool-page-wrapper {
    background-color: #f8fafc;
    padding-bottom: 30px;
    font-family: inherit;
}

/* Hero Banner Section */
.tool-hero-section {
    background: linear-gradient(135deg, #2d106e 0%, #3b118a 50%, #4c1d95 100%) !important;
    color: #ffffff;
    padding: 40px 0 40px 0 !important;
    position: relative;
    overflow: hidden;
}

.tool-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tool-hero-title {
    font-size: 2rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    font-family: inherit !important;
}

.tool-hero-title .title-highlight {
    color: var(--tool-accent-yellow) !important;
    font-weight: 500 !important;
}

.title-highlight-cursor::after {
    content: '|';
    animation: blinkCursor 1s infinite;
    color: var(--tool-accent-yellow);
    margin-left: 2px;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.tool-hero-subtitle {
    font-size: 1.05rem !important;
    color: #e2e8f0 !important;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.65;
    font-weight: 500;
}

/* Breadcrumbs System */
.tool-breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0 !important;
}

.tool-breadcrumb .breadcrumb-item {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
}

.tool-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    padding: 4px 6px !important;
    transition: color 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.tool-breadcrumb .breadcrumb-item a:hover {
    color: var(--tool-accent-yellow) !important;
    text-decoration: underline !important;
}

.tool-breadcrumb .breadcrumb-item.active {
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 4px 6px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.tool-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "/" !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    padding: 0 6px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.tool-breadcrumb a::after,
.tool-breadcrumb a::before,
.tool-breadcrumb .breadcrumb-item::after {
    content: none !important;
    display: none !important;
}

/* Index Search & Live Filter Bar System (Redesigned Website Banner Search Layout) */
.tool-search-wrapper {
    position: relative !important;
    max-width: 760px !important;
    margin: -26px auto 26px auto !important;
    z-index: 20 !important;
}

.tool-search-box {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 4px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
}

.tool-search-icon-box {
    width: 44px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    font-size: 1.15rem !important;
    border-right: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
}

.tool-search-input {
    flex-grow: 1 !important;
    height: 40px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 16px !important;
    font-size: 0.9rem !important;
    color: #0f172a !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}

.tool-search-input::placeholder,
.tool-search-input::-webkit-input-placeholder,
.tool-search-input::-moz-placeholder,
.tool-search-input:-ms-input-placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
    font-size: 0.8rem !important;
}

.tool-search-btn {
    height: 40px !important;
    background: var(--tool-accent-yellow) !important;
    color: var(--tool-dark-navy) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 26px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tool-search-btn:hover {
    background: var(--tool-dark-navy) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(30, 27, 75, 0.3) !important;
}

.tool-search-input:focus,
.tool-search-input:focus-visible {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.tool-search-box:focus-within {
    border-color: #ffb703 !important;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.35), 0 10px 30px -5px rgba(15, 23, 42, 0.15) !important;
}

/* Category Filter Badges */
.filter-btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    margin-bottom: 30px !important;
}

.filter-badge-btn {
    background: #ffffff !important;
    color: #340089 !important;
    border: 1.5px solid #ffb703 !important;
    padding: 7px 18px !important;
    border-radius: 25px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.filter-badge-btn:focus-visible,
.tool-page-wrapper button:focus-visible,
.tool-page-wrapper a:focus-visible {
    outline: 2.5px solid #ffb703 !important;
    outline-offset: 2px !important;
}

.filter-badge-btn:hover,
.filter-badge-btn.active {
    background: #ffb703 !important;
    color: #1e1b4b !important;
    border-color: #ffb703 !important;
    box-shadow: 0 4px 14px rgba(255, 183, 3, 0.4) !important;
}

/* 3D Glassmorphic Cards (Index & Calculators) */
.tool-card,
.tool-calculator-card {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 4px 10px -2px rgba(15, 23, 42, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
}

.tool-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 18px 22px !important;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.015) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.16), 0 10px 20px -6px rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

.tool-card-header {
    padding: 0 0 12px 0 !important;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.tool-icon-box {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px !important;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    color: var(--tool-dark-navy) !important;
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.35) !important;
    transition: transform 0.3s ease !important;
}

.tool-card:hover .tool-icon-box {
    transform: scale(1.1) rotate(-4deg) !important;
}

.tool-tag {
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    background: #eef2ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: 0 1px 3px rgba(67, 56, 202, 0.08) !important;
}

.tool-card-body {
    padding: 0 0 10px 0 !important;
    flex-grow: 1;
}

.tool-card-title {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 6px !important;
    line-height: 1.3;
}

.tool-card-desc {
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
}

.tool-card-footer {
    padding: 10px 0 0 0 !important;
    background: transparent !important;
    border-top: 1px dashed #cbd5e1 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-btn-link {
    color: #3b2a86 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.2s ease, gap 0.2s ease !important;
}

.tool-btn-link:hover,
.tool-card:hover .tool-btn-link {
    color: #2563eb !important;
    gap: 10px !important;
}

/* Converter Slip Card System */
.converter-slip {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03) !important;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 24px !important;
}

.converter-slip-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
}

.converter-slip-header h5 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin-bottom: 2px !important;
}

.converter-slip-header p {
    color: #cbd5e1 !important;
    font-size: 0.92rem !important;
    margin-bottom: 0 !important;
}

.converter-slip-body {
    padding: 28px !important;
    position: relative !important;
    background: #ffffff !important;
}

@media (min-width: 768px) {
    .converter-left-col {
        padding-right: 28px !important;
        border-right: 1px dashed #e2e8f0 !important;
    }

    .converter-right-col {
        padding-left: 28px !important;
        text-align: center !important;
    }
}

@media (max-width: 767px) {
    .converter-left-col {
        margin-bottom: 24px !important;
        padding-bottom: 24px !important;
        border-bottom: 1px dashed #e2e8f0 !important;
    }

    .converter-right-col {
        text-align: center !important;
    }
}

.converter-label-green {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: #059669 !important;
    margin-bottom: 6px !important;
}

.converter-big-val {
    font-size: 2.8rem !important;
    font-weight: 800 !important;
    color: var(--tool-primary) !important;
    line-height: 1.1 !important;
    margin: 8px 0 !important;
}

.converter-big-val small {
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

.converter-sub-val {
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    margin-bottom: 12px !important;
}

.converter-formula-pill {
    display: inline-block !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
    padding: 8px 18px !important;
    border-radius: 30px !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
    word-break: break-word;
}

/* AJAX Loader Overlay & Spinner */
.tool-loader-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(4px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
}

.tool-loader-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.tool-spinner {
    width: 38px !important;
    height: 38px !important;
    border: 3.5px solid #e2e8f0 !important;
    border-top-color: var(--tool-primary) !important;
    border-radius: 50% !important;
    animation: toolSpin 0.75s linear infinite !important;
}

@keyframes toolSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Master Form Control Styles */
.tool-form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-form-control {
    height: 46px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
    padding: 0 16px;
    transition: all 0.2s ease;
}

.tool-form-control:focus {
    border-color: var(--tool-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* Buttons Design System */
.preset-btn,
.btn-preset {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.84rem !important;
    padding: 5px 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.preset-btn:hover,
.btn-preset:hover {
    background: var(--tool-dark-navy) !important;
    border-color: var(--tool-dark-navy) !important;
    color: #ffffff !important;
}

.preset-btn.active,
.btn-preset.active {
    background: var(--tool-primary) !important;
    color: #ffffff !important;
    border-color: var(--tool-primary) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

/* Primary Action Buttons (Signature Yellow Theme) */
.btn-dark-purple,
.converter-slip button[type="submit"],
.tool-submit-btn {
    background: var(--tool-accent-yellow) !important;
    color: var(--tool-dark-navy) !important;
    border: none !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    box-shadow: 0 4px 14px rgba(255, 183, 3, 0.4) !important;
    transition: all 0.25s ease !important;
}

.btn-dark-purple:hover,
.converter-slip button[type="submit"]:hover,
.tool-submit-btn:hover {
    background: var(--tool-dark-navy) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(30, 27, 75, 0.4) !important;
}

/* Reset Buttons */
.converter-slip .btn-outline-secondary,
.tool-reset-btn,
[id^="btnReset"] {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    transition: all 0.25s ease !important;
}

.converter-slip .btn-outline-secondary:hover,
.tool-reset-btn:hover,
[id^="btnReset"]:hover {
    background: var(--tool-dark-navy) !important;
    color: #ffffff !important;
    border-color: var(--tool-dark-navy) !important;
    box-shadow: 0 4px 14px rgba(30, 27, 75, 0.3) !important;
}

/* Currency Direction Toggle Segment Control */
.currency-toggle-pill {
    display: inline-flex !important;
    background: #f1f5f9 !important;
    padding: 5px !important;
    border-radius: 30px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    gap: 4px !important;
}

.curr-toggle-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    padding: 8px 22px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.curr-toggle-btn:hover {
    color: var(--tool-dark-navy) !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.curr-toggle-btn.active {
    background: var(--tool-accent-yellow) !important;
    color: var(--tool-dark-navy) !important;
    box-shadow: 0 4px 14px rgba(255, 183, 3, 0.4) !important;
}

/* Measurement Dual Ruler Card */
.dual-ruler-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e0e7ff !important;
    box-shadow: 0 10px 30px -5px rgba(79, 70, 229, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03) !important;
    padding: 26px !important;
    margin-bottom: 24px !important;
    position: relative !important;
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #2b2a75 0%, #7c3aed 100%) !important;
}

.dual-ruler-wrapper {
    position: relative !important;
    padding: 30px 0 10px 0 !important;
}

.ruler-flex-container {
    display: flex !important;
    align-items: flex-start !important;
    gap: 20px !important;
}

@media (max-width: 576px) {
    .ruler-flex-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
}

.ruler-meta-column {
    width: 130px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.ruler-meta-block {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    height: 48px !important;
}

.ruler-badge-inches {
    display: inline-flex !important;
    align-items: center !important;
    background: #e0e7ff !important;
    color: #3730a3 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    width: fit-content !important;
}

.ruler-badge-cm {
    display: inline-flex !important;
    align-items: center !important;
    background: #d1fae5 !important;
    color: #065f46 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    width: fit-content !important;
}

.ruler-tracks-container {
    flex-grow: 1 !important;
    position: relative !important;
}

.ruler-scale-track-area {
    position: relative !important;
    cursor: pointer !important;
}

.dual-bar-base {
    height: 16px !important;
    border-radius: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.dual-bar-inches-bg,
.dual-bar-cm-bg {
    background: #f1f5f9 !important;
}

.dual-bar-fill {
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.dual-fill-inches {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 60%, #d946ef 100%) !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4) !important;
}

.dual-fill-cm {
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 60%, #3b82f6 100%) !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4) !important;
}

.ruler-ticks-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.inches-ticks {
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.85) 2px, transparent 2px, transparent 8.333%) !important;
}

.cm-ticks {
    background: repeating-linear-gradient(to right, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.85) 2px, transparent 2px, transparent 16.666%) !important;
}

.dual-scale-labels {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 0.74rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-top: 3px !important;
    padding: 0 1px !important;
}

.dual-pin-marker-line {
    position: absolute !important;
    top: 0 !important;
    bottom: 20px !important;
    width: 2px !important;
    background: #f43f5e !important;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.9), 0 0 16px rgba(244, 63, 94, 0.5) !important;
    z-index: 10 !important;
    transition: left 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    pointer-events: none !important;
    border-radius: 2px !important;
}

.dual-pin-head-top,
.dual-pin-head-bottom {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 8px !important;
    height: 8px !important;
    background: #f43f5e !important;
    border-radius: 50% !important;
    box-shadow: 0 0 8px rgba(244, 63, 94, 1) !important;
}

.dual-pin-head-top {
    top: -4px !important;
}

.dual-pin-head-bottom {
    bottom: -4px !important;
}

.dual-pin-tooltip {
    position: absolute !important;
    top: -34px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%) !important;
    border: 1px solid rgba(244, 63, 94, 0.5) !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(244, 63, 94, 0.3) !important;
    transition: transform 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.dual-pin-tooltip .tt-in {
    color: #93c5fd !important;
}

.dual-pin-tooltip .tt-sep {
    color: #64748b !important;
}

.dual-pin-tooltip .tt-cm {
    color: #6ee7b7 !important;
}

.text-indigo {
    color: var(--tool-primary) !important;
}

.text-emerald {
    color: #059669 !important;
}

/* Reference Table Card */
.reference-table-card {
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

.reference-table {
    margin-bottom: 0 !important;
}

.reference-table thead th {
    background: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px !important;
}

.reference-table tbody td {
    padding: 11px 14px !important;
    font-size: 0.9rem !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.val-green {
    color: #059669 !important;
    font-weight: 500 !important;
}

/* SEO Content Guide Card */
.tool-seo-content-card {
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04) !important;
    padding: 28px !important;
    margin: 24px 0 !important;
}

.tool-seo-title {
    font-size: 1.45rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    margin-bottom: 14px !important;
}

.tool-seo-subtitle {
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    margin: 22px 0 10px 0 !important;
}

.tool-seo-text {
    font-size: 0.95rem !important;
    color: #475569 !important;
    line-height: 1.7 !important;
    margin-bottom: 14px !important;
}

.tool-formula-box {
    background: #f8fafc !important;
    border-left: 4px solid var(--tool-primary) !important;
    padding: 14px 20px !important;
    border-radius: 0 10px 10px 0 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    color: #1e1b4b !important;
    line-height: 1.7 !important;
    margin: 16px 0 !important;
    border-top: 1px solid #f1f5f9 !important;
    border-right: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.tool-faq-item {
    padding: 14px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.tool-faq-item:last-child {
    border-bottom: none !important;
}

.tool-faq-question {
    font-weight: 500 !important;
    color: #1e293b !important;
    font-size: 0.98rem !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.tool-faq-answer {
    color: #64748b !important;
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    padding-left: 26px !important;
}

/* Bottom Purple CTA Banner */
.bottom-purple-cta {
    background: linear-gradient(135deg, #2d106e 0%, #3b118a 50%, #4c1d95 100%) !important;
    color: #ffffff !important;
    border-radius: 18px !important;
    padding: 28px 34px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-top: 30px !important;
    box-shadow: 0 10px 25px rgba(45, 16, 110, 0.25) !important;
}

.bottom-purple-cta h4 {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 1.35rem !important;
    margin-bottom: 4px !important;
}

.bottom-purple-cta p {
    color: #e2e8f0 !important;
    margin-bottom: 0 !important;
    font-size: 0.95rem !important;
}

/* ==========================================================================
   MASTER BUTTON CENTER ALIGNMENT & GLOBAL FONT-WEIGHT RESTRICTION (MAX 500 EXCEPT .converter-big-val)
   ========================================================================== */
.tool-page-wrapper,
.tool-page-wrapper *,
.tool-page-wrapper h1,
.tool-page-wrapper h2,
.tool-page-wrapper h3,
.tool-page-wrapper h4,
.tool-page-wrapper h5,
.tool-page-wrapper h6,
.tool-page-wrapper th,
.tool-page-wrapper label,
.tool-page-wrapper button,
.tool-page-wrapper select,
.tool-page-wrapper input,
.tool-page-wrapper a,
.tool-page-wrapper span,
.tool-page-wrapper div,
.tool-page-wrapper p,
.tool-page-wrapper .fw-600,
.tool-page-wrapper .fw-700,
.tool-page-wrapper .fw-800,
.tool-page-wrapper .fw-bold {
    font-weight: 500 !important;
}

.tool-page-wrapper .btn,
.tool-page-wrapper button,
.tool-page-wrapper a.btn,
.preset-btn,
.btn-dark-purple,
.curr-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.2 !important;
}

.tool-page-wrapper .btn i,
.tool-page-wrapper button i,
.tool-page-wrapper a.btn i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.tool-page-wrapper .btn-outline-primary {
    color: var(--tool-primary) !important;
    border-color: var(--tool-primary) !important;
    background: transparent !important;
}

.tool-page-wrapper .btn-outline-primary:hover {
    background: var(--tool-dark-navy) !important;
    color: #ffffff !important;
    border-color: var(--tool-dark-navy) !important;
    box-shadow: 0 4px 14px rgba(30, 27, 75, 0.3) !important;
}

.tool-page-wrapper .btn-sm {
    padding: 7px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

/* Exclude .converter-big-val so output numbers stay bold */
.converter-big-val,
.converter-big-val * {
    font-weight: 800 !important;
}

/* ==========================================================================
   AGE CALCULATOR SPECIFIC STYLES (Verification Slip, Ruler, Info Cards)
   ========================================================================== */

/* Age Verification Slip */
.age-verification-slip {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(30, 27, 75, 0.08) !important;
    overflow: hidden !important;
    position: relative !important;
}

.age-slip-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.age-slip-header h5 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0 !important;
}

.age-slip-id {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffb703 !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

.age-slip-body {
    padding: 28px !important;
}

.age-left-col {
    border-right: 1px solid #f1f5f9 !important;
    padding-right: 24px !important;
}

.age-big-yrs {
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: #1e1b4b !important;
    line-height: 1 !important;
    margin-bottom: 6px !important;
}

.age-big-yrs small {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.age-yellow-pill {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fef3c7 !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.age-yellow-pill strong {
    color: #1e1b4b !important;
    font-weight: 700 !important;
}

/* Exam Eligibility Ruler (Matching Reference Image) */
.ruler-container {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 24px 28px !important;
    box-shadow: 0 4px 20px rgba(30, 27, 75, 0.04) !important;
}

.ruler-chart-area {
    position: relative !important;
}

.ruler-row {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    gap: 16px !important;
}

.ruler-label-box {
    width: 180px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.ruler-radio-icon {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    border: 2px solid #a5b4fc !important;
    background: #ffffff !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    position: relative !important;
    margin-top: 3px !important;
}

.ruler-radio-icon::after {
    content: '' !important;
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: #6366f1 !important;
}

.ruler-label-text-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.ruler-title {
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    color: #1e1b4b !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.ruler-label-text-wrapper .badge {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    width: fit-content !important;
}

.ruler-track-wrapper {
    flex-grow: 1 !important;
}

.ruler-track {
    height: 14px !important;
    background: #f1f0fb !important;
    border-radius: 20px !important;
    position: relative !important;
    overflow: hidden !important;
}

.ruler-window {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    background: #fff7ed !important;
    border: 1.5px solid #f97316 !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.1) !important;
}

.ruler-arrow-right {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #f97316 !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    line-height: 1 !important;
}

.ruler-pin-track-overlay {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 196px !important;
    right: 0 !important;
    pointer-events: none !important;
}

.ruler-age-pin {
    position: absolute !important;
    top: -6px !important;
    bottom: -6px !important;
    width: 3px !important;
    background: linear-gradient(180deg, #340089, #340089) !important;
    border-radius: 2px !important;
    z-index: 30 !important;
    transition: left 0.3s ease !important;
    box-shadow: 0 0 8px rgba(52, 0, 137, 0.4) !important;
}

.ruler-pin-tooltip {
    position: absolute !important;
    top: -24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(135deg, #20935c, #08703e) !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(32, 147, 92, 0.35) !important;
}

.ruler-scale {
    display: flex !important;
    justify-content: space-between !important;
    margin-left: 196px !important;
    padding-top: 12px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
}

/* Info Cards & Bottom CTA */
.info-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 24px !important;
    height: 100% !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
}

.bottom-purple-cta {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    color: #ffffff !important;
    border-radius: 16px !important;
    padding: 32px 36px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    box-shadow: 0 12px 32px rgba(30, 27, 75, 0.2) !important;
}

.bottom-purple-cta h4 {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
}

.bottom-purple-cta p {
    color: #cbd5e1 !important;
    margin-bottom: 0 !important;
    font-size: 0.95rem !important;
}

.converter-big-val span {
    font-weight: 800 !important;
}

.converter-big-val small {
    font-weight: 500 !important;
}