/* ============================================
   ROOF SHINGLE CALCULATOR — Redesigned
   Clean, construction-inspired, two-column layout
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary — Deep Teal */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;

    /* Neutral — Warm Slate */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Accent */
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;

    /* Layout */
    --max-width: 1120px;
    --nav-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.09);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.1);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--slate-800);
    background: #f5f6f8;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
    transition: box-shadow 0.3s ease;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-700);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    padding: 7px 14px;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--slate-500);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-700);
    background: var(--primary-50);
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--slate-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 8px 20px 16px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--slate-200);
}

.nav-mobile-menu.open {
    display: flex;
}

.nav-mobile-link {
    padding: 12px 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--slate-600);
    border-bottom: 1px solid var(--slate-100);
    transition: color 0.2s;
}

.nav-mobile-link:hover {
    color: var(--primary-700);
}

/* --- Calculator Section Wrapper --- */
.calc-section-wrap {
    padding: calc(var(--nav-height) + 32px) 0 60px;
    background: #f5f6f8;
}

/* --- Compact Hero --- */
.calc-hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px 5px 8px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--slate-500);
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--slate-900);
    margin-bottom: 10px;
}

.text-accent {
    color: var(--primary-700);
}

.calc-hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--slate-500);
    max-width: 680px;
    margin: 0 auto 16px;
}

/* --- Two-Column Calculator Layout --- */
.calc-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* --- Left: Input Card --- */
.calc-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.calc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}

.calc-card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calc-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: var(--radius-sm);
}

.calc-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}

.calc-card-desc {
    font-size: 0.8rem;
    color: var(--slate-400);
    margin-top: 1px;
}

.calc-reset-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.calc-reset-btn:hover {
    color: var(--primary-700);
    background: var(--primary-50);
    transform: rotate(-90deg);
}

/* --- Input Sections --- */
.input-section {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--slate-100);
}

.input-section.input-section-last {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.section-label-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--slate-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tooltip */
.calc-tooltip {
    display: inline-flex;
    color: var(--slate-400);
    cursor: help;
    position: relative;
}

.calc-tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 230px;
    padding: 10px 12px;
    background: var(--slate-800);
    color: white;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    pointer-events: none;
    animation: tooltipIn 0.15s ease;
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Shape Selector --- */
.shape-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.shape-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    color: var(--slate-400);
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.shape-btn svg {
    width: 54px;
    height: 38px;
}

.shape-btn span {
    font-size: 0.8rem;
    font-weight: 600;
}

.shape-btn:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
    background: var(--primary-50);
}

.shape-btn.active {
    border-color: var(--primary-600);
    color: var(--primary-700);
    background: var(--primary-50);
    border-left-width: 4px;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.08);
}

/* --- Unit Toggle (inline) --- */
.unit-toggle {
    display: flex;
    gap: 2px;
    margin-left: auto;
    background: var(--slate-100);
    border-radius: 100px;
    padding: 3px;
}

.unit-btn {
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
    border-radius: 100px;
    transition: all 0.2s ease;
}

.unit-btn.active {
    background: white;
    color: var(--primary-700);
    box-shadow: var(--shadow-sm);
}

.unit-btn:hover:not(.active) {
    color: var(--slate-700);
}

/* --- Input Row --- */
.input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-label-sm {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-400);
    padding-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
}

.calc-input {
    width: 100%;
    height: 46px;
    padding: 0 38px 0 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-800);
    background: white;
    transition: all 0.2s ease;
    outline: none;
    -moz-appearance: textfield;
}

.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input::placeholder {
    color: var(--slate-300);
    font-weight: 400;
}

.calc-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.1);
}

.calc-input:hover:not(:focus) {
    border-color: var(--slate-300);
}

.calc-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--slate-800);
    background: white;
    transition: all 0.2s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.calc-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.1);
}

.calc-select:hover:not(:focus) {
    border-color: var(--slate-300);
}

.input-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-400);
    pointer-events: none;
}

.input-separator {
    display: flex;
    align-items: center;
    height: 46px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate-300);
    padding-bottom: 0;
}

.input-helper {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--slate-400);
    line-height: 1.4;
}

/* --- Pitch Selector --- */
.pitch-selector {
    background: var(--slate-50);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    border: 1px solid var(--slate-100);
}

.pitch-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.pitch-visual {
    flex: 1;
    max-width: 140px;
}

.pitch-visual svg {
    width: 100%;
    height: auto;
    color: var(--primary-700);
}

.pitch-value-display {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.pitch-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-700);
    min-width: 28px;
    text-align: right;
    line-height: 1;
}

.pitch-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-400);
}

.pitch-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pitch-range-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate-400);
    min-width: 14px;
    text-align: center;
}

.pitch-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--primary-500) 0%, var(--primary-500) 50%, var(--slate-200) 50%);
    outline: none;
    transition: background 0.15s;
}

.pitch-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-500);
    box-shadow: 0 2px 6px rgba(15,118,110,0.2);
    cursor: pointer;
    transition: all 0.15s ease;
}

.pitch-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(15,118,110,0.3);
}

.pitch-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-500);
    box-shadow: 0 2px 6px rgba(15,118,110,0.2);
    cursor: pointer;
}

.pitch-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-400);
}

/* --- Shingle Type Selector --- */
.shingle-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shingle-type-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: white;
    text-align: left;
    transition: all 0.2s ease;
}

.shingle-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    color: var(--slate-400);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.shingle-type-info strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 1px;
}

.shingle-type-info span {
    font-size: 0.72rem;
    color: var(--slate-400);
    font-weight: 500;
}

.shingle-type-btn:hover {
    border-color: var(--primary-300);
}

.shingle-type-btn.active {
    border-color: var(--primary-600);
    background: var(--primary-50);
    border-left-width: 4px;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.08);
}

.shingle-type-btn.active .shingle-type-icon {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* --- Waste Selector --- */
.waste-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.waste-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--slate-500);
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: white;
    transition: all 0.2s ease;
}

.waste-desc {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--slate-400);
    letter-spacing: 0;
}

.waste-btn:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
}

.waste-btn.active {
    border-color: var(--primary-600);
    background: var(--primary-50);
    color: var(--primary-700);
    box-shadow: 0 0 0 3px rgba(15,118,110,0.08);
}

.waste-btn.active .waste-desc {
    color: var(--primary-600);
}

/* ======================================
   RIGHT: Results Panel
   ====================================== */
.calc-results-panel {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.results-card {
    background: var(--slate-900);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.results-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.results-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--emerald-400);
    background: rgba(52,211,153,0.1);
    padding: 3px 10px;
    border-radius: 100px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--emerald-400);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s ease;
}

.result-item:hover {
    background: rgba(255,255,255,0.07);
}

.result-item.result-primary {
    background: rgba(20,184,166,0.1);
    border-color: rgba(20,184,166,0.15);
}

.result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    color: var(--primary-400);
    flex-shrink: 0;
}

.result-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.result-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--slate-400);
    order: -1;
    margin-bottom: 2px;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.result-value.updated {
    color: var(--primary-400);
}

/* Cost Estimate — inside results panel */
.cost-estimate {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.08);
}

.cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cost-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--slate-400);
}

.cost-range {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
}

.cost-bar {
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cost-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-400), var(--emerald-400));
    border-radius: 3px;
    transition: width 0.5s var(--ease-out);
}

.cost-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-note {
    font-size: 0.68rem;
    color: var(--slate-500);
}


/* ======================================
   BELOW-FOLD: ARTICLE CONTENT
   ====================================== */

.article-section {
    padding: 64px 0;
}

.article-section.bg-white {
    background: white;
}

.article-section.bg-gray {
    background: var(--slate-50);
}

.article-body {
    max-width: 760px;
    margin: 0 auto;
}

.article-body h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 18px;
}

.article-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 32px 0 12px;
    line-height: 1.3;
}

.article-body p {
    font-size: 0.95rem;
    color: var(--slate-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 18px 24px;
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.8;
}

.article-body li {
    margin-bottom: 6px;
}

.article-body li strong {
    color: var(--slate-800);
}

.article-body strong {
    color: var(--slate-800);
    font-weight: 600;
}

/* Formula / equation highlight block */
.formula-block {
    background: var(--slate-100);
    border-left: 3px solid var(--primary-600);
    padding: 14px 20px;
    margin: 16px 0 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 600;
    color: var(--slate-800);
    font-size: 0.92rem;
    font-family: 'Inter', monospace;
    letter-spacing: -0.01em;
}

/* --- Pitch Table (used in article) --- */
.pitch-table-wrap {
    margin: 24px 0;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    overflow-x: auto;
}

.pitch-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.pitch-table th {
    padding: 12px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-500);
    background: var(--slate-50);
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.pitch-table td {
    padding: 10px 20px;
    font-size: 0.88rem;
    color: var(--slate-700);
    border-bottom: 1px solid var(--slate-100);
    font-variant-numeric: tabular-nums;
}

.pitch-table tr:last-child td {
    border-bottom: none;
}

.pitch-table tr:hover td {
    background: var(--primary-50);
}

.pitch-table td:first-child {
    font-weight: 700;
    color: var(--slate-900);
}

.pitch-table td:nth-child(3) {
    font-weight: 600;
    color: var(--primary-700);
}

.pitch-tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 100px;
    white-space: nowrap;
}

.pitch-tag.low {
    background: rgba(16,185,129,0.1);
    color: var(--emerald-500);
}

.pitch-tag.moderate {
    background: rgba(251,191,36,0.12);
    color: var(--amber-500);
}

.pitch-tag.steep {
    background: rgba(251,146,60,0.12);
    color: #ea580c;
}

.pitch-tag.vsteep {
    background: rgba(244,63,94,0.1);
    color: var(--rose-500);
}

/* --- Section Header (used in FAQ) --- */
.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
}

/* --- Calculator directory --- */
.calculator-directory {
    padding: 72px 0;
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
}

.calculator-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.calculator-directory-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 132px;
    padding: 24px;
    color: inherit;
    text-decoration: none;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.calculator-directory-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.calculator-directory-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--primary-700);
    background: var(--primary-50);
    border-radius: var(--radius-md);
}

.calculator-directory-icon svg {
    width: 38px;
    height: 38px;
}

.calculator-directory-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
}

.calculator-directory-copy strong {
    color: var(--slate-900);
    font-size: 1rem;
    line-height: 1.3;
}

.calculator-directory-copy > span {
    color: var(--slate-500);
    font-size: 0.85rem;
    line-height: 1.55;
}

.calculator-directory-arrow {
    color: var(--primary-600);
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.calculator-directory-card:hover .calculator-directory-arrow {
    transform: translateX(3px);
}

@media (max-width: 720px) {
    .calculator-directory {
        padding: 56px 0;
    }

    .calculator-directory-grid {
        grid-template-columns: 1fr;
    }

    .calculator-directory-card {
        min-height: 0;
        padding: 20px;
    }
}

.section-badge {
    display: inline-block;
    padding: 5px 14px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 100px;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.section-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--slate-500);
    line-height: 1.6;
}

/* --- FAQ --- */
.faq {
    padding: 80px 0;
    background: var(--slate-50);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--slate-300);
}

.faq-item[open] {
    border-color: var(--primary-300);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.06);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--slate-800);
    list-style: none;
    user-select: none;
    transition: color 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--primary-700);
}

.faq-chevron {
    flex-shrink: 0;
    color: var(--slate-400);
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary-500);
}

.faq-answer {
    padding: 0 20px 18px;
}

.faq-answer p {
    font-size: 0.88rem;
    color: var(--slate-500);
    line-height: 1.7;
    margin-bottom: 10px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ol,
.faq-answer ul {
    margin: 0 0 12px 20px;
    font-size: 0.88rem;
    color: var(--slate-500);
    line-height: 1.7;
}

.faq-answer li {
    margin-bottom: 4px;
}

.faq-answer strong {
    color: var(--slate-700);
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    padding: 56px 0 28px;
    background: var(--slate-900);
    color: var(--slate-300);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--slate-700);
}

.footer-brand .nav-logo {
    color: white;
    margin-bottom: 12px;
}

.footer-brand .nav-logo-icon {
    color: var(--primary-400);
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--slate-400);
    max-width: 320px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links h4 {
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--slate-400);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--slate-500);
}


/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 1024px) {
    .calc-layout {
        grid-template-columns: 1fr 340px;
        gap: 20px;
    }
}

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

    .calc-results-panel {
        position: static;
    }

    .results-card {
        border-radius: var(--radius-lg);
    }

    h1 {
        font-size: 2rem;
    }

    .article-section {
        padding: 48px 0;
    }

    .article-body h2 {
        font-size: 1.45rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    h1 {
        font-size: 1.7rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .calc-section-wrap {
        padding: calc(var(--nav-height) + 20px) 0 40px;
    }

    .calc-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .results-card {
        padding: 20px;
    }

    .shape-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .shape-btn {
        padding: 14px 6px 10px;
    }

    .shape-btn svg {
        width: 44px;
        height: 32px;
    }

    .shingle-type-selector {
        grid-template-columns: 1fr;
    }

    .waste-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .pitch-table th,
    .pitch-table td {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .article-section {
        padding: 40px 0;
    }

    .article-body h2 {
        font-size: 1.3rem;
    }

    .article-body h3 {
        font-size: 1.05rem;
    }

    .faq {
        padding: 56px 0;
    }

    .hero-badge {
        font-size: 0.72rem;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .faq-answer {
        padding: 0 16px 14px;
    }

    .result-item {
        padding: 12px;
    }

    .pitch-top-row {
        gap: 12px;
    }

    .pitch-visual {
        max-width: 110px;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-hero {
    animation: fadeInUp 0.5s ease both;
}

.calc-card {
    animation: fadeInUp 0.5s ease 0.1s both;
}

.results-card {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.step-card:nth-child(1) { animation: fadeInUp 0.4s ease both; }
.step-card:nth-child(2) { animation: fadeInUp 0.4s ease 0.08s both; }
.step-card:nth-child(3) { animation: fadeInUp 0.4s ease 0.16s both; }


/* ======================================
   INTERACTIVE DIAGRAMS
   ====================================== */

/* --- Diagram Card Wrapper --- */
.diagram-card {
    margin: 24px 0;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.bg-gray .diagram-card {
    background: white;
}

.bg-white .diagram-card {
    background: var(--slate-50);
    border-color: var(--slate-100);
}

.diagram-card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}

/* --- Area Comparison Diagram --- */
.area-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.area-compare-item {
    text-align: center;
    flex: 1;
    min-width: 180px;
    max-width: 240px;
}

.area-svg {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 8px;
    display: block;
}

.area-compare-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 2px;
}

.area-compare-mult {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-600);
}

.area-compare-arrow {
    flex-shrink: 0;
    color: var(--primary-500);
    animation: pulseRight 2s ease-in-out infinite;
}

@keyframes pulseRight {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(4px); opacity: 1; }
}

.area-compare-sloped .area-svg {
    filter: drop-shadow(0 2px 8px rgba(13, 148, 136, 0.12));
}

/* --- Bundle Visual --- */
.bundle-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bundle-visual-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-md);
    min-width: 110px;
    transition: all 0.3s ease;
}

.bundle-visual-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.bundle-visual-highlight {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.bundle-icon-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bundle-meta {
    text-align: center;
}

.bundle-meta-big {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--slate-900);
}

.bundle-meta-sm {
    display: block;
    font-size: 0.72rem;
    color: var(--slate-500);
    font-weight: 500;
}

.bundle-visual-times,
.bundle-visual-eq {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-600);
    flex-shrink: 0;
}

/* --- Calculation Flow Pipeline --- */
.calc-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow-x: auto;
    padding: 4px 0;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 14px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    min-width: 110px;
    text-align: center;
    transition: all 0.3s ease;
}

.flow-step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-300);
}

.flow-step-final {
    background: var(--primary-50);
    border-color: var(--primary-300);
}

.flow-step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-600);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 8px;
}

.flow-step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
    margin-bottom: 4px;
}

.flow-step-value {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--slate-900);
}

.flow-step-final .flow-step-value {
    color: var(--primary-700);
}

.flow-arrow {
    flex-shrink: 0;
    color: var(--primary-400);
    padding: 0 2px;
}

/* --- Step Visual Cards --- */
.steps-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.step-v-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.step-v-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-300);
}

.step-v-card-final {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.step-v-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-600);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 50%;
}

.step-v-content {
    flex: 1;
}

.step-v-icon {
    color: var(--primary-600);
    margin-bottom: 6px;
}

.step-v-content strong {
    display: block;
    font-size: 0.88rem;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.step-v-content p {
    font-size: 0.8rem;
    color: var(--slate-500);
    line-height: 1.5;
    margin: 0;
}

/* --- Square Grid Visual --- */
.square-grid-wrap {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.square-grid {
    width: 200px;
    height: 200px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 1px;
    background: var(--slate-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.square-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 1px;
}

/* Generate 100 cells using background gradient hack */
.square-grid {
    background:
        repeating-linear-gradient(90deg, var(--slate-200) 0px, var(--slate-200) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(0deg, var(--slate-200) 0px, var(--slate-200) 1px, transparent 1px, transparent 20px),
        linear-gradient(135deg, rgba(13,148,136,0.08) 0%, rgba(13,148,136,0.2) 100%);
    background-size: 20px 20px, 20px 20px, 100% 100%;
    border: 2px solid var(--primary-300);
}

.square-grid-labels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.square-grid-side,
.square-grid-bottom {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-700);
    background: var(--primary-50);
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
}

.square-grid-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.sgi-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
}

.sgi-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sgi-dot-teal { background: var(--primary-500); }
.sgi-dot-amber { background: var(--amber-400); }
.sgi-dot-rose { background: var(--rose-400); }

/* --- Material Comparison Cards --- */
.material-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.mat-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.mat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--slate-300);
}

.mat-card-best {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.mat-card-best:hover {
    border-color: var(--primary-400);
}

.mat-card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    background: var(--primary-600);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.mat-card-icon {
    color: var(--primary-600);
    margin-bottom: 10px;
}

.mat-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.mat-card-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.mat-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--slate-100);
}

.mat-stat:last-child {
    border-bottom: none;
}

.mat-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mat-stat-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--slate-800);
}

.mat-stat-good {
    color: var(--emerald-500);
}

.mat-stat-warn {
    color: var(--amber-500);
}

.mat-stat-bad {
    color: var(--rose-500);
}

.mat-card-note {
    font-size: 0.75rem;
    color: var(--slate-500);
    line-height: 1.5;
    margin: 0;
}


/* ======================================
   RESPONSIVE — INTERACTIVE DIAGRAMS
   ====================================== */

@media (max-width: 900px) {
    .steps-visual {
        grid-template-columns: repeat(2, 1fr);
    }

    .material-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-flow {
        gap: 0;
        justify-content: flex-start;
    }

    .flow-step {
        min-width: 90px;
        padding: 12px 10px;
    }

    .flow-step-value {
        font-size: 0.82rem;
    }
}

@media (max-width: 640px) {
    .steps-visual {
        grid-template-columns: 1fr;
    }

    .material-cards {
        grid-template-columns: 1fr 1fr;
    }

    .diagram-card {
        padding: 16px;
    }

    .area-compare {
        flex-direction: column;
        gap: 8px;
    }

    .area-compare-arrow {
        transform: rotate(90deg);
    }

    @keyframes pulseRight {
        0%, 100% { transform: rotate(90deg) translateX(0); opacity: 0.6; }
        50% { transform: rotate(90deg) translateX(4px); opacity: 1; }
    }

    .bundle-visual {
        gap: 10px;
    }

    .bundle-visual-item {
        padding: 10px;
        min-width: 80px;
    }

    .calc-flow {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .flow-arrow {
        display: none;
    }

    .flow-step {
        min-width: 0;
        flex: 1 1 40%;
    }

    .square-grid {
        width: 160px;
        height: 160px;
    }

    .square-grid-wrap {
        gap: 16px;
    }

    .mat-card {
        padding: 14px 12px;
    }

    .mat-card h4 {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .material-cards {
        grid-template-columns: 1fr;
    }

    .bundle-visual {
        flex-direction: column;
    }
}

/* --- Language Selector Styling --- */
.lang-select-wrapper {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.lang-select-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    color: var(--slate-700);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lang-select-box:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.lang-select-box svg {
    color: var(--primary-600);
    flex-shrink: 0;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    padding-right: 14px;
    background-image: url("data:image/svg+xml,%3CSVG width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%3C475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
}

.mobile-lang-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--slate-100);
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
}

.mobile-lang-wrap svg {
    color: var(--primary-600);
}

/* --- RTL (Right-to-Left) Support --- */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .nav-logo {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-links {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .lang-select {
    padding-right: 0;
    padding-left: 14px;
    background-position: left center;
}

html[dir="rtl"] .hero-badge svg,
html[dir="rtl"] .calc-card-header-left svg {
    margin-left: 6px;
    margin-right: 0;
}

html[dir="rtl"] .input-wrapper .input-unit {
    right: auto;
    left: 12px;
}

html[dir="rtl"] .input-wrapper input {
    padding-right: 14px;
    padding-left: 45px;
}

/* --- Interactive Diagrams & Simulators Styling --- */
.interactive-card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 28px 0;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.interactive-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-lg);
}

.ic-header {
    margin-bottom: 20px;
}

.ic-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-100);
    color: var(--primary-800);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.ic-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.ic-header p {
    font-size: 0.9rem;
    color: var(--slate-600);
}

/* Bundle Simulator */
.ic-controls {
    margin-bottom: 20px;
}

.ic-controls label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 8px;
}

.ic-slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ic-val-chip {
    padding: 6px 14px;
    background: var(--primary-600);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.sim-output-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sim-out-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
}

.sim-out-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sim-out-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-700);
}

/* Step Explorer Preview */
.step-explorer-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.step-preview-icon {
    font-size: 2.2rem;
    line-height: 1;
    padding: 16px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.step-preview-info h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 4px;
}

.step-preview-info p {
    font-size: 0.9rem;
    color: var(--slate-700);
}

/* Step Cards Hover / Active state */
.step-v-card {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-v-card:hover, .step-v-card.active-step {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-50);
}

/* Sandbox Cards */
.sandbox-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.sb-input-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.sandbox-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.sb-step {
    background: var(--slate-800);
    color: #ffffff;
    padding: 14px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-step-num {
    font-size: 0.75rem;
    color: var(--slate-400);
}

.sb-step strong {
    font-size: 1.1rem;
    color: var(--emerald-400);
}

/* Square Explorer Grid Toggles */
.grid-mode-toggles {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: center;
}

.grid-mode-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    transition: all 0.2s ease;
}

.grid-mode-btn:hover, .grid-mode-btn.active {
    background: var(--primary-600);
    color: #ffffff;
    border-color: var(--primary-600);
}

.square-grid-cell {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.square-grid-cell:hover {
    transform: scale(1.1);
    z-index: 2;
    background: var(--amber-400) !important;
}

/* Material Comparison Slider & Cards */
.mat-slider-wrap {
    margin-bottom: 20px;
}

.mat-slider-wrap label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 8px;
}

.mat-compare-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.mat-comp-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mat-comp-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--slate-900);
}

.mat-comp-cost {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-700);
}

.mat-comp-meter {
    height: 6px;
    background: var(--slate-200);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.mat-comp-fill {
    height: 100%;
    background: var(--primary-500);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* FAQ Filters */
.faq-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.faq-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.faq-cat-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    transition: all 0.2s ease;
}

.faq-cat-btn:hover, .faq-cat-btn.active {
    background: var(--primary-600);
    color: #ffffff;
    border-color: var(--primary-600);
}

.faq-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    min-width: 240px;
}

.faq-search-box input {
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
}

/* Site search, enhanced footer, and mobile utilities */
.site-search { position:relative; display:flex; align-items:center; gap:10px; max-width:610px; margin:22px auto 0; padding:7px 7px 7px 16px; background:#fff; border:1px solid var(--slate-300); border-radius:12px; box-shadow:var(--shadow-md); color:var(--slate-400); text-align:left; }
.site-search:focus-within { border-color:var(--primary-500); box-shadow:0 0 0 3px rgba(20,184,166,.12),var(--shadow-md); }
.site-search input { min-width:0; flex:1; border:0; outline:0; color:var(--slate-800); font-size:.92rem; }
.site-search button { min-height:40px; padding:0 18px; border-radius:8px; background:var(--primary-700); color:#fff; font-size:.86rem; font-weight:700; }
.site-search-results { display:none; position:absolute; z-index:30; top:calc(100% + 8px); left:0; right:0; padding:8px; background:#fff; border:1px solid var(--slate-200); border-radius:10px; box-shadow:var(--shadow-xl); }
.site-search-results.open { display:block; }
.site-search-results a,.site-search-results p { display:block; padding:10px 12px; border-radius:7px; color:var(--slate-700); font-size:.86rem; }
.site-search-results a:hover { background:var(--primary-50); color:var(--primary-800); }
.social-links { display:flex; flex-wrap:wrap; gap:10px; margin:3px 0; }
.dmca-badge { align-self:flex-start; padding:5px 9px; border:1px solid var(--slate-600); border-radius:4px; color:var(--slate-300)!important; font-size:.7rem!important; font-weight:700; letter-spacing:.04em; }
.back-to-top { position:fixed; right:20px; bottom:20px; z-index:900; display:grid; width:46px; height:46px; place-items:center; border-radius:50%; background:var(--primary-700); color:#fff; box-shadow:var(--shadow-lg); opacity:0; visibility:hidden; transform:translateY(12px); transition:opacity .2s ease,transform .2s ease,visibility .2s; }
.back-to-top.visible { opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover { background:var(--primary-800); }

/* --- Footer --- */
.footer { padding:56px 0 28px; background:var(--slate-900); color:var(--slate-300); }
.footer-inner { display:grid; grid-template-columns:1.6fr repeat(4,1fr); gap:30px; padding-bottom:36px; border-bottom:1px solid var(--slate-700); }
.footer-brand .nav-logo { color:white; margin-bottom:12px; }
.footer-brand .nav-logo-icon { color:var(--primary-400); }
.footer-brand p { font-size:.85rem; line-height:1.6; color:var(--slate-400); max-width:320px; }
.footer-links { display:flex; flex-direction:column; gap:8px; }
.footer-links h4 { font-size:.78rem; font-weight:700; color:white; text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px; }
.footer-links a { font-size:.85rem; color:var(--slate-400); transition:color .2s; }
.footer-links a:hover { color:var(--primary-400); }
.footer-bottom { padding-top:20px; display:flex; justify-content:space-between; font-size:.78rem; color:var(--slate-500); }

.legal-page { min-height:calc(100vh - 150px); padding:calc(var(--nav-height) + 64px) 0 72px; }
.legal-card { max-width:800px; }
.legal-card h1 { margin-bottom:24px; color:var(--slate-900); }
.legal-card p { margin-bottom:18px; color:var(--slate-600); }
.legal-kicker { color:var(--primary-700)!important; font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.legal-contact { display:flex; flex-wrap:wrap; gap:12px 24px; margin:24px 0; color:var(--primary-700); font-weight:700; }
.legal-back { display:inline-block; margin-top:20px; color:var(--primary-700); font-weight:700; }

/* ======================================
   PRIVACY POLICY PAGE
   ====================================== */
.privacy-page {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 48px) 0 80px;
    background: linear-gradient(180deg, var(--slate-50) 0%, #f5f6f8 100%);
}

/* Hero */
.privacy-hero {
    text-align: center;
    padding: 48px 0 40px;
}

.privacy-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 12px;
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.privacy-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.privacy-hero-sub {
    font-size: 1.08rem;
    color: var(--slate-500);
    max-width: 520px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.privacy-hero-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.privacy-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--slate-400);
    font-weight: 500;
}

/* Summary Card */
.privacy-summary-card {
    display: flex;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--primary-800), var(--primary-700));
    border-radius: var(--radius-xl);
    color: white;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(15, 118, 110, 0.18);
}

.privacy-summary-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

.privacy-summary-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.privacy-summary-content p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
}

.privacy-summary-content strong {
    color: white;
}

/* Table of Contents */
.privacy-toc {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.privacy-toc h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.privacy-toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 32px;
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
}

.privacy-toc-list li {
    counter-increment: toc;
}

.privacy-toc-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--slate-600);
    transition: all 0.2s ease;
    text-decoration: none;
}

.privacy-toc-list li a::before {
    content: counter(toc, decimal-leading-zero);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-600);
    min-width: 22px;
}

.privacy-toc-list li a:hover {
    background: var(--primary-50);
    color: var(--primary-800);
}

/* Sections */
.privacy-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.privacy-section {
    position: relative;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 36px 32px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.privacy-section:hover {
    box-shadow: var(--shadow-md);
}

.privacy-section-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--slate-100);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.privacy-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 14px;
    padding-right: 50px;
}

.privacy-section > p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--slate-600);
    margin-bottom: 20px;
}

.privacy-section > p:last-child {
    margin-bottom: 0;
}

/* Info Grid (Section 1) */
.privacy-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.privacy-info-card {
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: var(--slate-50);
}

.privacy-info-card-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    margin-bottom: 14px;
}

.privacy-info-card-icon--auto {
    background: var(--primary-100);
    color: var(--primary-700);
}

.privacy-info-card-icon--never {
    background: #fef2f2;
    color: #ef4444;
}

.privacy-info-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 12px;
}

.privacy-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.privacy-info-card ul li {
    position: relative;
    padding: 5px 0 5px 18px;
    font-size: 0.85rem;
    color: var(--slate-600);
    line-height: 1.5;
}

.privacy-info-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--slate-300);
}

/* Use List (Section 2) */
.privacy-use-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.privacy-use-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--slate-100);
}

.privacy-use-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.privacy-use-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-50);
    color: var(--primary-700);
}

.privacy-use-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--slate-800);
    margin-bottom: 4px;
}

.privacy-use-item p {
    font-size: 0.85rem;
    color: var(--slate-500);
    line-height: 1.6;
    margin: 0;
}

/* Highlight Box (Section 3) */
.privacy-highlight-box {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: linear-gradient(135deg, #f0fdfa, #ccfbf1);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-600);
}

.privacy-highlight-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: var(--primary-600);
    color: white;
    border-radius: 14px;
}

.privacy-highlight-box h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 8px;
}

.privacy-highlight-box p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--slate-600);
    margin-bottom: 10px;
}

.privacy-highlight-box p:last-child {
    margin-bottom: 0;
}

.privacy-highlight-box strong {
    color: var(--primary-800);
}

/* Cookie Table (Section 4) */
.privacy-cookie-table {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.privacy-cookie-row {
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    gap: 16px;
    padding: 14px 20px;
    font-size: 0.85rem;
    color: var(--slate-600);
    border-bottom: 1px solid var(--slate-100);
    align-items: center;
}

.privacy-cookie-row:last-child {
    border-bottom: none;
}

.privacy-cookie-header {
    background: var(--slate-50);
    font-weight: 700;
    color: var(--slate-700);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.privacy-cookie-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.privacy-cookie-type--essential {
    background: var(--primary-100);
    color: var(--primary-800);
}

.privacy-cookie-type--analytics {
    background: #ede9fe;
    color: #6d28d9;
}

.privacy-cookie-type--pref {
    background: #fef3c7;
    color: #92400e;
}

.privacy-cookie-note {
    font-size: 0.85rem;
    color: var(--slate-500);
    line-height: 1.6;
    padding: 12px 16px;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--slate-300);
}

/* Third Party Grid (Section 5) */
.privacy-third-party-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.privacy-tp-card {
    padding: 20px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
}

.privacy-tp-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 8px;
}

.privacy-tp-card p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--slate-500);
    margin: 0;
}

.privacy-tp-card a {
    color: var(--primary-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-tp-card a:hover {
    color: var(--primary-500);
}

/* Styled List (Sections 6, 7) */
.privacy-styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.privacy-styled-list li {
    position: relative;
    padding: 10px 0 10px 24px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--slate-600);
    border-bottom: 1px solid var(--slate-100);
}

.privacy-styled-list li:last-child {
    border-bottom: none;
}

.privacy-styled-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: var(--primary-400);
    border-radius: 50%;
}

.privacy-styled-list li strong {
    color: var(--slate-800);
}

/* Rights Grid (Section 8) */
.privacy-rights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.privacy-right-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.privacy-right-item:hover {
    border-color: var(--primary-300);
}

.privacy-right-item svg {
    flex-shrink: 0;
    color: var(--primary-600);
    margin-top: 2px;
}

.privacy-right-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--slate-800);
    margin-bottom: 4px;
}

.privacy-right-item p {
    font-size: 0.82rem;
    color: var(--slate-500);
    line-height: 1.5;
    margin: 0;
}

/* Security Grid (Section 10) */
.privacy-security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.privacy-security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    color: var(--slate-600);
}

.privacy-security-item svg {
    flex-shrink: 0;
    color: var(--primary-600);
}

/* Contact Card (Section 12) */
.privacy-contact-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.privacy-contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--slate-200);
}

.privacy-contact-item:last-child {
    border-bottom: none;
}

.privacy-contact-item svg {
    flex-shrink: 0;
    color: var(--primary-600);
}

.privacy-contact-item strong {
    display: block;
    font-size: 0.82rem;
    color: var(--slate-500);
    font-weight: 600;
    margin-bottom: 2px;
}

.privacy-contact-item a {
    color: var(--primary-700);
    font-weight: 600;
    font-size: 0.92rem;
}

.privacy-contact-item a:hover {
    color: var(--primary-500);
}

/* Back Navigation */
.privacy-back-nav {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--slate-200);
}

.privacy-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-700);
    font-weight: 700;
    font-size: 0.92rem;
    transition: gap 0.2s ease, color 0.2s ease;
}

.privacy-back-link:hover {
    gap: 12px;
    color: var(--primary-500);
}

.privacy-section a {
    color: var(--primary-700);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.privacy-section a:hover {
    color: var(--primary-500);
}

/* Privacy Policy Responsive */
@media (max-width: 768px) {
    .privacy-hero h1 { font-size: 1.8rem; }
    .privacy-hero-sub { font-size: 0.95rem; }
    .privacy-summary-card { flex-direction: column; padding: 24px; }
    .privacy-toc-list { grid-template-columns: 1fr; }
    .privacy-info-grid { grid-template-columns: 1fr; }
    .privacy-third-party-grid { grid-template-columns: 1fr; }
    .privacy-rights-grid { grid-template-columns: 1fr; }
    .privacy-security-grid { grid-template-columns: 1fr 1fr; }
    .privacy-cookie-row { grid-template-columns: 100px 1fr 100px; gap: 10px; padding: 12px 14px; }
    .privacy-section { padding: 28px 22px 24px; }
    .privacy-highlight-box { flex-direction: column; }
}

@media (max-width: 480px) {
    .privacy-hero h1 { font-size: 1.5rem; }
    .privacy-hero-meta { flex-direction: column; align-items: center; gap: 8px; }
    .privacy-cookie-row { grid-template-columns: 1fr; gap: 6px; }
    .privacy-cookie-header { display: none; }
    .privacy-security-grid { grid-template-columns: 1fr; }
    .privacy-section-number { font-size: 1.6rem; }
}


@media (max-width:1024px) {
    .footer-inner { grid-template-columns:repeat(3,1fr); }
}

@media (max-width:640px) {
    .container,.nav-inner { padding-left:14px; padding-right:14px; }
    .nav-mobile-toggle { min-width:44px; min-height:44px; align-items:center; justify-content:center; }
    .nav-logo span { font-size:.92rem; }
    .input-row { align-items:stretch; flex-direction:column; }
    .input-separator { display:none; }
    .site-search { padding-left:12px; }
    .site-search button { padding:0 12px; }
    .footer-inner { grid-template-columns:1fr 1fr; gap:26px 18px; }
    .footer-brand { grid-column:1/-1; }
    .faq-search-box { min-width:0; width:100%; }
    .pitch-table-wrap,.calc-flow { -webkit-overflow-scrolling:touch; }
}

@media (max-width:420px) {
    .footer-inner { grid-template-columns:1fr; }
    .footer-brand { grid-column:auto; }
    .site-search svg { display:none; }
    .site-search input { font-size:.82rem; }
    .back-to-top { right:14px; bottom:14px; }
}

@media (max-width: 768px) {
    .sim-output-grid, .sandbox-inputs, .sandbox-steps, .mat-compare-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .sim-output-grid, .sandbox-inputs, .sandbox-steps, .mat-compare-grid {
        grid-template-columns: 1fr;
    }
    .faq-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}
