/* 
   Split Bill Calculator Pro - Optimized Stylesheet
   Senior FE Developer Optimization: Streamlined, DRY, and performant.
*/

:root {
    --primary: #006c49; --emerald: #42b883; --emerald-dark: #34a853;
    --gradient: linear-gradient(135deg, #42b883 0%, #34a853 100%);
    --bg: #f8f9ff; --ink: #0b1c30; --surface: #f0f4ff; --white: #ffffff;
    --black-5: rgba(0,0,0,0.05); --black-10: rgba(0,0,0,0.1);
    --ink-20: rgba(11,28,48,0.2); --ink-30: rgba(11,28,48,0.3);
    --ink-40: rgba(11,28,48,0.4); --ink-50: rgba(11,28,48,0.5); --ink-60: rgba(11,28,48,0.6);
    --font-headline: "Manrope", sans-serif; --font-body: "Inter", sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1); --max-width: 1200px;
}

/* Base & Typography */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); min-height: 100vh; flex-direction: column; line-height: 1.6; }
h1, h2, h3, h4, .font-headline { font-family: var(--font-headline); }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.signature-gradient { background: linear-gradient(135deg, var(--primary) 0%, var(--emerald) 100%); }
.material-symbols-outlined { vertical-align: middle; }

/* Navigation */
header { background: rgba(255,255,255,0.8); border-bottom: 1px solid var(--black-5); padding: 1rem 0; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.05em; }
.logo-icon { width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; display: flex; align-items: center; justify-content: center; color: var(--white); }
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.875rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--emerald); }
.hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--ink); padding: 0.5rem; }

/* Layout */
main { padding: 3rem 0; flex-grow: 1; }
.app-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; margin-top: 2rem; }
@media (min-width: 1024px) { .app-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Cards & Buttons */
.card {margin-bottom: 1rem; background: var(--white); border-radius: 2rem; border: 1px solid var(--black-5); padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.card-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; color: var(--ink); }

.btn { 
    padding: 14px 24px; 
    border-radius: 12px; 
    border: 1px solid transparent; 
    font-family: var(--font-body);
    font-weight: 600; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
    outline: none;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary { 
    width: 100%; 
    background: #2ecc71; 
    color: white; 
    font-size: 1.125rem; 
    border: none;
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    background: #27ae60;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.25); 
}

.btn-secondary { 
    background: #f8f9fa; 
    color: var(--ink); 
    font-size: 0.875rem; 
    border: 1px solid var(--black-10);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-secondary:hover { 
    background: #ffffff; 
    border-color: var(--emerald);
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn:active { 
    transform: scale(0.98); 
}

/* Form Controls */
.input-group { margin-bottom: 1.5rem; }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; padding: 0 0.25rem; }
.label { font-size: 0.875rem; font-weight: 700; color: var(--ink-50); }
.itemizer-link { display: flex; align-items: center; gap: 0.25rem; color: var(--emerald); font-size: 0.75rem; font-weight: 800; text-decoration: none; transition: opacity 0.2s; background: none; border: none; cursor: pointer; padding: 0; }
.itemizer-link:hover { opacity: 0.8; }
.itemizer-link .material-symbols-outlined { font-size: 1rem; }
.input-wrapper { position: relative; }
.input-icon, .input-suffix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-40); font-weight: 600; pointer-events: none; }
.input-icon { left: 1rem; } .input-suffix { right: 1rem; }
.form-input { width: 100%; height: 3.5rem; padding: 0 1rem; border: 2px solid transparent; border-radius: 1rem; font-size: 1.125rem; font-weight: 700; color: var(--ink); background: var(--surface); transition: all 0.2s; }
.form-input.has-icon { padding-left: 2.5rem; } .form-input.has-suffix { padding-right: 2.5rem; }
.form-input:focus { border-color: var(--emerald); background: var(--white); outline: none; box-shadow: 0 0 0 4px rgba(66, 184, 131, 0.1); }
select.form-input { padding-left: 1rem; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230b1c30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 1rem center / 1.2rem; }

/* Interactive Elements */
.preset-grid, .rounding-grid { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.preset-grid { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
.rounding-grid { grid-template-columns: 1fr 1fr; margin-top: 1.5rem; }

.preset-btn, .toggle-btn, .round-btn, .mobile-round-btn, .mobile-toggle-btn { 
    padding: 12px 16px; 
    border-radius: 10px; 
    background: var(--surface); 
    color: var(--ink); 
    font-weight: 600; 
    font-size: 0.875rem; 
    border: 1px solid transparent; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.preset-btn:hover, .toggle-btn:hover, .round-btn:hover, .mobile-round-btn:hover {
    transform: translateY(-1px);
    background: var(--white);
    border-color: var(--emerald);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.preset-btn.active, .toggle-btn.active, .round-btn.active, .mobile-round-btn.active { 
    background: #2ecc71; 
    color: var(--white); 
    border-color: transparent; 
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2); 
}

.preset-btn:active, .toggle-btn:active, .round-btn:active, .mobile-round-btn:active, .mobile-toggle-btn:active {
    transform: scale(0.97);
}

.toggle-container { display: flex; background: var(--surface); padding: 0.25rem; border-radius: 0.75rem; gap: 0.25rem; }
.toggle-btn { flex: 1; padding: 10px; font-size: 0.75rem; border: none; box-shadow: none; }
.toggle-btn:hover { transform: none; }
.toggle-btn.active { box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2); }

.stepper { display: flex; align-items: center; background: var(--surface); border-radius: 1rem; padding: 0.25rem; height: 3.5rem; }
.stepper-icon-box { display: flex; align-items: center; justify-content: center; padding: 0 0.75rem; color: var(--ink-30); }
.stepper-icon-box .material-symbols-outlined { font-size: 1.25rem; }
.step-btn { 
    width: 3rem; height: 3rem; border-radius: 12px; border: none; 
    background: var(--white); color: var(--ink); cursor: pointer; 
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}
.step-btn:hover { 
    background: #2ecc71; 
    color: var(--white); 
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
}
.step-btn:active { transform: scale(0.95); }

.stepper-input { 
    width: 3.5rem; 
    text-align: center; 
    background: transparent; 
    border: none; 
    font-size: 1.125rem; 
    font-weight: 800; 
    color: var(--ink); 
    outline: none;
}

/* Hide number input spinners */
input[type=number] {
    -moz-appearance: textfield;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Home Page Specific */
.home-hero { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; padding: 4rem 0; }
@media (min-width: 1024px) { .home-hero { grid-template-columns: 1.1fr 0.9fr; } }
.hero-content h1 { font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.125rem; color: var(--ink-50); margin-bottom: 3rem; max-width: 500px; }
.home-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.summary-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.summary-title { font-size: 1.5rem; font-weight: 800; }
.summary-subtitle { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-30); font-weight: 700; }
.summary-icon-box { width: 2.5rem; height: 2.5rem; background: #e6f7ef; color: #42b883; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 1rem; color: var(--ink-40); font-weight: 700; }
.summary-row.total {align-items: flex-end; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--black-5); color: var(--ink); font-weight: 800; font-size: 2rem; }
.each-person-card { background: var(--emerald); border-radius: 2rem; padding: 2rem 2.5rem; color: white; margin: 2rem 0; position: relative; overflow: hidden; box-shadow: 0 10px 25px rgba(46, 204, 113, 0.2); }
.each-person-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; opacity: 0.8; margin-bottom: 0.25rem; text-align: left; }
.each-person-value { font-size: 4.5rem; font-weight: 900; letter-spacing: -0.05em; text-align: left; position: relative; z-index: 2; line-height: 1; }
.each-person-bg-icon { position: absolute; right: -1rem; bottom: -1rem; font-size: 140px !important; opacity: 0.1; transform: rotate(-10deg); pointer-events: none; }
.home-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.active-splitters { margin-top: 2rem; }
.splitters-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.splitters-title { font-size: 0.875rem; font-weight: 800; color: var(--ink); }

.avatar-group { display: flex; align-items: center; gap: 0.5rem; }
.avatar, .avatar-plus { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.avatar { border: 2px solid white; object-fit: cover; }
.avatar-plus { background: #e6f7ef; color: #42b883; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 800; }

/* Tip Calculator Specific */
.results-sidebar { position: sticky; top: 7rem; z-index: 10; }
.result-card { background: var(--ink); color: var(--white); border-radius: 2.5rem; padding: 2.5rem; box-shadow: 0 30px 60px rgba(11, 28, 48, 0.2); overflow: hidden; position: relative; }
.result-row { display: flex; justify-content: space-between; align-items: flex-end;; margin-bottom: 0.5rem; }
.result-label { font-size: 0.875rem; font-weight: 600; opacity: 0.6; }
.result-value { font-size: 1.2rem; font-weight: 800; }
.main-result { }
.main-value { font-size: 3.5rem; font-weight: 900; letter-spacing: -0.05em; margin-top: 0.5rem; color: var(--emerald); }
.result-bg-icon { position: absolute; right: -2rem; bottom: -2rem; font-size: 180px !important; opacity: 0.05; pointer-events: none; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.service-btn { padding: 0.75rem 0.25rem; border-radius: 1rem; background: var(--surface); border: 2px solid transparent; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; cursor: pointer; }
.service-btn .emoji { font-size: 1.5rem; }
.service-btn .label { font-size: 0.7rem; font-weight: 800; color: var(--ink); text-transform: uppercase; }
.service-btn .tip-info { font-size: 0.6rem; font-weight: 600; color: var(--ink-40); margin-top: -0.125rem; }
.service-btn.active { background: var(--white); border-color: var(--emerald); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.splitter-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.splitter-item { display: grid; grid-template-columns: 1fr auto; gap: 1rem; background: var(--surface); padding: 1.25rem; border-radius: 1.25rem; align-items: center; }
.splitter-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; grid-column: span 2; }
.splitter-name-input { background: transparent; border: none; font-size: 0.875rem; font-weight: 800; color: var(--ink); width: 120px; padding: 0.25rem; border-bottom: 1px dashed var(--ink-20); }
.splitter-name-input:focus { outline: none; border-bottom-color: var(--emerald); }
.splitter-person-amount { font-size: 1rem; font-weight: 800; color: var(--emerald); }
.splitter-slider-container { display: flex; align-items: center; gap: 1rem; grid-column: span 2; }
.splitter-slider { flex-grow: 1; accent-color: var(--emerald); height: 6px; border-radius: 3px; cursor: pointer; }
.splitter-val { font-size: 0.875rem; font-weight: 800; width: 45px; text-align: right; color: var(--ink-60); }

.hidden { display: none !important; }

/* Mobile Results Sidebar */
.mobile-results-sidebar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #0b1c30; padding: 0.75rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 50px rgba(0,0,0,0.5); border-radius: 1.25rem 1.25rem 0 0; flex-direction: column; gap: 0.125rem; color: white; }
.mobile-result-row, .mobile-main-result { display: flex; justify-content: space-between; align-items: center; padding: 0.025rem 0; }
.mobile-result-label { font-size: 0.75rem; font-weight: 500; color: rgba(255, 255, 255, 0.7); }
.mobile-result-value { font-size: 0.875rem; font-weight: 700; color: white; }
.mobile-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: .25rem 0; }
.mobile-main-label { font-size: 0.75rem; color: rgba(255, 255, 255, 0.9); }
.mobile-main-value { font-size: 1.125rem; font-weight: 700; color: #2ECC71; margin-left: 1rem; line-height: 1.1; text-align: right;}
.mobile-expandable { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.375rem; }
.mobile-rounding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.mobile-round-btn { min-height: 44px; padding: 0.5rem; font-size: 0.875rem; font-weight: 600; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.1); border: none; color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mobile-round-btn.active { background: rgba(46, 204, 113, 0.2); border: 1px solid #2ECC71; }
.mobile-make-even-btn { width: 100%; margin-top: 0.5rem; background: transparent; border: 1px solid #2ECC71; color: #2ECC71; }
.mobile-share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.mobile-toggle-btn { width: 100%; padding: 0.425rem; background: rgba(255, 255, 255, 0.1); border: none; border-radius: 0.75rem; color: rgba(255, 255, 255, 0.9); font-size: 0.8125rem; font-weight: 700; margin-top: 0.175rem; cursor: pointer; }

/* SEO & Footer */
.seo-content { margin-top: 6rem; padding-top: 4rem; border-top: 1px solid var(--black-5); }
.seo-content h2 { font-size: 2rem; font-weight: 800; margin: 3rem 0 1.5rem; }
.seo-content p { margin-bottom: 1.5rem; color: var(--ink-60); font-size: 1.125rem; }
.faq-item { margin-bottom: 2rem; background: var(--white); padding: 2rem; border-radius: 1.5rem; border: 1px solid var(--black-5); }
.faq-question { font-weight: 800; font-size: 1.25rem; margin-bottom: 0.75rem; }
.faq-answer { color: var(--ink-60); }
footer { background: var(--surface); padding: 4rem 0; border-top: 1px solid var(--black-5); margin-top: 6rem; }
.footer-grid { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
@media (min-width: 768px) { .footer-grid { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-logo { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.75rem; font-weight: 700; color: var(--ink-40); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-link { font-size: 0.75rem; font-weight: 700; color: var(--ink-40); text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--emerald); }
.ad-banner { background: var(--surface); border: 1px dashed var(--ink-20); border-radius: 1rem; padding: 1rem; text-align: center; color: var(--ink-40); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2rem; }

@media (max-width: 1023px) { .results-sidebar, .summary-card-home { display: none !important; } .mobile-results-sidebar { display: flex !important; } main { padding-bottom: 12rem; } }

/* Modal & Calculator */
.modal-overlay { 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(11, 28, 48, 0.4); backdrop-filter: blur(8px); 
    display: flex; align-items: center; justify-content: center; 
    z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s; 
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-card { 
    background: #f0f4ff; width: 100%; max-width: 400px; 
    border-radius: 2.5rem; padding: 2rem; 
    box-shadow: 0 40px 80px rgba(0,0,0,0.2); 
    transform: translateY(20px); transition: all 0.3s; 
}
.modal-overlay.active .modal-card { transform: translateY(0); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--ink-30); transition: color 0.2s; }
.modal-close:hover { color: var(--ink); }

.calc-display { 
    background: white; border-radius: 1.5rem; padding: 1.5rem; 
    text-align: right; margin-bottom: 1.5rem; min-height: 100px; 
    display: flex; flex-direction: column; justify-content: center; 
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); 
    border: 1px solid var(--black-5);
}
.calc-history { font-size: 0.875rem; color: var(--ink-30); font-weight: 600; min-height: 1.25rem; }
.calc-current { font-size: 2.5rem; font-weight: 900; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }

.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.calc-btn { 
    height: 4rem; border-radius: 1rem; border: none; 
    font-size: 1.25rem; font-weight: 800; cursor: pointer; 
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; 
}
.calc-btn.num { background: white; color: var(--ink); box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.calc-btn.op { background: #e8edff; color: var(--ink-50); }
.calc-btn.eq { background: var(--emerald); color: white; grid-row: span 2; height: auto; }
.calc-btn.span-2 { grid-column: span 2; }

.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.08); }
.calc-btn:active { transform: scale(0.95); }
.calc-btn.eq:hover { background: var(--emerald-dark); }

.btn-apply { 
    width: 100%; background: #0b1c30; color: white; 
    padding: 1.25rem; border-radius: 1.25rem; font-size: 1rem; 
    font-weight: 800; border: none; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; gap: 0.75rem; 
    transition: all 0.2s; 
}
.btn-apply:hover { background: #162a42; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(11, 28, 48, 0.2); }

@media (max-width: 480px) {
    .modal-card { max-width: 90%; padding: 1.5rem; border-radius: 2rem; }
    .calc-btn { height: 3.5rem; font-size: 1.125rem; }
    .calc-current { font-size: 2rem; }
}

/* Animations */
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-val { animation: countUp 0.3s ease-out; }

/* About Page */
.about-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.about-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--ink);
}
.about-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--ink);
}
.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--ink-50);
    font-size: 1.125rem;
}
.about-mission {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1.5rem;
    border-left: 4px solid var(--emerald);
    margin: 2rem 0;
}
.about-mission p {
    margin-bottom: 0;
    font-style: italic;
    color: var(--ink);
}

/* Policy Pages */
.policy-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.policy-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--ink);
}
.policy-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--ink);
}
.policy-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--ink-50);
}
.policy-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.policy-content li {
    margin-bottom: 0.5rem;
    color: var(--ink-50);
}

/* Home Page Sections */
.home-section { padding: 6rem 0; }
.section-header { text-align: center; max-width: 800px; margin: 0 auto 4rem; }
.section-header h2 { font-size: 3rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--ink); line-height: 1.1; }
.section-header p { font-size: 1.125rem; color: var(--ink-50); line-height: 1.7; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background: var(--white); padding: 3rem 2rem; border-radius: 2.5rem; border: 1px solid var(--black-5); transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-10px); }
.feature-icon { width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: #e6f7ef; color: #42b883; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }
.feature-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: var(--ink); }
.feature-card p { color: var(--ink-50); line-height: 1.6; }

.about-dark-section { background: var(--ink); border-radius: 3rem; padding: 4rem; color: var(--white); display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; overflow: hidden; }
.about-dark-content .badge { color: #42b883; margin-bottom: 1.5rem; }
.about-dark-content h2 { font-size: 3rem; font-weight: 800; margin-bottom: 2rem; line-height: 1.1; }
.about-dark-content p { font-size: 1.125rem; opacity: 0.7; line-height: 1.8; }
.about-dark-image { border-radius: 2.5rem; overflow: hidden; height: 100%; min-height: 400px; }
.about-dark-image img { width: 100%; height: 100%; object-fit: cover; }

.faq-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; border-bottom: 1px solid var(--black-5); padding-bottom: 2rem; }
.faq-header-left h2 { font-size: 3rem; font-weight: 900; color: var(--ink); }
.faq-header-left p { color: var(--ink-30); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.5rem; }
.faq-q-badge { background: #e6f7ef; color: #42b883; padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.875rem; font-weight: 800; }

.faq-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.faq-card { background: var(--white); padding: 2.5rem; border-radius: 2rem; border: 1px solid var(--black-5); display: flex; gap: 2rem; align-items: flex-start; transition: all 0.3s; }
.faq-card:hover { border-color: var(--emerald); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.faq-number { font-size: 0.875rem; font-weight: 800; color: var(--ink-20); padding-top: 0.25rem; }
.faq-body h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; color: var(--ink); display: flex; align-items: center; gap: 0.75rem; }
.faq-body h3::before { content: ""; width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; display: inline-block; }
.faq-body p { color: var(--ink-50); line-height: 1.7; }

@media (max-width: 1024px) {
    .about-dark-section { grid-template-columns: 1fr; padding: 3rem; border-radius: 2.5rem; text-align: center; }
    .about-dark-image { min-height: 300px; }
    .section-header h2, .about-dark-content h2, .faq-header-left h2 { font-size: 2.25rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 0.75rem; } header { padding: 0.5rem 0; } main { padding: 0.75rem 0; } .app-grid { gap: 0.75rem; }
    .card { padding: 0.875rem; border-radius: 1rem; } .card-title { margin-bottom: 0.625rem; font-size: 1rem; }
    .input-group { margin-bottom: 0.625rem; } .label-row { margin-bottom: 0.25rem; } .form-input { padding: 0.5rem 0.75rem; font-size: 0.9375rem; }
    .preset-grid { gap: 0.375rem; } .preset-btn { padding: 0.5rem; font-size: 0.8125rem; }
    .toggle-container { padding: 0.125rem; } .toggle-btn { padding: 0.4rem; font-size: 0.65rem; }
    .stepper { padding: 0.125rem; } .step-btn { width: 2.25rem; height: 2.25rem; } .stepper-input { width: 2.5rem; font-size: 1rem; }
    .splitter-list { gap: 0.5rem; } .splitter-item { padding: 0.75rem; gap: 0.375rem; } .splitter-top { margin-bottom: 0.25rem; } .splitter-slider-container { gap: 0.5rem; }
    .ad-banner { padding: 0.5rem; margin-bottom: 0.75rem; font-size: 0.65rem; }
    .home-input-grid { grid-template-columns: 1fr; gap: 0.75rem; margin-bottom: 1rem; }
    .service-grid { gap: 0.25rem; } .service-btn { padding: 0.375rem 0.125rem; } .service-btn .emoji { font-size: 1.125rem; }
    .seo-content { margin-top: 1.5rem; padding-top: 1rem; } .seo-content h2 { font-size: 1.125rem; margin: 1.25rem 0 0.5rem; } .seo-content p { font-size: 0.9375rem; margin-bottom: 1rem; }
    .faq-item { padding: 0.875rem; margin-bottom: 0.75rem; border-radius: 1rem; } .faq-question { font-size: 1.125rem; margin-bottom: 0.5rem; }
    footer { padding: 1.25rem 0; margin-top: 1.5rem; } .footer-grid { gap: 0.75rem; }
    .nav-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background: var(--white); flex-direction: column; align-items: flex-start; padding: 6rem 2rem; gap: 1.5rem; box-shadow: var(--shadow-xl); z-index: 9999; visibility: hidden; }
    .nav-menu.active { transform: translateX(0); visibility: visible; }
    .hamburger { display: block; z-index: 99999; }
    
    /* Home Page Mobile Optimization */
    .home-hero { padding: 1.5rem 0; gap: 1.5rem; }
    .hero-content h1 { font-size: 2.25rem; margin-bottom: 0.75rem; }
    .hero-content p { font-size: 0.9375rem; margin-bottom: 1.5rem; }
    .summary-header { margin-bottom: 1rem; }
    .summary-title { font-size: 1.125rem; }
    .summary-row { font-size: 0.875rem; margin-bottom: 0.5rem; }
    .summary-row.total {font-size: 1.5rem; margin-top: 1rem; padding-top: 1rem; }
    .each-person-card { padding: 1.25rem; margin: 1.25rem 0; border-radius: 1.25rem; }
    .each-person-label { font-size: 0.65rem; }
    .each-person-value { font-size: 2.75rem; }
    .each-person-bg-icon { font-size: 80px !important; }
    .active-splitters { margin-top: 1rem; }
    .home-section { padding: 2rem 0; }
    .section-header { margin-bottom: 1.5rem; text-align: left; }
    .section-header h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
    .section-header p { font-size: 0.9375rem; }
    .btn-primary { font-size: 1rem; padding: 0.75rem; }
    .btn-secondary { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
    .home-share-grid { gap: 0.5rem; }
    .avatar, .avatar-plus { width: 2rem; height: 2rem; font-size: 0.75rem; }
    .features-grid { gap: 1rem; }
    .feature-card { padding: 1.5rem; border-radius: 1.5rem; }
    .feature-icon { width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; }
    .feature-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
    .feature-card p { font-size: 0.875rem; }
    .about-dark-section { padding: 1.5rem; border-radius: 1.5rem; gap: 1.5rem; }
    .about-dark-content h2 { font-size: 1.75rem; margin-bottom: 1rem; }
    .about-dark-content p { font-size: 0.9375rem; }
    .about-dark-image { min-height: 200px; border-radius: 1.25rem; }
    .faq-header { margin-bottom: 1.5rem; padding-bottom: 1rem; }
    .faq-header-left h2 { font-size: 1.75rem; }
    .faq-card { padding: 1.25rem; border-radius: 1.25rem; }
    .faq-body h3 { font-size: 1rem; margin-bottom: 0.5rem; }
    .faq-body p { font-size: 0.875rem; }
    .faq-number { display: none; }
}
