/*
Stibo Systems Brand Stylesheet
Derived from the 2025 Brand Guidelines / October 2024.
Use for digital prototypes, internal web pages, landing pages, and HTML-based documents.

Notes:
- For public/production brand assets, use approved Stibo Systems logo files.
- MS Office documents should use Arial, not Noto Sans.
- Noto Sans is the primary brand font for non-Office digital/print use.
*/

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;700;900&display=swap");

:root {
  /* Primary brand colors */
  --stibo-skagerrak: #004f5f;
  --stibo-ocean: #33727e;
  --stibo-wave: #66959f;
  --stibo-tide: #99b8be;
  --stibo-shore: #ccdbdf;

  /* Air palette */
  --stibo-storm: #00abc1;
  --stibo-gales: #33bbcd;
  --stibo-wind: #66ccd9;
  --stibo-breeze: #99dde6;
  --stibo-still: #cceef2;

  /* Night palette */
  --stibo-midnight: #37464f;
  --stibo-dark: #5f6b72;
  --stibo-twilight: #869095;
  --stibo-fog: #aeb5b8;
  --stibo-mist: #d6dadb;

  /* Accent colors */
  --stibo-sun: #f9d452;
  --stibo-lighthouse: #f05123;

  /* Neutrals */
  --stibo-white: #ffffff;
  --stibo-black: #111111;

  /* Semantic aliases */
  --color-background: var(--stibo-white);
  --color-surface: var(--stibo-still);
  --color-text: var(--stibo-midnight);
  --color-heading: var(--stibo-skagerrak);
  --color-primary: var(--stibo-skagerrak);
  --color-secondary: var(--stibo-storm);
  --color-accent: var(--stibo-sun);
  --color-cta: var(--stibo-lighthouse);
  --color-border: var(--stibo-tide);
  --color-muted: var(--stibo-dark);

  /* Typography */
  --font-brand: "Noto Sans", Arial, Helvetica, sans-serif;
  --font-office: Arial, Helvetica, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Shape */
  --radius-none: 0;
  --radius-sm: 0.125rem;

  /* Decorative geometry */
  --pixel-size: 0.75rem;
  --pixel-gap: 1.25rem;
  --pixel-line-height: 0.75rem;

  /* Controls */
  --action-button-width: 10.75rem;
}

/* Base */

html {
  font-family: var(--font-brand);
  color: var(--color-text);
  background: var(--color-background);
  font-size: 16px;
  line-height: 1.45;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
}

a {
  color: var(--stibo-skagerrak);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--stibo-storm);
}

strong,
b {
  font-weight: 700;
}

small {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Typography hierarchy */

.h1,
h1 {
  margin: 0 0 var(--space-6);
  color: var(--color-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.h1 .light,
h1 .light {
  font-weight: 300;
}

.h2,
h2 {
  margin: 0 0 var(--space-4);
  color: var(--color-heading);
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 900;
}

.h2 .light,
h2 .light {
  font-weight: 300;
}

.h3,
h3 {
  margin: 0 0 var(--space-3);
  color: var(--color-heading);
  font-size: clamp(1.375rem, 2vw, 2rem);
  line-height: 1.15;
  font-weight: 700;
}

p {
  margin: 0 0 var(--space-4);
  max-width: 72ch;
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--stibo-dark);
}

.tagline {
  color: var(--stibo-skagerrak);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* Layout */

.container {
  width: min(1120px, calc(100vw - 2rem));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-16);
}

.section-dark {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark .tagline {
  color: var(--stibo-white);
}

.section-air {
  background: var(--stibo-breeze);
}

.section-still {
  background: var(--stibo-still);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Brand headline underline: solid line plus pixel */

.brand-rule {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-8);
}

.brand-rule::before {
  content: "";
  display: block;
  width: min(420px, 75vw);
  height: 0.45rem;
  background: var(--stibo-storm);
}

.brand-rule::after {
  content: "";
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--stibo-storm);
}

/* Pixel line */

.pixel-line {
  position: relative;
  height: var(--pixel-line-height);
  background: currentColor;
  color: var(--stibo-storm);
}

.pixel-line::before {
  content: "";
  position: absolute;
  left: calc(-1 * (var(--pixel-line-height) + var(--space-6)));
  top: 0;
  width: var(--pixel-line-height);
  height: var(--pixel-line-height);
  background: currentColor;
}

.pixel-line-yellow {
  color: var(--stibo-sun);
}

.pixel-line-skagerrak {
  color: var(--stibo-skagerrak);
}

.pixel-line-white {
  color: var(--stibo-white);
}

/* Grid graphic: use on empty/decorative areas, not over image focal points */

.pixel-grid {
  --dot: var(--pixel-size);
  --gap: var(--pixel-gap);
  display: grid;
  grid-template-columns: repeat(5, var(--dot));
  grid-auto-rows: var(--dot);
  gap: var(--gap);
  width: max-content;
}

.pixel-grid > span,
.pixel-grid::before,
.pixel-grid::after {
  width: var(--dot);
  height: var(--dot);
  background: var(--stibo-skagerrak);
}

.pixel-grid > span {
  display: block;
}

.pixel-grid-gradient > span:nth-child(5n + 1) {
  background: var(--stibo-sun);
}
.pixel-grid-gradient > span:nth-child(5n + 2) {
  background: var(--stibo-sun);
}
.pixel-grid-gradient > span:nth-child(5n + 3) {
  background: var(--stibo-tide);
}
.pixel-grid-gradient > span:nth-child(5n + 4) {
  background: var(--stibo-wave);
}
.pixel-grid-gradient > span:nth-child(5n + 5) {
  background: var(--stibo-storm);
}

/* Cards and message boxes */

.card {
  background: var(--stibo-white);
  border: 1px solid var(--stibo-tide);
  padding: var(--space-8);
  box-shadow: 0.75rem 0.75rem 0 var(--stibo-breeze);
}

.card-yellow {
  border-color: var(--stibo-sun);
  box-shadow: 0.75rem 0.75rem 0 var(--stibo-sun);
}

.message-box {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
  padding: var(--space-8);
  border-top: 0.75rem solid var(--stibo-sun);
}

.statement-box {
  background: var(--stibo-storm);
  color: var(--stibo-white);
  padding: var(--space-12);
  font-size: clamp(1.375rem, 2.3vw, 2.25rem);
  line-height: 1.12;
  font-weight: 700;
  box-shadow: -1.5rem -1.5rem 0 var(--stibo-skagerrak);
}

/* Tables */

.table-brand {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-brand th {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
}

.table-brand td {
  border-bottom: 1px solid var(--stibo-shore);
  padding: var(--space-3) var(--space-4);
  vertical-align: top;
}

.table-brand tr:first-child td {
  border-top: 1px solid var(--stibo-shore);
}

/* Buttons */

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius-none);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
}

.button-primary:hover {
  background: var(--stibo-ocean);
  color: var(--stibo-white);
}

.button-secondary {
  background: var(--stibo-storm);
  color: var(--stibo-white);
}

.button-cta {
  background: var(--stibo-lighthouse);
  color: var(--stibo-white);
}

.button-outline {
  background: transparent;
  color: var(--stibo-skagerrak);
  border-color: var(--stibo-skagerrak);
}

/* Logo placement utility */

.logo-lockup {
  display: inline-block;
  min-width: 160px; /* Minimum digital logo width from guideline */
}

.logo-clear-space {
  padding: 1em; /* Replace 1em with the logo Window-of-Transparency width when using final assets */
}

/* Imagery */

.image-tint-skagerrak {
  position: relative;
  overflow: hidden;
}

.image-tint-skagerrak img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
}

.image-tint-skagerrak::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 79, 95, 0.55);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Office-compatible override */

.office-document {
  font-family: var(--font-office);
}

/* Accessibility helpers */

.text-on-skagerrak {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
}

.text-on-storm {
  background: var(--stibo-storm);
  color: var(--stibo-white);
}

.text-on-sun {
  background: var(--stibo-sun);
  color: var(--stibo-skagerrak);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Salesforce Surfer app layer */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  background:
    linear-gradient(90deg, var(--stibo-skagerrak) 0 6px, transparent 6px),
    linear-gradient(180deg, var(--stibo-white) 0, #f7fafb 100%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 4px solid var(--stibo-skagerrak);
}

.title-lockup {
  min-width: 0;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-3);
  color: var(--stibo-skagerrak);
  line-height: 1;
  text-decoration: none;
}

.brand-logo:hover {
  color: var(--stibo-ocean);
}

.brand-logo:focus-visible {
  outline: 3px solid rgb(249 212 82 / 55%);
  outline-offset: 3px;
}

.brand-logo-image {
  display: block;
  width: min(13.25rem, 52vw);
  height: auto;
}

.toolbar h1,
.details h2 {
  margin: 0;
  letter-spacing: 0;
}

.toolbar h1 {
  font-size: 2rem;
  line-height: 1.05;
}

.details h2 {
  font-size: 1.5rem;
  line-height: 1.1;
}

.details-header {
  margin-bottom: var(--space-4);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--stibo-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-link,
.auth-action,
.login-action,
.search-panel button,
.salesforce-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.25rem;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-none);
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.search-panel button,
.salesforce-button {
  cursor: pointer;
}

.home-link:hover,
.auth-action:hover,
.login-action:hover,
.search-panel button:hover,
.salesforce-button:hover {
  background: var(--stibo-ocean);
  color: var(--stibo-white);
}

.search-panel button.search-button-ready {
  background: var(--stibo-ocean);
  box-shadow: inset 0 -4px 0 var(--stibo-sun);
  color: var(--stibo-white);
}

.search-panel button.search-button-ready:hover {
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
}

.home-link:focus-visible,
.auth-action:focus-visible,
.login-action:focus-visible,
.search-panel button:focus-visible,
.salesforce-button:focus-visible,
input[type="search"]:focus-visible,
.status-filter-option input:focus-visible + .status-filter-mark,
.details-link:focus-visible {
  outline: 3px solid rgb(249 212 82 / 55%);
  outline-offset: 2px;
}

.auth-panel {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  border: 1px solid var(--stibo-tide);
  background: var(--stibo-white);
  color: var(--stibo-dark);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.auth-panel span {
  max-width: 16rem;
  overflow: hidden;
  padding: 0 var(--space-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-action {
  min-height: calc(2.25rem - 2px);
  padding-inline: var(--space-3);
  font-size: 0.8rem;
}

.shell.is-login-required .search-panel,
.shell.is-login-required .status,
.shell.is-login-required .details,
.shell.is-login-required .table-wrap,
.shell.is-access-denied .search-panel,
.shell.is-access-denied .status,
.shell.is-access-denied .details,
.shell.is-access-denied .table-wrap {
  display: none;
}

.login-view {
  min-height: min(32rem, calc(100vh - 12rem));
  display: grid;
  align-items: center;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-8);
  padding: var(--space-8);
  border: 1px solid var(--stibo-shore);
  border-left: 6px solid var(--stibo-sun);
  background:
    linear-gradient(90deg, rgb(204 219 223 / 35%) 0 1px, transparent 1px),
    linear-gradient(180deg, var(--stibo-white) 0, #f8fbfc 100%);
  background-size:
    2rem 2rem,
    auto;
}

.login-copy {
  min-width: 0;
}

.login-copy h2 {
  margin-bottom: var(--space-3);
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--stibo-dark);
  font-size: 0.95rem;
}

.login-action {
  min-width: 13rem;
  min-height: 2.75rem;
  background: var(--stibo-skagerrak);
  box-shadow: inset 0 -4px 0 var(--stibo-sun);
}

.search-panel,
.status,
.details,
.table-wrap {
  border: 1px solid var(--stibo-shore);
  background: var(--stibo-white);
}

.search-panel,
.details {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
}

.search-panel > label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--stibo-midnight);
  font-size: 0.86rem;
  font-weight: 900;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--action-button-width);
  gap: var(--space-3);
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.search-panel button {
  width: 100%;
}

.salesforce-button {
  width: var(--action-button-width);
}

input[type="search"] {
  width: 100%;
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--stibo-tide);
  border-radius: var(--radius-none);
  color: var(--stibo-midnight);
  background: var(--stibo-white);
  font: inherit;
  font-size: 0.88rem;
}

input[type="search"]:focus {
  border-color: var(--stibo-skagerrak);
  outline: 0;
}

.status-filters {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border: 1px solid var(--stibo-shore);
  background: #fbfdfe;
}

.status-filters legend {
  padding: 0 var(--space-1);
  color: var(--stibo-midnight);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.status-filter-option {
  display: inline-grid;
  grid-template-columns: 1rem minmax(0, auto);
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 2rem;
  padding: 0 var(--space-2);
  border: 0;
  background: var(--stibo-white);
  color: var(--stibo-midnight);
  font-size: 0.78rem;
  font-weight: 400;
  cursor: pointer;
}

.status-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-filter-mark {
  display: grid;
  align-self: center;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border: 1px solid var(--stibo-tide);
  background: var(--stibo-white);
  color: var(--stibo-white);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1rem;
}

.status-filter-mark::before {
  content: "";
}

.status-filter-option:has(input:checked) {
  background: var(--stibo-still);
}

.status-filter-option input:checked + .status-filter-mark {
  border-color: var(--stibo-skagerrak);
  background: var(--stibo-skagerrak);
}

.status-filter-option input:checked + .status-filter-mark::before {
  content: "\2713";
}

.status {
  min-height: 2.25rem;
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 6px solid var(--stibo-sun);
  color: var(--stibo-dark);
  font-size: 0.84rem;
}

.status.error {
  border-left-color: var(--stibo-lighthouse);
  color: var(--stibo-lighthouse);
  background: #fff8f5;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-3);
  margin: 0;
}

dl > div {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--stibo-shore);
  background: #fbfdfe;
}

dt {
  color: var(--stibo-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

dd {
  margin: var(--space-1) 0 0;
  overflow-wrap: anywhere;
  color: var(--stibo-midnight);
  font-size: 0.86rem;
}

.detail-address,
.detail-composed {
  grid-column: span 2;
}

.detail-status-line {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  grid-row: span 3;
  gap: var(--space-3);
}

.detail-status-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.detail-status-row-single {
  grid-template-columns: 1fr;
}

.detail-status-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 1.2rem;
  color: var(--stibo-midnight);
}

.detail-status-checkbox input {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
}

.detail-address dd,
.detail-composed dd {
  line-height: 1.45;
  white-space: pre-line;
}

.active-subscriptions {
  margin-top: var(--space-4);
  border: 1px solid var(--stibo-shore);
  background: var(--stibo-white);
}

.active-subscriptions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--stibo-shore);
  background: var(--stibo-skagerrak);
}

.active-subscriptions h3 {
  margin: 0;
  color: var(--stibo-white);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.active-subscriptions p {
  margin: 0;
  color: var(--stibo-shore);
  font-size: 0.78rem;
}

.active-subscriptions-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.subscription-loading {
  display: grid;
  grid-template-columns: 2.25rem minmax(11rem, 0.35fr) minmax(12rem, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 5rem;
  padding: var(--space-3);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 79, 95, 0.05), rgba(249, 212, 82, 0.08)),
    var(--stibo-white);
}

.accounts-loading-row:hover {
  background: transparent;
}

.accounts-loading-cell {
  padding: 0;
}

.accounts-loading-cell .subscription-loading {
  min-height: 4.5rem;
}

.subscription-loading-orbit {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: conic-gradient(
    from 90deg,
    var(--stibo-skagerrak),
    var(--stibo-storm),
    var(--stibo-sun),
    transparent 78%
  );
  animation: subscription-loading-spin 1.15s linear infinite;
}

.subscription-loading-orbit::after {
  position: absolute;
  inset: 0.28rem;
  border-radius: 50%;
  background: var(--stibo-white);
  content: "";
}

.subscription-loading-orbit span {
  position: absolute;
  inset: 0.82rem;
  z-index: 1;
  border-radius: 50%;
  background: var(--stibo-skagerrak);
}

.subscription-loading-copy {
  display: grid;
  gap: 0.1rem;
}

.subscription-loading-copy strong {
  color: var(--stibo-midnight);
  font-size: 0.86rem;
}

.subscription-loading-copy span {
  color: var(--stibo-dark);
  font-size: 0.78rem;
}

.subscription-loading-skeleton {
  display: grid;
  gap: var(--space-2);
}

.subscription-loading-skeleton span {
  position: relative;
  display: block;
  height: 0.62rem;
  overflow: hidden;
  background: var(--stibo-mist);
}

.subscription-loading-skeleton span:nth-child(2) {
  width: 86%;
}

.subscription-loading-skeleton span:nth-child(3) {
  width: 64%;
}

.subscription-loading-skeleton span::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  content: "";
  transform: translateX(-100%);
  animation: subscription-loading-scan 1.35s ease-in-out infinite;
}

@keyframes subscription-loading-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes subscription-loading-scan {
  to {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .subscription-loading-orbit,
  .subscription-loading-skeleton span::after {
    animation: none;
  }
}

.subscription-contract {
  border-bottom: 1px solid var(--stibo-shore);
}

.subscription-contract:last-child {
  border-bottom: 0;
}

.subscription-contract > summary {
  display: grid;
  grid-template-columns: 1rem minmax(9rem, 0.45fr) minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-3);
  cursor: pointer;
  list-style: none;
}

.subscription-contract > summary::-webkit-details-marker,
.subscription-segment > summary::-webkit-details-marker,
.environment-license-group > summary::-webkit-details-marker {
  display: none;
}

.subscription-contract > summary::marker,
.subscription-segment > summary::marker,
.environment-license-group > summary::marker {
  content: "";
}

.subscription-contract > summary::before {
  content: "+";
  grid-column: 1;
  grid-row: 1;
  width: 1rem;
  color: var(--stibo-skagerrak);
  font-weight: 900;
}

.subscription-contract[open] > summary::before {
  content: "-";
}

.subscription-contract:not([open]) > .subscription-segments,
.subscription-contract:not([open]) > .environment-detail-table,
.subscription-contract:not([open]) > .environment-table,
.subscription-contract:not([open]) > .environment-license-groups,
.environment-license-group:not([open]) > .environment-table,
.subscription-segment:not([open]) > .product-quantity-table {
  display: none;
}

.subscription-contract > summary strong {
  grid-column: 2;
}

.subscription-contract > summary span {
  grid-column: 3;
}

.subscription-segments {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--stibo-shore);
  background: #fbfdfe;
}

.subscription-segment {
  border-bottom: 1px solid var(--stibo-shore);
}

.subscription-segment:last-child {
  border-bottom: 0;
}

.subscription-segment > summary {
  display: grid;
  grid-template-columns: 1rem max-content minmax(8rem, 0.35fr) minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-2) var(--space-3) var(--space-2)
    calc(var(--space-3) + 1.35rem);
  cursor: pointer;
  list-style: none;
}

.subscription-segment > summary::before {
  content: "+";
  grid-column: 1;
  grid-row: 1;
  width: 1rem;
  color: var(--stibo-skagerrak);
  font-weight: 900;
}

.subscription-segment[open] > summary::before {
  content: "-";
}

.subscription-segment > summary strong {
  grid-column: 3;
}

.subscription-segment-label {
  grid-column: 2;
  color: var(--stibo-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subscription-segment-meta {
  grid-column: 4;
}

.product-quantity-table {
  width: calc(100% - (var(--space-3) + 2.7rem));
  min-width: 0;
  margin-left: calc(var(--space-3) + 2.7rem);
  border-collapse: collapse;
  border-top: 1px solid var(--stibo-shore);
  background: var(--stibo-white);
  table-layout: fixed;
}

.product-quantity-table th,
.product-quantity-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--stibo-shore);
  text-align: left;
  vertical-align: top;
}

.product-quantity-table th {
  position: static;
  padding-block: var(--space-3);
  background: var(--stibo-still);
  color: var(--stibo-skagerrak);
  font-size: 0.76rem;
  font-weight: 900;
}

.product-quantity-table td {
  color: var(--stibo-dark);
  font-size: 0.78rem;
}

.product-quantity-table th:first-child,
.product-quantity-table td:first-child {
  width: 56%;
}

.product-quantity-table th:not(:first-child),
.product-quantity-table td:not(:first-child) {
  text-align: right;
}

.product-quantity-table th.third-party-license-cell,
.product-quantity-table td.third-party-license-cell {
  width: 24%;
  text-align: left;
}

.product-quantity-table th + th,
.product-quantity-table td + td {
  padding-left: var(--space-3);
}

.product-quantity-table tr:last-child td {
  border-bottom: 0;
}

.environment-code-group > summary strong {
  color: var(--stibo-skagerrak);
}

.environment-license-groups {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--stibo-shore);
  background: #fbfdfe;
}

.environment-license-group {
  border-bottom: 1px solid var(--stibo-shore);
}

.environment-license-group:last-child {
  border-bottom: 0;
}

.environment-license-group > summary {
  display: grid;
  grid-template-columns: 1rem minmax(9rem, 0.32fr) minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
  padding: var(--space-2) var(--space-3) var(--space-2)
    calc(var(--space-3) + 1.35rem);
  cursor: pointer;
  list-style: none;
}

.environment-license-group > summary::before {
  content: "+";
  grid-column: 1;
  grid-row: 1;
  width: 1rem;
  color: var(--stibo-skagerrak);
  font-weight: 900;
}

.environment-license-group[open] > summary::before {
  content: "-";
}

.environment-license-group > summary strong {
  grid-column: 2;
  color: var(--stibo-skagerrak);
}

.environment-license-group > summary span {
  grid-column: 3;
}

.environment-table {
  width: calc(100% - (var(--space-3) + 2.7rem));
  min-width: 0;
  margin-left: calc(var(--space-3) + 2.7rem);
  border-collapse: collapse;
  border-top: 1px solid var(--stibo-shore);
  background: var(--stibo-white);
  table-layout: fixed;
}

.environment-table th,
.environment-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--stibo-shore);
  text-align: left;
  vertical-align: top;
}

.environment-table thead th {
  background: var(--stibo-still);
  color: var(--stibo-skagerrak);
  font-size: 0.76rem;
  font-weight: 900;
}

.environment-table tbody th {
  background: var(--stibo-white);
  color: var(--stibo-dark);
  font-size: 0.78rem;
  font-weight: 400;
}

.environment-table td {
  color: var(--stibo-dark);
  font-size: 0.78rem;
  white-space: pre-line;
}

.environment-table th:first-child,
.environment-table td:first-child {
  width: 16%;
}

.environment-table th:nth-child(2),
.environment-table td:nth-child(2) {
  width: 36%;
}

.environment-table th:nth-child(3),
.environment-table td:nth-child(3),
.environment-table th:nth-child(4),
.environment-table td:nth-child(4),
.environment-table th:nth-child(5),
.environment-table td:nth-child(5),
.environment-table th:nth-child(6),
.environment-table td:nth-child(6) {
  width: 12%;
}

.workday-contract-line-table th:first-child,
.workday-contract-line-table td:first-child {
  width: 46%;
}

.workday-contract-line-table th:nth-child(2),
.workday-contract-line-table td:nth-child(2),
.workday-contract-line-table th:nth-child(3),
.workday-contract-line-table td:nth-child(3) {
  width: 18%;
}

.workday-contract-line-table th:nth-child(4),
.workday-contract-line-table td:nth-child(4) {
  width: 18%;
  text-align: right;
}

.account-hierarchy-table {
  width: 100%;
  margin-left: 0;
}

.account-hierarchy-table th:first-child,
.account-hierarchy-table td:first-child {
  width: 12%;
}

.account-hierarchy-table th:nth-child(2),
.account-hierarchy-table td:nth-child(2) {
  width: 16%;
}

.account-hierarchy-table th:nth-child(3),
.account-hierarchy-table td:nth-child(3) {
  width: 20%;
}

.account-hierarchy-table th:nth-child(4),
.account-hierarchy-table td:nth-child(4) {
  width: 36%;
}

.account-hierarchy-table th:nth-child(5),
.account-hierarchy-table td:nth-child(5) {
  width: 16%;
  white-space: normal;
}

.account-hierarchy-parent-row td {
  background: #fbfdfe;
  font-weight: 800;
}

.account-hierarchy-current-row td {
  background: #fff1d6;
}

.account-hierarchy-current-row.account-hierarchy-parent-row td {
  background: #ffe7ba;
}

.mrr-table {
  width: calc(100% - (var(--space-3) + 2.7rem));
  margin-left: calc(var(--space-3) + 2.7rem);
}

.mrr-table th,
.mrr-table td {
  width: 33.333%;
}

.mrr-table thead th {
  background: var(--stibo-still);
  color: var(--stibo-skagerrak);
}

.mrr-table tbody td {
  background: var(--stibo-white);
}

.mrr-table th:last-child,
.mrr-table td:last-child {
  text-align: right;
}

.environment-table tr:last-child th,
.environment-table tr:last-child td {
  border-bottom: 0;
}

.active-subscriptions strong {
  color: var(--stibo-midnight);
  font-size: 0.86rem;
}

.active-subscriptions span {
  color: var(--stibo-dark);
  font-size: 0.78rem;
}

.table-wrap {
  overflow: auto;
}

.table-meta {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--stibo-shore);
  background: var(--stibo-still);
  color: var(--stibo-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--stibo-shore);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  padding: 0;
  background: var(--stibo-skagerrak);
  color: var(--stibo-white);
  font-size: 0.68rem;
  font-weight: 900;
}

.sort-button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-height: 2.2rem;
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.15;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.sort-label {
  min-width: 0;
}

.sort-indicator {
  flex: 0 0 auto;
  min-width: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--stibo-white);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

.sort-button[data-sort-direction="ascending"],
.sort-button[data-sort-direction="descending"] {
  background: transparent;
}

.sort-button[data-sort-direction="ascending"] .sort-indicator,
.sort-button[data-sort-direction="descending"] .sort-indicator {
  color: var(--stibo-gold);
}

.sort-button:hover {
  background: var(--stibo-ocean);
}

.sort-button[data-sort-key="activeContracts"],
.sort-button[data-sort-key="opportunitiesStage456"] {
  justify-content: center;
  text-align: center;
}

.sort-button:focus-visible {
  outline: 3px solid rgb(249 212 82 / 55%);
  outline-offset: -3px;
}

td {
  background: var(--stibo-white);
}

.global-account-number-cell {
  color: var(--stibo-dark);
  font-family:
    SFMono-Regular,
    Consolas,
    Liberation Mono,
    monospace;
  font-size: 0.74rem;
  white-space: nowrap;
}

.metric-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.contracts-cell,
.opportunities-cell {
  text-align: center;
}

tr:last-child td {
  border-bottom: 0;
}

.details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.55rem;
  border: 1px solid var(--stibo-tide);
  color: var(--stibo-skagerrak);
  background: var(--stibo-white);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;

  .contracts-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  line-height: 1;
  text-decoration: none;
}

.details-link:hover {
  border-color: var(--stibo-skagerrak);
  color: var(--stibo-white);
  background: var(--stibo-skagerrak);
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 22px 0 32px;
  }

  .toolbar,
  .search-row,
  dl {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .home-link,
  .search-panel button,
  .salesforce-button {
    width: 100%;
  }

  .detail-address,
  .detail-composed,
  .detail-status-line {
    grid-column: auto;
    grid-row: auto;
  }

  .subscription-loading {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .subscription-loading-skeleton {
    grid-column: 1 / -1;
  }
}
