/* ============================================================
   NUTRITION 2.0 — SHARED CHROME
   Nav + search overlay used identically across every page.
   Edit here once, every page updates.
   ============================================================ */

/* === BASE TOKENS (must match landing page :root) === */
.n2-shared-host {
    --ink:    #0A0A0A;
    --pulse:  #131313;
    --hull:   #1A1A1A;
    --steel:  #262626;
    --bone:   #F4F2EC;
    --paper:  #FFFFFF;
    --muted:  rgba(10,10,10,0.55);
    --hair:   rgba(10,10,10,0.10);
    --hairw:  rgba(255,255,255,0.10);
    --plasma: #06B6D4;
    --plasma-soft: rgba(6,182,212,0.14);
    --petrol-deep: #0D3640;
    --sans:   'Schibsted Grotesk', system-ui, sans-serif;
    --display:'Schibsted Grotesk', system-ui, sans-serif;
    --mono:   'JetBrains Mono', monospace;
}

/* === NAV (identical across all pages) === */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: #FFFFFF;
    color: #0A0A0A;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 32px;
    z-index: 100;
    border-bottom: 1px solid rgba(10,10,10,0.10);
}
.nav-left {
    display: flex; gap: 28px;
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-left a {
    color: #0A0A0A; text-decoration: none;
    transition: opacity 0.2s;
    display: inline-flex; align-items: baseline; gap: 1px;
}
.nav-left a sup {
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 9px; font-weight: 400;
    color: rgba(10,10,10,0.55);
    margin-left: 1px;
}
.nav-left a:hover { opacity: 0.55; }
.nav-logo {
    display: inline-flex;
    align-items: center;
    height: 100%;
}
.nav-logo img {
    height: 22px; width: auto; display: block;
}
.nav-right {
    display: flex; gap: 18px;
    align-items: center; justify-content: flex-end;
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-right > a:not(.cta-pill) {
    color: #0A0A0A; text-decoration: none;
    transition: opacity 0.2s;
}
.nav-right > a:not(.cta-pill):hover { opacity: 0.55; }
.nav-icon {
    display: inline-flex; align-items: center;
    color: #0A0A0A; opacity: 0.85;
    transition: opacity 0.2s;
    background: transparent; border: 0;
    padding: 0; cursor: pointer;
}
.nav-icon:hover { opacity: 1; }
.cta-pill {
    background: #0A0A0A;
    color: #FFFFFF;
    padding: 9px 18px;
    border-radius: 100px;
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.cta-pill:hover {
    background: #06B6D4;
    color: #0A0A0A;
}
@media (max-width: 900px) {
    .nav-left { display: none; }
    .nav { grid-template-columns: 1fr auto; }
    .nav-logo { grid-column: 1; text-align: left; justify-content: flex-start; }
    .nav-right { grid-column: 2; }
}

/* === SEARCH OVERLAY === */
.search-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(10,10,10,0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 96px 24px 48px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.search-overlay.open { display: flex; opacity: 1; }
.search-modal {
    width: 100%; max-width: 720px;
    background: #0A0A0A;
    border: 1px solid rgba(255,255,255,0.10);
    border-top: 3px solid #06B6D4;
    padding: 28px 28px 18px;
    transform: scale(0.97);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 32px 72px rgba(0,0,0,0.6);
    color: #F2EFE8;
}
.search-overlay.open .search-modal { transform: scale(1); }
.search-head {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 18px;
}
.search-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: #06B6D4;
    display: inline-flex; align-items: center; gap: 8px;
}
.search-tag .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #06B6D4;
    box-shadow: 0 0 8px #06B6D4;
}
.search-close {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 5px 9px; cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.search-close:hover {
    color: #FFFFFF;
    border-color: rgba(255,255,255,0.45);
}
.search-input-wrap {
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 10px 0 14px;
    display: flex; align-items: center; gap: 14px;
}
.search-input-icon { color: rgba(255,255,255,0.45); flex-shrink: 0; }
.search-input {
    flex: 1; background: transparent; border: 0; outline: none;
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-weight: 500; font-size: 22px;
    letter-spacing: -0.015em; color: #FFFFFF;
    padding: 4px 0;
}
.search-input::placeholder {
    color: rgba(255,255,255,0.32);
    font-weight: 400;
}
.search-results {
    max-height: 52vh;
    overflow-y: auto;
    margin: 8px -8px 0;
    padding: 4px 8px;
}
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.10);
    border-radius: 3px;
}
.search-result-group {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 14px 4px 8px;
}
.search-result {
    display: grid; grid-template-columns: 32px 1fr auto;
    gap: 14px; align-items: center;
    padding: 12px 10px;
    cursor: pointer;
    border: 0; background: transparent; width: 100%;
    border-radius: 4px;
    transition: background 0.12s;
    text-align: left;
    font-family: inherit; color: inherit;
    margin: 2px 0;
}
.search-result:hover,
.search-result.active {
    background: rgba(6,182,212,0.10);
}
.search-result .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.12em;
    color: #06B6D4;
}
.search-result .body {
    display: flex; flex-direction: column; gap: 3px;
}
.search-result .title {
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-weight: 500; font-size: 15px;
    letter-spacing: -0.005em; color: #FFFFFF;
}
.search-result .title mark {
    background: rgba(6,182,212,0.22);
    color: #FFFFFF;
    padding: 0 2px; border-radius: 2px;
}
.search-result .desc {
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 12.5px; color: rgba(255,255,255,0.55);
    line-height: 1.4;
}
.search-result .arrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px; color: rgba(255,255,255,0.32);
    transition: transform 0.15s, color 0.15s;
}
.search-result:hover .arrow,
.search-result.active .arrow {
    color: #06B6D4;
    transform: translateX(2px);
}
.search-empty {
    padding: 32px 12px; text-align: center;
    font-family: 'Schibsted Grotesk', system-ui, sans-serif;
    font-size: 14px; color: rgba(255,255,255,0.5);
}
.search-foot {
    display: flex; gap: 18px; justify-content: flex-end;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}
.search-foot kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 1px 5px; margin-right: 4px;
    color: #FFFFFF;
}
@media (max-width: 600px) {
    /* nav padding/cta tighter on small phones */
    .nav { padding: 0 18px; }
    .nav-right { gap: 12px; }
    .cta-pill { padding: 8px 14px; font-size: 11px; }
    .search-overlay { padding: 72px 16px 24px; }
    .search-input { font-size: 18px; }
    .search-foot { gap: 12px; font-size: 9px; }
}
