/* /profile.php, the owner's page (inc/profile-page.php, views/profile*.php): "Explore your scores" with its controls,
   rows, facets and stepper; Unfinished tests; the ID block under the intro; the rest of the page brought onto the same
   tokens. The look settled in exp-0032's results arm (Lewis 2026-11-13, rounds 1 to 24). The rows' layout comes last. */

/* One small system for the whole page (Lewis 2026-11-13: "standardize the css to increase cohesion"). Every rule
   below reads these; the site's own values where it has one (the red pill, the row surface and radius, the link blue,
   the text greys), a 4/8/12/16/24/32 scale for the rest. Scoped to the owner's profile (.ps-results on
   .profile-contain); the share page and other pages are untouched. ":root" lifts these over the site's dark-theme
   rules for the same parts. */
.profile-contain.ps-results {
  --ps-gap-section: 32px;  /* between sections */
  --ps-gap-block: 16px;    /* a section's text to what follows it; a list to its buttons */
  --ps-gap: 12px;          /* controls to the list; between controls; a grid's rows */
  --ps-gap-tight: 8px;     /* a heading to its text; between rows; an ID to its form */
  --ps-gutter: 24px;       /* between a grid's two columns (facets, About you) */
  --ps-pad-row: 12px 16px; /* inside a row surface (results, unfinished, the survey card) */
  --ps-h: 40px;            /* fields, selects, the search, the red pills, the ID */
  --ps-h-sm: 32px;         /* the quiet outlined buttons: Continue, Show all, the stepper's arrows */
  --ps-r-surface: 10px;    /* rows and cards */
  --ps-r-control: 6px;     /* fields, selects, outlined buttons (the red pill keeps the site's round ends) */
  --ps-ink: #333;          /* titles and facet names */
  --ps-text: #555;         /* paragraphs, a row's sentence, list items */
  --ps-muted: #888;        /* dates, counts, "Higher than", meta lines */
  --ps-link: #1f8fc4;
  --ps-danger: #c94848;    /* the one destructive action's words (Delete my results) */
  --ps-border: #cfd8dc;    /* every control's outline */
  --ps-hairline: #eceff1;  /* list separators */
  --ps-surface: #fafafa;
  --ps-field: #fff;
  --ps-hover: rgba(31, 143, 196, .07);   /* a secondary button under the pointer */
  --ps-focus: rgba(31, 143, 196, .18);   /* a field's focus halo */
  --ps-fs-body: 17px;
  --ps-fs-row: 15px;
  --ps-fs-small: 13px;
}

html.supports-dark-mode.theme-dark .profile-contain.ps-results {
  --ps-ink: #eee;
  --ps-text: #eee;         /* the site's dark content text (its #page rule colours the paragraphs so) */
  --ps-muted: #b0b0b0;     /* 4.7:1 on the row surface, 5.8:1 on the page (#999 was 3.6:1 on rows) */
  --ps-link: #9edff2;
  --ps-danger: #f28b82;    /* a lighter red of the same family: 5.3:1 on the dark field (#c94848 was 2.7:1) */
  --ps-border: #5a5f62;
  --ps-hairline: #444;
  --ps-surface: #414141;
  --ps-field: #333;
  --ps-hover: rgba(158, 223, 242, .08);
  --ps-focus: rgba(158, 223, 242, .2);
}

/* rhythm: sections, headings, a section's text */
:root .profile-contain.ps-results .mr-section { margin: 0 0 var(--ps-gap-section); }
:root .profile-contain.ps-results .mr-lede { margin: 0 0 var(--ps-gap-block); color: var(--ps-text); }
:root .profile-contain.ps-results .mr-h { margin: 0 0 var(--ps-gap-tight); }
:root .profile-contain.ps-results .mr-note { margin: 0 0 var(--ps-gap-block); color: var(--ps-text); }

/* rows: the results' and the unfinished tests' surface */
:root .profile-contain.ps-results .mr-results > li { padding: var(--ps-pad-row); margin: 0 0 var(--ps-gap-tight); border-radius: var(--ps-r-surface); background: var(--ps-surface); }
:root .profile-contain.ps-results .mr-results > li.mr-tap:hover { background: var(--ps-surface); filter: brightness(.985); }
:root .profile-contain.ps-results .mr-result-title a { color: var(--ps-ink); }
:root .profile-contain.ps-results .mr-result-text { color: var(--ps-text); font-size: var(--ps-fs-row); }
:root .profile-contain.ps-results .mr-result-meta,
:root .profile-contain.ps-results .mr-trait-sub,
:root .profile-contain.ps-results .mr-step-at,
:root .profile-contain.ps-results .mr-step-date,
:root .profile-contain.ps-results .mr-none { color: var(--ps-muted); font-size: var(--ps-fs-small); }
:root .profile-contain.ps-results .mr-cards .mr-trait-name { color: var(--ps-ink); font-size: var(--ps-fs-row); }
:root .profile-contain.ps-results .mr-cards .mr-trait-pct { color: var(--ps-text); font-size: var(--ps-fs-small); }
:root .profile-contain.ps-results .mr-cards .mr-traits { gap: var(--ps-gap) var(--ps-gutter); }

/* controls: one height and radius for every field, select and the search; one outline */
:root .profile-contain.ps-results .mr-controls { gap: var(--ps-gap); margin: 0 0 var(--ps-gap); }
:root .profile-contain.ps-results .mr-controls select,
:root .profile-contain.ps-results .mr-controls .mr-search input,
:root .profile-contain.ps-results .mr-field input,
:root .profile-contain.ps-results .mr-field select,
:root .profile-contain.ps-results .mr-share-row input {
  height: var(--ps-h);
  min-height: var(--ps-h);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r-control);
  background-color: var(--ps-field);
  box-shadow: none;
  padding: 0 12px;
  color: var(--ps-ink);
  font: 400 var(--ps-fs-row) "Open Sans", sans-serif;
}
:root .profile-contain.ps-results .mr-controls .mr-search input { padding-inline: 32px 34px; }  /* room for the magnifier and the clear */
:root .profile-contain.ps-results .mr-controls select,
:root .profile-contain.ps-results .mr-field select { padding-right: 8px; }
:root .profile-contain.ps-results .mr-controls select:focus,
:root .profile-contain.ps-results .mr-controls .mr-search input:focus,
:root .profile-contain.ps-results .mr-field input:focus,
:root .profile-contain.ps-results .mr-field select:focus,
:root .profile-contain.ps-results .mr-share-row input:focus { border-color: var(--ps-link); outline: none; box-shadow: 0 0 0 2px var(--ps-focus); }
:root .profile-contain.ps-results input::placeholder { color: var(--ps-muted); opacity: 1; }
:root .profile-contain.ps-results .mr-share-row { gap: var(--ps-gap); margin: 0 0 var(--ps-gap-tight); }
:root .profile-contain.ps-results .mr-id {
  min-height: var(--ps-h);
  padding: 8px 14px;
  line-height: 24px;
  margin: 0 0 var(--ps-gap-tight);
  border-radius: var(--ps-r-control);
  background: var(--ps-surface);
  color: var(--ps-text);
}
:root .profile-contain.ps-results .mr-about { gap: var(--ps-gap) var(--ps-gutter); }
:root .profile-contain.ps-results .mr-field { color: var(--ps-text); font-size: var(--ps-fs-small); }
/* labels and the two disclosure lines were in the browser's default face: the page's type */
:root .profile-contain.ps-results .mr-field,
:root .profile-contain.ps-results .mr-section summary { font-family: "Open Sans", sans-serif; }

/* buttons: the red pill at the controls' height; the quiet outlined ones at one small height */
:root .profile-contain.ps-results .profile button.button.mr-pill { height: var(--ps-h); }
/* the secondary button, the page's one other button: Continue, Show all N / Show fewer, Delete my results and the
   stepper's arrows (its small square members): one height, outline, radius, fill, type, hover, focus and disabled look */
:root .profile-contain.ps-results .mr-unf-rows a.mr-unf-go,
:root .profile-contain.ps-results .mr-cards button.mr-show-all,
:root .profile-contain.ps-results .mr-step button,
:root .profile-contain.ps-results .profile button.button.mr-pill.mr-pill-outline {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ps-h-sm) !important;
  min-height: var(--ps-h-sm);
  margin: 0 !important;
  padding: 0 14px !important;
  border: 1px solid var(--ps-border) !important;
  border-radius: var(--ps-r-control) !important;
  background: var(--ps-field) !important;
  box-shadow: none !important;
  color: var(--ps-link) !important;
  font: 600 var(--ps-fs-small)/1 "Open Sans", sans-serif !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  transition: background-color .15s ease;
}
:root .profile-contain.ps-results .mr-cards button.mr-show-all { display: flex; width: 100%; }
:root .profile-contain.ps-results .mr-step button { width: var(--ps-h-sm); min-width: var(--ps-h-sm); padding: 0 !important; font-size: 17px !important; font-weight: 400 !important; }
:root .profile-contain.ps-results .profile button.button.mr-pill.mr-pill-outline { width: auto; color: var(--ps-danger) !important; } /* the one destructive action: red words, the same button */
:root .profile-contain.ps-results .mr-unf-rows a.mr-unf-go:hover,
:root .profile-contain.ps-results .mr-cards button.mr-show-all:hover,
:root .profile-contain.ps-results .mr-step button:not(:disabled):hover,
:root .profile-contain.ps-results .profile button.button.mr-pill.mr-pill-outline:hover { background: var(--ps-hover) !important; }
:root .profile-contain.ps-results .mr-unf-rows a.mr-unf-go:focus,
:root .profile-contain.ps-results .mr-cards button.mr-show-all:focus,
:root .profile-contain.ps-results .mr-step button:focus,
:root .profile-contain.ps-results .profile button.button.mr-pill.mr-pill-outline:focus { outline: none; opacity: 1; }
:root .profile-contain.ps-results .mr-unf-rows a.mr-unf-go:focus-visible,
:root .profile-contain.ps-results .mr-cards button.mr-show-all:focus-visible,
:root .profile-contain.ps-results .mr-step button:focus-visible,
:root .profile-contain.ps-results .profile button.button.mr-pill.mr-pill-outline:focus-visible { outline: 2px solid var(--ps-link); outline-offset: 2px; }
:root .profile-contain.ps-results .mr-step button:disabled { opacity: .35 !important; cursor: default; }

/* links: one colour and weight, at the size of the text they sit in; the two disclosures (History's Show all N,
   Delete everything) alike */
:root .profile-contain.ps-results .mr-lede a,
:root .profile-contain.ps-results .mr-note a,
:root .profile-contain.ps-results .mr-result-meta a,
:root .profile-contain.ps-results .mr-history a,
:root .profile-contain.ps-results .mr-section details > summary,
:root .profile-contain.ps-results .mr-share .mr-link-btn { color: var(--ps-link) !important; font-weight: 400 !important; }
:root .profile-contain.ps-results .mr-section details > summary { font-size: var(--ps-fs-row) !important; cursor: pointer; }
:root .profile-contain.ps-results .mr-more-wrap { margin: var(--ps-gap-block) 0 0; }
/* "Show more" and "Show less" side by side, the second under the first with the same gap where a language's words
   do not fit one line (390 px: de, es, id, it, pt, tr, uk) */
:root .profile-contain.ps-results .profile .mr-more-wrap { display: flex; flex-wrap: wrap; gap: var(--ps-gap); }
:root .profile-contain.ps-results .profile .mr-more-wrap button.button.mr-pill { margin: 0; }

/* the lists and the small lines further down: the same text, muted and hairline */
:root .profile-contain.ps-results .mr-history li { padding: var(--ps-gap-tight) 0; border-bottom-color: var(--ps-hairline); color: var(--ps-text); }
:root .profile-contain.ps-results .mr-when,
:root .profile-contain.ps-results .mr-try { color: var(--ps-muted) !important; }
:root .profile-contain.ps-results .mr-history-more summary { padding: var(--ps-gap-tight) 0 0; }
:root .profile-contain.ps-results .mr-survey-card { padding: var(--ps-pad-row); gap: var(--ps-gap); border-radius: var(--ps-r-surface); font-family: "Open Sans", sans-serif; }
/* the card's words in the rows' type: its name as a row title, its line as a row's sentence */
:root .profile-contain.ps-results .mr-survey-card span { color: var(--ps-text); font-size: var(--ps-fs-row); line-height: 1.45; }
:root .profile-contain.ps-results .mr-survey-card strong { color: var(--ps-ink); font-size: 17px; margin-bottom: 2px; }
/* a row whose sentence wraps: its links inline after the last word, at their own size */
#all-results li.mr-links-inline .mr-result-text,
#all-results li.mr-links-inline .mr-result-meta {
  display: inline;
}

#all-results li.mr-links-inline .mr-result-meta {
  margin-inline-start: 6px;
  white-space: nowrap;
}

#all-results [hidden] {
  display: none !important;
}

.mr-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin: 0 0 12px;
}

.mr-controls form {
  display: flex;
  flex: 1 1 130px;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.mr-controls select {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  margin: 0;
  padding: 7px 10px;
}

/* the profile's red pill (Create a share link, Use this ID, Save), at the rows' left edge */
.mr-more-wrap {
  margin: var(--ps-gap-block, 16px) 0 0;
  text-align: start;
}

/* the search, first in the controls row, in the selects' box (their border, height, type), the site's magnifier */
.mr-controls form.mr-search {
  position: relative;
  flex: 1.3 1 170px;
}

.mr-controls .mr-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  color: var(--ps-text, #444);
  font: 14px "Open Sans", sans-serif;
}

.mr-controls .mr-search input:focus {
  border-color: var(--ps-link, #22b9ec);
  outline: none;
}

.mr-controls .mr-search .icon-search {
  position: absolute;
  inset-inline-start: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ps-muted, #999);
  font-size: 14px;
  pointer-events: none;
}

.mr-controls .mr-search .mr-q-x {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ps-muted, #888) !important;
  font-size: 20px !important;
  line-height: 30px !important;
  text-transform: none !important;
  cursor: pointer;
}

.mr-controls .mr-search .mr-q-x:hover {
  color: var(--ps-ink, #333) !important;
  background: var(--ps-hairline, #f0f0f0) !important;
}

.mr-controls .mr-search .mr-q-x[hidden] {
  display: none;
}

/* the site's button focus fades a pressed button (opacity .7): these stay solid, a ring for the keyboard */
.profile-contain .profile .mr-more-wrap button.button.mr-pill:focus {
  opacity: 1;
  outline: none;
}

.profile-contain .profile .mr-more-wrap button.button.mr-pill:focus-visible {
  outline: 2px solid #d65454;
  outline-offset: 2px;
}

.mr-none {
  margin: 4px 0 0;
}

html.supports-dark-mode.theme-dark .mr-controls .mr-search input,
html.supports-dark-mode.theme-dark .mr-controls select {
  color: var(--ps-ink, #eee);
}

@media only screen and (max-width: 727px) {
  .mr-controls form.mr-search {
    flex-basis: 100%;
  }
}

/* a row with lines under it: its icon at the top, by the title */
#all-results .mr-results li.mr-row {
  align-items: flex-start;
}



/* a row: the icon, the title, sentence and links, the stepper at the right; the facets under them, two across from
   728 px (views/profile-row.php) */
#all-results .mr-results > li.mr-has-cards{flex-wrap:wrap;row-gap:8px}
#all-results .mr-results > li.mr-has-cards > .mr-result-body{flex:1 1 0}
.mr-cards{flex:0 0 100%;min-width:0}
.mr-results .mr-cards .mr-traits{margin:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--ps-gap,11px) var(--ps-gutter,24px)}
.mr-results .mr-cards .mr-traits li,html.supports-dark-mode.theme-dark .mr-results .mr-cards .mr-traits li{display:block;margin:0;gap:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none}
.mr-results.mr-js .mr-cards:not(.mr-cards-all) .mr-traits li.mr-facet-x{display:none}
/* without script every facet shows and the dead "Show all" cell goes */
#all-results .mr-results:not(.mr-js) .mr-more-tile{display:none}
.mr-cards .mr-bar-you{transition:left .35s ease}
@media (prefers-reduced-motion:reduce){.mr-cards .mr-bar-you{transition:none}}
.mr-cards .mr-more-tile{position:relative;z-index:1}
.mr-cards .mr-more-tile.mr-more-span{grid-column:1/-1}
.mr-cards .mr-more-at{position:relative;height:8px;margin:9px 0 7px}
.mr-cards .mr-more-at .mr-show-all{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%)}
.mr-cards .mr-more-tile .mr-trait-head,.mr-cards .mr-more-tile .mr-trait-sub{visibility:hidden}
.mr-cards button.mr-show-all{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;box-sizing:border-box;min-height:var(--ps-h-sm,30px);height:auto!important;padding:4px 12px!important;margin:0!important;border:1px solid var(--ps-border,#b9c4c9)!important;border-radius:var(--ps-r-control,4px)!important;background:transparent!important;box-shadow:none!important;color:var(--ps-link,#1f8fc4)!important;font:inherit;font-size:var(--ps-fs-small,13px)!important;font-weight:600!important;line-height:1.4!important;text-transform:none!important;letter-spacing:0!important;opacity:1!important;cursor:pointer;transition:background-color .15s ease}
.mr-cards button.mr-show-all:hover{background:rgba(31,143,196,.07)!important}
.mr-cards button.mr-show-all:focus{outline:none}
.mr-cards button.mr-show-all:focus-visible{outline:2px solid var(--ps-link,#1f8fc4);outline-offset:2px}
.mr-cards .mr-chev{width:6px;height:6px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg);transition:transform .2s ease}
.mr-cards .mr-show-all[aria-expanded=true] .mr-chev{transform:translateY(1px) rotate(-135deg)}
html.supports-dark-mode.theme-dark .mr-cards button.mr-show-all{border-color:var(--ps-border,#8a9499)!important;color:var(--ps-link,#9edff2)!important}
html.supports-dark-mode.theme-dark .mr-cards button.mr-show-all:hover{background:rgba(158,223,242,.08)!important}
html.supports-dark-mode.theme-dark .mr-cards button.mr-show-all:focus-visible{outline-color:#9edff2}
@media only screen and (max-width:727px){.mr-results .mr-cards .mr-traits{grid-template-columns:1fr;gap:11px}.mr-cards .mr-more-tile .mr-trait-head,.mr-cards .mr-more-tile .mr-trait-sub{display:none}.mr-cards .mr-more-at{height:30px;margin:4px 0 0}.mr-cards{order:4}}
.mr-step{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;position:relative;z-index:1;margin:-2px 0 0}
#all-results .mr-results > li.mr-row > .mr-result-body{flex:1 1 0;min-width:0}
#all-results .mr-results > li.mr-row > .mr-step{margin-inline-start:auto}
.mr-step-nav{display:flex;align-items:center;gap:6px}
.mr-step button{font:inherit;color:var(--ps-text,#555);border:1px solid var(--ps-border,#d5dce0);background:var(--ps-field,#fff);border-radius:var(--ps-r-control,4px);box-sizing:border-box;min-width:var(--ps-h-sm,34px);min-height:var(--ps-h-sm,34px);padding:0 8px;margin:0;box-shadow:none;cursor:pointer;font-size:19px;line-height:1}
.mr-step button:disabled{opacity:.35;cursor:default}
.mr-step-at{font-size:var(--ps-fs-small,13px);color:var(--ps-muted,#777);white-space:nowrap;font-variant-numeric:tabular-nums;min-width:5.6em;text-align:center}
.mr-step-date{font-size:var(--ps-fs-small,12px);color:var(--ps-muted,#999);white-space:nowrap}
html.supports-dark-mode.theme-dark .mr-step button{background:var(--ps-field,#333);color:var(--ps-text,#ddd);border-color:var(--ps-border,#555)}
.mr-step button{box-shadow:none!important;text-transform:none!important;letter-spacing:0!important;height:auto!important;opacity:1}
.mr-step button:disabled{opacity:.35!important}
.mr-step button:not(:disabled){opacity:1!important}
.mr-step button:focus{outline:none}
.mr-step button:focus-visible{outline:2px solid var(--ps-link,#1f8fc4);outline-offset:2px}
@media only screen and (max-width:727px){#all-results .mr-results > li.mr-row{flex-wrap:wrap;row-gap:8px}#all-results .mr-results > li.mr-row > .mr-result-body{flex:1 1 0}.mr-step{order:3;flex-basis:100%;flex-direction:row;justify-content:center;align-items:center;gap:var(--ps-gap,12px);margin:0}}
/* a top-match test's candidates (a character test): the visitor's own number as a filled bar from nothing to it,
   ending in the round marker of the percentile bars (Lewis 2026-11-14: one look for both); no middle mark, one
   colour and no line under it: an amount, not a place among takers */
.mr-cards .mr-bar.mr-bar-fill{background:var(--ps-hairline,#eceff1);margin-bottom:2px}
html.supports-dark-mode.theme-dark .mr-cards .mr-bar.mr-bar-fill{background:rgba(255,255,255,.13)}
.mr-cards .mr-bar-amount{position:absolute;left:0;top:0;bottom:0;min-width:2px;border-radius:4px;background:var(--ps-link,#1f8fc4);transition:width .35s ease}
@media (prefers-reduced-motion:reduce){.mr-cards .mr-bar-amount{transition:none}}
.mr-cards .mr-bar-amount::after{content:"";position:absolute;right:-7px;top:50%;width:14px;height:14px;margin-top:-7px;box-sizing:border-box;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.3);background:var(--ps-link,#1f8fc4)}
html.supports-dark-mode.theme-dark .mr-cards .mr-bar-amount::after{border-color:#282828}
.mr-cards-match .mr-more-tile .mr-trait-sub{display:none}
.mr-cards-match .mr-more-at{margin-bottom:2px}
/* right to left: the grid mirrors, the bars keep low on the left (.mr-bar is ltr), the arrows point their own way;
   a match's filled bar is an amount, not a place on a line, so it grows from the name's side: the right */
[dir=rtl] .mr-cards .mr-bar-amount { left: auto; right: 0; }
[dir=rtl] .mr-cards .mr-bar-amount::after { right: auto; left: -7px; }
[dir=rtl] .mr-step button { transform: scaleX(-1); }

/* Unfinished tests: rows in the same look, a quiet Continue (views/my-results-unfinished.php) */
.mr-unf-rows > li > .mr-result-body{flex:1 1 0}
.mr-unf-rows .mr-result-meta{margin-top:2px}
.mr-unf-rows a.mr-unf-go{position:relative;z-index:1;flex:none;display:inline-flex;align-items:center;gap:6px;line-height:1.4;text-decoration:none}
.mr-unf-rows .mr-unf-go::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:1.6px 1.6px 0 0;transform:rotate(45deg)}
[dir=rtl] .mr-unf-rows .mr-unf-go::after{transform:rotate(-135deg)}
@media only screen and (max-width:727px){.mr-unf-rows > li{align-items:center}}
