/*
 | Employee-facing styles. The reference is docs/ui-spec.md — if this file and
 | that document disagree, the document wins.
 |
 | Plain CSS, served as a static file. There is no build step in front of it:
 | one fewer thing that can be skipped on a deploy and leave the site unstyled.
 */

:root {
    /* Surfaces */
    --page:        #F4F3F1;
    --card:        #FFFFFF;

    /* Text */
    --ink:         #1A1A1A;
    --ink-muted:   #5C5A57;
    --ink-support: #3D3B39;

    /* Lines */
    --line:        #E3E0DB;
    --line-card:   #EEEBE6;
    --line-input:  #CFCAC3;
    --line-todo:   #B9B4AD;

    /* Brand: the CLEVER logo's own colours (App\Support\Brand). The orange
       only ever carries black text — white on it is 2.0:1. */
    --brand:       #FAA41A;
    --on-brand:    #1A1A1A;

    /* Focus and emphasis */
    --accent:      #B41F6A;
    --accent-ring: #F8E6EF;
    --link:        #B41F6A;
    --link-hover:  #951855;

    /* States */
    --error:       #B42318;
    --on-duty:     #1E6B34;
    --on-duty-bg:  #E4F2E8;
    --role:        #B41F6A;
    --role-bg:     #F8E6EF;

    /* To-do card */
    --todo-bg:     #FFF1DB;
    --todo-border: #FFC766;
    --todo-done:   #FAA41A;
    --todo-todo:   #F2D3A0;

    --radius-card: 22px;
    --radius-btn:  14px;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    /* The form's footer sticks to the bottom; without this, tabbing to a
       field can scroll it to exactly where the footer covers it. */
    scroll-padding-bottom: 150px;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* The wordmark, and only the wordmark. */
.wordmark { font-family: "Baloo 2", "Noto Sans SC", sans-serif; font-weight: 700; line-height: 1; }

a { color: var(--link); }
a:hover { color: var(--link-hover); }

/* One focus treatment everywhere, and it is never removed. */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------- layout */

.shell { max-width: 460px; margin: 0 auto; padding: 0 20px 40px; }

.stack   { display: grid; gap: 16px; }
.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;
}

/* ------------------------------------------------------- language toggle */

/*
 | Never squeezed, never wrapped. Batch P (P6).
 |
 | 「中文」 broke across two lines inside the self-service form's header: the heading
 | beside it is `flex: 1 1 auto` and this had no `flex-shrink: 0`, so a narrow phone
 | took the width out of the two characters rather than out of the heading.
 */
.lang-toggle { display: inline-flex; margin: 0; flex: 0 0 auto; }
.lang-toggle button { white-space: nowrap; }

.lang-toggle .segments {
    display: inline-flex;
    background: #FFFFFF;
    border: 1.5px solid var(--line-input);
    border-radius: 13px;
    padding: 2px;
    gap: 2px;
}

.lang-toggle button {
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    min-width: 48px;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--ink-support);
    cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }

/* ---------------------------------------------------------------- cards */

.card {
    background: var(--card);
    border-radius: var(--radius-card);
    padding: 22px;
}

.card-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    background: var(--line-card);
    color: var(--ink-muted);
}

.chip-duty { background: var(--on-duty-bg); color: var(--on-duty); }
.chip-role { background: var(--role-bg);    color: var(--role); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: var(--radius-btn);
    border: 0;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary   { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.btn-dark      { background: var(--ink);   color: #FFFFFF;         font-weight: 500; }
.btn-secondary { background: transparent;  color: var(--ink); border: 1.5px solid var(--ink); font-weight: 500; }

.btn-primary[disabled],
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* A 44px minimum, because a 30px icon button is a miss on a phone. */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--line-input);
    border-radius: 12px;
    background: #FFFFFF;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

/* --------------------------------------------------------------- fields */

.field { display: grid; gap: 8px; }

/*
 | A hidden field is hidden.
 |
 | `.field` is a class selector and `[hidden]` in the user-agent stylesheet is
 | not, so `display: grid` above won every time — the progressive-disclosure
 | script set the attribute, the DOM agreed the field was hidden, and it drew
 | anyway. "Please specify" sat under every emergency contact regardless of
 | the relationship chosen.
 */
.field[hidden] { display: none; }

/* 15px semi-bold, above the box. docs/ui-standard.md §1 — this form is the measure. */
.field label { font-size: 15px; font-weight: 600; }

.field input,
.field select,
.field textarea {
    height: 50px;
    padding: 0 14px;
    border: 1.5px solid var(--line-input);
    border-radius: 12px;
    background: #FFFFFF;
    color: var(--ink);
    font: inherit;
    font-size: 16px;   /* 16px or iOS zooms the page on focus. */
    width: 100%;
}

.field textarea { height: auto; padding: 12px 14px; line-height: 1.5; }

/*
 | One measure for every field. Batch P (P6).
 |
 | They were 100% of whatever contained them, so a field inside a card was narrower
 | than the same field on a page without one, and on a wide screen a postcode input
 | ran the full width of the window. A readable maximum, and short answers get a
 | short box — a four-character field drawn 600px wide reads as "write a lot here".
 */
.field input,
.field select,
.field textarea { max-width: 34rem; }

.field input[inputmode="numeric"],
.field input[type="date"] { max-width: 14rem; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.field-error input,
.field-error select,
.field-error textarea { border: 2px solid var(--error); }

.field-message { font-size: 14px; color: var(--error); margin: 0; }
.field-hint    { font-size: 14px; color: var(--ink-muted); margin: 0; }

/* A phone number here is Malaysian unless stated otherwise. */
.field-prefixed { display: flex; align-items: stretch; }
.field-prefixed .prefix {
    display: inline-flex; align-items: center; padding: 0 12px;
    border: 1.5px solid var(--line-input); border-right: 0;
    border-radius: 12px 0 0 12px; background: var(--page);
    color: var(--ink-muted); font-size: 16px;
}
.field-prefixed input { border-radius: 0 12px 12px 0; }

/* The two-town postcodes: offer the choice rather than guessing. */
.city-choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.city-choice {
    font: inherit; font-size: 14px; min-height: 44px; padding: 0 14px;
    border: 1.5px solid var(--line-input); border-radius: 12px;
    background: #FFFFFF; color: var(--ink); cursor: pointer;
}
.city-choice[aria-pressed="true"] { border-color: var(--ink); font-weight: 500; }

/* -------------------------------------------------------------- banners */

.banner { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.banner-ok   { background: var(--on-duty-bg); color: var(--on-duty); }
.banner-warn { background: var(--todo-bg); border: 1.5px solid var(--todo-border); color: #6B4A00; }
.banner-error{ background: #FDECEA; color: var(--error); }

/* ---------------------------------------------------------- login page */

.hero {
    background: var(--brand);
    min-height: 318px;
    border-bottom-right-radius: 120px;
    padding: 56px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.logo-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: #FFFFFF;
    border-radius: 26px;
    flex: 0 0 auto;
}
/*
 | The mark keeps its aspect ratio everywhere.
 |
 | Height is fixed and width follows it; object-fit is the backstop for the
 | case where a stylesheet elsewhere sets both. The source file is square
 | today, but a replacement that is not square must not come out stretched —
 | that is exactly how it went wrong.
 */
.logo-tile img { height: 62px; width: auto; object-fit: contain; display: block; }

.hero-word { font-size: 52px; color: var(--on-brand); margin-top: 32px; }

.login-body { padding: 32px 0 0; }
.login-body h1 { font-size: 28px; font-weight: 700; margin: 0 0 10px; line-height: 1.25; }
.login-body .lede { font-size: 16px; color: var(--ink-muted); margin: 0 0 24px; }

.btn-google {
    background: #FFFFFF;
    border: 1.5px solid var(--ink);
    border-radius: 16px;
    min-height: 56px;
    color: var(--ink);
    font-weight: 500;
}

.hints { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.hints li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-support); }
.hints svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--link); margin-top: 2px; }

.login-foot { margin: 32px 0 0; font-size: 15px; color: var(--ink-muted); text-align: center; }

/* --------------------------------------------------------------- topbar */

.topbar {
    background: #FFFFFF;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
}
.topbar img.mark { height: 34px; width: auto; object-fit: contain; display: block; flex: 0 0 auto; }
.topbar h1 { font-size: 18px; font-weight: 700; margin: 0; flex: 1 1 auto; }
.topbar .spacer { flex: 1 1 auto; }

/* ------------------------------------------------------------ my details */

/*
 | On a phone the top bar already carries the page name, so repeating it here
 | is the same words twice in the first 120px of a 390px screen. The desktop
 | bar shows the wordmark instead, and the heading returns.
 */
.page-title { display: none; }

/* The two column groups stack on a phone and need the same gap between them
   as the cards inside them have. */
.columns, .columns > * { display: grid; gap: 16px; align-content: start; }

.identity-name  { font-size: 26px; font-weight: 700; margin: 0 0 4px; line-height: 1.25; }
.identity-email { font-size: 15px; color: var(--ink-muted); margin: 0 0 14px; word-break: break-all; }
.identity-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.todo-card { background: var(--todo-bg); border: 1.5px solid var(--todo-border); }
.todo-card .card-title { font-size: 18px; }
.todo-card p { font-size: 15px; color: var(--ink-support); margin: 0 0 16px; }

.progress { display: flex; gap: 6px; margin: 0 0 8px; }
.progress span { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--todo-todo); }
.progress span.done { background: var(--todo-done); }
.progress-label { font-size: 14px; color: var(--ink-support); margin: 0 0 16px; }

.detail-rows { display: grid; }
.detail-rows > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 14px 0; border-bottom: 1px solid var(--line-card);
}
.detail-rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-rows > div:first-child { padding-top: 0; }
.detail-rows dt { font-size: 15px; color: var(--ink-muted); margin: 0; }
.detail-rows dd { font-size: 15px; font-weight: 500; margin: 0; text-align: right; word-break: break-word; }

.page-foot { display: grid; gap: 14px; justify-items: center; margin: 28px 0 0; text-align: center; }
.page-foot p { margin: 0; font-size: 14px; color: var(--ink-muted); }

/* ----------------------------------------------------------- form chrome */

/*
 | Kept for anything still using it; the self-service form does not. See below.
 */
.form-topbar { height: 60px; }

/*
 | The self-service form's header. Batch P (P6).
 |
 | It used to be a second full-width white bar carrying a back arrow, the title, the
 | language switch and a large "Home" button — four controls and the page name in the
 | first 60px of a 390px screen, with the button that LEAVES the form drawn as the most
 | important thing on it.
 |
 | Now: a heading that reads as a heading, the arrow beside it, and leaving as a text
 | link. Nothing is lost by leaving, because every step saves as it goes.
 */
.form-page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px 0;
}

.form-page-head h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;        /* so the heading gives up width, not the language switch */
}

.form-page-head .form-head-out {
    font-size: 14px;
    color: var(--ink-muted);
    text-decoration: underline;
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .form-page-head { padding: 24px 32px 0; }
    .form-page-head h1 { font-size: 24px; }
}

.steps { display: flex; align-items: center; gap: 6px; padding: 18px 20px 0; }
.steps li { display: flex; align-items: center; gap: 6px; flex: 1 1 0; list-style: none; }
.steps ol, .steps { margin: 0; }
ol.steps { padding-left: 20px; }

.step-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: 13px; font-weight: 700; flex: 0 0 auto;
    background: transparent; color: var(--ink-support);
    border: 1.5px solid var(--line-todo);
}
.step-done    { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.step-current { background: var(--brand); color: var(--on-brand); border: 2.5px solid var(--ink); }

.step-rule { flex: 1 1 auto; height: 1.5px; background: var(--line-input); }
.step-name { font-size: 13px; color: var(--ink-muted); }

.form-head h2 { font-size: 24px; font-weight: 700; margin: 24px 0 8px; line-height: 1.3; }
.form-head p  { font-size: 15px; color: var(--ink-muted); margin: 0 0 20px; }

/* Sticky, and the page is padded so it never covers the last field. */
.form-foot {
    position: sticky; bottom: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--line);
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    margin: 24px -20px 0;
}
.form-foot .saved { font-size: 13px; color: var(--ink-muted); margin: 0 0 10px; text-align: center; }
.form-foot .pair  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------------------------------------ pdpa page */

.notice-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-card); padding: 0 0 12px; margin: 0 0 16px; }
.notice-tabs a {
    font-size: 14px; font-weight: 500; text-decoration: none;
    padding: 8px 12px; border-radius: 10px; color: var(--ink-support);
    min-height: 44px; display: inline-flex; align-items: center;
}
.notice-tabs a[aria-current="true"] { background: var(--ink); color: #FFFFFF; }

.notice-body { max-height: 46vh; overflow-y: auto; font-size: 15px; padding-right: 4px; }
.notice-body h2 { font-size: 17px; margin: 0 0 10px; }
.notice-body h3 { font-size: 15px; margin: 18px 0 4px; }
.notice-body p  { margin: 0 0 8px; }

.agree { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; font-size: 15px; cursor: pointer; }
.agree input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--accent); }

.meta { font-size: 13px; color: var(--ink-muted); margin: 14px 0 0; }

/* -------------------------------------------------------------- desktop */

@media (min-width: 900px) {
    .topbar { height: 76px; padding: 0 32px; }
    .topbar .wordmark { font-size: 26px; }

    /* The heading below carries the page name on desktop; the bar carries the
       wordmark. Saying it in both is saying it twice. */
    .topbar h1 {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .topbar h1 + .desktop-only { margin-left: auto; }

    .shell { max-width: 1040px; padding: 0 32px 56px; }

    .page-title { display: block; font-size: 34px; font-weight: 700; margin: 32px 0 24px; }

    .card { border-radius: 24px; }

    .columns { grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
    .columns > * { gap: 20px; }

    /* The toggle moves into the top bar, so the footer copy stands alone. */
    .page-foot .lang-toggle { display: none; }

    .form-foot { position: static; margin: 24px 0 0; border-radius: var(--radius-card); border: 1px solid var(--line); }
    .form-foot .pair { max-width: 420px; margin-left: auto; }
}

@media (max-width: 899px) {
    .topbar .desktop-only { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/*
 | Proof documents on the self-service form.
 |
 | Deliberately plain: a file input styled to look like something else is a
 | file input people cannot find.
 */
.field.document input[type="file"] {
    height: auto;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px dashed var(--line-input);
    border-radius: 12px;
    background: var(--card);
    font: inherit;
}

.document-held {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin: 0 0 .5rem;
}

.document-held a {
    font-weight: 600;
}

/*
 | A record HR has rejected, and why.
 |
 | Given the same weight as the to-do card rather than styled as an error:
 | being asked to correct something is ordinary, and a red banner makes an
 | ordinary request look like a fault.
 */
.rejected-card { border-left: 4px solid var(--brand); }

.rejected-note {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--page);
    color: var(--ink);
    white-space: pre-wrap;
}

/*
 | The notice's own tables, on a phone.
 |
 | The PDPA notice lists data categories in a two-column table. At 375px a
 | table with prose in both cells pushes the whole page sideways, and a legal
 | document you have to scroll horizontally to read is one nobody reads. The
 | table scrolls inside its own box instead.
 */
.notice-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 15px;
}

.notice-body th,
.notice-body td {
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    min-width: 9rem;
}

.notice-body th { background: var(--page); font-weight: 600; }

.notice-body h2 { font-size: 18px; margin: 22px 0 8px; }
.notice-body h3 { font-size: 16px; margin: 18px 0 6px; }
.notice-body ul,
.notice-body ol { margin: 8px 0 8px 20px; }
.notice-body li { margin: 4px 0; }

/* A long registration number must not widen the page on a narrow screen. */
.notice-body { overflow-wrap: anywhere; }

/*
 | Your band, on the dashboard.
 |
 | The employee side has no asset pipeline either — this file is served as it
 | is written, so everything here is plain CSS against the variables already
 | defined at the top.
 */
.band-code {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.3rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* The one you are aiming at, not the one you hold. */
.band-code-next {
    background: transparent;
    color: var(--ink-muted);
    border: 1px solid var(--line);
    margin-left: 0;
    margin-right: 0.35rem;
}

.band-track {
    margin: 0 0 0.75rem;
    color: var(--ink-muted);
    font-size: 0.9375rem;
}

.band-heading {
    margin: 0.9rem 0 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
}

.band-note {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/*
 | Letters, on the employee side.
 */
.letter-body {
    max-height: 22rem;
    overflow-y: auto;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.letter-body:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sign online | Upload signed copy (R1 U-06). Tabs, not links. */
.letter-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.letter-tab {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
    color: var(--ink-muted); text-decoration: none; font-weight: 500;
    border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.letter-tab:hover { color: var(--ink); }
.letter-tab-on { color: var(--ink); font-weight: 700; border-bottom-color: var(--brand); }

/* A status, in the four fixed colours (R1 U-01). */
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip-ok   { background: #E2F3E7; color: #1B6E36; }
.chip-warn { background: #FFEFD6; color: #8A4B00; }
.chip-bad  { background: #FDE7E4; color: #A91E14; }
.chip-idle { background: #EDEDEF; color: #55555A; }

/* The way back to the Inbox, above the letter. */
.letter-back { margin: 0 0 1rem; }

/* Paragraphs and clauses as LetterBody marks them, the same gaps as the PDF. */
.letter-body p { margin: 0 0 0.5em; }
.letter-body .clause { margin-top: 0.9em; }
.letter-body .clause-title { margin: 0 0 0.2em; }

/* Drawn on, so it has to look like something you can draw on. */
.signature-pad {
    width: 100%;
    height: 9rem;
    border: 1px dashed var(--line);
    border-radius: 0.5rem;
    background: #fff;
    touch-action: none;
}

.agree-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0.9rem 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.agree-row input { margin-top: 0.2rem; }

.letter-card .btn { margin-top: 0.5rem; }

/* One line per item of company property, with its own confirm button. */
.asset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}

.asset-row:last-of-type { border-bottom: 0; }

/*
|-------------------------------------------------------------------------------
| GPS: rating a criterion, and setting a goal
|-------------------------------------------------------------------------------
| Both are a name, an explanation, and two or three controls. Laid out as a
| two-column detail row — label left, everything else right — the explanation
| and the select land on the same line and neither can be read, which is what
| this screen did until 2026-09-29. Stacked, with the controls on a row of
| their own that wraps on a phone.
*/
.gps-criteria { list-style: none; margin: 0; padding: 0; display: grid; }
.gps-criterion {
    padding: 16px 0;
    border-bottom: 1px solid var(--line-card);
}
.gps-criterion:last-child { border-bottom: 0; padding-bottom: 0; }
.gps-criterion:first-child { padding-top: 0; }
.gps-criterion-name { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.gps-criterion .criterion-description {
    display: block; font-size: 14px; color: var(--ink-support);
    font-weight: 400; margin: 0 0 10px;
}
.gps-criterion .meta { font-size: 13px; color: var(--ink-support); margin: 8px 0 0; }

.gps-criterion-form {
    display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: 12px;
    align-items: start;
}
.gps-criterion-form label { display: grid; gap: 4px; }
.gps-criterion-form label > span { font-size: 13px; color: var(--ink-support); }
.gps-criterion-form select,
.gps-criterion-form textarea { width: 100%; }

.goal-fieldset {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    border: 1px solid var(--line-card); border-radius: var(--radius-card);
    padding: 16px; margin: 0 0 12px;
}
.goal-fieldset label { display: grid; gap: 4px; }
.goal-fieldset label > span { font-size: 13px; color: var(--ink-support); }
.goal-fieldset input, .goal-fieldset textarea { width: 100%; }

.checkbox-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--line-card);
}
.checkbox-row:last-of-type { border-bottom: 0; }
.checkbox-row input { width: auto; margin: 0; }
.checkbox-row .meta { font-size: 13px; color: var(--ink-support); margin-left: auto; }

@media (max-width: 640px) {
    .gps-criterion-form { grid-template-columns: 1fr; }
    .goal-fieldset { grid-template-columns: 1fr; }
}

/*
 |==========================================================================
 | UI-REVISION-R2: the CLEVER standard, on the standalone pages
 |==========================================================================
 | The same rules as the panels' r2-chrome, for the pages that are not inside
 | a panel: sign-in, a letter, the GPS report, the privacy notice. Values are
 | App\Support\Tokens' (docs/CLEVER-ECOSYSTEM-STANDARD.md). The sizes above are a
 | phone's; the block at the end of this file gives a desktop the Budget system's.
 */

/* Secondary: white, grey edge, dark text. It was a black outline, which next to
   the orange read as a second primary. */
.btn-secondary { background: #FFFFFF; color: var(--ink); border: 1px solid var(--line-input); font-weight: 500; }
.btn-secondary:hover { border-color: var(--ink-muted); }

/* Danger: white, red edge, red text. */
.btn-danger { background: #FFFFFF; color: #B42318; border: 1px solid #F1C4C0; font-weight: 500; }
.btn-danger:hover { background: #FDE4E1; border-color: #B42318; }

/* Final approval: solid green. */
.btn-good { background: #1E6B34; color: #FFFFFF; font-weight: 700; }

/* Disabled: grey on grey, never a faded primary. */
.btn-primary[disabled],
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 1; cursor: not-allowed;
    background: #EEEBE6; color: var(--ink-muted); border: 1px solid var(--line);
}

/* Status chips: uppercase on a tint. */
.chip {
    text-transform: uppercase; letter-spacing: .4px; font-weight: 600;
    border-radius: 999px;
}
.chip-ok   { background: #E4F2E8; color: #1E6B34; }
.chip-warn { background: #FFF3D6; color: #8A5A00; }
.chip-bad  { background: #FDE4E1; color: #B42318; }
.chip-idle { background: #EEEBE6; color: #3D3B39; }

/* Tabs: the open one in CI orange, with an orange underline. */
.letter-tab-on { color: var(--brand); border-bottom-color: var(--brand); }
.notice-tabs { gap: 2px; padding: 0; border-bottom-color: var(--line); }
.notice-tabs a { border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.notice-tabs a[aria-current="true"] { background: none; color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* Selected options: CI orange edge on pale orange. */
.city-choice[aria-pressed="true"],
.lang-toggle button[aria-pressed="true"] {
    background: #FFF4E0; color: var(--ink); border-color: var(--brand);
    box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 600;
}

/* Focus: CI orange edge, pale orange ring. */
.field input:focus,
.field select:focus,
.field textarea:focus {
    border: 2px solid var(--brand);
    box-shadow: 0 0 0 4px #FFF4E0;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }

/* The standalone pages' top bar carries the same brand as the panels (R2). */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-tile {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #FFFFFF;
}
.topbar-tile img.mark { height: 30px; }
.topbar-brand { flex: 0 0 auto; }

/* Withdraw, asked twice, on the page (partials/confirm-step). Jeff, 2026-10-22. */
.confirm-step > summary { list-style: none; }
.confirm-step > summary::-webkit-details-marker { display: none; }
.confirm-step[open] > summary { display: none; }
/* Open, it takes the whole row, so the question is not squeezed beside the next button. */
.pair > .confirm-step[open] { grid-column: 1 / -1; }
.confirm-ask {
    display: grid; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--line-input); border-radius: 10px; background: #FAF9F7;
}
.confirm-ask p { margin: 0; font-weight: 600; }
.confirm-ask .inline-form { margin: 0; }
.btn-link-back { background: none; color: var(--ink-muted); font-weight: 500; }
.btn-link-back:hover { color: var(--ink); text-decoration: underline; }

/*
 | A desktop gets the Budget system's sizes. Jeff, 2026-10-22 (REVIEW-TODO 90).
 |
 | Everything above this is a phone's: 15–16px text and nothing to press under
 | 44px, which stays. Wider than 48rem the pointer is a mouse, so the text is
 | 14px, the controls 36px and the labels 12px, as App\Support\Tokens has them
 | for the panels. The values are the same numbers, spelled out, because this
 | file is static and cannot read Tokens::css().
 */
@media (min-width: 48.0625rem) {
    body { font-size: 14px; line-height: 1.45; }

    .btn { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
    /*
     | Except the sign-in page, which keeps the CLEVER login standard at every width.
     | UI-REVISION-R3 step 1: it is Booking's page, and Booking's is HRMS's from before R2
     | (clever-booking docs/ecosystem/LOGIN-STANDARD.md v2.0) — a 56px Google button
     | with a 16px corner, and the language switch at its own size.
     */
    .login-body .btn-google { min-height: 56px; padding: 0 18px; font-size: 16px; border-radius: 16px; }
    .hero .lang-toggle button { height: 38px; min-width: 48px; font-size: 14px; }
    .btn-icon { min-width: 36px; height: 36px; font-size: 14px; border-radius: 8px; }
    .lang-toggle button { height: 30px; min-width: 40px; font-size: 13px; }
    .city-choice { min-height: 36px; font-size: 14px; border-radius: 8px; }
    .letter-tab { min-height: 36px; }

    .field { gap: 6px; }
    .field label { font-size: 12px; }
    .field input,
    .field select { height: 36px; padding: 0 10px; font-size: 14px; border-radius: 8px; }
    .field textarea { padding: 7px 10px; font-size: 14px; border-radius: 8px; }
    .field-prefixed .prefix { font-size: 14px; border-radius: 8px 0 0 8px; }
    .field-prefixed input { border-radius: 0 8px 8px 0; }
    .field-message,
    .field-hint { font-size: 12px; }

    .chip { height: 22px; padding: 0 8px; font-size: 11.5px; }
    .banner { font-size: 13px; }

    .card-title,
    .todo-card .card-title { font-size: 15px; }
    .page-title { font-size: 18px; margin: 24px 0 16px; }
    .form-page-head h1,
    .form-head h2 { font-size: 18px; }
    .identity-name { font-size: 18px; }
    .notice-body h1 { font-size: 18px; }
    .notice-body h2 { font-size: 15px; }
    .notice-body h3 { font-size: 14px; }

    .form-head p,
    .todo-card p,
    .identity-email,
    .detail-rows dt,
    .detail-rows dd,
    .notice-body,
    .notice-body table,
    .agree,
    .agree-row,
    .asset-row,
    .letter-body,
    .band-track,
    .band-note,
    .gps-criterion-name { font-size: 14px; }

    .meta,
    .step-name,
    .progress-label,
    .form-foot .saved,
    .page-foot p,
    .band-code,
    .band-heading,
    .gps-criterion .meta,
    .gps-criterion-form label > span,
    .goal-fieldset label > span,
    .checkbox-row .meta { font-size: 12px; }
}
