/* Mabapu Ingredient Hub — responsive culinary field guide */
:root {
    --ih-ink: #17251f;
    --ih-forest: #174c3d;
    --ih-forest-deep: #0e352b;
    --ih-leaf: #2f765f;
    --ih-turmeric: #d79a22;
    --ih-turmeric-soft: #f6e7bd;
    --ih-clay: #b9573f;
    --ih-paper: #f7f4ed;
    --ih-card: #fffefb;
    --ih-mist: #e7eee9;
    --ih-line: #d7dfd9;
    --ih-muted: #58665f;
    --ih-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --ih-body: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ih-shadow: 0 18px 45px rgba(26, 55, 44, .09);
}

.ih-page,
.ih-detail-page {
    font-family: var(--ih-body);
    color: var(--ih-ink);
    background:
        radial-gradient(circle at 7% 3%, rgba(215, 154, 34, .13), transparent 25rem),
        linear-gradient(180deg, #fbfaf6 0, var(--ih-paper) 32rem, #f3f6f3 100%);
    isolation: isolate;
}

.ih-page *,
.ih-detail-page * { box-sizing: border-box; }

.ih-shell {
    width: calc(100% - 32px);
    max-width: 1240px;
    margin-inline: auto;
    padding-block: 88px 64px;
}

.ih-hero > *,
.ih-detail-hero-inner > *,
.ih-search-panel,
.ih-search-wrap,
.ih-search-input { min-width: 0; max-width: 100%; }

.ih-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--ih-forest);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ih-kicker::before {
    width: 26px;
    height: 2px;
    content: "";
    background: var(--ih-turmeric);
}

.ih-display {
    font-family: var(--ih-display);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .98;
}

.ih-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 28px;
    padding: 28px 20px 24px;
    color: #fff;
    border-radius: 26px;
    background: var(--ih-forest-deep);
    box-shadow: var(--ih-shadow);
}

.ih-hero::after {
    position: absolute;
    right: -72px;
    bottom: -110px;
    width: 260px;
    height: 260px;
    content: "";
    border: 44px solid rgba(246, 231, 189, .09);
    border-radius: 50%;
}

.ih-hero-copy,
.ih-search-panel { position: relative; z-index: 1; }

.ih-hero .ih-kicker { color: #f3d995; }

.ih-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.5rem, 10vw, 4.75rem);
}

.ih-hero-lead {
    max-width: 650px;
    margin: 18px 0 0;
    color: #dce9e3;
    font-size: 1rem;
    line-height: 1.7;
}

.ih-search-panel {
    padding: 18px;
    color: var(--ih-ink);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
}

.ih-search-label {
    display: block;
    margin-bottom: 9px;
    font-size: .82rem;
    font-weight: 800;
}

.ih-search-wrap { position: relative; }

.ih-search-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 20px;
    height: 20px;
    color: var(--ih-forest);
    transform: translateY(-50%);
    pointer-events: none;
}

.ih-search-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ih-search-input {
    width: 100%;
    min-height: 52px;
    padding: 0 72px 0 46px;
    color: var(--ih-ink);
    border: 1.5px solid #b9c8bf;
    border-radius: 13px;
    outline: none;
    background: #fff;
    font: 650 1rem/1 var(--ih-body);
}

.ih-search-input:focus {
    border-color: var(--ih-forest);
    box-shadow: 0 0 0 4px rgba(23, 76, 61, .13);
}

.ih-search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 10px;
    color: var(--ih-clay);
    border-radius: 9px;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-50%);
}

.ih-search-clear:hover { background: #fff0ec; text-decoration: none; }

.ih-search-note {
    margin: 10px 0 0;
    color: var(--ih-muted);
    font-size: .78rem;
    line-height: 1.5;
}

.ih-purpose-strip {
    display: grid;
    gap: 1px;
    overflow: hidden;
    margin: 18px 0 0;
    border: 1px solid var(--ih-line);
    border-radius: 18px;
    background: var(--ih-line);
}

.ih-purpose-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 13px;
    align-items: center;
    padding: 15px;
    background: var(--ih-card);
}

.ih-purpose-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: var(--ih-forest);
    font-family: var(--ih-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.ih-purpose-item strong { display: block; font-size: .92rem; }
.ih-purpose-item span:last-child { display: block; margin-top: 2px; color: var(--ih-muted); font-size: .79rem; line-height: 1.4; }

.ih-jump-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    margin: 18px 0 28px;
    padding: 0 0 7px;
    scrollbar-width: none;
}

.ih-jump-nav::-webkit-scrollbar { display: none; }

.ih-jump-nav a {
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    padding: 0 16px;
    color: var(--ih-forest);
    border: 1px solid #bfcfc6;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    font-size: .85rem;
    font-weight: 800;
    text-decoration: none;
}

.ih-jump-nav a:hover { color: #fff; border-color: var(--ih-forest); background: var(--ih-forest); text-decoration: none; }

.ih-section {
    margin-top: 20px;
    padding: 22px 16px;
    border: 1px solid var(--ih-line);
    border-radius: 22px;
    background: rgba(255, 254, 251, .86);
}

.ih-section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.ih-section-title {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
    color: var(--ih-ink);
    font: 700 clamp(1.55rem, 5vw, 2.15rem)/1.08 var(--ih-display);
    letter-spacing: -.025em;
}

.ih-section-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--ih-forest);
    border-radius: 12px;
    background: var(--ih-mist);
}

.ih-section-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ih-section-copy { margin: 0; color: var(--ih-muted); font-size: .9rem; line-height: 1.55; }

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

.ih-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 132px;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    color: var(--ih-ink);
    border: 1px solid #d5ddd8;
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ih-card:hover { border-color: var(--ih-leaf); background: #fbfffc; box-shadow: 0 12px 26px rgba(23, 76, 61, .1); text-decoration: none; }
.ih-card:focus-visible,
.ih-jump-nav a:focus-visible,
.ih-back:focus-visible,
.ih-topic-link:focus-visible { outline: 3px solid var(--ih-turmeric); outline-offset: 3px; }

.ih-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ih-card-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; overflow: hidden; color: var(--ih-forest); border-radius: 12px; background: var(--ih-mist); }
.ih-card-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ih-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.ih-card-arrow { color: #8a9a92; font-size: 1.05rem; }
.ih-card-name { display: block; overflow-wrap: anywhere; margin-top: 14px; font-size: .94rem; font-weight: 850; line-height: 1.25; }
.ih-card-sub { display: block; min-height: 17px; margin-top: 5px; color: var(--ih-muted); font-size: .74rem; line-height: 1.35; }
.ih-card-sub--empty { color: #955032; }

.ih-result-meta { margin: 0 0 15px; color: var(--ih-muted); font-size: .82rem; font-weight: 750; }
.ih-pagination { display: flex; justify-content: center; margin-top: 24px; }
.ih-empty { margin: 0; padding: 22px; color: var(--ih-muted); border: 1px dashed #b9c8bf; border-radius: 14px; text-align: center; }

/* Detail pages */
.ih-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--ih-forest);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}
.ih-back svg { width: 18px; height: 18px; }
.ih-back:hover { color: var(--ih-clay); text-decoration: none; }

.ih-detail-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 20px;
    color: #fff;
    border-radius: 24px;
    background: var(--ih-forest-deep);
    box-shadow: var(--ih-shadow);
}

.ih-detail-hero::after {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    content: "";
    border: 36px solid rgba(215, 154, 34, .12);
    border-radius: 50%;
}

.ih-detail-hero-inner { position: relative; z-index: 1; display: grid; gap: 20px; }
.ih-detail-label { margin: 0 0 10px; color: #f2d88d; font-size: .73rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.ih-detail-title { margin: 0; color: #fff; font: 700 clamp(2.45rem, 12vw, 5rem)/.96 var(--ih-display); letter-spacing: -.045em; overflow-wrap: anywhere; }
.ih-detail-hi { display: block; margin-top: 10px; color: #dce9e3; font-size: 1.1rem; font-weight: 650; }
.ih-detail-desc { max-width: 690px; margin: 16px 0 0; color: #dce9e3; font-size: 1rem; line-height: 1.65; }

.ih-ingredient-portrait {
    position: relative;
    width: 120px;
    height: 120px;
    overflow: hidden;
    color: var(--ih-forest-deep);
    border: 6px solid rgba(255, 255, 255, .18);
    border-radius: 28px;
    background: var(--ih-turmeric-soft);
    box-shadow: 0 18px 35px rgba(0, 0, 0, .22);
    cursor: zoom-in;
    padding: 0;
}
.ih-ingredient-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ih-ingredient-portrait svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ih-ingredient-portrait--generic { display: grid; place-items: center; cursor: default; }

.ih-hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin-top: 22px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 16px; background: rgba(255, 255, 255, .15); }
.ih-hero-stat { padding: 13px 14px; background: rgba(255, 255, 255, .08); }
.ih-hero-stat span { display: block; color: #c7d8d0; font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ih-hero-stat strong { display: block; margin-top: 4px; color: #fff; font-size: .95rem; line-height: 1.3; }

.ih-detail-layout { display: grid; gap: 18px; margin-top: 20px; }
.ih-aside { display: none; }
.ih-content { min-width: 0; }

.ih-panel { margin-bottom: 18px; padding: 22px 18px; border: 1px solid var(--ih-line); border-radius: 20px; background: var(--ih-card); }
.ih-panel-heading { margin: 0; color: var(--ih-ink); font: 700 clamp(1.55rem, 6vw, 2.25rem)/1.08 var(--ih-display); letter-spacing: -.03em; }
.ih-panel-lead { max-width: 800px; margin: 12px 0 0; color: var(--ih-muted); font-size: .96rem; line-height: 1.75; }

.ih-facts { display: grid; gap: 8px; margin: 20px 0 0; }
.ih-fact { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 13px 0; border-top: 1px solid var(--ih-line); }
.ih-fact-label { color: var(--ih-muted); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ih-fact-value { max-width: 65%; color: var(--ih-ink); font-size: .9rem; font-weight: 850; text-align: right; overflow-wrap: anywhere; }

.ih-guide-grid { display: grid; gap: 10px; margin-top: 20px; }
.ih-guide-card { position: relative; padding: 18px 17px 18px 54px; border-radius: 15px; background: var(--ih-paper); }
.ih-guide-number { position: absolute; top: 17px; left: 16px; display: grid; width: 27px; height: 27px; place-items: center; color: #fff; border-radius: 8px; background: var(--ih-forest); font-family: var(--ih-display); font-weight: 700; }
.ih-guide-card h3 { margin: 0 0 7px; color: var(--ih-ink); font: 850 .94rem/1.35 var(--ih-body); }
.ih-guide-card p { margin: 0; color: var(--ih-muted); font-size: .86rem; line-height: 1.65; }

.ih-topic-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ih-topic-link { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 0 14px; color: var(--ih-forest); border: 1px solid #bbccc3; border-radius: 999px; background: #fff; font-size: .81rem; font-weight: 800; text-decoration: none; }
.ih-topic-link:hover { color: #fff; border-color: var(--ih-forest); background: var(--ih-forest); text-decoration: none; }

.ih-collection { margin-top: 30px; scroll-margin-top: 110px; }
.ih-collection-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.ih-collection-title { margin: 0; color: var(--ih-ink); font: 700 clamp(1.65rem, 6vw, 2.3rem)/1.05 var(--ih-display); letter-spacing: -.03em; }
.ih-collection-count { color: var(--ih-muted); font-size: .8rem; font-weight: 750; }
.ih-related-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.ih-related-link { display: flex; min-width: 0; min-height: 68px; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ih-ink); border: 1px solid var(--ih-line); border-radius: 15px; background: var(--ih-card); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.ih-related-link:hover { border-color: var(--ih-leaf); box-shadow: 0 9px 22px rgba(23, 76, 61, .08); text-decoration: none; }
.ih-related-icon { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; overflow: hidden; color: var(--ih-forest); border-radius: 12px; background: var(--ih-mist); }
.ih-related-icon img { width: 100%; height: 100%; object-fit: cover; }
.ih-related-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ih-related-text { min-width: 0; }
.ih-related-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 850; }
.ih-related-count { display: block; margin-top: 3px; color: var(--ih-muted); font-size: .73rem; }

.ih-recipe-grid,
.ih-product-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: stretch; }
.ih-product-grid > .product-card { width: 100%; height: 100%; }
.ih-no-results { padding: 30px 20px; color: var(--ih-muted); border: 1px dashed #aebeb5; border-radius: 18px; background: rgba(255, 255, 255, .65); text-align: center; }
.ih-no-results p { margin: 0; }

.ih-mandi { background: #fff; }
.ih-mandi-title { display: flex; gap: 10px; align-items: center; }
.ih-mandi-title svg { width: 28px; height: 28px; color: var(--ih-clay); fill: none; stroke: currentColor; stroke-width: 1.8; }
.ih-mandi-control-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.ih-mandi-status { color: var(--ih-muted); font-size: .82rem; line-height: 1.45; }
.ih-text-btn { min-height: 44px; padding: 0 10px; color: var(--ih-forest); border: 0; border-radius: 8px; background: transparent; font: 800 .78rem/1 var(--ih-body); cursor: pointer; text-decoration: underline; }
.ih-manual-location { display: none; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 14px; border: 1px solid var(--ih-line); border-radius: 14px; background: var(--ih-paper); }
.ih-manual-location label { display: grid; flex: 1 1 145px; gap: 6px; color: var(--ih-muted); font-size: .73rem; font-weight: 800; }
.ih-manual-location input { width: 100%; min-height: 44px; padding: 0 12px; color: var(--ih-ink); border: 1px solid #b7c5bd; border-radius: 9px; background: #fff; font: 500 .86rem/1 var(--ih-body); }
.ih-manual-location input:focus { outline: 3px solid rgba(23, 76, 61, .14); border-color: var(--ih-forest); }
.ih-action-btn { min-height: 44px; padding: 0 16px; color: #fff; border: 0; border-radius: 9px; background: var(--ih-forest); font: 800 .78rem/1 var(--ih-body); cursor: pointer; }
.ih-action-btn--quiet { color: var(--ih-clay); background: transparent; }
.ih-ticker { display: flex; height: 52px; overflow: hidden; align-items: center; margin-top: 16px; border-radius: 13px; background: #10231d; }
.ih-ticker-label { display: flex; height: 100%; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 14px; color: #fff; background: var(--ih-clay); font-size: .69rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ih-ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: mabapu-live-blink 1s infinite alternate; }
.ih-ticker-track { display: flex; width: 100%; height: 100%; overflow: hidden; align-items: center; }
.ih-disclaimer { margin: 14px 0 0; padding: 12px 14px; color: #754033; border-left: 3px solid var(--ih-clay); border-radius: 7px; background: #fff1ed; font-size: .75rem; line-height: 1.55; }

.ih-zoom-modal { position: fixed; z-index: 2000000000; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 18, 14, .9); backdrop-filter: blur(9px); cursor: zoom-out; }
.ih-zoom-close { position: absolute; top: 18px; right: 18px; display: grid; width: 48px; height: 48px; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.1); font-size: 2rem; line-height: 1; cursor: pointer; }
.ih-zoom-wrapper { position: relative; display: flex; width: min(330px, 88vw); height: min(330px, 88vw); align-items: center; justify-content: center; transition: transform .3s cubic-bezier(.16,1,.3,1); transform: scale(.9); }

@keyframes mabapu-ticker-scroll { from { transform: translate3d(0,0,0); } to { transform: translate3d(-20%,0,0); } }
@keyframes mabapu-live-blink { from { opacity: .35; } to { opacity: 1; } }

.ih-detail-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ih-detail-tags .ih-detail-label {
    margin-bottom: 0;
}
.ih-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    color: #17251f;
    border-radius: 999px;
    background: #f3d995;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.ih-profile-card {
    margin: 20px 0;
    padding: 20px 22px;
    border: 1px solid rgba(215, 154, 34, .3);
    border-left: 4px solid var(--ih-turmeric);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(246, 231, 189, .2) 0%, rgba(255, 254, 251, 1) 100%);
}
.ih-profile-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.ih-profile-icon {
    font-size: 1.5rem;
    line-height: 1;
}
.ih-profile-title {
    margin: 0;
    color: var(--ih-ink);
    font: 750 1.05rem/1.2 var(--ih-body);
}
.ih-profile-subtitle {
    display: block;
    color: var(--ih-muted);
    font-size: .75rem;
    font-weight: 600;
}
.ih-profile-text {
    margin: 0;
    color: var(--ih-ink);
    font-size: .95rem;
    line-height: 1.7;
}

.ih-badge-pill {
    display: inline-block;
    padding: 2px 10px;
    color: var(--ih-forest-deep);
    border-radius: 999px;
    background: var(--ih-mist);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: capitalize;
}

.ih-aliases-section {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--ih-line);
    border-radius: 16px;
    background: var(--ih-paper);
}
.ih-aliases-title {
    margin: 0 0 6px;
    color: var(--ih-ink);
    font: 750 .98rem/1.3 var(--ih-body);
}
.ih-aliases-copy {
    margin: 0 0 14px;
    color: var(--ih-muted);
    font-size: .82rem;
    line-height: 1.5;
}
.ih-aliases-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ih-alias-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: var(--ih-ink);
    border: 1px solid #c9d5ce;
    border-radius: 10px;
    background: #fff;
    font-size: .84rem;
    font-weight: 650;
    line-height: 1.2;
    transition: border-color .15s ease, background-color .15s ease;
}
.ih-alias-tag:hover {
    border-color: var(--ih-leaf);
    background: #f4fbf7;
}
.ih-alias-tag--hindi {
    border-color: rgba(215, 154, 34, .5);
    background: #fffdf5;
    font-weight: 750;
}
.ih-alias-lang {
    padding: 2px 6px;
    color: #7b580d;
    border-radius: 6px;
    background: #faecc7;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Tablet: denser directory and a compact guide rail. */
@media (min-width: 700px) {
    .ih-shell { width: calc(100% - 56px); padding-block: 104px 76px; }
    .ih-hero { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: end; padding: 42px 36px; border-radius: 30px; }
    .ih-hero h1 { font-size: clamp(3.8rem, 8vw, 5.5rem); }
    .ih-purpose-strip { grid-template-columns: repeat(3, 1fr); }
    .ih-purpose-item { grid-template-columns: 38px 1fr; padding: 14px 12px; }
    .ih-purpose-number { width: 38px; height: 38px; }
    .ih-jump-nav { margin-inline: 0; padding-inline: 0; }
    .ih-section { padding: 28px; }
    .ih-section-head { flex-direction: row; align-items: end; justify-content: space-between; }
    .ih-section-copy { max-width: 390px; text-align: right; }
    .ih-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
    .ih-card { min-height: 148px; padding: 17px; }
    .ih-card-name { font-size: 1rem; }
    .ih-detail-hero { padding: 36px; border-radius: 30px; }
    .ih-detail-hero-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .ih-ingredient-portrait { width: 160px; height: 160px; border-radius: 36px; }
    .ih-hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ih-hero-stat { padding: 15px; }
    .ih-panel { padding: 30px; }
    .ih-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .ih-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ih-guide-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .ih-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ih-recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .ih-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* Desktop: persistent context rail and editorial working surface. */
@media (min-width: 1100px) {
    .ih-shell { padding-top: 118px; }
    .ih-hero { grid-template-columns: minmax(0, 1.45fr) 390px; padding: 52px 54px; }
    .ih-hero h1 { font-size: clamp(4.8rem, 6.5vw, 6.3rem); }
    .ih-hero-lead { font-size: 1.08rem; }
    .ih-purpose-strip { margin-top: -18px; margin-inline: 36px; position: relative; z-index: 2; box-shadow: 0 12px 30px rgba(26,55,44,.08); }
    .ih-jump-nav { justify-content: center; margin-top: 28px; }
    .ih-section { padding: 34px; border-radius: 26px; }
    .ih-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
    .ih-card { min-height: 158px; padding: 19px; border-radius: 18px; }
    .ih-card-icon { width: 48px; height: 48px; }
    .ih-card-name { font-size: 1.06rem; }
    .ih-detail-hero { padding: 50px 54px; }
    .ih-detail-title { font-size: clamp(4.6rem, 6vw, 6rem); }
    .ih-ingredient-portrait { width: 190px; height: 190px; border-radius: 42px; }
    .ih-detail-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
    .ih-aside { position: sticky; top: 110px; display: block; padding: 22px; border: 1px solid var(--ih-line); border-radius: 20px; background: rgba(255,254,251,.9); }
    .ih-aside-title { margin: 0 0 13px; color: var(--ih-ink); font: 700 1.25rem/1.15 var(--ih-display); }
    .ih-aside-copy { margin: 0 0 18px; color: var(--ih-muted); font-size: .79rem; line-height: 1.55; }
    .ih-aside-nav { display: grid; gap: 5px; }
    .ih-aside-nav a { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 11px; color: var(--ih-forest); border-radius: 9px; font-size: .8rem; font-weight: 800; text-decoration: none; }
    .ih-aside-nav a:hover { background: var(--ih-mist); text-decoration: none; }
    .ih-panel { padding: 36px; border-radius: 24px; }
    .ih-guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ih-guide-card:last-child:nth-child(odd) { grid-column: auto; }
    .ih-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ih-recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
    .ih-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

@media (min-width: 1420px) {
    .ih-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
    .ih-shell { width: calc(100% - 22px); }
    .ih-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ih-card { min-height: 124px; padding: 13px; }
    .ih-detail-title { font-size: 2.55rem; }
    .ih-hero-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ih-page *, .ih-detail-page * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
    .ih-page, .ih-detail-page { background: #fff; }
    .ih-aside, .ih-jump-nav, .ih-back, .ih-search-panel { display: none !important; }
    .ih-hero, .ih-detail-hero { color: #000; border: 1px solid #bbb; background: #fff; box-shadow: none; }
    .ih-hero h1, .ih-detail-title, .ih-detail-desc { color: #000; }
}
