/* AP portals — adapted from the visual direction at weather.vallery.net. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-style: normal; font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-style: normal; font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #112231;
  --muted: #626b76;
  --line: #dcede7;
  --line-strong: #b9d8cd;
  --field: #f4f7f4;
  --forest: #0e5a43;
  --leaf: #2e7d5c;
  --mint: #7de2b8;
  --accent-active: #083d2d;
  --summary-button: var(--mint);
  --summary-button-ink: var(--ink);
  --summary-button-hover: #a4efd0;
  --positive-background: #e3f3ec;
  --positive-border: #b9d8cd;
  --on-dark-border: #547769;
  --amber: #d6a93b;
  --navy-panel: #1b2d3d;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
/* Company and account screens use the same AP blue as the public website. */
body[data-portal="company"], body[data-portal="account"] {
  --forest: #006de5;
  --leaf: #0059bd;
  --mint: #62b5ff;
  --line: #dce7f4;
  --line-strong: #bfd5ef;
  --field: #f3f8ff;
  --accent-active: #004a9e;
  --summary-button: var(--forest);
  --summary-button-ink: #fff;
  --summary-button-hover: var(--leaf);
  --positive-background: #e8f3ff;
  --positive-border: #bfd5ef;
  --on-dark-border: #47739f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--forest); text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--leaf); }
header { min-height: 76px; display: flex; align-items: center; gap: 24px; padding: 10px max(24px, calc((100vw - 1200px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
header img { display: block; width: 174px; height: auto; }
header > span:nth-child(2) { padding-left: 24px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 600; }
header .badge { margin-left: auto; }
.badge { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); color: var(--forest); font: 400 11px/1.4 var(--mono); letter-spacing: .6px; white-space: nowrap; }
main { max-width: 1280px; margin: 0 auto; padding: 32px 40px 48px; min-height: calc(100vh - 198px); }
main:focus { outline: none; }
.eyebrow { margin: 0 0 8px; color: var(--forest); font: 400 11px/1.4 var(--mono); letter-spacing: 1px; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
h1 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 38px); font-weight: 600; }
h2 { margin: 0 0 12px; font-size: 23px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p:last-child { margin-bottom: 0; }
#sessionActions { display: flex; gap: 8px; flex-shrink: 0; }
.portal-nav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.portal-nav a { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.portal-nav a:hover, .portal-nav a[aria-current="location"] { color: var(--forest); border-bottom-color: var(--forest); background: var(--field); }
.dashboard-summary { background: var(--ink); color: #fff; border-radius: 16px; padding: 30px 32px 22px; margin-bottom: 40px; }
.dashboard-summary > .eyebrow { color: var(--mint); margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; }
.stats section { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; min-width: 0; background: var(--navy-panel); }
.stats section:first-child { padding: 0 32px 0 0; background: transparent; }
.stats section:nth-child(2) { border-radius: 10px 0 0 10px; }
.stats section:last-child { border-radius: 0 10px 10px 0; }
.stats section > span { color: var(--mint); font: 400 11px/1.5 var(--mono); letter-spacing: .6px; text-transform: uppercase; }
.stats strong { color: #fff; font-size: 36px; font-weight: 600; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats section:first-child strong { font-size: clamp(48px, 5vw, 72px); }
.stats small { color: #b9c4cc; font-size: 12px; line-height: 1.5; }
.stats .button { background: var(--summary-button); border-color: var(--summary-button); color: var(--summary-button-ink); padding-inline: 14px; font-size: 13px; }
.stats .button:hover { background: var(--summary-button-hover); border-color: var(--summary-button-hover); }
.summary-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #30424f; }
.summary-footer a { display: inline-flex; align-items: center; min-height: 36px; color: var(--mint); text-decoration: none; font-size: 14px; font-weight: 600; }
.summary-footer a:hover { color: #fff; }
.summary-footer > span { font: 400 11px/1.5 var(--mono); color: #b9c4cc; letter-spacing: .8px; }
.card { min-width: 0; padding: 24px; margin: 28px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px #1122310a; scroll-margin-top: 24px; }
.card:target { border-color: var(--leaf); }
.card > p { max-width: 80ch; font-size: 14px; }
.card > .eyebrow { margin-bottom: 8px; font-size: 11px; }
.login-card { max-width: 460px; margin: 36px auto; padding: 32px; }
.login-card h2 { font-size: 26px; }
.login-card form { display: grid; gap: 20px; margin-top: 24px; }
.login-card form > button { width: 100%; margin-top: 4px; }
body:has(#portal[hidden]) .page-heading { border-radius: 16px; background: var(--ink); padding: 28px 32px; }
body:has(#portal[hidden]) .page-heading h1 { color: #fff; }
body:has(#portal[hidden]) .page-heading .eyebrow { color: var(--mint); }
body:has(#portal[hidden]) .page-heading p:last-child { color: #b9c4cc; }
body:has(#portal[hidden]) #sessionActions .secondary { color: var(--mint); border-color: var(--on-dark-border); background: transparent; }
body:has(#portal[hidden]) #sessionActions .secondary:hover { background: var(--navy-panel); }
label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: var(--ink); font: 400 14px/1.5 var(--font); }
input:hover { border-color: var(--leaf); }
input:disabled { opacity: .6; cursor: not-allowed; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--forest); border-radius: 6px; background: var(--forest); color: #fff; font: 600 14px/1.4 var(--font); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .12s, border-color .12s; }
button:hover, .button:hover { background: var(--leaf); border-color: var(--leaf); color: #fff; }
button:active, .button:active { background: var(--accent-active); }
button:disabled { opacity: .55; cursor: not-allowed; }
.secondary { background: #fff; color: var(--forest); border-color: var(--line-strong); }
.secondary:hover { background: var(--field); color: var(--forest); border-color: var(--leaf); }
button:focus-visible, a:focus-visible, input:focus-visible, .scroll:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.portal-nav a:focus-visible { outline-offset: -3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: end; max-width: 880px; margin-top: 20px; }
.form-grid button { justify-self: start; min-width: 160px; }
.scroll { max-width: 100%; overflow: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
th { padding: 13px 14px; border-bottom: 1px solid var(--line); background: var(--field); color: var(--forest); font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .7px; white-space: nowrap; }
td { padding: 14px; min-width: 110px; max-width: 360px; background: #fff; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--field); }
td button { min-height: 36px; margin: 0 4px 6px 0; padding: 7px 10px; font-size: 12px; }
td input { min-width: 72px; max-width: 104px; min-height: 36px; padding: 7px; }
td > div { min-width: 170px; }
td.data-id { font: 400 11px/1.7 var(--mono); min-width: 150px; color: var(--muted); }
.status-tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); background: var(--field); font: 400 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .3px; }
.status-tag.positive { color: var(--forest); background: var(--positive-background); border-color: var(--positive-border); }
.status-tag.pending { color: #70540a; background: #f8eccb; border-color: #ead59c; }
.status-tag.negative { color: #9c211a; background: #fbeae8; border-color: #edc5c1; }
#message { margin-bottom: 24px; padding: 16px 20px; border-left: 3px solid var(--forest); border-radius: 0 6px 6px 0; background: var(--field); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
#message.error { border-color: #b3261e; background: #fbeae8; color: #9c211a; }
.hint { margin: 20px 0 0; font-size: 12px; line-height: 1.7; }
.section-title { display: flex; justify-content: space-between; gap: 20px; }
.empty { padding: 24px; margin: 0; color: var(--muted); background: var(--field); font-size: 14px; }
footer { margin: 0; padding: 24px max(24px, calc((100vw - 1200px) / 2)); background: var(--field); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.code, .install-code { color: var(--forest); font: 400 12px/1.7 var(--mono); }
.install-code { display: block; min-width: 200px; max-width: 340px; margin-bottom: 10px; overflow-wrap: anywhere; }
#usageMonth { max-width: 240px; }
#usageCount { margin-top: 16px; }
dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 16px 48px #11223133; }
dialog::backdrop { background: #11223199; }
dialog pre { padding: 20px; background: var(--field); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.account-success { border-top: 4px solid var(--forest); }
.sign-in-button { width: 100%; min-height: 56px; padding: 16px; margin-top: 24px; font-size: 15px; }
#portalLinks { text-align: center; margin-top: 24px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 12px 20px; border-radius: 6px; background: #fff; }
.skip-link:focus { top: 12px; }
@media (max-width: 900px) {
  main { padding-inline: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats section:first-child { grid-column: 1 / -1; padding: 0 0 24px; }
  .stats section { padding: 20px; }
}
@media (max-width: 700px) {
  header { min-height: 68px; gap: 12px; padding: 10px 16px; }
  header img { width: 136px; }
  header > span:nth-child(2) { font-size: 12px; padding-left: 12px; }
  header .badge { display: none; }
  main { padding: 24px 16px 32px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  body:has(#portal[hidden]) .page-heading { padding: 24px; }
  .portal-nav { gap: 0; }
  .portal-nav a { padding-inline: 12px; font-size: 13px; }
  .dashboard-summary { padding: 24px 20px 18px; margin-bottom: 28px; }
  .stats section { padding: 16px 12px; }
  .stats strong { font-size: 30px; }
  .stats .button { padding: 10px; font-size: 12px; width: 100%; }
  .summary-footer { gap: 12px; }
  .card { padding: 20px; margin-block: 24px; }
  .login-card { margin: 28px auto; padding: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid button { width: 100%; }
  .section-title { flex-wrap: wrap; }
  footer { padding: 24px 16px; }
  dialog { padding: 24px; }
  #portalLinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
}
@media (max-width: 360px) { .stats { grid-template-columns: 1fr; } .stats section:nth-child(2) { border-radius: 10px 10px 0 0; } .stats section:last-child { border-radius: 0 0 10px 10px; } }
@media (prefers-reduced-motion: reduce) { button, .button { transition: none; } }
