/* Problem-led pages (/problems/), the problems hub and the guides filter.
   Kept in its own file so it never clashes with main.css edits elsewhere.
   Uses the colour and font tokens defined in main.css. */

/* Breadcrumb */
.pb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 22px; }
.pb-crumbs a { color: var(--ink-soft); text-decoration: none; }
.pb-crumbs a:hover { color: var(--orange-dark); text-decoration: underline; }
.pb-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Answer-first box: the 40 to 60 words Google and AI tools can quote */
.pb-answer { position: relative; max-width: 760px; margin-top: 30px; padding: 22px 24px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: 0 18px 40px -32px rgba(20,33,61,.45); }
.pb-answer p { margin: 0; font-size: 1.08rem; line-height: 1.6; }
.pb-answer-label { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 8px; }

/* "Sound familiar?" symptom picker */
.pb-band { background: var(--ink); color: #d5dae5; padding: 56px 0 60px; }
.pb-band h2 { color: #fff; margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.pb-band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 26px; }
.pb-band-head p { margin: 0; color: var(--muted); }
.pb-band .pb-band-head p { color: #aab3c6; }
.pb-symptoms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pb-symptoms button { width: 100%; height: 100%; text-align: left; font: inherit; font-size: 1rem; line-height: 1.45; color: #e6e9f0; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm); padding: 14px 16px 14px 48px; cursor: pointer; position: relative; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s; }
.pb-symptoms button::before { content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.45); transition: background .2s, border-color .2s; }
.pb-symptoms button:hover { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.09); }
.pb-symptoms button[aria-pressed="true"] { background: rgba(242,98,46,.16); border-color: var(--orange); color: #fff; }
.pb-symptoms button[aria-pressed="true"]::before { background-color: var(--orange); background-repeat: no-repeat; border-color: var(--orange); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 3.8L16 5.5' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 14px; background-position: center; }
.pb-score { margin: 22px 0 0; padding: 16px 20px; border-radius: var(--radius-sm); background: rgba(255,194,61,.12); border: 1px solid rgba(255,194,61,.4); color: #fff; font-size: 1.02rem; }
.pb-score a { color: var(--accent); font-weight: 600; }

/* Research stats strip */
.pb-stats-wrap { border-bottom: 1px solid var(--line); background: var(--tint); }
.pb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pb-stat { margin: 0; padding: 30px 26px 28px; border-left: 1px solid var(--line); }
.pb-stat:first-child { border-left: 0; padding-left: 0; }
.pb-stat strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 4.6vw, 3.3rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.pb-stat figcaption { color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.pb-stat figcaption a { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
@media (max-width: 620px) {
  .pb-stat { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0; }
  .pb-stat:first-child { border-top: 0; }
}

/* Fix-this-week steps */
.pb-steps-intro { color: var(--ink-soft); }
.prose ol.pb-steps { list-style: none; padding: 0; counter-reset: pbstep; margin: 1.4em 0 0; }
.pb-steps li { counter-increment: pbstep; position: relative; padding: 0 0 26px 64px; margin: 0; border-left: 1px dashed var(--line-strong); margin-left: 20px; padding-left: 44px; }
.pb-steps li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.pb-steps li::before { content: counter(pbstep); position: absolute; left: -20px; top: -4px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.15rem; }
.prose .pb-steps h3 { margin: 4px 0 8px; font-size: 1.25rem; }
.pb-steps p { margin-bottom: .6em; }

/* When to get help: the method, mapped to this problem */
.prose ol.pb-method { list-style: none; padding: 0; margin: 1.2em 0; display: grid; gap: 10px; }
.pb-method li { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: baseline; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0; }
.pb-method p { margin: 0; }
.pb-method-step { font-family: var(--serif); font-size: 1.1rem; color: var(--orange-dark); font-style: italic; }
@media (max-width: 620px) { .pb-method li { grid-template-columns: 1fr; gap: 4px; } }
.pb-price { font-size: .95rem; color: var(--ink-soft); }

/* Read next */
.prose ul.pb-related { list-style: none; padding: 0; margin: 1em 0 0; border-top: 1px solid var(--line); }
.pb-related li { padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }
.pb-related a { font-weight: 600; }
.pb-related span { display: block; color: var(--muted); font-size: .93rem; margin-top: 2px; }

/* Other problems, and the hub grid */
.pb-others { background: var(--tint); }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pb-card { display: flex; flex-direction: column; gap: 14px; justify-content: space-between; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.pb-card:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(20,33,61,.5); }
.pb-quote { font-family: var(--serif); font-size: 1.18rem; line-height: 1.3; font-style: italic; }
.pb-card strong { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.pb-card strong::after { content: ""; width: 15px; height: 11px; background: var(--orange); -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; transition: transform .25s var(--ease); }
.pb-card:hover strong::after { transform: translateX(4px); }

/* Sources */
.pb-sources { padding: 48px 0 64px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-soft); }
.pb-sources h2 { font-size: 1.3rem; margin-bottom: 12px; }
.pb-sources ol { padding-left: 1.2em; margin: 0; }
.pb-sources li { margin-bottom: 6px; }

/* Hub page */
.hub-areas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.chip { font: inherit; font-size: .92rem; font-weight: 500; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card { display: flex; flex-direction: column; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.hub-card:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 22px 40px -28px rgba(20,33,61,.5); }
.hub-card[hidden] { display: none; }
.hub-card .pb-quote { font-size: 1.4rem; margin-bottom: 14px; }
.hub-card h2 { font-family: var(--font); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; margin: 0 0 8px; }
.hub-card p { color: var(--ink-soft); font-size: .95rem; margin: 0 0 16px; }
.hub-card .hub-stat { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.hub-card .hub-stat b { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 1.15rem; margin-right: 4px; }
.hub-card .tag { align-self: flex-start; margin-bottom: 16px; }

/* Guides page: filter and search */
.guides-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-bottom: 30px; }
.guides-tools .hub-areas { margin: 0; }
.guides-search { position: relative; flex: 0 1 320px; }
.guides-search input { width: 100%; font: inherit; font-size: .96rem; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.guides-search input:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.guides-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.guides-empty { padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--ink-soft); }
.guides-problems { padding: 40px 0 44px; background: var(--tint); border-bottom: 1px solid var(--line); }
.guides-problems h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 0; }
.guides-problems .pb-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.guides-problems .pb-card { padding: 18px; }
.guides-problems .pb-quote { font-size: 1.05rem; }
.post-card[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .pb-card, .hub-card, .pb-symptoms button { transition: none; }
  .pb-card:hover, .hub-card:hover { transform: none; }
}
