/* halalsnap.org /ingredients/ and /research/ (#691). Generated pages share this
   file; tokens come from /colors_and_type.css. Light mode only, like the site. */
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); font-family: var(--font-body); color: var(--text); overflow-x: hidden; }
* { box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }
a { color: #1F63C6; }
.ic { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex: 0 0 auto; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.hs-header { position: sticky; top: 0; z-index: 60; background: rgba(249,250,251,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.hs-header-row { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.hs-logo img { height: 36px; width: auto; }
.hs-nav { display: flex; gap: 28px; margin-left: auto; margin-right: 20px; }
.hs-nav a { font-size: 15px; font-weight: 600; color: var(--text-muted); text-decoration: none; padding: 10px 0; }
.hs-nav a:hover { color: var(--text); }
.hs-cta { background: var(--teal); color: var(--anchor-deep); border-radius: 999px; padding: 11px 22px; font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 6px 16px rgba(0,212,170,.28); white-space: nowrap; }

/* hero */
.hero { padding: 48px 0 8px; }
.crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--text-muted); text-decoration: none; padding: 4px 0; }
.crumbs a:hover { text-decoration: underline; }
.crumb-sep { color: var(--text-faint); }
.overline { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #0B7A66; margin-bottom: 12px; }
.overline-light { color: var(--teal-bright); }
h1.q, h1.q-plain { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -.025em; margin: 0; color: var(--text); text-wrap: balance; }
/* The reader's question, shown quoted: it is theirs, not the app's claim. */
h1.q::before { content: '\201C'; }
h1.q::after { content: '\201D'; }
.names { color: var(--text-muted); font-size: 16px; margin: 12px 0 0; }
.lead { font-size: 19px; color: var(--text-muted); line-height: 1.6; margin: 18px 0 0; max-width: 720px; text-wrap: pretty; }

.answer { margin-top: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.answer-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.answer p { font-size: 18px; line-height: 1.6; margin: 12px 0 0; }
.answer .answer-meta { font-size: 13px; color: var(--text-muted); margin-top: 12px; }

.inline-cta { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: var(--gradient-brand-soft); border-radius: 16px; padding: 16px 18px; }
.inline-cta p { margin: 0; font-size: 15.5px; line-height: 1.5; max-width: 420px; }

/* chips */
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 700; line-height: 1.3; border: 1px solid transparent; }
.chip-ok { background: var(--halal-bg); color: #15803D; border-color: #BBF7D0; }
.chip-warn { background: var(--doubtful-bg); color: #92400E; border-color: #FDE68A; }
.chip-bad { background: var(--haram-bg); color: #B91C1C; border-color: #FECACA; }
.chip-neutral { background: var(--surface-2); color: #374151; border-color: var(--border); }

/* content */
.block { padding: 32px 0; }
.prose h2, .h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.015em; line-height: 1.2; margin: 40px 0 12px; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17px; line-height: 1.7; margin: 0 0 14px; text-wrap: pretty; }
.table-intro { color: var(--text-muted); font-size: 15px !important; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
table.grid th, table.grid td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); line-height: 1.5; }
table.grid tr:last-child th, table.grid tr:last-child td { border-bottom: 0; }
table.grid thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); background: var(--surface-2); }
table.grid tbody th { font-weight: 700; white-space: nowrap; }
table.grid td.shared-note { color: var(--text-muted); }
table.grid td:nth-child(2) { width: 34%; }
table.grid td .chip { white-space: normal; }
@media (min-width: 641px) { table.grid td:nth-child(2) { width: 30%; } }
table.list td a { font-weight: 600; text-decoration: none; }
table.list td a:hover { text-decoration: underline; }
.aka { display: block; color: var(--text-faint); font-size: 13px; margin-top: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; white-space: nowrap; }
.rule { display: inline-block; margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #4B5563; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }

.checks { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.6; }
.checks .ic { color: #0E9F84; margin-top: 4px; }

.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 16px; line-height: 1.45; min-height: 48px; }
.faq details p { padding: 0 16px 14px; margin: 0; font-size: 16px; color: var(--text); }

.sources { padding-left: 20px; margin: 0; font-size: 15px; line-height: 1.6; }
.sources li { margin-bottom: 8px; }
.src-date { color: var(--text-muted); white-space: nowrap; }
.review { font-size: 14px !important; color: var(--text-muted); margin-top: 12px !important; }

.related { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related a { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); }
.related a:hover { box-shadow: var(--shadow-md); }
.rel-name { font-weight: 700; }
.more { margin-top: 18px !important; font-size: 15px !important; }
.more a { font-weight: 700; color: #0E7C67; padding: 6px 0; display: inline-block; }

/* index */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.stat-n { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--anchor); }
.stat-l { font-size: 14px; color: var(--text-muted); line-height: 1.45; margin-top: 4px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field-l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.field-q { justify-content: flex-end; }
.field-q .ic { position: absolute; left: 14px; bottom: 15px; color: var(--text-faint); }
.field input, .field select { width: 100%; min-width: 0; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); color: var(--text); min-height: 48px; }
.field-q input { padding-left: 42px; }
.field input:focus, .field select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.count { color: var(--text-muted); font-size: 14px; margin: 10px 0 12px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card a { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'code name' 'code cat' 'chip chip'; column-gap: 12px; row-gap: 4px; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); }
.card a:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.card-code { grid-area: code; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 15px; color: var(--anchor); background: var(--gradient-brand-soft); border-radius: 10px; padding: 8px 10px; align-self: start; min-width: 64px; text-align: center; }
.card-name { grid-area: name; font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.card-cat { grid-area: cat; font-size: 13px; color: var(--text-muted); }
.card .chip { grid-area: chip; justify-self: start; margin-top: 8px; font-size: 12.5px; }
.none { color: var(--text-muted); }
.note { color: var(--text-muted); font-size: 14px; margin-top: 18px; }
.cats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cats a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; min-height: 48px; }
.cats a:hover { box-shadow: var(--shadow-md); }
.cats.small { margin-top: 18px; }
.cat-n { font-size: 13px; color: #4B5563; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.sum { display: inline-flex; align-items: center; gap: 6px; }
.sum-n { font-weight: 700; color: var(--text-muted); font-size: 14px; }

/* app band */
.app-band { background: var(--anchor); color: var(--on-dark); padding: 72px 0; margin-top: 24px; position: relative; overflow: hidden; }
.app-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.app-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.02em; line-height: 1.1; margin: 0; color: #fff; text-wrap: balance; }
.app-lead { font-size: 18px; line-height: 1.6; color: rgba(234,246,242,.88); margin: 16px 0 20px; max-width: 540px; }
.app-list { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 10px; }
.app-list li { display: flex; gap: 10px; align-items: center; font-size: 16px; color: #fff; }
.app-list .ic { color: var(--teal); }
.app-phone { display: flex; justify-content: center; }
.phone { width: 260px; aspect-ratio: 390 / 844; border-radius: 36px; background: #0b0b0d; padding: 7px; transform: rotate(2deg); box-shadow: 0 40px 90px rgba(0,0,0,.35); position: relative; }
.phone-notch { position: absolute; top: 3.2%; left: 50%; transform: translateX(-50%); width: 32%; height: 20px; background: #0b0b0d; border-radius: 12px; z-index: 3; }
.phone-screen { width: 100%; height: 100%; border-radius: 29px; overflow: hidden; background: #000; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 10px; border-radius: 14px; padding: 10px 18px; text-decoration: none; min-height: 48px; }
.badge-dark { background: var(--anchor); color: #fff; }
.badge-light { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; }
.badge .ic { color: #fff; }
.badge-text { line-height: 1.05; text-align: left; }
.badge-small { font-size: 10px; opacity: .85; display: block; }
.badge-big { font-size: 16px; font-weight: 700; }

.disclaimer { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.disclaimer .ic { color: #0E9F84; margin-top: 2px; }
.disclaimer p { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* research */
.bars { margin: 18px 0 24px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.bars figcaption { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.bar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-list li { display: grid; grid-template-columns: minmax(150px, 38%) 1fr 36px; gap: 12px; align-items: center; font-size: 14.5px; min-height: 28px; }
.bar-label a { color: var(--text); font-weight: 600; }
.bar-track { height: 14px; background: transparent; }
.bar-fill { display: block; height: 100%; background: #0E9F84; border-radius: 0 4px 4px 0; }
.bar-list li:hover .bar-fill { background: var(--anchor); }
.bar-n { font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.posts { list-style: none; padding: 0; margin: 28px 0 0; }
.posts a { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; text-decoration: none; color: var(--text); }
.post-date { font-size: 13px; color: var(--text-muted); }
.post-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.post-sub { color: var(--text-muted); font-size: 15.5px; }

/* footer */
.hs-footer { background: var(--anchor-deep); color: var(--cream); padding: 40px 0 32px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-copy { font-size: 14px; color: rgba(234,246,242,.75); }
.hs-footer .footer-copy a { text-decoration: underline; }
.hs-footer a { color: var(--cream); text-decoration: none; }
.hs-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.footer-links a { padding: 8px 0; display: inline-block; }
.footer-note { font-size: 13px; color: rgba(234,246,242,.6); margin-top: 18px; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cats { grid-template-columns: 1fr 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .app-phone { order: -1; }
  .phone { width: 220px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .field-q { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hs-nav { display: none; }
  .hero { padding-top: 28px; }
  .stats { grid-template-columns: 1fr; }
  .cards, .cats, .related { grid-template-columns: 1fr; }
  .answer { padding: 18px; }
  .answer p { font-size: 17px; }
  .inline-cta { flex-direction: column; align-items: flex-start; }
  /* Stack the 3-column tables into one card per row on phones. */
  table.grid:not(.list) thead { display: none; }
  table.grid:not(.list), table.grid:not(.list) tbody, table.grid:not(.list) tr, table.grid:not(.list) th, table.grid:not(.list) td { display: block; width: auto !important; }
  table.grid:not(.list) tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  table.grid:not(.list) tr:last-child { border-bottom: 0; }
  table.grid:not(.list) th, table.grid:not(.list) td { padding: 0; border: 0; }
  table.grid:not(.list) tbody th { font-size: 15px; margin-bottom: 6px; }
  table.grid:not(.list) td + td { margin-top: 8px; font-size: 15px; }
  table.grid:not(.list) td.shared-note { margin-top: 10px; }
  table.list { font-size: 14px; }
  table.list th, table.list td { padding: 10px; }
  .bar-list li { grid-template-columns: 1fr 36px; }
  .bar-label { grid-column: 1 / -1; }
  .app-band { padding: 48px 0; }
}
