/* linkedin-personal-profile-deep-analytics.html
 *
 * The LinkedIn personal profile dashboard. It loads the company page
 * benchmark's stylesheet first and borrows that tool's pieces as they are:
 * the ink band, the tool card and its drop zones and status line, the chart
 * figures, legend, tooltip and "show the numbers" tables, the notes bar, the
 * blue ask card and the FAQ accordion. Reusing them keeps the two free tools
 * one family instead of two near-copies. .page-head, .section, .sec-head,
 * .c-steps, .feat-pair/.feat-tile, .card, .compare-table and .cta-card come
 * from styles.css.
 *
 * What neither had: the numbered steps on the ink band, two drop zones
 * instead of three fields, the stat tiles, a trio of small charts, the post
 * lists, the breakdown switcher, the audience bars, and the topic heat table
 * and history grid. Sizes are the ones the site already uses for the same
 * jobs, so the file adds no primitive of its own (check-design.py E3).
 */

/* ── The steps, on the benchmark's ink band ──────────────────────────────── */

.pa-steps .sec-head h2 { color: var(--cream); }
.pa-steps .sec-head .muted { color: var(--on-dark-2); }

/* Three steps, so three columns rather than the component's four. */
.pa-steps .c-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px;
}

.pa-step-link {
  margin-top: auto;
  font-size: 15px;
  font-weight: 500;
  color: var(--blue-mid);
}

.pa-step-link::after { content: " ↗"; }
.pa-step-link:hover { color: var(--white); }

/* The tool card sits in the hero under its two buttons, so it lines up with
   the hero's text instead of centring like the benchmark's. */
.pa-shell { margin-top: 32px; margin-left: 0; }

/* One drop zone, with the checklist of the four files beside it. */
.pa-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pa-drop {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.pa-files {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  list-style: none;
}

.pa-file {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* An empty ring until the file is read, then a blue disc with a tick. */
.pa-file-mark {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  flex-shrink: 0;
}

.pa-file.is-done .pa-file-mark { border-color: var(--blue); background: var(--blue); }
.pa-file.is-done .pa-file-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translate(-50%, -60%) rotate(45deg);
}

.pa-file-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pa-file-name {
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* "Required" sits where "Optional" does, a shade stronger. */
.pa-required { color: var(--ink); font-weight: 500; }

.pa-file-note {
  font-size: 13px;
  color: var(--ink-4);
}

.pa-file.is-done .pa-file-note { color: var(--ink-3); }

/* ── Dashboard ───────────────────────────────────────────────────────────── */

/* The notes bar holds one sentence per note. */
.pa-results .bm-flag p + p { margin-top: 6px; }

/* The source link inside the blue ask card, in white so it shows on blue. */
.bm-cta p a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }

.pa-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.pa-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
}

.pa-stat-label {
  font-size: 14px;
  color: var(--ink-3);
}

.pa-stat-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.pa-stat-sub {
  font-size: 13px;
  color: var(--ink-4);
}

/* Impressions, posts and followers per week, side by side. */
.pa-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pa-mini-title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.pa-posts {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
}

.pa-post {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
}

.pa-post:first-child { border-top: 0; padding-top: 0; }

.pa-post-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pa-post-meta {
  font-size: 13px;
  color: var(--ink-4);
}

.pa-post-link {
  width: fit-content;
  font-size: 13px;
  color: var(--blue);
}

/* The ask to add the archive files, in the benchmark's blue-card style. It
   sits right under the notes bar, above everything the files would add. */
.pa-more {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.pa-more[hidden] { display: none; }
.pa-more > div { flex: 1 1 28em; }

.pa-more h3 {
  font-size: 22px;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.pa-more p {
  margin-top: 12px;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--blue-soft);
}

/* Tables inside the figures: numbers right-aligned, low samples greyed. */
.pa-table td.pa-num,
.pa-table th.pa-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pa-table tr.pa-muted td { color: var(--ink-4); }

.pa-ranked td { vertical-align: top; }

.pa-cell-label {
  display: block;
  font-weight: 500;
}

.pa-cell-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-4);
}

.pa-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 500;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}

.pa-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* The breakdown switcher: one button per breakdown, the open one in blue. */
.pa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pa-tabs[hidden] { display: none; }

.pa-tab {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
}

.pa-tab:hover { border-color: var(--blue); color: var(--ink); }
.pa-tab[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.pa-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* The audience and topics open their own parts of the dashboard. */
.pa-part { margin-top: 64px; }
/* A source in a part's intro reads as a link, as in the benchmark's notes. */
.pa-part .muted a { color: var(--blue); }
.pa-part[hidden],
#pa-topics-part[hidden] { display: none; }

.pa-audience { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pa-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.pa-bar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.pa-bar-label { overflow-wrap: anywhere; }

.pa-bar-value {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pa-bar-track {
  display: block;
  height: 6px;
  margin-top: 4px;
  border-radius: var(--r-xs);
  background: var(--cream-2);
}

.pa-bar-fill {
  display: block;
  height: 100%;
  border-radius: var(--r-xs);
  background: var(--blue);
}

/* LinkedIn's 1-to-4 scores as one blue ramp, light to dark. */
.pa-five td:not(.feat),
.pa-five th:not(:first-child) { text-align: center; }

.pa-heat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 28px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.pa-heat-1 { background: var(--blue-soft); color: var(--ink); }
.pa-heat-2 { background: #c9d4fb; color: var(--ink); }
.pa-heat-3 { background: var(--blue-mid); color: var(--ink); }
.pa-heat-4 { background: var(--blue); color: var(--white); }

/* Which topics made the five: a square per snapshot. */
.pa-history { overflow-x: auto; }

.pa-hist { border-collapse: separate; border-spacing: 4px; }

.pa-hist th {
  padding-right: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  text-align: left;
  white-space: nowrap;
}

.pa-hist thead th {
  position: relative;
  height: 1.5em;
  font-size: 12px;
  color: var(--ink-4);
  padding-right: 0;
}

/* The first and last dates hang off their column instead of widening it,
   so every square keeps the same spacing. */
.pa-hist-tick {
  position: absolute;
  bottom: 0;
  left: 0;
  white-space: nowrap;
}

.pa-hist-tick.is-last { left: auto; right: 0; }

.pa-hist td { text-align: center; }

.pa-sq {
  display: block;
  margin: 0 auto;
  width: 14px;
  height: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-xs);
}

.pa-sq.is-on { border-color: var(--blue); background: var(--blue); }

/* ── The PDF ─────────────────────────────────────────────────────────────── */

/* The benchmark's print rules do the work. This page changes the running
   footer, and keeps its two part headings, which the benchmark hides with
   the results' own heading, and drops the switcher, which does nothing on
   paper. */
:root { --bm-footer: "Willow LinkedIn profile analytics"; }
:root:lang(nl) { --bm-footer: "Willow LinkedIn-profielanalyse"; }

/* At A4 width the narrow-screen rules would stack the tiles, the weekly
   trio and the audience cards one per row; on paper they keep their
   columns. The benchmark lays its figures out as blocks for print, so the
   audience grid is put back here too. */
.bm-printing .pa-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bm-printing .pa-stat { padding: 16px; }
.bm-printing .pa-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bm-printing .bm-figs.pa-audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bm-printing .pa-audience .bm-fig { margin-top: 0; }

@media print {
  .bm-results .sec-head.pa-part:not([hidden]) { display: flex !important; margin-top: 24px; }
  .pa-tabs,
  .pa-post-link,
  .pa-fold-icon { display: none !important; }
  .pa-stat,
  .pa-part { break-inside: avoid; }
  .pa-part { break-after: avoid; }
}

/* ── Folding ─────────────────────────────────────────────────────────────── */

/* Each card's title is its fold button, with the round toggle the FAQ uses
   on the right. A folded card keeps only its title. */
.pa-fold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pa-fold:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: var(--r-sm); }

.pa-fold-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream-2);
  flex-shrink: 0;
}

/* A chevron drawn from two borders: up while open, down while folded. */
.pa-fold-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translate(-50%, -25%) rotate(-135deg);
  transition: transform 0.2s;
}

.pa-fold:hover .pa-fold-icon { background: var(--blue-soft); }
.bm-fig.is-folded .pa-fold-icon::before { transform: translate(-50%, -75%) rotate(45deg); }

.bm-fig.is-folded > :not(figcaption),
.bm-fig.is-folded .bm-fig-sub { display: none; }

/* ── The processing screen ───────────────────────────────────────────────── */

/* Shown in the tool card for ten seconds after a drop. The bar is the
   global .academy-bar; the steps tick off underneath it. */
.pa-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--paper);
}

.pa-loading[hidden] { display: none; }

.pa-loading-title {
  font-size: 15px;
  font-weight: 500;
}

.pa-loading .academy-bar > span {
  width: 0;
  transition: width 0.1s linear;
}

.pa-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.pa-loading-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-4);
}

.pa-loading-steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  flex-shrink: 0;
}

.pa-loading-steps li.is-active { color: var(--ink); font-weight: 500; }
.pa-loading-steps li.is-active::before { border-color: var(--blue); }
.pa-loading-steps li.is-done { color: var(--ink-3); }
.pa-loading-steps li.is-done::before { border-color: var(--blue); background: var(--blue); }

/* ── Narrower screens ────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .pa-stats,
  .pa-audience { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .pa-steps .c-steps,
  .pa-fields,
  .pa-trio { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .pa-audience { grid-template-columns: minmax(0, 1fr); }
  .pa-stat-value { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .pa-fold-icon::before,
  .pa-loading .academy-bar > span { transition: none; }
}
