/* Opportunity Score: styles for this feature only. Scope every rule to its own class prefix (.os-). */

/* ---------- page head: the step and the launch path ---------- */
.os-head { display: flex; flex-direction: column; gap: 10px; }
.os-head h1 { font-size: 22px; }
.os-path { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 12px; color: var(--muted); }
.os-path li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--border); border-radius: 99px; background: var(--panel-2); }
.os-path li b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e4e6ea; color: var(--text); font-size: 11px; }
.os-path li.on { border-color: var(--su-orange); background: var(--su-orange-50); color: var(--su-ink); font-weight: 600; }
.os-path li.on b { background: var(--su-orange); color: #fff; }

.os-source { display: flex; flex-direction: column; gap: 8px; }
.os-source h2 { font-size: 18px; overflow-wrap: anywhere; }
.os-list td, .os-list th { white-space: normal; }

/* ---------- the form ---------- */
.os-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px 16px; align-items: start; }
.os-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.os-field > label { font-size: 12px; font-weight: 600; color: var(--muted); }
.os-field .input, .os-field .select { width: 100%; }
.os-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.45; }
.os-label { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 6px; padding: 0; }
.os-label .os-hint { display: inline; }
/* A figure from the research shown beside a field: context, never a default. */
.os-from { color: #3f4651; }
.os-costs { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.os-cost { display: grid; grid-template-columns: minmax(0, 1fr) 140px 36px; gap: 8px; width: 100%; max-width: 560px; align-items: center; }
.os-cost .btn { padding: 0; width: 36px; }
.os-budget { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.os-budget-l { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.os-budget-v { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.os-budget-v.muted { font-size: 13px; font-weight: 400; }
textarea.os-diff { width: 100%; min-height: 96px; resize: vertical; line-height: 1.5; }
.os-fees { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 0; min-width: 0; }
.os-fees legend { padding: 0 6px; margin: 0; }
.os-fee-modes { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.os-fee-body { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.os-err:empty { display: none; }

/* ---------- the score ---------- */
.os-score h2:focus { outline: none; }
.os-verdict { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.os-verdict-l { font: 600 22px/1.2 var(--display); letter-spacing: .3px; text-transform: uppercase; }
.os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .os-grid { grid-template-columns: 1fr; } }
.os-comp .card-h h3, .os-diffcard .card-h h3, .os-next .card-h h3 { font-size: 15px; }
.os-pts { font-size: 16px; font-weight: 700; }
.os-pts.na { font-weight: 500; }
.os-parts { display: flex; flex-direction: column; gap: 12px; }
.os-part { display: flex; flex-direction: column; gap: 4px; }
.os-part-h { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 550; }
.os-facts { margin: 0; display: flex; flex-direction: column; }
.os-fact { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.os-fact:first-child { border-top: 0; padding-top: 0; }
.os-fact dt { color: var(--muted); font-weight: 550; }
.os-fact dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.os-fact dd > span:first-child { flex: 1 1 200px; min-width: 0; }
@media (max-width: 600px) { .os-fact { grid-template-columns: 1fr; } }
.os-comp details.explain p { margin-top: 6px; line-height: 1.55; }
.os-score details.explain p, .os-score details.explain ul { line-height: 1.55; }

/* ---------- trend ---------- */
.os-trend { display: flex; flex-direction: column; gap: 10px; }
.os-trend-line { display: flex; flex-direction: column; gap: 3px; }
.os-trend-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.os-trend-l { font-size: 13px; font-weight: 600; }
.os-trend .badge { white-space: normal; }
/* The compact Trend card in the Product Research result. */
.os-trend-card .card-b { display: flex; flex-direction: column; gap: 12px; }
.os-trend-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px 20px; }

/* ---------- profit ---------- */
.os-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.os-lines th, .os-lines td { padding: 7px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.os-lines th { text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.os-lines td:nth-child(2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.os-lines td:nth-child(3) { text-align: right; width: 1%; white-space: nowrap; }
.os-lines .os-rev th, .os-lines .os-total th, .os-lines .os-total td { font-weight: 650; }
.os-lines .os-total th, .os-lines .os-total td { border-bottom: 0; font-size: 15px; }
.os-profit { display: flex; flex-direction: column; gap: 8px; }
.os-notes { margin: 0; padding-left: 18px; }

/* ---------- differentiator ---------- */
.os-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--su-orange); background: var(--panel-2); border-radius: 0 8px 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.os-phrases { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.os-phrases li { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; overflow-wrap: anywhere; }
.os-mark { flex: none; width: 14px; text-align: center; font-weight: 700; }
.os-phrases li.free .os-mark { color: var(--good); }
.os-phrases li.taken .os-mark { color: var(--warn); }
.os-phrases li.unknown .os-mark { color: var(--faint); }
.os-ai { display: flex; flex-direction: column; gap: 10px; }
.os-ai:empty { display: none; }
.os-ai-box { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.os-ai-box h4, .os-ai-box h5 { margin: 0; font-size: 13px; }
.os-ai-box h5 { color: var(--muted); }
.os-ai-box ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- next steps ---------- */
.os-next-b { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.os-next-b p { flex-basis: 100%; }

@media (max-width: 600px) {
  .os-cost { grid-template-columns: minmax(0, 1fr) 104px 36px; }
  /* Tap targets on a phone. */
  .os-form .btn, .os-next .btn { min-height: 40px; }
  .os-lines td:nth-child(3) { white-space: normal; }
}
