/* Best Alternatives to Nutrafol — built from Figma 437:8128 (desktop 1440) / 437:8478 (mobile 430) */
:root {
  --ink: #241c18;
  --orange: #d88a2d;
  --rust: #be5a32;
  --tint: rgba(216, 138, 45, 0.07);
  --tint-10: rgba(216, 138, 45, 0.1);
  --line: #ddd3c8;
  --grey: #888;
  --cell: #d9d9d9;
  --cell-bg: #f3f3f3;
  --strip: #f4f4f4;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --gap: 35px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 22px;
  word-break: break-word;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; }

/* Figma "text-box-trim: cap / alphabetic" */
.trim { text-box: trim-both cap alphabetic; }

.serif {
  font-family: var(--serif);
  font-optical-sizing: auto;
}

/* ---------- Header ---------- */
.site-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.site-header img { width: 220px; height: 53px; }

/* ---------- Layout ---------- */
main {
  max-width: 564px;
  margin: 0 auto;
  padding: var(--gap) 15px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--tint);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.kicker {
  font-size: 10px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--rust);
}
h1 {
  font-size: 35px;
  line-height: 42px;
  font-weight: 500;
}
.byline { font-size: 12px; line-height: 15px; color: #757575; }
.byline strong { color: var(--ink); }

/* Callout boxes (intro, method, notes) */
.callout {
  background: var(--tint);
  border-left: 5px solid var(--orange);
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.callout.method { padding: 30px 25px; gap: 15px; }
.callout h2 { font-size: 22px; line-height: 26px; font-weight: 700; }
.callout ul { padding-left: 24px; list-style: disc; }
.callout li + li { margin-top: 10px; }

.hero-img img {
  width: 100%;
  height: 385px;
  object-fit: cover;
  border-radius: 5px;
}

/* ---------- Boxed cards (top pick + #1) ---------- */
.box {
  border: 1px solid var(--orange);
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.box-bar {
  background: var(--orange);
  padding: 12px 20px;
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.box-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.box-body.glance { gap: 10px; }
.box-cta { padding: 0 20px; }

.glance-row { display: flex; align-items: center; }
.glance-row a { flex: 0 0 150px; }
.glance-row img { width: 150px; height: 150px; object-fit: cover; }
.glance-text { flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; gap: 10px; }
.p-title { font-size: 22px; line-height: 26px; font-weight: 700; }

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 16px 25px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background-color .15s ease;
}
.btn:hover, .btn:focus-visible { background: #3a2e28; }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Rank header */
.rank { display: flex; gap: 20px; align-items: flex-start; }
.rank-num {
  flex: 0 0 46px;
  height: 47px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 27px;
  font-weight: 700;
}
.rank-text { flex: 1 1 0; min-width: 1px; padding-top: 5px; display: flex; flex-direction: column; gap: 15px; }
.rank-name { font-size: 22px; line-height: 26px; font-weight: 700; }
.rank-label { color: var(--orange); font-size: 12px; line-height: 15px; font-weight: 700; }
.rank-label.lg { font-size: 14px; line-height: 17px; font-weight: 600; }
.rank-label.lg b { font-weight: 700; }
.rank-label.lg span { font-weight: 400; }

/* Product image strip (#1) */
.strip {
  background: var(--strip);
  margin: 0 -21px;
  border-left: 1px solid var(--orange);
  border-right: 1px solid var(--orange);
  display: flex;
  justify-content: center;
}
.strip img { width: 293px; height: 293px; }

/* Product strip (#2/#3) */
.mini {
  background: var(--strip);
  display: flex;
  align-items: center;
}
.mini img { flex: 0 0 120px; width: 120px; height: 120px; object-fit: cover; }
.mini-text { flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; gap: 10px; }

/* Spec tables */
.spec {
  width: 100%;
  border: 1px solid var(--cell);
  border-collapse: collapse;
  table-layout: fixed;
}
.spec th, .spec td {
  padding: 15px;
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
  border-bottom: 1px solid var(--cell);
}
.spec th { background: var(--cell-bg); }
.spec col.k { width: 149px; }
.spec.wide col.k { width: 219px; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

.paras { display: flex; flex-direction: column; gap: 22px; }

/* Pros / considerations */
.pc { display: flex; gap: 20px; align-items: flex-start; }
.pc-col { flex: 1 1 0; min-width: 1px; display: flex; flex-direction: column; gap: 20px; }
.pc-col h3 { font-size: 16px; line-height: 19px; font-weight: 700; }
.pc-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.pc-col li { display: flex; gap: 10px; align-items: flex-start; }
.pc-col li img { flex: 0 0 10px; width: 10px; }
.pc-col li span { flex: 1 1 0; min-width: 1px; }

.take { background: var(--tint); padding: 15px; }

/* Competitor cards */
.alt { display: flex; flex-direction: column; gap: 20px; }

/* Side-by-side */
.sbs { display: flex; flex-direction: column; gap: 15px; }
.sbs h2 { font-size: 22px; line-height: 26px; font-weight: 700; }
.cmp {
  width: 100%;
  border: 1px solid var(--grey);
  border-collapse: collapse;
  table-layout: fixed;
}
.cmp th, .cmp td {
  padding: 15px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--grey);
  border-bottom: 1px solid var(--grey);
}
.cmp th:last-child, .cmp td:last-child { border-right: 0; }
.cmp thead th { background: var(--orange); color: #fff; font-weight: 700; vertical-align: middle; }
.cmp tbody th { font-weight: 700; }
.cmp td { font-weight: 400; }
.cmp tr.hl > * { background: var(--tint-10); }
.cmp col.c1 { width: 189px; }
.cmp col.c2 { width: 135px; }
.note { color: var(--grey); font-size: 15px; line-height: 22px; }
.m-only { display: none; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 20px; }
.faq h2, .verdict h2 { font-size: 30px; line-height: 36px; font-weight: 500; }
.faq hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.faq h3 {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}
.faq h3 img { flex: 0 0 15px; width: 15px; height: 11px; }

.verdict { display: flex; flex-direction: column; gap: 15px; }

.sources { color: var(--grey); }
.sources a { color: var(--grey); text-decoration: underline; text-underline-offset: 2px; }
.sources a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.ad-bar {
  border-top: 1px solid var(--line);
  background: #fff;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 85px;
}
.ad-bar p { color: var(--grey); text-align: center; flex: 1 1 0; }
.site-footer {
  background: var(--ink);
  padding: 25px 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
}
.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  white-space: nowrap;
}
.brand .b1 { color: var(--rust); font-size: 30px; line-height: 36px; font-weight: 500; }
.brand .b2 { color: #fff; font-size: 20.108px; line-height: 28.151px; font-weight: 400; }
.legal {
  flex: 1 1 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  color: var(--line);
  font-size: 12px;
  line-height: 15px;
  font-weight: 300;
}

/* ---------- Mobile (430 frame) ---------- */
@media (max-width: 600px) {
  :root { --gap: 30px; }
  main { padding: 25px 15px; }
  .d-br { display: none; }
  .btn { font-size: 18px; line-height: 22px; }
  .strip { margin: 0 -20px; border: 0; }
  .spec col.k { width: 124px; }
  .spec.wide col.k { width: 219px; }

  /* #1 card: Pros, footnote, Considerations stacked */
  .box-body .pc { display: contents; }
  .box-body .pros { order: 6; }
  .box-body .footnote { order: 7; }
  .box-body .cons { order: 8; }
  .box-body .take { order: 9; }
  .box-body .price { order: 10; }
  .alt .pc { flex-direction: column; }
  .pc-col { width: 100%; flex: none; }

  .cmp th, .cmp td { padding: 10px; }
  .cmp thead th { height: 65px; }
  .cmp col.c1 { width: 129px; }
  .cmp col.c2 { width: 124px; }
  .d-only { display: none; }
  .m-only { display: inline; }

  .ad-bar { padding: 0 15px; }
  .ad-bar p { font-size: 14px; line-height: 17px; text-align: left; }
  .site-footer { flex-direction: column; gap: 20px; padding: 25px 15px; }
  .legal { flex: none; width: 100%; }
}

/* Figma: a few list rows centre the icon instead of top-aligning it */
.pc-col li.mid { align-items: center; }
.faq hr { margin-bottom: -1px; }
