/* REMeasure.
   ----------------------------------------------------------------------------------------------
   A global sheet, not a component's .razor.css. These rules style markup rendered across several
   components (the list, the evaluation screen, the shared job-journey strip), and Blazor's CSS
   isolation only matches elements authored in the same .razor file - so as scoped files most of
   this would apply to nothing. The rm- prefix carries the scope instead.

   Palette from General Docs/OML-CORP-DESIGN-SYSTEM-REFERENCE-2026-08.md: #F3F3F3 page, #FFFFFF
   surfaces, #E5E5E5 borders, #18181F primary fill, and REMeasure's own accent #F37021.

   The accent is used sparingly and never as a large fill: it marks the active factor, the progress
   a person has made, and the score they are accumulating - the three things that change as they
   work. Everything static stays neutral, so the colour means "this moved" rather than "this is
   REMeasure". */

.rm-page {
    --rm-accent: #F37021;
    --rm-accent-deep: #B4470E;
    --rm-accent-wash: #FDF0E7;

    --rm-ink: #18181F;
    --rm-body: #35353B;
    --rm-muted: #5A5A5A;
    --rm-faint: #8A9793;
    --rm-line: #E5E5E5;
    --rm-hairline: #F3F4F4;
    --rm-surface: #FFFFFF;

    padding: 22px 4px 40px;
    color: var(--rm-body);
}

/* ---------------------------------------------------------------- header */

.rm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

/* Job scores stat strip (design frame 01). */
.rm-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.rm-stat { padding: 16px 20px; border-left: 1px solid #f0f0f0; }
.rm-stat:first-child { border-left: 0; }
.rm-stat-num { font-size: 28px; font-weight: 700; line-height: 1.05; color: #18181f; }
.rm-stat-num.awaiting { color: #F37021; }
.rm-stat-num.month { color: #00795f; }
.rm-stat-label { font-size: 12.5px; color: #5a5a5a; margin-top: 3px; }
@media (max-width: 720px) { .rm-strip { grid-template-columns: repeat(2, 1fr); } .rm-stat:nth-child(3){border-left:0;} }

.rm-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--rm-ink);
    margin: 0;
    text-wrap: balance;
}

.rm-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--rm-muted);
    margin: 6px 0 0;
}

/* The back button that used to be here is gone - Components/Shared/Breadcrumb.razor carries the
   way out now. */

/* ---------------------------------------------------------------- status tabs

   Count above label, matching REMprofile's job-profile tabs. The active tab is marked by an
   underline in the app accent rather than a filled pill: these are a filter, not a destination,
   and a row of filled pills would compete with the table below them. */

.rm-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--rm-line);
    margin-bottom: 16px;
    overflow-x: auto;
}

.rm-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 14px 10px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.rm-tab-count {
    font-size: 17px;
    font-weight: 700;
    color: var(--rm-ink);
    font-variant-numeric: tabular-nums;
}

.rm-tab-label {
    font-size: 12.5px;
    color: var(--rm-muted);
}

.rm-tab:hover { background: var(--rm-hairline); }

.rm-tab-active {
    border-bottom-color: var(--rm-accent);
}

.rm-tab-active .rm-tab-label { color: var(--rm-ink); font-weight: 600; }

/* ---------------------------------------------------------------- search row */

.rm-searchrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.rm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 380px;
    padding: 7px 12px;
    background: var(--rm-surface);
    border: 1px solid var(--rm-line);
    border-radius: 8px;
}

.rm-search:focus-within { border-color: var(--rm-accent); }

.rm-search-icon { color: var(--rem-ink-muted, #66706e); display: inline-flex; }

.rm-search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--rm-ink);
    background: transparent;
}

.rm-resultcount, .rm-loading {
    font-size: 13px;
    color: var(--rm-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ---------------------------------------------------------------- grid

   A CSS grid rather than a table element, matching REMprofile's list, so the row can hold stacked
   content (title over code) without nested tables. */

.rm-grid {
    background: var(--rm-surface);
    border: 1px solid var(--rm-line);
    border-radius: 10px;
    overflow: hidden;
}

.rm-grid-head, .rm-row {
    display: grid;
    grid-template-columns: minmax(240px, 3fr) 90px 150px 110px 96px;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.rm-grid-head {
    height: 40px;
    background: var(--rm-hairline);
    border-bottom: 1px solid var(--rm-line);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rm-muted);
}

.rm-row {
    min-height: 60px;
    border-bottom: 1px solid var(--rm-hairline);
    font-size: 13.5px;
}

.rm-row:hover { background: #FAFAFA; }

.rm-cell-job { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.rm-job-title {
    font-weight: 600;
    color: var(--rm-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rm-job-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--rem-ink-muted, #66706e);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rm-job-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.rm-cell-score, .rm-contrib-score {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--rm-ink);
}

.rm-cell-actions { text-align: right; }

.rm-muted { color: var(--rem-ink-muted, #66706e); }

/* ---------------------------------------------------------------- status pills

   Neutral except for the two that need a person: pending authorisation is waiting on someone, and
   declined is a result that needs rework. The rest are states, not calls to action. */

.rm-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--rm-hairline);
    color: var(--rm-muted);
}

.rm-pill-in-progress          { background: var(--rm-accent-wash); color: var(--rm-accent-deep); }
.rm-pill-pending-authorisation{ background: #FDF1E3; color: #96591A; }
.rm-pill-authorised           { background: #E4F3EF; color: #00795F; }
.rm-pill-declined             { background: #FBEDEB; color: #A9291B; }

.rm-grade {
    display: inline-block;
    min-width: 26px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--rm-ink);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 12.5px;
    text-align: center;
}

/* The evaluation and the job profile disagree - the row that needs a human. */
.rm-outofstep {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #A9291B;
    border-bottom: 1px dotted currentColor;
    cursor: help;
}

/* ---------------------------------------------------------------- progress */

.rm-progress {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: var(--rm-hairline);
    overflow: hidden;
}

.rm-progress-lg { height: 8px; margin: 10px 0 6px; }

.rm-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--rm-accent);
    transition: width 180ms ease;
}

.rm-progress-text {
    font-size: 11.5px;
    color: var(--rem-ink-muted, #66706e);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- buttons */

.rm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.rm-btn-primary   { background: var(--rm-ink); color: #FFFFFF; }
.rm-btn-primary:hover:not(:disabled) { background: #2E2E38; }

.rm-btn-secondary { background: var(--rm-surface); color: var(--rm-ink); border-color: #DBDBDB; }
.rm-btn-secondary:hover:not(:disabled) { border-color: var(--rm-ink); }

.rm-btn-quiet     { background: transparent; color: var(--rm-accent-deep); padding: 6px 10px; }
.rm-btn-quiet:hover:not(:disabled) { background: var(--rm-accent-wash); }

.rm-btn-block { width: 100%; margin-top: 10px; }

.rm-btn:disabled { opacity: 0.5; cursor: default; }

.rm-btn:focus-visible,
.rm-tab:focus-visible,
.rm-rail-item:focus-visible,
.rm-answer:focus-within {
    outline: 2px solid var(--rm-accent);
    outline-offset: 2px;
}

.rm-more { display: flex; justify-content: center; padding: 16px 0 0; }

/* ---------------------------------------------------------------- empty / loading */

.rm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 24px;
    background: var(--rm-surface);
    border: 1px solid var(--rm-line);
    border-radius: 10px;
    text-align: center;
}

.rm-empty-title { font-size: 16px; font-weight: 600; color: var(--rm-ink); margin: 0; }
.rm-empty-body  { font-size: 13.5px; color: var(--rm-muted); margin: 0; max-width: 52ch; }

.rm-loading-page {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rm-muted);
    font-size: 14px;
}

.rm-readonly-note {
    padding: 10px 14px;
    margin-bottom: 16px;
    background: var(--rm-hairline);
    border-left: 3px solid var(--rm-faint);
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--rm-muted);
}

/* ---------------------------------------------------------------- evaluation screen

   Three columns: where you are, what you are answering, what it adds up to. The rail and the
   result stick, because both are references you consult while working in the middle column. */

.rm-eval-body {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.rm-rail {
    position: sticky;
    top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rm-rail-item {
    display: flex;
    align-items: center;
    /* Explicit, because a button's user-agent centring otherwise wins: each rail item then centres
       its own content, so the shortest factor name indents furthest and the rail reads as ragged
       steps rather than a list. */
    justify-content: flex-start;
    width: 100%;
    gap: 10px;
    padding: 10px 12px;
    background: none;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.rm-rail-item:hover { background: var(--rm-hairline); }

.rm-rail-active { background: var(--rm-accent-wash); }

/* The symbol is the factor's identity throughout - rail, heading and contribution list all use
   it, so a reviewer can connect a bar on the right to a section on the left without reading. */
.rm-rail-symbol {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--rm-hairline);
    color: var(--rm-muted);
    font-size: 12px;
    font-weight: 700;
}

.rm-rail-active .rm-rail-symbol { background: var(--rm-accent); color: #FFFFFF; }
.rm-rail-done   .rm-rail-symbol { background: var(--rm-ink); color: #FFFFFF; }

.rm-rail-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.rm-rail-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--rm-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rm-rail-meta { font-size: 11.5px; color: var(--rem-ink-muted, #66706e); font-variant-numeric: tabular-nums; }

.rm-rail-check { margin-left: auto; color: #00795F; }

/* ---------------------------------------------------------------- questions */

.rm-questions { min-width: 0; }

.rm-factor-head { margin-bottom: 18px; }

.rm-factor-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--rm-ink);
    margin: 0;
}

.rm-factor-symbol {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--rm-accent);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
}

.rm-factor-desc { font-size: 13.5px; color: var(--rm-muted); margin: 6px 0 0; max-width: 62ch; }

.rm-question {
    background: var(--rm-surface);
    border: 1px solid var(--rm-line);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 0 0 14px;
}

.rm-question[disabled] { opacity: 0.85; }

.rm-question-legend { display: flex; gap: 10px; padding: 0; margin-bottom: 4px; }

.rm-question-code {
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: var(--rem-ink-muted, #66706e);
    padding-top: 2px;
}

.rm-question-text { font-size: 15px; font-weight: 600; color: var(--rm-ink); text-wrap: balance; }

.rm-question-instr {
    font-size: 12.5px;
    color: var(--rm-muted);
    margin: 0 0 12px 44px;
    max-width: 60ch;
}

.rm-answers { display: flex; flex-direction: column; gap: 6px; margin-left: 44px; }

/* The whole row is the target, not just the radio - these are sentences, and asking someone to
   hit a 16px circle forty times is a worse experience than it looks on a mockup. */
.rm-answer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--rm-line);
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
}

.rm-answer:hover { border-color: #C9C9C9; background: #FAFAFA; }

.rm-answer-selected {
    border-color: var(--rm-accent);
    background: var(--rm-accent-wash);
}

.rm-answer input { accent-color: var(--rm-accent); flex: 0 0 auto; }

.rm-answer-text { flex: 1; min-width: 0; }

.rm-answer-score {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 700;
    color: var(--rem-ink-muted, #66706e);
}

.rm-answer-selected .rm-answer-score { color: var(--rm-accent-deep); }

.rm-factor-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

/* ---------------------------------------------------------------- result */

.rm-result { position: sticky; top: 8px; }

.rm-result-card {
    background: var(--rm-surface);
    border: 1px solid var(--rm-line);
    border-radius: 10px;
    padding: 18px 18px 20px;
}

.rm-result-label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rm-muted);
    margin: 0;
}

.rm-result-grade {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--rm-ink);
    margin: 6px 0 0;
}

.rm-result-band  { font-size: 13px; color: var(--rm-muted); margin: 2px 0 0; }

.rm-result-score { font-size: 14px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }

.rm-result-progress { font-size: 12px; color: var(--rem-ink-muted, #66706e); margin: 0; }

.rm-result-hint { font-size: 12px; color: var(--rm-muted); margin: 10px 0 0; }

.rm-contrib {
    list-style: none;
    margin: 16px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--rm-hairline);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rm-contrib-row { display: flex; align-items: center; gap: 8px; }

.rm-contrib-symbol {
    flex: 0 0 auto;
    width: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--rem-ink-muted, #66706e);
}

.rm-contrib-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--rm-hairline);
    overflow: hidden;
}

.rm-contrib-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--rm-accent);
    transition: width 180ms ease;
}

.rm-contrib-score { flex: 0 0 auto; width: 26px; text-align: right; font-size: 12px; }

/* ---------------------------------------------------------------- job journey strip

   Shared with REMprofile and REMchannel - see JobJourneyStrip.razor. Each step carries its own
   app's accent through --jj-accent, so the three products' colours appear together exactly once,
   in the one place whose subject is the relationship between them. */

.jj-strip {
    background: var(--rm-surface, #FFFFFF);
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 18px;
}

.jj-steps {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
}

.jj-step { display: flex; align-items: center; gap: 10px; }

/* The connector reads left to right as a journey, not three separate badges. */
.jj-step + .jj-step::before {
    content: "";
    width: 18px;
    height: 1px;
    background: #DCDDDE;
    margin-right: -18px;
}

.jj-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #DCDDDE;
    flex: 0 0 auto;
}

.jj-done  .jj-dot { background: var(--jj-accent); }
.jj-doing .jj-dot { background: var(--jj-accent); opacity: 0.45; }

.jj-body { display: flex; flex-direction: column; gap: 1px; }

.jj-app {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--jj-accent);
}

.jj-value { font-size: 13px; color: #35353B; }

a.jj-value { color: #18181F; text-decoration: underline; text-underline-offset: 2px; }
a.jj-value:hover { color: #000000; }

.jj-step-current .jj-value { font-weight: 700; color: #18181F; }

.jj-warning {
    margin: 12px 0 0;
    padding: 9px 12px;
    background: #FBEDEB;
    border-radius: 6px;
    font-size: 12.5px;
    color: #A9291B;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1400px) {
    .rm-eval-body { grid-template-columns: 210px minmax(0, 1fr) 250px; gap: 18px; }
}

@media (max-width: 1150px) {
    /* The result card moves above the questions rather than shrinking: it is the thing a person
       checks after each answer, and a 150px column cannot hold a grade and six factor bars. */
    .rm-eval-body { grid-template-columns: minmax(0, 1fr); }
    .rm-rail { position: static; flex-direction: row; overflow-x: auto; }
    .rm-rail-item { flex: 0 0 auto; }
    .rm-rail-text { display: none; }
    .rm-result { position: static; order: -1; }
    .rm-grid-head { display: none; }
    .rm-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 12px 14px; }
    .rm-cell-actions { grid-column: 2; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
