/* portal.css: layout and components, built on the tokens in brand.css. */
:root {
  --bg: var(--sc-page-bg);
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --ink: var(--sc-ink);
  --ink-2: var(--sc-ink-2);
  --heading: var(--sc-navy);
  --line: #e1e1e1;
  --focus: #1478c8;
  --good: #1b7148; --good-bg: #e3f3ea;
  --warn: #875000; --warn-bg: #fcefd6;
  --bad: #b3261e;  --bad-bg: #fbe7e6;
  --info: var(--sc-navy); --info-bg: #e8eef8;
  --link: var(--sc-link);
  /* Buttons and selected-state controls. Solid fills so they read on any surface. */
  --btn-primary-bg: var(--sc-accent); --btn-primary-hover: var(--sc-accent-hover); --btn-primary-fg: var(--sc-accent-ink);
  --btn-secondary-bg: var(--sc-blue); --btn-secondary-hover: #2c6298; --btn-secondary-fg: #ffffff;
  --ui-accent: var(--sc-navy);
  --card-border: var(--sc-card-border);
  --input-border: #8a8a8a;   /* 3.4:1 against white, so fields are visible */
  /* Top strip, account bar and the phone menu (website colours in light mode) */
  --bar-accent: var(--sc-navy); --bar-link: #444444; --bar-muted: #555555;
  --bar-btn-bg: var(--sc-navy); --bar-btn-hover: var(--sc-navy-hover); --bar-btn-fg: #ffffff;
  --menu-bg: #ffffff; --menu-fg: var(--sc-ink-2);
  --subheading: var(--sc-blue);
  --wrap: 1080px;            /* Divi row width on softcom.net */
  --gap: clamp(16px, 3vw, 28px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1622; --surface: #172131; --surface-2: #1c2839; --ink: #e6ebf2; --ink-2: #a8b3c2; --heading: #a9c6ff; --line: #2a3748;
    --good: #72d3a1; --good-bg: #143325; --warn: #f1c46e; --warn-bg: #362a12; --bad: #ff8f86; --bad-bg: #3b1917;
    --info: #a9c6ff; --info-bg: #17243a; --link: #8fb8ff; --focus: #8fb8ff; color-scheme: dark;
    --btn-primary-bg: #8fb8ff; --btn-primary-hover: #b3cfff; --btn-primary-fg: #0b1422;
    --btn-secondary-bg: #3875b2; --btn-secondary-hover: #2c6298; --btn-secondary-fg: #ffffff;
    --ui-accent: #8fb8ff; --card-border: #34445a; --input-border: #6b7b92;
    --sc-topbar-bg: #0a0f18; --sc-topbar-fg: #c3cbd6; --sc-band-bg: #1a2433; --sc-band-fg: #e6ebf2;
    --bar-accent: #a9c6ff; --bar-link: #d3dae4; --bar-muted: #a8b3c2;
    --bar-btn-bg: #8fb8ff; --bar-btn-hover: #b3cfff; --bar-btn-fg: #0b1422;
    --menu-bg: #172131; --menu-fg: #e6ebf2; --subheading: #8fb8ff;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1622; --surface: #172131; --surface-2: #1c2839; --ink: #e6ebf2; --ink-2: #a8b3c2; --heading: #a9c6ff; --line: #2a3748;
  --good: #72d3a1; --good-bg: #143325; --warn: #f1c46e; --warn-bg: #362a12; --bad: #ff8f86; --bad-bg: #3b1917;
  --info: #a9c6ff; --info-bg: #17243a; --link: #8fb8ff; --focus: #8fb8ff; color-scheme: dark;
    --btn-primary-bg: #8fb8ff; --btn-primary-hover: #b3cfff; --btn-primary-fg: #0b1422;
    --btn-secondary-bg: #3875b2; --btn-secondary-hover: #2c6298; --btn-secondary-fg: #ffffff;
    --ui-accent: #8fb8ff; --card-border: #34445a; --input-border: #6b7b92;
    --sc-topbar-bg: #0a0f18; --sc-topbar-fg: #c3cbd6; --sc-band-bg: #1a2433; --sc-band-fg: #e6ebf2;
    --bar-accent: #a9c6ff; --bar-link: #d3dae4; --bar-muted: #a8b3c2;
    --bar-btn-bg: #8fb8ff; --bar-btn-hover: #b3cfff; --bar-btn-fg: #0b1422;
    --menu-bg: #172131; --menu-fg: #e6ebf2; --subheading: #8fb8ff;
}

:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
*, *::before, *::after { box-sizing: border-box; } /* not inherit: <details> content inherits through a built-in wrapper */
html { background: var(--sc-topbar-bg); scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font-family: var(--sc-font-body); font-size: 1rem; font-weight: 400; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
p a, .field__hint a, .alert a, .auth__help a, .fine-print a { text-decoration: underline; text-underline-offset: 0.16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--sc-font-display); line-height: 1.2; margin: 0 0 0.5em; }
h1 { color: var(--heading); font-size: clamp(2rem, 1.45rem + 1.7vw, 2.6rem); font-weight: 600; line-height: 1.1; }
h2 { color: var(--ink); font-size: 1.25rem; font-weight: 700; }
h3 { color: var(--ink); font-size: 1rem; font-weight: 700; }
strong { color: var(--ink); font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--surface); color: var(--ink); padding: 10px 14px; }
.skip-link:focus { top: 12px; }
.dev-banner { margin: 0; padding: 6px 12px; background: #fff1c2; color: #4d3a00; font-size: 0.8125rem; text-align: center; }

/* Top bar: white, grey links on the left, as on softcom.net */
.topbar { background: var(--sc-topbar-bg); color: var(--sc-topbar-fg); font-size: 0.875rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; }
.topbar p { margin: 0; }
.topbar a { color: inherit; white-space: nowrap; text-decoration: none; }
.topbar a:hover { color: var(--bar-accent); text-decoration: none; }
.topbar__links { display: flex; gap: 18px; text-transform: uppercase; }
.topbar__links a[aria-current] { color: var(--bar-accent); font-weight: 600; }
@media (max-width: 480px) { .topbar__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* Header: the site's blue gradient, white logo, 14px nav */
.site-header { background: var(--sc-header-bg); background-image: var(--sc-header-gradient); color: var(--sc-header-fg); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; }
.site-header__brand { display: inline-flex; align-items: center; color: inherit; }
.site-header__brand img { width: 225px; height: auto; display: block; }
.wordmark { font-weight: 700; font-size: 1.7rem; letter-spacing: 0.08em; color: var(--sc-header-fg); }
.site-nav ul, .site-nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.site-nav ul { display: flex; gap: 22px; }
.site-nav a { display: block; padding: 8px 0; color: var(--sc-header-fg); font-size: 0.875rem; }
.site-nav a:hover { opacity: 0.7; text-decoration: none; }
.site-nav-mobile { display: none; position: relative; }
.site-nav-mobile summary { cursor: pointer; list-style: none; padding: 8px 14px; border: 1px solid rgb(255 255 255 / 0.5); border-radius: var(--sc-button-radius); font-size: 0.875rem; font-weight: 600; }
.site-nav-mobile summary::-webkit-details-marker { display: none; }
.site-nav-mobile ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--menu-bg); border-top: 3px solid var(--bar-accent); padding: 6px 0; z-index: 20; box-shadow: var(--sc-card-shadow); }
.site-nav-mobile a { display: block; padding: 10px 18px; color: var(--menu-fg); }
@media (max-width: 920px) { .site-nav { display: none; } .site-nav-mobile { display: block; } .site-header__inner { min-height: 84px; } .site-header__brand img { width: 180px; } }

/* Account bar: sits where the site's grey announcement band is */
.account-bar { background: var(--sc-band-bg); color: var(--sc-band-fg); }
.account-bar__inner { display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; min-height: 58px; }
.account-bar__who { margin: 0; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; padding-block: 8px; }
.account-bar__name { font-weight: 700; color: var(--sc-band-fg); }
.account-bar__id { font-size: 0.8125rem; color: var(--bar-muted); }
.account-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.account-nav a { padding: 18px 12px 15px; color: var(--bar-link); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.account-nav a:hover { color: var(--bar-accent); text-decoration: none; }
.account-nav a[aria-current] { color: var(--bar-accent); border-bottom-color: var(--bar-accent); }
.account-bar__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; padding-block: 8px; }
.account-bar .link-button { color: var(--bar-accent); }
@media (max-width: 780px) {
  .account-bar__inner { column-gap: 12px; }
  .account-bar__actions { gap: 12px; }
  .account-nav { order: 3; flex-basis: 100%; margin-inline: -12px; }
  .account-nav a { padding: 10px 12px 9px; }
}
@media (max-width: 480px) { .account-bar__actions .button { display: none; } }

/* Page scaffolding */
.main { padding-block: clamp(26px, 4vw, 44px) clamp(48px, 7vw, 80px); }
.page-head { margin-bottom: 26px; }
.page-head__meta { color: var(--ink-2); margin: 0; }
.page-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb { margin: 0 0 8px; font-size: 0.9375rem; }
.lede { color: var(--ink-2); }
.empty { color: var(--ink-2); margin: 6px 0 0; }
.optional { font-weight: 400; color: var(--ink-2); }

/* Amount due: built like the site's plan cards (navy title strip over a white card) */
.balance { background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--sc-card-shadow); border-radius: var(--sc-radius); margin-bottom: 28px; }
.balance__label { margin: 0; padding: 12px clamp(20px, 3vw, 30px); background: var(--sc-navy); color: #ffffff; font-size: 1.375rem; font-weight: 700; }
.balance__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px 40px; padding: clamp(22px, 3vw, 32px) clamp(20px, 3vw, 30px); }
.balance__amount { color: var(--heading); font-size: clamp(2.8rem, 1.8rem + 4vw, 4.4rem); font-weight: 600; line-height: 1; letter-spacing: -0.02em; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.balance__note { margin: 0; max-width: 56ch; }
.balance__actions { display: flex; flex-direction: column; gap: 10px; min-width: 230px; }
@media (max-width: 640px) { .balance__body { grid-template-columns: 1fr; } .balance__actions { min-width: 0; } }

/* Panels and lists */
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; margin-bottom: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 12px rgba(0, 0, 0, 0.05); border-radius: var(--sc-radius); padding: clamp(18px, 3vw, 26px); margin-bottom: 20px; }
.columns .panel { margin-bottom: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.panel__head h2 { margin: 0; }
.panel--row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.panel--row h2 { margin-bottom: 4px; }
.panel--row p { margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows__item:first-child { border-top: 0; }
.rows__link { display: flex; flex-direction: column; min-width: 0; }
.rows__link:hover { text-decoration: none; }
.rows__main { font-weight: 600; color: var(--link); }
.rows__link:hover .rows__main { text-decoration: underline; }
.rows__sub { font-size: 0.875rem; color: var(--ink-2); }
.rows__amount { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 12px rgba(0, 0, 0, 0.05); }
.table-wrap--flush { border: 0; box-shadow: none; background: transparent; }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; font-size: 0.8125rem; font-weight: 700; color: var(--ink); background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td a { font-weight: 600; }
.data-table .num { text-align: right; }
.cell-sub { display: block; font-size: 0.8125rem; color: var(--ink-2); }
@media (max-width: 640px) {
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack td { display: block; }
  .data-table--stack tr { padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .data-table--stack tbody tr:last-child { border-bottom: 0; }
  .data-table--stack td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .data-table--stack td::before { content: attr(data-label); font-weight: 600; color: var(--ink); text-align: left; }
}
.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.badge--paid, .badge--successful { background: var(--good-bg); color: var(--good); }
.badge--open, .badge--partial { background: var(--warn-bg); color: var(--warn); }
.badge--declined, .badge--failed, .badge--unreadable { background: var(--bad-bg); color: var(--bad); }
.segmented { display: inline-flex; border: 1px solid var(--ui-accent); border-radius: var(--sc-button-radius); overflow: hidden; margin-bottom: 18px; background: var(--surface); }
.segmented a { padding: 8px 16px; color: var(--ui-accent); font-weight: 600; font-size: 0.9375rem; }
.segmented a:hover { text-decoration: none; background: var(--info-bg); }
.segmented a + a { border-left: 1px solid var(--ui-accent); }
.segmented a[aria-current] { background: var(--ui-accent); color: var(--surface); }
.totals, .facts { margin: 18px 0 0 auto; max-width: 340px; }
.facts { margin: 0 0 22px; max-width: 420px; }
.totals div, .facts div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.totals dt, .facts dt { color: var(--ink-2); }
.totals dd, .facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.totals__strong { border-top: 1px solid var(--line); font-weight: 700; }
.totals__strong dt { color: var(--ink); }

/* Alerts */
.alert { padding: 12px 16px; margin: 0 0 20px; border-left: 4px solid currentColor; }
.alert--success { background: var(--good-bg); color: var(--good); }
.alert--error { background: var(--bad-bg); color: var(--bad); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }
.alert--info { background: var(--info-bg); color: var(--info); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: var(--sc-button-radius); border: 2px solid transparent; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; text-align: center; }
.button:hover { text-decoration: none; }
.button--accent { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.button--accent:hover { background: var(--btn-primary-hover); }
.button--secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-fg); }
.button--secondary:hover { background: var(--btn-secondary-hover); }
/* Account bar button: navy on the light band, light blue on the dark one. */
.account-bar .button--accent { background: var(--bar-btn-bg); color: var(--bar-btn-fg); }
.account-bar .button--accent:hover { background: var(--bar-btn-hover); }
.button--large { min-height: 52px; padding-inline: 30px; font-size: 1.0625rem; }
.button--small { min-height: 38px; padding: 6px 16px; font-size: 0.9375rem; }
.button--block { width: 100%; }
.button[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.inline-form { display: inline; margin: 0; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (prefers-reduced-motion: no-preference) { .button { transition: background-color 0.15s, border-color 0.15s; } }

/* Forms */
.form { display: grid; gap: 16px; }
.form > .button:not(.button--block) { justify-self: start; }
.form--narrow { max-width: 420px; }
.form--inline { grid-template-columns: minmax(0, 420px) auto; align-items: end; justify-content: start; }
@media (max-width: 640px) { .form--inline { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 600; color: var(--ink); }
.field__hint { font-size: 0.875rem; color: var(--ink-2); margin: 0; }
.field__error { font-size: 0.875rem; color: var(--bad); margin: 0; font-weight: 600; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input:not([type]), select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: var(--sc-button-radius);
  background: var(--surface); color: var(--ink); font: inherit;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.25rem; color: var(--ink); padding: 0; margin-bottom: 12px; }

/* Sign in */
.auth { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(24px, 6vw, 72px); align-items: start; }
.auth__card { background: var(--surface); border: 1px solid var(--card-border); box-shadow: var(--sc-card-shadow); padding: clamp(22px, 4vw, 38px); }
.auth__card h1 { font-size: clamp(1.7rem, 1.35rem + 1vw, 2.1rem); }
.auth__help { margin: 18px 0 0; font-size: 0.9375rem; }
.auth__aside { padding-top: 14px; max-width: 46ch; }
.auth__aside h2 { color: var(--subheading); font-weight: 400; font-size: 1.375rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } }

/* Payment */
.pay-form { max-width: 760px; }
.pay-step + .pay-step { margin-top: 30px; }
.pick-list { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.pick-list li + li { border-top: 1px solid var(--line); }
.pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; }
.pick input, .choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ui-accent); }
.pick__main, .choice__main { display: flex; flex-direction: column; font-weight: 600; color: var(--ink); }
.pick__sub, .choice__sub { font-weight: 400; font-size: 0.875rem; color: var(--ink-2); }
.pick__amount { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.field--amount { max-width: 260px; }
.field--narrow { max-width: 160px; }
.money-input { display: flex; align-items: center; border: 1px solid var(--input-border); border-radius: var(--sc-button-radius); background: var(--surface); padding-left: 12px; font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.money-input input { border: 0; min-height: 50px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 6px; }
.money-input:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.money-input input:focus-visible { outline: none; }
.choices { display: grid; gap: 10px; margin-bottom: 14px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ui-accent); box-shadow: inset 0 0 0 1px var(--ui-accent); }
.method-panel { display: grid; gap: 14px; border-left: 3px solid var(--ui-accent); padding: 6px 0 10px 18px; margin: 2px 0 6px 10px; }
@supports selector(:has(*)) {
  .method-panel { display: none; }
  .pay-form:has(#method-onfile:checked) .method-panel--onfile,
  .pay-form:has(#method-card:checked) .method-panel--card { display: grid; }
}
.billing-address { display: grid; gap: 14px; }
.billing-address legend { margin-bottom: 4px; }
.pay-submit { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.fine-print { font-size: 0.875rem; color: var(--ink-2); margin: 12px 0 0; }
.receipt { text-align: center; max-width: 580px; margin-inline: auto; padding-block: clamp(28px, 5vw, 48px); }
/* The reference on the "Something went wrong" page: easy to read out over the phone, and to copy. */
.error-ref { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 10px 0 0; padding: 10px 22px; border: 1px dashed var(--card-border); background: var(--surface-2); }
.error-ref__label { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.error-ref__code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.1em; color: var(--heading); user-select: all; }
.error-ref + .fine-print { margin: 8px 0 26px; }
.receipt__amount { color: var(--heading); font-size: 2.8rem; font-weight: 600; margin: 0 0 10px; font-variant-numeric: tabular-nums; }

/* Account settings */
.settings .panel { scroll-margin-top: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.address-card { border: 1px solid var(--line); padding: 16px; background: var(--surface-2); }
.address-card h3 { margin-bottom: 6px; }
.address-card address { font-style: normal; color: var(--ink-2); }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 600; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ui-accent); }
.check .field__hint { display: block; font-weight: 400; margin-top: 2px; }
details.edit summary { cursor: pointer; color: var(--link); font-weight: 600; margin-top: 10px; }
details.edit[open] summary { margin-bottom: 14px; }

/* Footer: the site's three columns, #353535 over a #10121a bottom bar */
.site-footer { background: var(--sc-footer-bg); color: var(--sc-footer-fg); font-size: 0.9375rem; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px 40px; padding-block: 44px 36px; }
.site-footer h2 { color: var(--sc-footer-heading); font-size: 1.25rem; font-weight: 400; margin: 0 0 10px; }
.site-footer section + section, .site-footer__col > * + h2 { margin-top: 26px; }
.site-footer ul { margin: 0; padding-left: 1.1em; list-style: disc; display: grid; gap: 4px; }
/* Round bullets like softcom.net's footer: white under Popular pages, gray elsewhere */
.site-footer li::marker { color: #9a9a9a; }
.site-footer__col:first-child > ul:first-of-type li::marker { color: #fff; }
.site-footer a { color: var(--sc-footer-link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; margin-bottom: 8px; }
.site-footer address strong { color: var(--sc-footer-link); }
.site-footer a[href^="tel:"], .nowrap { white-space: nowrap; }
.site-footer p { margin: 0 0 6px; }
.site-footer__logo { display: inline-block; }
.site-footer__logo img { display: block; width: 179px; height: auto; }
.site-footer__badge { display: inline-block; margin-top: 22px; }
.site-footer__badge img { display: block; width: 179px; height: auto; }
.site-footer ul.social-icons { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social-icons img { display: block; width: 32px; height: 32px; }
.social-icons a:focus-visible, .site-footer__badge:focus-visible, .site-footer__logo:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.site-footer__member { display: block; width: 160px; height: auto; }
.site-footer__bottom { background: var(--sc-footer-bottom-bg); color: var(--sc-footer-bottom-fg); font-size: 0.8125rem; }
.site-footer__bottom .wrap { padding-block: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; }
.site-footer__bottom p { margin: 0; }
/* The portal's version, on the right (for support and debugging) */
.site-footer__bottom .site-footer__version { margin-left: auto; font-variant-numeric: tabular-nums; }

@media print {
  .topbar, .site-header, .account-bar, .site-footer, .dev-banner, .page-head__actions, .skip-link, .breadcrumb { display: none !important; }
  html, body { background: #fff; color: #000; }
  .panel, .table-wrap { border: 0; padding: 0; box-shadow: none; }
}

/* On-hold notice (critical): full width under the account bar, on every signed-in page */
.hold-banner { background: var(--bad-bg); color: var(--bad); border-bottom: 3px solid var(--bad); }
.hold-banner__inner { padding-top: 14px; padding-bottom: 14px; }
.hold-banner p { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--bad); }
.hold-banner strong { font-weight: 700; }
.hold-banner a { color: inherit; font-weight: 700; text-decoration: underline; }

/* Internet plan on the overview */
.plan__list { list-style: none; margin: 6px 0 12px; padding: 0; display: grid; gap: 14px; }
.plan__speeds { margin: 0; font-size: 1.15rem; color: var(--ink); }
.plan__speeds strong { font-size: 1.5rem; font-weight: 700; color: var(--heading); }
.plan__speeds abbr { text-decoration: none; }

/* A note that must be read before submitting (card form) */
.callout { background: var(--info-bg); color: var(--ink); border-left: 4px solid var(--ui-accent); padding: 12px 14px; }
.callout p { margin: 0 0 6px; }
.callout p:last-child { margin-bottom: 0; }

.alert__title { font-weight: 700; margin: 0 0 4px; }
.alert > p { margin: 0; }
.alert > p.alert__action { margin-top: 10px; }

/* Past-due notice (warning): every signed-in page while any invoice is past due */
.pastdue-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 3px solid var(--warn); }
.pastdue-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.pastdue-banner p { margin: 0; flex: 1 1 520px; font-size: 1.0625rem; line-height: 1.55; color: var(--warn); }
.pastdue-banner strong { font-weight: 700; }
.pastdue-banner p a { color: inherit; font-weight: 700; text-decoration: underline; }
.pastdue-banner__action { flex: 0 0 auto; }
/* Card autopay: the card on file has expired (warning), or expires within 60 days (information) */
.card-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 3px solid var(--warn); }
.card-banner--soon { background: var(--info-bg); color: var(--info); border-bottom-color: var(--info); }
.card-banner__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.card-banner p { margin: 0; flex: 1 1 520px; font-size: 1.0625rem; line-height: 1.55; color: inherit; }
.card-banner strong { font-weight: 700; }
.card-banner__action { flex: 0 0 auto; }
.pay-expired { margin: 0 0 12px; color: var(--ink); }
.page-head__meta + .page-head__meta { margin-top: 2px; }
a[href^="tel:"] { white-space: nowrap; } /* never split a phone number across lines */

/* Router setup and credentials in the services box */
.plan__detail { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.plan__setup { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.plan__setup-title { font-size: 1.0625rem; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.plan__setup .field__hint { margin-top: 8px; }
.plan__setup .plan__detail { margin: 0; }
.creds { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 16px; margin: 8px 0 0; align-items: baseline; }
.creds div { display: contents; }
.creds dt { font-weight: 600; color: var(--ink-2); padding-top: 2px; }
.creds dd { margin: 0; }
.creds code, .plan__detail code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; background: var(--surface-2); color: var(--ink); padding: 2px 7px; border-radius: 3px; overflow-wrap: anywhere; }
details.reveal summary { cursor: pointer; color: var(--link); font-weight: 600; width: fit-content; }
details.reveal[open] summary { margin-bottom: 6px; }
/* PPPoE credentials: each label on its own line, its value indented beneath it */
.creds--stacked { display: block; margin: 12px 0 0; }
.creds--stacked div { display: block; }
.creds--stacked div + div { margin-top: 12px; }
.creds--stacked dt { padding-top: 0; }
.creds--stacked dd { margin: 4px 0 0 1.5rem; }
/* "Click to show" is a plain link, starting where the text inside the value boxes does. */
.creds--stacked details.reveal summary { list-style: none; padding: 2px 0 2px 7px; text-decoration: underline; text-underline-offset: 3px; }
.creds--stacked details.reveal summary::-webkit-details-marker { display: none; }
.creds--stacked details.reveal summary::marker { content: ''; }
.plan__setup--standalone { margin-top: 0; padding-top: 0; border-top: 0; }
.plan__cta { font-size: 1.0625rem; color: var(--ink); margin: 14px 0 0; }
.autopay-steps { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; color: var(--ink); }
.autopay-steps li::marker { color: var(--ink-2); }
details.autopay-how[open] { margin-bottom: 4px; }
/* Email: one mailbox per line under its label, then the help links with room to breathe */
.mailboxes { margin-top: 10px; }
.mailboxes dd { color: var(--ink); overflow-wrap: anywhere; }
.mailboxes dd + dd { margin-top: 6px; }
.plan__links { margin-top: 16px; display: grid; gap: 8px; }
.plan__links .field__hint { margin: 0; }
.plan__aside { margin-top: 14px; }
/* "Your services": Broadband Internet Access and Softcom Email as clearly separate sections */
.services__section { margin-top: 18px; }
.services__section + .services__section { margin-top: 30px; padding-top: 26px; border-top: 2px solid var(--line); }
.plan > h2 { font-size: 1.5rem; margin-bottom: 2px; }
.services__title { font-size: 1.1875rem; font-weight: 700; margin: 0 0 12px; color: var(--subheading); }

/* Text for screen readers only */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Payment page introduction */
.pay-intro { max-width: 76ch; margin: -4px 0 26px; }
.pay-intro > p { margin: 0 0 14px; color: var(--ink); line-height: 1.6; }
.pay-intro__note p { color: var(--ink); }

/* Invoice list: choose invoices to print together */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; }
.list-toolbar__hint { margin: 0; font-size: 0.9375rem; }
.button[data-print-selected][aria-disabled="true"] { cursor: not-allowed; }
@media (min-width: 641px) { .data-table .select-col { width: 1%; white-space: nowrap; padding-right: 4px; } }
.select-col input { width: 1.125rem; height: 1.125rem; margin: 0; vertical-align: -3px; accent-color: var(--ui-accent); cursor: pointer; }
/* A bigger area to tap than the box itself, without changing the layout */
.select-hit { display: inline-flex; padding: 8px; margin: -8px; cursor: pointer; }

/* An invoice as a document: letterhead and bill-to (the print view, and every printout) */
.invoice-sheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; margin-bottom: 20px; }
.invoice-sheet__from p, .invoice-sheet__billto p { margin: 0; line-height: 1.5; }
.invoice-sheet__company { font-weight: 700; color: var(--ink); }
.invoice-sheet__title { margin: 0 0 6px; font-size: 1.375rem; color: var(--heading); }
.invoice-sheet__facts { margin: 0; display: grid; grid-template-columns: max-content auto; gap: 2px 14px; }
.invoice-sheet__facts div { display: contents; }
.invoice-sheet__facts dt { color: var(--ink-2); }
.invoice-sheet__facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.invoice-sheet__billto { margin-bottom: 20px; color: var(--ink); }
.invoice-sheet__billto .invoice-sheet__label { margin-bottom: 2px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.print-stack { display: grid; gap: 24px; }
/* Receipts (a payment as a document), and the payments and credits on an invoice */
.invoice-sheet__kind { margin: 0 0 2px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.sheet-heading { margin: 26px 0 8px; font-size: 1.0625rem; color: var(--ink); }
.sheet-note { margin: 12px 0 0; max-width: 76ch; color: var(--ink); }
/* A declined charge has no receipt, so no box to tick: nothing to show on a phone */
@media (max-width: 640px) { .data-table--stack td.select-col--none { display: none; } }

/* Payment history: each row's status, and why a charge was declined */
.page-head__note { max-width: 76ch; margin-top: 4px; }
.status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.status-cell .cell-sub { max-width: 34ch; line-height: 1.4; }
@media (max-width: 640px) { .data-table--stack .status-cell { align-items: flex-end; text-align: right; } }

/* First-visit welcome (views.welcomeDialog). Rendered open so it shows without JavaScript, as a
   card at the top of the page; portal.js re-opens it as a modal (focus held, Esc to dismiss). */
.welcome { position: fixed; inset: 0; margin: auto; width: min(92vw, 560px); max-height: min(88vh, 720px); overflow: auto; padding: 0; border: 1px solid var(--card-border); border-radius: var(--sc-radius); background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); z-index: 60; }
.welcome::backdrop { background: rgba(8, 16, 89, 0.55); }
.welcome__form { padding: clamp(22px, 4vw, 34px); margin: 0; }
.welcome h2 { margin: 0 0 12px; font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.8rem); color: var(--heading); }
.welcome h2:focus { outline: none; } /* focus lands on the heading when the dialog opens (read out, no scroll to the button) */
.welcome p { margin: 0 0 14px; line-height: 1.55; }
.welcome__points { margin: 0 0 16px; padding-left: 1.25em; }
.welcome__points li { margin-bottom: 8px; line-height: 1.5; }
.welcome__ask { padding: 12px 14px; background: var(--info-bg); color: var(--ink); border-left: 4px solid var(--ui-accent); }
.welcome__ask a { color: var(--link); font-weight: 600; }
.welcome__ok { min-width: 140px; }

/* Floating feedback button (views.feedbackButton): a <details>, so it opens without JavaScript. */
.feedback { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 50; }
.feedback__button { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px 10px 14px; border-radius: 999px; background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.85); user-select: none; }
.feedback__button::-webkit-details-marker { display: none; }
.feedback__button::marker { content: ""; }
.feedback__button:hover { background: var(--btn-primary-hover); }
.feedback__button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.feedback__icon { flex: none; }
.feedback[open] .feedback__button { border-radius: 999px; }
.feedback__panel { position: absolute; right: 0; bottom: calc(100% + 10px); width: min(88vw, 340px); padding: 18px 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--card-border); border-radius: var(--sc-radius); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); }
.feedback__panel h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--heading); }
.feedback__panel p { margin: 0 0 10px; line-height: 1.5; }
.feedback__phone { font-size: 1.15rem; font-weight: 700; }
.feedback__phone a { color: var(--link); }
.feedback__hours { display: block; font-size: 0.9375rem; font-weight: 400; color: var(--ink-2); }
.feedback__alt { margin-bottom: 0 !important; font-size: 0.9375rem; color: var(--ink-2); }
@media (max-width: 480px) { .feedback__label { font-size: 0.9375rem; } .feedback__button { padding: 8px 14px 8px 12px; min-height: 44px; } }
@media (prefers-reduced-motion: no-preference) { .feedback__button { transition: background-color 0.15s; } }

@media screen { .print-only { display: none !important; } }

@page { margin: 16mm 14mm; }
@media print {
  /* Paper is white: print in light colours whatever the screen's colour scheme */
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --ink: #111; --ink-2: #444; --heading: #111; --line: #bbb;
    --good: #1b7148; --good-bg: #fff; --warn: #6b3f00; --warn-bg: #fff; --bad: #b3261e; --bad-bg: #fff;
    --info: #111; --info-bg: #fff; --link: #111; --subheading: #111; --card-border: #bbb; --ui-accent: #111;
    color-scheme: light;
  }
  .hold-banner, .pastdue-banner, .card-banner, .alert, .screen-only, .list-toolbar, .welcome, .feedback { display: none !important; }
  .main { padding-block: 0; }
  .print-stack { display: block; }
  .print-sheet + .print-sheet { break-before: page; }
  .data-table tr, .totals div, .invoice-sheet__head, .invoice-sheet__billto { break-inside: avoid; }
  .sheet-heading { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}
