/* Heal Psoriasis — tool styling. Inherits the landing page's design language:
   committed light, Newsreader + Hanken Grotesk, pine + brass, hairline rules. */

.hp-tool {
  --ground: #FDFCF9; --surface: #FFFFFF; --surface-2: #F6F5F0;
  --ink: #1A201B; --muted: #6A7264; --faint: #989E8E;
  --line: #E8E6DD; --hairline: #EEECE4;
  --pine: #1C4632; --pine-deep: #123320; --pine-wash: #EEF3EE;
  --brass: #9A7B3F;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(26,32,27,.04), 0 16px 40px -24px rgba(26,32,27,.16);
}

.hp-tool * { box-sizing: border-box; }
.hp-tool-head { margin-bottom: 26px; }
.hp-tool-title { font-family: var(--serif); font-weight: 500; font-size: 27px;
  letter-spacing: -.015em; line-height: 1.15; margin: 0 0 8px; }
.hp-tool-sub { color: var(--muted); font-size: 15.5px; margin: 0 0 12px; }
.hp-tool-instructions { font-size: 14.5px; color: var(--muted); background: var(--surface-2);
  border-left: 2px solid var(--brass); padding: 12px 14px; border-radius: 0 6px 6px 0; margin: 0; }
.hp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass); }
.hp-sub-head { font-family: var(--serif); font-weight: 500; font-size: 18px; margin: 22px 0 8px; }

/* categories + rating rows */
.hp-cat { margin-bottom: 26px; }
.hp-cat-title { font-size: 15px; font-weight: 700; letter-spacing: -.005em;
  margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); }
.hp-row { display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.hp-row-label { font-size: 15px; flex: 1; }
.hp-scale { display: flex; gap: 6px; flex: 0 0 auto; }
.hp-dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--faint); font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all .15s; font-variant-numeric: tabular-nums; }
.hp-dot:hover { border-color: var(--pine); color: var(--pine); }
.hp-dot.is-on { background: var(--pine); border-color: var(--pine); color: #FDFCF9; }
.hp-dot:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* form fields (tracker) */
.hp-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.hp-field-label { font-size: 15px; flex: 1 1 55%; }
.hp-field-detail { font-size: 12.5px; color: var(--faint); flex-basis: 100%; order: 3; }
.hp-input, .hp-select, .hp-date { font: inherit; font-size: 14.5px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink); min-width: 110px; }
.hp-input:focus-visible, .hp-select:focus-visible, .hp-date:focus-visible {
  outline: none; border-color: var(--pine); }
.hp-check { width: 20px; height: 20px; accent-color: var(--pine); cursor: pointer; }
.hp-unit { font-size: 13px; color: var(--faint); }
.hp-daterow { margin-bottom: 20px; }
.hp-date-label { font-size: 13px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 10px; }

/* buttons */
.hp-btn { font: inherit; font-weight: 600; font-size: 15px; padding: .8em 1.6em;
  border-radius: 8px; border: 1px solid transparent; cursor: pointer; margin-top: 20px;
  transition: background .18s, border-color .18s, color .18s; }
.hp-btn-primary { background: var(--pine); color: #FDFCF9; }
.hp-btn-primary:hover { background: var(--pine-deep); }
.hp-btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.hp-btn-quiet:hover { border-color: var(--pine); color: var(--pine); }
.hp-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* tabs */
.hp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 22px; }
.hp-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 9px 14px; cursor: pointer; margin-bottom: -1px; }
.hp-tab:hover { color: var(--ink); }
.hp-tab.is-on { color: var(--pine); border-bottom-color: var(--pine); }

/* results */
.hp-result { border-top: 1px solid var(--hairline); padding-top: 22px; }
.hp-result-label { font-family: var(--serif); font-weight: 500; font-size: 26px;
  letter-spacing: -.015em; margin: 8px 0 10px; }
.hp-result-desc { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.hp-bars { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; }
.hp-bar-label { display: flex; justify-content: space-between; font-size: 14px;
  font-weight: 600; margin-bottom: 5px; }
.hp-bar-num { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.hp-bar-track { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hp-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--pine);
  transition: width .5s ease; }
.hp-bar-fill[data-good="false"][data-level="high"] { background: #B4472F; }
.hp-bar-fill[data-good="false"][data-level="mid"]  { background: var(--brass); }
.hp-bar-fill[data-good="false"][data-level="low"]  { background: var(--pine); }
.hp-bar-fill[data-good="true"][data-level="high"]  { background: var(--pine); }
.hp-bar-fill[data-good="true"][data-level="mid"]   { background: var(--brass); }
.hp-bar-fill[data-good="true"][data-level="low"]   { background: #B4472F; }
.hp-recs { padding-left: 20px; margin: 0; }
.hp-recs li { font-size: 15px; margin-bottom: 8px; }

/* insights + history */
.hp-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hp-insight { background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 14px 16px; }
.hp-insight-label { font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.hp-insight-value { font-family: var(--serif); font-size: 21px; font-weight: 500;
  font-variant-numeric: tabular-nums; }
.hp-trend-up { color: var(--pine); } .hp-trend-down { color: #B4472F; }
.hp-trend-stable { color: var(--faint); }
.hp-history { display: flex; flex-direction: column; gap: 10px; }
.hp-hist-card { border: 1px solid var(--hairline); border-radius: 8px; padding: 12px 14px; }
.hp-hist-date { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.hp-hist-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chip { font-size: 12px; background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 99px; padding: 3px 9px; color: var(--muted); }
.hp-empty { color: var(--faint); font-size: 15px; text-align: center; padding: 30px 0; }
.hp-saved { font-size: 12.5px; color: var(--faint); margin-top: 16px; }

.hp-disclaimer { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--hairline);
  font-size: 12px; line-height: 1.55; color: var(--faint); }

@media (max-width: 600px) {
  .hp-tool { padding: 22px 18px; border-radius: 0; }
  .hp-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hp-dot { width: 34px; height: 34px; }
  .hp-field-label { flex-basis: 100%; }
}
@media print {
  .hp-tabs, .hp-btn { display: none; }
  .hp-tool { box-shadow: none; border: none; max-width: 100%; }
}

/* print bar */
.hp-printbar { margin-top: 22px; }

/* Print: give people something worth taking to an appointment. */
@media print {
  @page { margin: 16mm; }
  body { background: #fff !important; }
  .page > .picker, .page > .note, .page > .lede, .page > .eyebrow, footer { display: none !important; }
  .hp-printbar, .hp-tabs, .hp-btn, .hp-dot, .hp-scale { display: none !important; }
  .hp-tool { box-shadow: none !important; border: none !important; padding: 0 !important;
    max-width: 100% !important; font-size: 11.5pt; }
  .hp-tool-title { font-size: 20pt; }
  .hp-cat, .hp-result, .hp-hist-card, .hp-insight { break-inside: avoid; page-break-inside: avoid; }
  .hp-cat-title { break-after: avoid; }
  .hp-disclaimer { border-top: 1px solid #ccc; color: #444 !important; font-size: 9pt; }
  /* show the selected rating as text, since buttons are hidden */
  .hp-row::after { content: ""; }
  a[href]::after { content: ""; }
}

/* Safety panel — the fix for "the note existed but nobody saw it". */
.hp-safety { border: 1px solid var(--line); border-radius: 8px; margin: 18px 0 22px;
  background: var(--surface-2); overflow: hidden; }
.hp-safety-head { width: 100%; text-align: left; font: inherit; font-weight: 700;
  font-size: 14px; padding: 12px 16px; background: none; border: none; cursor: pointer;
  color: var(--ink); display: flex; align-items: center; gap: 8px; }
.hp-safety-head::before { content: "⚠"; color: #B4472F; font-size: 15px; }
.hp-safety-head:hover { color: var(--pine); }
.hp-safety-head:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
.hp-safety-body { padding: 0 16px 14px; }
.hp-safety-item { font-size: 13.5px; line-height: 1.55; color: var(--muted);
  padding: 9px 0; border-top: 1px solid var(--hairline); margin: 0; }
.hp-safety-item.is-urgent { color: var(--ink); font-weight: 500;
  border-left: 3px solid #B4472F; padding-left: 12px; }
.hp-insight.is-urgent { border-color: #B4472F; background: #FBF2EF; }
.hp-insight.is-urgent .hp-insight-label { color: #B4472F; }
@media print { .hp-safety-body { display: block !important; } .hp-safety-head { display: block; } }

/* ---------------------------------------------------------------- next steps
   Renders NEXT_TOOLS, which 27 configs export and nothing displayed until now.
   This is the free-tool -> next-tool path, so it sits at the bottom of a tool,
   after the reader has their result and is deciding what to do about it. */
.hp-next { margin: 26px 0 8px; padding: 16px 18px 18px; border-radius: 8px;
  background: var(--pine-wash, #EEF3EE); border: 1px solid var(--line); }
.hp-next-head { margin: 0 0 10px; font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--pine, #1C4632); }
.hp-next-group { margin: 12px 0 6px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); }
.hp-next-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-next-item { display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; line-height: 1.3; padding: 8px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; }
.hp-next-item:hover { border-color: var(--pine, #1C4632); color: var(--pine, #1C4632); }
.hp-next-item:focus-visible { outline: 2px solid var(--brass, #9A7B3F); outline-offset: 2px; }
.hp-next-item.is-current { display: none; }
/* An unresolved slug is a broken route. Make it obvious rather than hiding it. */
.hp-next-item.is-unresolved { border-style: dashed; color: #B4472F; cursor: not-allowed; }
.hp-next-free { font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--pine, #1C4632);
  background: var(--pine-wash, #EEF3EE); border-radius: 4px; padding: 1px 5px; }
.hp-next-prose { margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
@media print { .hp-next { break-inside: avoid; } }

/* ---------------------------------------------------------------- BespokeTool
   Generic renderer for the 15 builder-shaped tools. Its one rule is that every
   key in a result gets rendered — unfamiliar shapes fall through to .hp-bt-raw
   rather than being dropped. */
.hp-bt-form { display: grid; gap: 16px; margin: 18px 0 20px; }
.hp-bt-input { display: grid; gap: 6px; }
.hp-bt-label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.hp-bt-help { margin: 0; font-size: 13px; color: var(--muted); }
.hp-bt-text, .hp-bt-select { font: inherit; font-size: 15px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  max-width: 420px; }
.hp-bt-text:focus-visible, .hp-bt-select:focus-visible, .hp-bt-check:focus-visible,
.hp-bt-chip:focus-visible { outline: 2px solid var(--brass, #9A7B3F); outline-offset: 2px; }
.hp-bt-check { width: 18px; height: 18px; }
.hp-bt-multi { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-bt-chip { font: inherit; font-size: 13.5px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  text-align: left; }
.hp-bt-chip:hover { border-color: var(--pine, #1C4632); }
.hp-bt-chip.is-on { background: var(--pine, #1C4632); border-color: var(--pine, #1C4632);
  color: #fff; }

.hp-bt-result { margin-top: 22px; }
.hp-bt-lead { font-size: 17px; line-height: 1.6; margin: 0 0 18px; color: var(--ink); }
.hp-bt-block { margin: 0 0 22px; }
.hp-bt-key { margin: 0 0 8px; font-size: 15px; font-weight: 700; letter-spacing: -.005em;
  color: var(--ink); }
h4.hp-bt-key { font-size: 13.5px; color: var(--muted); font-weight: 600; margin: 12px 0 5px; }
.hp-bt-prose { margin: 0 0 10px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.hp-bt-stat { margin: 0 0 10px; font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.hp-bt-list { margin: 0 0 12px; padding-left: 20px; }
.hp-bt-list li { margin: 0 0 7px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.hp-bt-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
  margin: 0 0 12px; background: var(--surface-2); }
.hp-bt-card-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.hp-bt-fields { display: grid; gap: 6px; margin: 0 0 10px; }
.hp-bt-field { display: flex; gap: 12px; justify-content: space-between;
  font-size: 14px; border-bottom: 1px solid var(--hairline); padding: 5px 0; }
.hp-bt-field-key { color: var(--muted); }
.hp-bt-field-val { font-weight: 600; text-align: right;
  font-variant-numeric: tabular-nums; }
.hp-bt-raw { font-size: 12.5px; background: var(--surface-2); padding: 10px 12px;
  border-radius: 6px; overflow-x: auto; }

/* Urgent content is never collapsed and never below the fold of its own section. */
.hp-bt-alert { border: 1px solid #E3B7AC; border-left: 3px solid #B4472F;
  background: #FBF2EF; border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 0 0 20px; }
.hp-bt-alert-head { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #B4472F; }
.hp-bt-alert-item { margin: 0 0 9px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.hp-bt-alert-item:last-child { margin: 0; }

/* honesty / warnings / disclaimer sit last and read quieter than the findings. */
.hp-bt-block.is-tail .hp-bt-key { color: var(--muted); font-size: 13.5px; }
.hp-bt-block.is-tail .hp-bt-list li,
.hp-bt-block.is-tail .hp-bt-prose { font-size: 13.5px; }
@media print { .hp-bt-form, .hp-bt-chip { display: none; } .hp-bt-alert { break-inside: avoid; } }
