/* ============================================================================
   account.css - component layer for the customer account area.

   Loaded ONLY by WtechAccount.Master.  Every rule is scoped under .acct
   except the single #coreContent rule marked below.

   DO NOT edit wtech.css to support this file.  wtech.css is loaded by
   WtechStore.Master (42 store pages) AND maint_loc/Admin.Master (56 admin
   pages, some layering jQuery UI) - 98 pages with no test coverage.  It
   styles bare elements (input, button, hr, p, a), so any change there lands
   on all of them.  The .acct scope below gives us a specificity budget
   (.acct input = 0,1,1 beats wtech.css's `input,...` = 0,0,1) so we can
   restyle elements safely in here and never need !important.
   ============================================================================ */


/* ---------------------------------------------------------------- tokens -- */
:root {
    /* Brand - taken from the live palette, unchanged. */
    --wt-dark: #2c2c2c; /* nav / footer */
    --wt-teal: #00abd3; /* brand accent: borders, focus, hover */
    --wt-cyan: #00ccff; /* hr / highlight */
    --wt-orange: #f97c15; /* link hover */
    --wt-amber: #eb8f00;
    --wt-blue: #1c94c4;

    /* Ink */
    --wt-ink: #333;
    --wt-ink-soft: #63696e;
    --wt-ink-faint: #8a9095;
    --wt-on-dark: #fff;

    /* Surfaces */
    --wt-page: #eee;
    --wt-surface: #fff;
    --wt-surface-alt: #f6f7f8;
    --wt-line: #d8dbde;
    --wt-line-soft: #e8eaec;

    /* ---- Status ------------------------------------------------------------
       Cautionary / destructive states use the COMPANY ORANGE rather than a red.

       Contrast note, because it dictates the split below: #f97c15 on white is
       only 2.65:1 and fails WCAG AA badly, so the brand orange can never be
       small text on a light surface.  It IS used at full strength wherever it
       is a large/graphical element or sits on the dark:
         - #f97c15 on #2c2c2c ............ 5.27:1  (AA)  - button text, icons
         - #2c2c2c on #f97c15 ............ 5.27:1  (AA)  - glyph on orange fill
         - #8f4700 on white .............. 6.84:1  (AAA) - small text only
       So --wt-caution is the accent you see (borders, fills, icons) and
       --wt-caution-ink is the legible text form of the same hue.
       ------------------------------------------------------------------------ */
    --wt-caution: #f97c15; /* the company orange - accents, fills, icons */
    --wt-caution-ink: #8f4700; /* same hue, legible as small text on light */
    --wt-caution-bg: #fff3e6;
    --wt-caution-line: #f9c08a;

    /* "Pending"-class states.  Kept amber and distinct from --wt-caution so a
       Pending badge doesn't read the same as a Returned/Cancelled one now that
       red is gone. */
    --wt-warn: #7a5200;
    --wt-warn-bg: #fdf6df;
    --wt-warn-line: #e6cf8f;

    --wt-ok: #1e6b3a;
    --wt-ok-bg: #e8f5ec;
    --wt-ok-line: #a9d6b9;
    --wt-info: #0b5f78;
    --wt-info-bg: #e9f8fd;
    --wt-info-line: #9fdcee;

    /* Space - 4px base */
    --wt-s1: 4px;
    --wt-s2: 8px;
    --wt-s3: 12px;
    --wt-s4: 16px;
    --wt-s5: 24px;
    --wt-s6: 32px;
    --wt-s7: 48px;

    /* Card padding.  One knob for how airy the "bubbles" feel - every card head,
       body and foot derives from it, so dial this and the whole area follows. */
    --wt-card-pad-y: 14px;
    --wt-card-pad-x: 18px;

    /* Radius */
    --wt-r1: 3px;
    --wt-r2: 6px;
    --wt-r3: 8px;
    --wt-r-pill: 999px;

    /* Elevation */
    --wt-e1: 0 1px 2px rgba(0,0,0,.08);
    --wt-e2: 0 2px 6px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --wt-e3: 0 8px 20px rgba(0,0,0,.14);

    /* Type.  --wt-f-md is the workhorse: body copy, form labels, inputs and every
       data-table cell derive from it, so it is the knob for "the content is too
       small".  The legacy pages ran at 14px; the account area sits a notch above,
       because the values in these tables are the point of the page. */
    --wt-f-xs: 12px;
    --wt-f-sm: 13px;
    --wt-f-md: 15px;
    --wt-f-lg: 17px;
    --wt-f-xl: 22px;
    --wt-f-2xl: 26px;
    --wt-lh: 1.45;
    --wt-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

    /* Layout */
    --wt-acct-max: 1180px;
    --wt-acct-nav-w: 220px;
    --wt-focus: 0 0 0 3px rgba(0,171,211,.40);
}


/* ------------------------------------------------- root + specificity anchor */

/* THE ONE UNSCOPED RULE.  #coreContent lives in WtechStore.Master, outside the
   nested master's reach, so we cannot put a class on it.  This is safe ONLY
   because account.css is loaded solely by WtechAccount.Master.  Do not add a
   second unscoped rule. */
#coreContent {
    max-width: var(--wt-acct-max);
}

/* The whole site centers via `#page_content { text-align:center }` inheritance,
   which is why every legacy page uses <table style="margin:auto"> and then
   fights back with inline text-align:left.  One declaration ends that: an own-
   element declaration always beats an inherited value regardless of the
   specificity of the rule that produced it.  Marketing pages have no .acct
   ancestor and are untouched. */
.acct {
    text-align: left;
    color: var(--wt-ink);
    font-size: var(--wt-f-md);
    line-height: var(--wt-lh);
    padding-bottom: var(--wt-s6);
}

/* No max-width measure cap: it left paragraphs filling only the left 2/3 of
   their card and looking squished (Josh, 2026-07-20).  The shell and cards
   already bound the line length. */
.acct p {
    margin: 0 0 var(--wt-s3) 0;
    padding: 0;
}

    .acct p:last-child {
        margin-bottom: 0;
    }

/* wtech.css paints hr #00ccff at 15px margins; too loud once cards carry the
   visual grouping. */
.acct hr {
    border: 0;
    height: 1px;
    background: var(--wt-line);
    margin: var(--wt-s5) 0;
    clear: none;
}

/* wtech.css has no focus styling at all.  Scoped = free accessibility win. */
.acct :focus-visible {
    outline: 2px solid var(--wt-teal);
    outline-offset: 2px;
}

.acct a {
    color: #0b5fa5; /* #0000ff on #eee is harsh; same family, calmer */
}

    .acct a:hover {
        color: var(--wt-orange);
        text-decoration: underline;
    }

.acct h1, .acct h2, .acct h3, .acct h4 {
    margin: 0;
    padding: 0;
    line-height: 1.25;
}


/* ------------------------------------------------------- shell + page head -- */
.acct-shell {
    display: grid;
    grid-template-columns: var(--wt-acct-nav-w) minmax(0, 1fr);
    gap: var(--wt-s5);
    align-items: start;
}

.acct-main {
    min-width: 0; /* lets tables shrink instead of blowing out the grid */
}

.acct-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--wt-s3);
    justify-content: space-between;
    padding-bottom: var(--wt-s3);
    border-bottom: 2px solid var(--wt-line);
    margin-bottom: var(--wt-s5);
}

.acct-title {
    font-size: var(--wt-f-2xl);
    font-weight: 700;
}

.acct-subtitle {
    font-size: var(--wt-f-md);
    color: var(--wt-ink-soft);
    margin: var(--wt-s1) 0 0;
}

.acct-page-actions {
    display: flex;
    gap: var(--wt-s2);
    margin-left: auto;
}

/* The logged-out gate on Account.aspx: login / create.  There is no sidebar when
   signed out (ShowNav is false), so this is a centred column, not the shell grid. */
.acct-gate {
    max-width: 900px;
    margin: var(--wt-s5) auto var(--wt-s7);
}

.acct-gate-head {
    text-align: center;
    margin-bottom: var(--wt-s5);
}

    .acct-gate-head .acct-subtitle {
        margin-left: auto;
        margin-right: auto;
        max-width: 60ch;
        /* Must be restated here even though the container centers: the subtitle is a
           <p>, and wtech.css declares `p { text-align: left }` directly on the element,
           which beats the INHERITED center.  The <h1> has no such global rule, so it
           centered while the paragraph under it hugged the left of its column - visibly
           askew on every gate page, worst where the subtitle is one short line. */
        text-align: center;
    }

.acct-section-head {
    font-size: var(--wt-f-lg);
    font-weight: 700;
    margin: var(--wt-s6) 0 var(--wt-s3);
}


/* ---------------------------------------------------------------- cards --- */
.acct-card {
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r3);
    box-shadow: var(--wt-e1);
    /* s5, matching .acct-cols' horizontal gap - the tighter s4 made stacked
       pages (PortfolioSettings) read congested next to the 24px column gap. */
    margin: 0 0 var(--wt-s5);
    overflow: hidden; /* clips .acct-table to the radius */
}

.acct-card-head {
    padding: 11px var(--wt-card-pad-x);
    border-bottom: 1px solid var(--wt-line-soft);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--wt-s3);
}

.acct-card-title {
    font-size: var(--wt-f-lg);
    font-weight: 700;
}

.acct-card-sub {
    font-size: var(--wt-f-sm);
    color: var(--wt-ink-soft);
    margin: var(--wt-s1) 0 0;
    flex-basis: 100%;
    max-width: none;
}

.acct-card-tools {
    margin-left: auto;
    display: flex;
    gap: var(--wt-s2);
}

.acct-card-body {
    padding: var(--wt-card-pad-y) var(--wt-card-pad-x);
}

    .acct-card-body > :last-child {
        margin-bottom: 0;
    }

/* Table sits flush inside a card. */
.acct-card-body--flush {
    padding: 0;
}

.acct-card-foot {
    padding: 10px var(--wt-card-pad-x);
    background: var(--wt-surface-alt);
    border-top: 1px solid var(--wt-line-soft);
    display: flex;
    gap: var(--wt-s2);
    align-items: center;
    flex-wrap: wrap;
}

/* Destructive zone - AutoPaySettings "Cancel AutoPay", PortfolioSettings
   "Cancel Hosting". */
.acct-card--danger {
    border-color: var(--wt-caution-line);
}

    .acct-card--danger .acct-card-head {
        background: var(--wt-caution-bg);
        border-bottom-color: var(--wt-caution-line);
    }

    .acct-card--danger .acct-card-title {
        color: var(--wt-caution-ink);
    }

/* Card grid - generalizes PortfolioHostingUserList.aspx:20 (the one real flex
   precedent in the codebase) and AutoPayProcessors' inline-flex .accountbox row. */
.acct-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wt-s4);
    align-items: stretch;
    /* Same rhythm as a card's own bottom margin - the grid's tiles zero theirs,
       so without this the grid sat flush against whatever follows it. */
    margin: 0 0 var(--wt-s5);
}

    .acct-card-grid > .acct-card {
        flex: 1 1 280px;
        margin: 0;
    }

/* Two-column page body - replaces Account.aspx:95 <table><tr><td>|<td>.
   Reflows to one column for free; no media query needed. */
.acct-cols {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wt-s5);
    align-items: flex-start;
}

    .acct-cols > * {
        flex: 1 1 420px;
        min-width: 0;
    }


/* ------------------------------------------------------------ form grid --- */
/* Direct replacement for <tr><td align=right>Label:</td><td><input></td></tr>.
   Label and control are direct grid children - no wrapper, no display:contents
   (which still has assistive-tech bugs). colspan="2" maps to .acct-form-full. */
.acct-form {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--wt-s3) var(--wt-s4);
    align-items: baseline;
    max-width: 620px;
}

.acct-form-label {
    justify-self: end;
    text-align: right;
    color: var(--wt-ink-soft);
    font-size: var(--wt-f-md);
    padding-top: 6px; /* optical align to input text */
}

.acct-form-control {
    min-width: 0;
}

    .acct-form-control > * {
        vertical-align: middle;
    }

/* colspan="2" equivalents */
.acct-form-full {
    grid-column: 1 / -1;
}

.acct-form-sep {
    grid-column: 1 / -1;
    margin: var(--wt-s1) 0;
}

.acct-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: var(--wt-s2);
    align-items: center;
    margin-top: var(--wt-s2);
}

.acct-req {
    color: var(--wt-caution-ink);
    font-weight: 700;
}

.acct-hint {
    display: block;
    font-size: var(--wt-f-sm);
    color: var(--wt-ink-soft);
    margin-top: var(--wt-s1);
}

/* Stacked variant for narrow cards. */
.acct-form--stack {
    grid-template-columns: minmax(0, 1fr);
}

    .acct-form--stack .acct-form-label {
        justify-self: start;
        text-align: left;
        padding-top: 0;
    }

/* Scoped element styling.  This is the big labor saving: ~50 existing
   <input size="20"> tags get styled with ZERO markup change.

   SPECIFICITY: this selector is (0,2,1) - .acct (0,1,0) + input (0,0,1) +
   :not(...) (0,1,0).  :not() takes the specificity of its MOST SPECIFIC
   argument, and a comma list counts once.  Do NOT rewrite this as a chain of
   four separate :not()s - that computes to (0,5,1) and silently kills the
   .is-short / .is-medium modifiers below, which are only (0,2,1). */
.acct input:not([type=checkbox], [type=radio], [type=submit], [type=button]),
.acct select,
.acct textarea {
    width: 100%;
    max-width: 22em;
    box-sizing: border-box;
    font: inherit;
    font-size: var(--wt-f-md);
    color: var(--wt-ink);
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r2);
    padding: 6px var(--wt-s2);
    margin: 0;
    transition: border-color .1s, box-shadow .1s;
}

    .acct input:focus,
    .acct select:focus,
    .acct textarea:focus {
        border-color: var(--wt-teal);
        box-shadow: var(--wt-focus);
        outline: none;
    }

    .acct input[disabled],
    .acct select[disabled] {
        background: var(--wt-surface-alt);
        color: var(--wt-ink-faint);
    }

    .acct input::placeholder {
        color: var(--wt-ink-faint);
    }

.acct select {
    max-width: 16em;
}

/* Width modifiers - CSS beats the legacy size="" attribute.

   These are element-qualified on purpose.  The base field rule above is (0,2,1);
   a bare `.acct .is-short` would only be (0,2,0) and would LOSE to it, doing
   nothing at all.  Qualifying with the element brings these to (0,2,1) and the
   cascade breaks the tie by source order - which is why they must stay BELOW the
   base rule.  Don't move them up. */
.acct input.is-short,
.acct select.is-short,
.acct textarea.is-short {
    max-width: 8em;
}

.acct input.is-medium,
.acct select.is-medium,
.acct textarea.is-medium {
    max-width: 14em;
}

.acct input.is-full,
.acct select.is-full,
.acct textarea.is-full {
    max-width: none;
}

/* Radio / checkbox rows - AutoPaySettings.aspx:22-23, PortfolioSettings:239 */
.acct-check {
    display: flex;
    align-items: flex-start;
    gap: var(--wt-s2);
    padding: var(--wt-s1) 0;
    cursor: pointer;
}

    .acct-check input {
        margin: 3px 0 0;
        flex: 0 0 auto;
    }


/* ---------------------------------------------------------- data tables --- */
.acct-table-wrap {
    overflow-x: auto; /* the whole cheap responsive story for tables */
}

.acct-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--wt-surface);
    font-size: var(--wt-f-md);
    margin: 0;
}

    /* `thead td` covers MyActivations.aspx:29-35, which uses td in the header. */
    .acct-table thead th,
    .acct-table thead td,
    .acct-table .acct-th {
        text-align: left;
        font-size: var(--wt-f-xs);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--wt-ink-soft);
        background: var(--wt-surface-alt);
        border-bottom: 2px solid var(--wt-line);
        padding: var(--wt-s2) var(--wt-s3);
        white-space: nowrap;
    }

    .acct-table td {
        padding: var(--wt-s2) var(--wt-s3);
        border-bottom: 1px solid var(--wt-line-soft);
        vertical-align: top;
    }

    .acct-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .acct-table tbody tr:hover td {
        background: #f2fbfe;
    }

    /* Money / counts.  Replaces ~20 inline style="text-align:right". */
    .acct-table .num,
    .acct-table td.num,
    .acct-table th.num {
        text-align: right;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    .acct-table .acct-td-strong {
        font-weight: 700;
    }

    .acct-table .acct-td-mono {
        font-family: var(--wt-mono);
        font-size: var(--wt-f-xs);
    }

/* Simple single-row-per-record striping. */
.acct-table--zebra tbody tr:nth-child(even) td {
    background: var(--wt-surface-alt);
}

/* Multi-row-per-record striping.  AutoPayStatus emits FOUR <tr> per logical
   payment with a server-side `hrow` bool, so nth-child striping would be wrong
   there.  Have the server emit class="is-alt" instead of an inline style. */
.acct-table tr.is-alt td {
    background: var(--wt-surface-alt);
}

.acct-table tr.is-alt:hover td {
    background: #eaf7fc;
}

/* Sub-row for activity-log rows (AutoPayStatus.aspx:252). */
.acct-table tr.is-sub td {
    font-size: var(--wt-f-sm);
    color: var(--wt-ink-soft);
    border-bottom: 0;
    padding-top: 0;
}

.acct-table tr.is-group-end td {
    border-bottom: 2px solid var(--wt-line);
}

/* Empty state - replaces <em>None of your licenses have been activated.</em> */
.acct-empty {
    padding: var(--wt-s6) var(--wt-s4);
    text-align: center;
    color: var(--wt-ink-soft);
    font-style: normal;
}

/* Keeps .rateTable semantics without touching the global .rateTable rule. */
.acct-table--bordered,
.acct-table--bordered td,
.acct-table--bordered th {
    border: 1px solid var(--wt-line);
}

.acct-table--auto {
    width: auto;
}


/* --------------------------------------------------------------- buttons -- */
/* .btn carries STRUCTURE ONLY.  A variant is always required.  This is the
   deliberate fix for the .button/.button2 split in wtech.css, where .button
   carried all the styling and .button2 carried only a hover shadow - so
   `class="button2"` alone silently did nothing and nobody noticed.  Here,
   `btn` alone is visibly unstyled: you notice immediately. */
.acct .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wt-s2);
    font: inherit;
    font-size: var(--wt-f-md);
    font-weight: 600;
    line-height: 1.2;
    padding: 9px var(--wt-s4);
    border: 1px solid transparent;
    border-radius: var(--wt-r2);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .1s, border-color .1s, box-shadow .1s, color .1s;
    -webkit-appearance: none;
}

    .acct .btn:hover {
        text-decoration: none;
    }

    .acct .btn:active:not([disabled]) {
        transform: translateY(1px);
    }

    /* One explicit disabled look for every variant.  Not opacity: fading the dark
       primary over the light page produced a muddy blue-grey with washed-out
       cyan text.  This is (0,2,1) so it beats the variant rules regardless of
       source order.  ForgotPassword.aspx really does use this state - it swaps
       the button to "Please Wait..." during the post. */
    .acct .btn[disabled] {
        background: var(--wt-surface-alt);
        color: var(--wt-ink-faint);
        border-color: var(--wt-line);
        box-shadow: none;
        cursor: default;
        pointer-events: none;
    }

/* Primary - dark ground, cyan writing.  This is the house button idiom: the
   sibling borrower site already does exactly this (payments.css `button`:
   2px #00ccff border, #00ccff text on #444).  Using the theme's own #2c2c2c
   instead of #444 ties it to the nav bar and reads 7.37:1 (AAA). */
.acct .btn--primary {
    background: var(--wt-dark);
    color: var(--wt-cyan);
    border-color: var(--wt-cyan);
}

    /* Invert on hover - the cyan the eye was already tracking becomes the fill. */
    .acct .btn--primary:hover:not([disabled]) {
        background: var(--wt-cyan);
        color: var(--wt-dark);
        box-shadow: var(--wt-e2);
    }

/* Secondary - the default for bare <button> in the old markup. */
.acct .btn--secondary {
    background: var(--wt-surface);
    color: var(--wt-ink);
    border-color: var(--wt-line);
}

    .acct .btn--secondary:hover:not([disabled]) {
        border-color: var(--wt-teal);
        color: var(--wt-ink);
        box-shadow: var(--wt-e1);
    }

/* Danger - cancel AutoPay, cancel hosting, disable API, deactivate license.
   Deliberately OUTLINED rather than dark-filled like the primary: a destructive
   action should never look as ready-to-press as the main one.  Text is
   --wt-caution-ink (6.84:1) because full #f97c15 on white is only 2.65:1; the
   border carries the brand orange at full strength.  Fills orange on hover. */
.acct .btn--danger {
    background: var(--wt-surface);
    color: var(--wt-caution-ink);
    border-color: var(--wt-caution);
}

    .acct .btn--danger:hover:not([disabled]) {
        background: var(--wt-caution);
        color: var(--wt-dark);
        border-color: var(--wt-caution);
    }

/* Danger, solid - only for the final confirm inside an already-open
   destructive flow.  Dark text on orange = 5.27:1. */
.acct .btn--danger-solid {
    background: var(--wt-caution);
    color: var(--wt-dark);
    border-color: var(--wt-caution);
}

    .acct .btn--danger-solid:hover:not([disabled]) {
        /* #e06a05 only gave the dark text 4.15:1; this holds 4.87:1. */
        background: #ee7810;
        border-color: #ee7810;
        /* Same a:hover leak as the CTA - see the comment there.  Without the pin, an
           anchor-rendered confirm button went orange text on orange fill. */
        color: var(--wt-dark);
    }

/* CTA - the one action that moves a sale forward.  This is the INVERSE of
   .btn--primary: primary is cyan writing on dark, so filling with the cyan makes the
   money button the loudest thing on the page without introducing a new colour.
   Dark on #00ccff is 7.37:1 (AAA), same pair as primary, just swapped.
   Use at most once per page - if everything is a CTA, nothing is. */
.acct .btn--cta {
    background: var(--wt-cyan);
    color: var(--wt-dark);
    border-color: var(--wt-cyan);
    font-size: var(--wt-f-lg);
    font-weight: 700;
    padding: 11px var(--wt-s5);
    box-shadow: var(--wt-e1);
}

    .acct .btn--cta:hover:not([disabled]) {
        /* Slightly DARKER than rest, not lighter - hover reads as press-down, and the
           old #2ad8ff brightened an already-bright button.  Dark text on this: 5.65:1. */
        background: #00b3dd;
        border-color: #00b3dd;
        box-shadow: var(--wt-e2);
        /* MUST be restated in every variant's :hover.  Most of these buttons are
           rendered as <a>, and the global `.acct a:hover` (0,2,1) outranks a variant's
           base rule (0,2,0) - without this pin, anchor CTAs flipped to the link-hover
           orange on the cyan fill, which measured 1.4:1.  <button> CTAs never matched
           a:hover, which is why the bug looked intermittent. */
        color: var(--wt-dark);
    }

    .acct .btn--cta::after {
        content: "\203A"; /* a single guillemet: this button goes onward */
        font-weight: 400;
        font-size: 1.25em;
        line-height: 0;
        margin-left: 2px;
        /* The glyph is drawn low relative to its baseline, so flex-centering the box
           still leaves it a couple of pixels below the label's optical center. */
        position: relative;
        top: -2px;
    }

/* Ghost - inline text actions currently written as bare <a onclick>. */
.acct .btn--ghost {
    background: transparent;
    color: #0b5fa5;
    padding: 4px var(--wt-s2);
    font-weight: 500;
}

    .acct .btn--ghost:hover:not([disabled]) {
        background: var(--wt-surface-alt);
        /* The ink form of the hover orange, not the raw brand orange - #f97c15 on this
           background is only ~2.7:1.  Same hue, readable. */
        color: var(--wt-caution-ink);
    }

/* Sizes */
.acct .btn--sm {
    font-size: var(--wt-f-sm);
    padding: 5px var(--wt-s3);
}

.acct .btn--lg {
    font-size: var(--wt-f-lg);
    padding: 12px var(--wt-s5);
}

.acct .btn--block {
    display: flex;
    width: 100%;
}

.acct .btn-row {
    display: flex;
    gap: var(--wt-s2);
    flex-wrap: wrap;
    align-items: center;
}

.acct .btn-row--end {
    justify-content: flex-end;
}


/* ------------------------------------------------------------ account nav - */
/* Contract: .acct-nav > .acct-nav-group > (.acct-nav-title, .acct-nav-link*)
   Current page marked with .is-current AND aria-current="page".
   Optional trailing .acct-badge.  Optional .acct-nav-link--danger. */
.acct-nav {
    position: sticky;
    top: var(--wt-s4);
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r3);
    box-shadow: var(--wt-e1);
    padding: var(--wt-s3);
    font-size: var(--wt-f-md);
}

.acct-nav-group + .acct-nav-group {
    margin-top: var(--wt-s4);
    padding-top: var(--wt-s3);
    border-top: 1px solid var(--wt-line-soft);
}

.acct-nav-title {
    font-size: var(--wt-f-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--wt-ink-faint);
    padding: 0 var(--wt-s2) var(--wt-s2);
}

.acct-nav-link {
    display: flex;
    align-items: center;
    gap: var(--wt-s2);
    padding: 7px var(--wt-s2);
    margin-bottom: 2px;
    border-radius: var(--wt-r2);
    color: var(--wt-ink);
    text-decoration: none;
    border-left: 3px solid transparent;
}

    .acct-nav-link:hover {
        background: var(--wt-surface-alt);
        color: var(--wt-ink);
        text-decoration: none;
    }

    .acct-nav-link.is-current {
        background: var(--wt-info-bg);
        border-left-color: var(--wt-teal);
        color: var(--wt-ink);
        font-weight: 700;
    }

.acct-nav-link--danger {
    color: var(--wt-caution-ink);
}

.acct-nav-link .acct-badge {
    margin-left: auto;
}

/* Second-level items (AutoPay sub-nav), shown only on the active section. */
.acct-nav-sub {
    margin: 0 0 var(--wt-s2) var(--wt-s3);
    padding-left: var(--wt-s2);
    border-left: 1px solid var(--wt-line-soft);
}

    .acct-nav-sub .acct-nav-link {
        font-size: var(--wt-f-sm);
        padding: 5px var(--wt-s2);
        border-left: 0;
    }


/* ------------------------------------------------- alerts, badges, flash --- */
.acct-alert {
    display: flex;
    gap: var(--wt-s3);
    align-items: flex-start;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: var(--wt-r2);
    padding: var(--wt-s3) var(--wt-s4);
    margin: 0 0 var(--wt-s4);
    font-size: var(--wt-f-md);
    text-align: left;
}

    .acct-alert p:last-child {
        margin-bottom: 0;
    }

.acct-alert-body {
    flex: 1 1 auto;
    min-width: 0;
}

.acct-alert-title {
    font-weight: 700;
    display: block;
    margin-bottom: var(--wt-s1);
}

.acct-alert-actions {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Icon drawn in CSS - no font, no request. */
.acct-alert::before {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: var(--wt-surface);
    margin-top: 1px;
}

.acct-alert--danger {
    color: var(--wt-caution-ink);
    background: var(--wt-caution-bg);
    border-color: var(--wt-caution-line);
    border-left-color: var(--wt-caution); /* full-strength orange carries the signal */
}

    .acct-alert--danger::before {
        content: "!";
        background: var(--wt-caution);
        color: var(--wt-dark); /* dark on orange = 5.27:1; white would be 2.65:1 */
    }

.acct-alert--warn {
    color: var(--wt-warn);
    background: var(--wt-warn-bg);
    border-color: var(--wt-warn-line);
}

    .acct-alert--warn::before {
        content: "!";
        background: var(--wt-warn);
        color: var(--wt-surface);
    }

.acct-alert--ok {
    color: var(--wt-ok);
    background: var(--wt-ok-bg);
    border-color: var(--wt-ok-line);
}

    .acct-alert--ok::before {
        content: "\2713";
        background: var(--wt-ok);
    }

.acct-alert--info {
    color: var(--wt-info);
    background: var(--wt-info-bg);
    border-color: var(--wt-info-line);
}

    .acct-alert--info::before {
        content: "i";
        background: var(--wt-info);
        font-style: italic;
    }

/* Session-expiry banner, injected by session-timer.js a couple of minutes before the
   server session dies.  Fixed to the bottom so it can't be missed but doesn't cover the
   form the customer is probably mid-way through. */
.acct-session-warn {
    position: fixed;
    left: 50%;
    bottom: var(--wt-s4);
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--wt-s4);
    max-width: min(560px, calc(100vw - 32px));
    background: var(--wt-warn-bg);
    color: var(--wt-warn);
    border: 1px solid var(--wt-warn-line);
    border-left: 4px solid var(--wt-warn);
    border-radius: var(--wt-r2);
    padding: var(--wt-s3) var(--wt-s4);
    box-shadow: var(--wt-e3);
    font-size: var(--wt-f-md);
}

.acct-session-warn-msg {
    flex: 1 1 auto;
}

/* The "Saved" flash. */
.acct-flash {
    display: inline-block;
    margin-left: var(--wt-s2);
    font-size: var(--wt-f-sm);
    font-weight: 700;
    color: var(--wt-ok);
    background: var(--wt-ok-bg);
    border: 1px solid var(--wt-ok-line);
    border-radius: var(--wt-r-pill);
    padding: 1px var(--wt-s2);
}

/* Badges - order status, payment status, activation state, nav counts. */
.acct-badge {
    display: inline-block;
    font-size: var(--wt-f-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.6;
    padding: 0 var(--wt-s2);
    border: 1px solid;
    border-radius: var(--wt-r-pill);
    white-space: nowrap;
    vertical-align: 1px;
}

.acct-badge--ok {
    color: var(--wt-ok);
    background: var(--wt-ok-bg);
    border-color: var(--wt-ok-line);
}

.acct-badge--warn {
    color: var(--wt-warn);
    background: var(--wt-warn-bg);
    border-color: var(--wt-warn-line);
}

.acct-badge--danger {
    color: var(--wt-caution-ink);
    background: var(--wt-caution-bg);
    border-color: var(--wt-caution);
}

.acct-badge--info {
    color: var(--wt-info);
    background: var(--wt-info-bg);
    border-color: var(--wt-info-line);
}

.acct-badge--neutral {
    color: var(--wt-ink-soft);
    background: var(--wt-surface-alt);
    border-color: var(--wt-line);
}


/* --------------------------------------------------- definition + stats --- */
.acct-dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--wt-s2) var(--wt-s4);
    margin: 0;
}

    .acct-dl dt {
        color: var(--wt-ink-soft);
        justify-self: end;
        text-align: right;
        font-size: var(--wt-f-md);
    }

    .acct-dl dd {
        margin: 0;
        font-weight: 600;
        min-width: 0;
    }

.acct-dl--wide dt {
    min-width: 11em;
}

/* Stacked variant: the term is a step title sitting above its description rather
   than a right-aligned label beside it.  For sequences whose titles are full
   sentences - side-by-side, the max-content label column would take half the
   card.  Titles carry the weight here, so descriptions drop to normal. */
.acct-dl--stack {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

    .acct-dl--stack dt {
        justify-self: start;
        text-align: left;
        font-weight: 600;
        color: var(--wt-ink);
    }

    .acct-dl--stack dd {
        font-weight: 400;
        margin: var(--wt-s1) 0 var(--wt-s4);
    }

        .acct-dl--stack dd:last-child {
            margin-bottom: 0;
        }

.acct-dl .acct-dl-sep {
    grid-column: 1 / -1;
    border: 0;
    border-top: 1px solid var(--wt-line-soft);
    margin: var(--wt-s1) 0;
}

.acct-dl--money dd {
    font-variant-numeric: tabular-nums;
}

/* Value-over-label stat.  Replaces .accountbox + .tinylabel. */
.acct-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wt-s5);
}

.acct-stat {
    min-width: 0;
}

.acct-stat-value {
    display: block;
    font-size: var(--wt-f-xl);
    font-weight: 700;
    color: var(--wt-ink);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.acct-stat-label {
    display: block;
    font-size: var(--wt-f-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--wt-ink-faint);
    margin-top: 2px;
}

/* Click-to-copy field (PortfolioSettings host/port, API URL).
   NOTE: clipboard() in PortfolioSettings.aspx sets and then clears an INLINE
   background-color.  Clearing it to "" restores this rule's background, so
   this is safe - but the flash colour is hardcoded in that JS and cannot read
   a token.  Leave it. */
.acct-copy {
    display: inline-flex;
    align-items: center;
    gap: var(--wt-s2);
    font-family: var(--wt-mono);
    font-size: var(--wt-f-md);
    background: var(--wt-surface-alt);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r2);
    padding: 6px var(--wt-s3);
    cursor: pointer;
    transition: background-color .15s, border-color .1s;
}

    .acct-copy:hover {
        border-color: var(--wt-teal);
        background: var(--wt-info-bg);
    }

    .acct-copy::after {
        content: "copy";
        font-family: inherit;
        font-size: var(--wt-f-xs);
        color: var(--wt-ink-faint);
        text-transform: uppercase;
        letter-spacing: .05em;
    }

/* Pre-formatted legal text (AutoPayLenderBank's authorisation wording, which the
   code-behind emits with its own line breaks).  It was an inline
   font-family: Courier New on a <p>, which collapsed those breaks. */
.acct-contract {
    font-family: var(--wt-mono);
    font-size: var(--wt-f-sm);
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: var(--wt-surface-alt);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r2);
    padding: var(--wt-s3) var(--wt-s4);
    margin: 0 0 var(--wt-s4);
    max-height: 320px;
    overflow-y: auto;
}

/* Bank-account card - AutoPaySettings duplicates this inline, twice. */
.acct-bank {
    display: inline-block;
    text-align: left;
    background: var(--wt-surface);
    border: 1px solid var(--wt-line);
    border-radius: var(--wt-r2);
    padding: var(--wt-s3) var(--wt-s5);
    margin: var(--wt-s2) 0;
    box-shadow: var(--wt-e1);
    font-size: var(--wt-f-md);
}

.acct-bank-micr {
    font-family: var(--wt-mono);
    letter-spacing: .05em;
}

.acct-bank-note {
    font-size: var(--wt-f-sm);
    color: var(--wt-ink-soft);
    margin-bottom: var(--wt-s2);
}


/* ------------------------------------------------------- help glyph (FA) --- */
/* FontAwesome is NOT loaded and should not be.  All 11 `fas fa-question-circle`
   references (PortfolioSettings.aspx, PortfolioHostingSignup.aspx) are the SAME
   glyph, always a help marker whose parent <span> carries a working native
   title="".  Today they render as nothing.  Loading a 30-75KB icon font for one
   glyph is a bad trade; draw it instead.  Zero markup changes, zero requests.
   Scoped to .acct so this can never collide if FA is ever loaded for real. */
.acct .fa-question-circle,
.acct .acct-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--wt-ink-faint);
    color: var(--wt-surface);
    font: 700 11px/1 Arial, sans-serif;
    font-style: normal; /* the markup is <i>, which would italicise */
    cursor: help;
    vertical-align: 1px;
    user-select: none;
    transition: background-color .1s;
}

    .acct .fa-question-circle::before,
    .acct .acct-help::before {
        content: "?";
    }

    .acct .fa-question-circle:hover,
    .acct .acct-help:hover {
        background: var(--wt-dark);
    }

/* data-toggle="tooltip" is a Bootstrap hook and Bootstrap is never loaded, so
   it does nothing; the native title is what shows.  Harmless - just make the
   whole thing a hover target. */
.acct [data-toggle="tooltip"] {
    cursor: help;
}


/* ------------------------------------------------------------ utilities --- */
/* Deliberately ~12.  The ~287 inline styles are a VOCABULARY problem, not a
   syntax one - a utility framework would faithfully translate all 287 into 287
   class attributes and change nothing.  The components above collapse them to a
   dozen names because they carry intent.  Reaching for a utility should feel
   slightly like giving up.

   There is deliberately NO .u-hidden.  `display:none` on this site is toggled
   by jQuery .show()/.hide()/.toggle(), which writes an inline style; a
   .u-hidden{display:none !important} would beat it and silently break every
   toggle in the account area.  Leave style="display:none" exactly where it is. */
.acct .u-left {
    text-align: left;
}

.acct .u-center {
    text-align: center;
}

.acct .u-right {
    text-align: right;
}

.acct .u-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.acct .u-muted {
    color: var(--wt-ink-soft);
}

.acct .u-small {
    font-size: var(--wt-f-sm);
}

.acct .u-strong {
    font-weight: 700;
}

.acct .u-nowrap {
    white-space: nowrap;
}

.acct .u-mt0 {
    margin-top: 0;
}

.acct .u-mb0 {
    margin-bottom: 0;
}

.acct .u-mt4 {
    margin-top: var(--wt-s4);
}

.acct .u-mb4 {
    margin-bottom: var(--wt-s4);
}

.acct .u-mt6 {
    margin-top: var(--wt-s6);
}

.acct .u-stack > * + * {
    margin-top: var(--wt-s3);
}


/* ----------------------------------------------------------- responsive --- */
/* Desktop-first; ~98% of use is desktop.  This is the whole responsive budget:
   one gutter, one shell collapse, one form collapse.  Plus flex-wrap on
   .acct-cols/.acct-card-grid and overflow-x on .acct-table-wrap, which cost
   nothing and are already above.  No mobile drawer, no hamburger. */
@media (max-width: 1220px) {
    #coreContent {
        max-width: none;
        margin-left: var(--wt-s4);
        margin-right: var(--wt-s4);
    }
}

@media (max-width: 900px) {
    .acct-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .acct-nav {
        position: static;
    }

    .acct-nav-group {
        display: flex;
        flex-wrap: wrap;
        gap: var(--wt-s1);
        align-items: center;
    }

        .acct-nav-group + .acct-nav-group {
            margin-top: var(--wt-s2);
            padding-top: var(--wt-s2);
        }

    .acct-nav-title {
        flex-basis: 100%;
        padding-bottom: var(--wt-s1);
    }

    .acct-nav-link {
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

        .acct-nav-link.is-current {
            border-left: 0;
            border-bottom-color: var(--wt-teal);
        }

    .acct-nav-sub {
        flex-basis: 100%;
        margin-left: 0;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .acct-form {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--wt-s3);
    }

    .acct-form-label {
        justify-self: start;
        text-align: left;
        padding-top: 0;
        font-weight: 600;
    }

    .acct-dl {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--wt-s1) 0;
    }

        .acct-dl dt {
            justify-self: start;
            text-align: left;
        }

        .acct-dl dd {
            margin-bottom: var(--wt-s2);
        }

    .acct-card-body,
    .acct-card-head,
    .acct-card-foot {
        padding-left: var(--wt-s4);
        padding-right: var(--wt-s4);
    }

    .acct-title {
        font-size: var(--wt-f-xl);
    }
}

@media print {
    .acct-nav {
        display: none;
    }

    .acct-shell {
        grid-template-columns: 1fr;
    }

    .acct-card {
        box-shadow: none;
        break-inside: avoid;
    }
}
