/* Health Hack Hub — shared styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --teal: #0f766e;
    --teal-deep: #134e4a;
    --mint: #99f6e4;
    --mint-soft: #ecfdf5;
    --bg: #f7faf8;
    --text: #1a1a1a;
    --muted: #4b5563;
    --muted-soft: #6b7280;
    --border: #e5e7eb;
    --amber-bg: #fffbeb;
    --amber-border: #fde68a;
    --amber-text: #92400e;
    --white: #fff;
}

html { background: var(--bg); scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(1100px 380px at 8% -8%, rgba(167, 243, 208, 0.55) 0%, transparent 58%),
        var(--bg);
    color: var(--text);
    line-height: 1.7;
}

body::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #0f766e 0%, #2dd4bf 60%, #fbbf24 100%);
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
}

.container-narrow { max-width: 720px; }

/* Brand / nav */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eaeaea;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--teal);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.emblem {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: block;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    align-items: center;
}

.nav a {
    color: var(--teal-deep);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 600; }

/* Typography */
h1 {
    font-size: 2.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    color: #111827;
}

h1.headline { font-size: 2.15rem; }

.lede {
    font-size: 1.18rem;
    color: #3f5e57;
    margin-bottom: 1.25rem;
}

h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--teal-deep);
    margin-bottom: 0.85rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--mint);
}

h2.plain {
    padding-left: 0;
    border-left: none;
}

.section { margin-bottom: 2.25rem; }

.section-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 0.5rem;
}

/* Buttons / CTAs */
.btn {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.35rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
}

.btn-primary:hover {
    background: #0d9488;
    box-shadow: 0 2px 10px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
    background: var(--white);
    color: var(--teal);
    border: 1.5px solid var(--mint);
}

.btn-secondary:hover {
    border-color: var(--teal);
    background: var(--mint-soft);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* Trust / disclaimer */
.disclaimer, .callout {
    font-size: 0.95rem;
    color: var(--muted);
    background: var(--mint-soft);
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 0.9rem 1.05rem;
    margin-bottom: 1.5rem;
}

.trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.75rem 0 2.25rem;
}

.trust-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    font-size: 0.92rem;
    color: var(--teal-deep);
    font-weight: 500;
    text-align: center;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.guide-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.guide-card:hover {
    border-color: var(--mint);
    box-shadow: 0 2px 14px rgba(15, 118, 110, 0.08);
}

.guide-card:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.card-top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.product-thumb, .guide-cover {
    display: block;
    width: 52px;
    height: 70px;
    flex-shrink: 0;
    border: 1px solid var(--mint);
    border-radius: 7px;
    object-fit: cover;
    background: var(--mint-soft);
}

.guide-cover { width: 135px; height: 180px; border-radius: 10px; }

.product-thumb-placeholder, .guide-cover-placeholder {
    --cover-accent: #5eead4;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f0fdfa;
}

.product-thumb-placeholder::before,
.guide-cover-placeholder::before {
    content: "";
    position: absolute;
    width: 27px;
    height: 37px;
    border: 1px solid var(--cover-accent);
    border-radius: 3px;
    opacity: 0.85;
}

.guide-cover-placeholder::before {
    width: 72px;
    height: 98px;
    border-width: 1.5px;
    border-radius: 6px;
}

.product-thumb-placeholder span,
.guide-cover-placeholder span {
    position: relative;
    margin-top: 27px;
    color: var(--teal);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.guide-cover-placeholder span {
    margin-top: 72px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.tone-sleep { --cover-accent: #2dd4bf; background: #ecfeff; }
.tone-digestion { --cover-accent: #6ee7b7; background: #ecfdf5; }
.tone-heart { --cover-accent: #67e8f9; background: #f0fdfa; }
.tone-mind { --cover-accent: #a7f3d0; background: #f0fdfa; }
.tone-general { --cover-accent: #14b8a6; background: #e6fffa; }
.tone-default { --cover-accent: #5eead4; background: #f0fdfa; }

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--teal);
    line-height: 1.35;
}

.guide-card:hover .card-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card-blurb {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: auto;
    padding-top: 0.35rem;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--teal);
    background: var(--mint-soft);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.status {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--amber-text);
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    white-space: nowrap;
}

.badge-pdf {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--teal);
    background: #e6fffa;
    border: 1px solid var(--mint);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.category-tile {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1rem;
    text-decoration: none;
    color: var(--teal-deep);
    font-weight: 600;
    font-size: 0.98rem;
    transition: border-color 0.15s, background 0.15s;
}

.category-tile:hover {
    border-color: var(--mint);
    background: var(--mint-soft);
    color: var(--teal);
}

.category-tile span {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted-soft);
    margin-top: 0.25rem;
}

/* Capture / forms */
.capture-box {
    background: var(--white);
    border: 1px solid var(--mint);
    border-radius: 14px;
    padding: 1.5rem 1.35rem;
    margin: 1rem 0;
}

.capture-box p { color: var(--muted); margin-bottom: 0.85rem; font-size: 1rem; }

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.form-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal);
}

.form-row input {
    font-family: inherit;
    font-size: 1.02rem;
    padding: 0.75rem 0.95rem;
    border: 1.5px solid var(--mint);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

.form-row input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.form-note {
    font-size: 0.88rem;
    color: var(--muted-soft);
    margin-top: 0.65rem;
}

/* Library list */
.search-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(247, 250, 248, 0.92);
    backdrop-filter: blur(8px);
    padding: 0.75rem 0 1rem;
    margin-bottom: 0.5rem;
}

.search-wrap label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

#search, .topic-select {
    width: 100%;
    font-family: inherit;
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--mint);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

#search:focus, .topic-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 0.75rem;
    align-items: end;
}

.meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--muted-soft);
}

#result-count { font-weight: 500; color: #3f5e57; }

.topic-block { margin-bottom: 2rem; }

.topic-block h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.product-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

a.product-link {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    align-items: start;
    text-decoration: none;
    color: inherit;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

a.product-link:hover {
    border-color: var(--mint);
    box-shadow: 0 2px 12px rgba(15, 118, 110, 0.06);
}

a.product-link:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

a.product-link .product-thumb {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--teal);
    grid-column: 2;
}

a.product-link:hover .product-title {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-blurb {
    font-size: 0.95rem;
    color: var(--muted);
    grid-column: 2;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    grid-column: 2;
    margin-top: 0.15rem;
}

a.product-link .status {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
}

.price {
    grid-column: 3;
    grid-row: 3;
    align-self: end;
    justify-self: end;
    font-size: 0.9rem;
    font-weight: 500;
    color: #9ca3af;
}

.empty {
    display: none;
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted-soft);
    font-size: 1.05rem;
}

.empty.visible { display: block; }

/* Guide page */
.cover-row {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.benefit-lead {
    font-size: 1.15rem;
    color: #3f5e57;
    margin-bottom: 1.5rem;
}

.benefit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.benefit-list li {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 2.25rem;
    font-size: 1.02rem;
    color: #1f2937;
    position: relative;
}

.benefit-list li::before {
    content: "";
    position: absolute;
    left: 0.9rem;
    top: 1.05rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--teal);
}

.intro-copy p {
    font-size: 1.05rem;
    color: #374151;
    margin-bottom: 0.9rem;
}

.intro-copy p:last-child { margin-bottom: 0; }

.who-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.who-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.15rem;
}

.who-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal-deep);
    margin-bottom: 0.5rem;
}

.who-box p, .who-box ul {
    font-size: 0.95rem;
    color: var(--muted);
}

.who-box ul { padding-left: 1.1rem; }

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
}

.faq-item h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--teal-deep);
    margin-bottom: 0.35rem;
}

.faq-item p {
    font-size: 0.98rem;
    color: var(--muted);
}

#page-not-found, #page-guide { display: none; }
#page-not-found.visible, #page-guide.visible { display: block; }

.not-found-copy {
    font-size: 1.1rem;
    color: #3f5e57;
    margin: 1rem 0 1.5rem;
}

.back-link {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.notify-box {
    background: var(--white);
    border: 1px dashed var(--mint);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin: 1.5rem 0 2rem;
}

.notify-box p { font-size: 0.98rem; color: var(--muted); margin-bottom: 0.75rem; }

/* About / legal prose */
.prose p {
    font-size: 1.08rem;
    color: #2a2a2a;
    margin-bottom: 1rem;
}

.prose a { color: var(--teal); font-weight: 500; }

.updated { font-size: 0.9rem; color: var(--muted-soft); margin-bottom: 1.75rem; }

.prose h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.65rem;
}

/* Free page minimal */
.free-chrome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.free-chrome .home-link {
    font-size: 0.92rem;
    color: var(--teal);
    font-weight: 500;
    text-decoration: none;
}

.free-chrome .home-link:hover { text-decoration: underline; }

.bullet-simple {
    list-style: none;
    margin: 1.25rem 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.bullet-simple li {
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.05rem;
    color: #374151;
}

.bullet-simple li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--teal);
}

/* Footer */
.footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-soft);
    padding: 2.5rem 0 0.5rem;
    border-top: 1px solid #eaeaea;
    margin-top: 2.5rem;
}

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

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

.footer-links { margin-bottom: 0.5rem; }
.footer-links span { margin: 0 0.4rem; color: #d1d5db; }
.credit { margin-bottom: 0.35rem; }
.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--muted-soft);
    max-width: 540px;
    margin: 0 auto 0.75rem;
    line-height: 1.5;
}

@media (max-width: 720px) {
    h1 { font-size: 1.85rem; }
    h1.headline { font-size: 1.7rem; }
    .lede { font-size: 1.08rem; }
    .container { padding: 1.25rem 1.15rem 1.5rem; }
    .card-grid, .who-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .trust-strip { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    a.product-link {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 0.3rem 0.65rem;
        padding: 0.7rem 0.75rem;
    }
    .product-thumb { width: 48px; height: 64px; }
    .guide-cover { width: 120px; height: 160px; }
    .site-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
    .category-grid { grid-template-columns: 1fr; }
}
