* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFC80F;
    --accent-color: #FFC80F;
    --text-color: #37352F;
    --light-bg: #F7F6F3;
    --border-color: #E9E9E7;
    --warning-bg: #FFF3CD;
    --info-bg: #EDF5FA;
    --max-width: 900px;
}

body {
    font-family: Inter, 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    height: 70px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.logo {
    height: 32px;
}

.logo img {
    height: 100%;
    width: auto;
}

.app-link {
    background-color: var(--primary-color);
    color: #000000;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.app-link:hover {
    background-color: #E6B40E;
    transform: translateY(-1px);
}

/* Container */
.container {
    max-width: calc(var(--max-width) + 192px);
    margin: 0 auto;
    display: flex;
    gap: 46px;
    padding: 2rem 96px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    width: 200px;
    height: fit-content;
    flex-shrink: 0;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.side-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.side-nav a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

/* Main Content */
.content {
    flex: 1;
    max-width: var(--max-width);
}

.main-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
}

section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

h2 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    color: var(--text-color);
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

h4 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Info Boxes */
.info-box {
    background-color: var(--info-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 3px;
    box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px;
}

.warning-box {
    background-color: var(--warning-bg);
    border-left: 4px solid #D9730D;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 3px;
    box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px;
}

/* Comparison */
.comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comparison-item {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.step {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.tip-item {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Recycling Guide */
.recycling-guide {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.recycling-guide p {
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

table thead {
    background-color: var(--light-bg);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
}

table tbody tr:hover {
    background-color: rgba(247, 246, 243, 0.5);
}

.registry-table {
    font-size: 0.85rem;
}

.registry-table td {
    padding: 0.75rem;
    line-height: 1.5;
}

.reference-table {
    font-size: 0.9rem;
}

/* Term Box */
.term-box {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.term-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.term-item {
    margin-bottom: 1rem;
}

.term-item:last-child {
    margin-bottom: 0;
}

.term-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.term-item p {
    margin-bottom: 0;
    padding-left: 1rem;
}

.term-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.term-item a:hover {
    text-decoration: underline;
}

/* Example Box */
.example-box {
    background-color: #FFF9E6;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #FFE8A3;
}

.example-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Case Studies - QNA Style */
.case-study {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.case-study > p {
    padding: 1.25rem 1.5rem;
    margin: 0;
    background-color: #FFFBF0;
    font-weight: 500;
    line-height: 1.7;
}

.case-study > p strong {
    font-weight: 600;
    color: var(--text-color);
}

.case-study .answer {
    padding: 1.5rem;
    background-color: white;
    border-top: 1px solid var(--border-color);
}

.case-study .answer::before {
    content: '💡';
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.case-study .answer p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

.case-study .answer strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Tips List */
.tips-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.tips-list .tip-item {
    background-color: white;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tips-list .tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tips-list .tip-item h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.tips-list .tip-item p {
    margin-bottom: 0;
}

/* Tip Section */
.tip-section h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.tip-section h4:first-child {
    margin-top: 0;
}

/* Cleaning Tips List */
.cleaning-tips-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.cleaning-item {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.cleaning-item h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
}

.cleaning-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Recycling Guide */
.recycling-guide h4 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.recycling-guide h4:first-child {
    margin-top: 0;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: #666;
}

.footer-cta {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.footer-cta p {
    margin-bottom: 0.5rem;
}

.footer-cta p:last-child {
    margin-bottom: 0;
}

.footer .copyright {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* Footnotes */
.footnote {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.footnote:hover {
    color: #E6B40E;
}

/* Endnotes Section */
.endnotes-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.endnotes-section ol {
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.endnotes-section li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.endnotes-section li a {
    color: var(--primary-color);
    text-decoration: none;
}

.endnotes-section li a:hover {
    text-decoration: underline;
}

/* Tooltip for desktop */
.footnote-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 300px;
    width: max-content;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 8px;
    white-space: normal;
    text-align: left;
    font-weight: 400;
}

.footnote-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.footnote:hover .footnote-tooltip {
    display: block;
}

/* Modal for mobile */
.footnote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.footnote-modal.active {
    display: flex;
}

.footnote-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.footnote-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.footnote-modal-close:hover {
    background-color: var(--light-bg);
}

.footnote-modal-content h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footnote-modal-content p {
    margin: 0;
    line-height: 1.6;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #111111;
    color: var(--primary-color);
    padding: 16px 31px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s;
    z-index: 1000;
}

.floating-btn:hover {
    background: #222222;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 1.5rem 24px;
    }

    .nav-content {
        padding: 0 24px;
    }

    .sidebar {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
    }

    .side-nav {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .side-nav a {
        display: inline-block;
    }

    .main-title {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .tips-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .comparison {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cleaning-tips-list {
        grid-template-columns: 1fr;
    }

    .floating-btn {
        bottom: 30px;
        right: 26px;
        padding: 14px 24px;
        font-size: 16px;
    }

    table {
        font-size: 0.85rem;
    }

    table th,
    table td {
        padding: 0.75rem;
    }

    /* Hide tooltip on mobile */
    .footnote-tooltip {
        display: none !important;
    }

    .footnote-modal-content {
        padding: 1.5rem;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 1rem;
    }

    .app-link {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .floating-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    table {
        font-size: 0.8rem;
    }

    table th,
    table td {
        padding: 0.5rem;
    }
}