.fs-workspace-desktop-dashboard {
  display: grid;
  gap: var(--fs-space-4);
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(115deg, var(--fs-color-surface) 0%, var(--fs-color-surface-subtle) 100%);
}

.fs-workspace-desktop-quick-access {
  min-width: 0;
}

.fs-workspace-desktop-quick-access--top {
  padding: 10px 12px;
}

.fs-workspace-desktop-quick-access__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fs-workspace-desktop-quick-access__items a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--fs-color-text);
  background: var(--fs-color-surface-subtle);
  border: 1px solid var(--fs-color-border-subtle);
  border-radius: var(--fs-radius-md);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.fs-workspace-desktop-quick-access__items a:hover {
  background: var(--fs-color-surface-hover);
  border-color: var(--fs-color-border);
}

.fs-workspace-desktop-quick-access__items a:focus-visible {
  outline: none;
  box-shadow: var(--fs-focus-ring);
}

.fs-workspace-desktop-quick-access__items img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.fs-workspace-default {
  display: grid;
  gap: var(--fs-page-gap);
}

.fs-workspace-home {
  display: block;
  padding: 0;
  overflow: hidden;
}

.fs-workspace-home__hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.46fr);
  align-items: stretch;
  gap: var(--fs-space-4);
  padding: 26px;
  overflow: hidden;
  border-bottom: 1px solid var(--fs-color-border-subtle);
}

.fs-workspace-home__hero-copy h1 {
  max-width: 640px;
  margin: 5px 0 var(--fs-space-3);
  color: var(--fs-color-text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.fs-workspace-home__hero-copy p,
.fs-workspace-home__section header p,
.fs-workspace-home__highlights p,
.fs-workspace-home__section figcaption {
  color: var(--fs-color-text-secondary);
  line-height: 1.65;
}

.fs-workspace-home__hero-copy p {
  margin: 0 0 8px;
  font-size: 14px;
}

.fs-workspace-home__hero-copy p:last-child {
  margin-bottom: 0;
}

/* The media column matches the copy it stands beside instead of setting its own height. */
.fs-workspace-home__hero-media {
  display: grid;
  gap: var(--fs-space-2);
  height: 100%;
  min-height: 188px;
}

.fs-workspace-home > .fs-company-news-grid {
  border-bottom: 1px solid var(--fs-color-border-subtle);
}

.fs-workspace-home figure {
  margin: 0;
  overflow: hidden;
  background: var(--fs-color-surface-subtle);
  border: 1px solid var(--fs-color-border-subtle);
  border-radius: var(--fs-radius-lg);
}

.fs-workspace-home img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*
 * The photo is taken out of flow so it never sizes the panel: it fills whatever
 * height the copy beside it asks for, top edge to bottom edge.
 */
.fs-workspace-home figure {
  position: relative;
  min-height: 0;
}

.fs-workspace-home figure img {
  position: absolute;
  inset: 0;
}

/*
 * The panel itself is the two-column grid, not the block inside it. That lets
 * the photo span the heading row as well and reach the full height of the
 * panel, instead of hanging below the heading with dead space beside it.
 */
.fs-workspace-home__section {
  display: grid;
  align-content: start;
  gap: var(--fs-space-3);
  padding: 24px 26px;
  border-bottom: 1px solid var(--fs-color-border-subtle);
}

.fs-workspace-home__section:last-child {
  border-bottom: 0;
}

.fs-workspace-home__section:has(.fs-workspace-home__section-content figure) {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.6fr);
  grid-template-rows: auto 1fr;
}

.fs-workspace-home__section > header,
.fs-workspace-home__highlights,
.fs-workspace-home__section-content ul {
  grid-column: 1;
}

/* A wrapper with no layout of its own: its children are the panel's own grid items. */
.fs-workspace-home__section-content {
  display: contents;
}

.fs-workspace-home__section > header {
  display: grid;
  gap: 4px;
}

.fs-workspace-home__section h2 {
  margin: 0;
  color: var(--fs-color-text);
  font-size: 16px;
  font-weight: 700;
}

.fs-workspace-home__section header p,
.fs-workspace-home__highlights p {
  margin: 0;
  font-size: 13px;
}

.fs-workspace-home__highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--fs-space-2);
}

.fs-workspace-home__highlights article {
  padding: var(--fs-space-3) var(--fs-space-2) var(--fs-space-2) 0;
  border-top: 2px solid var(--fs-color-primary-line);
}

.fs-workspace-home__highlights h3 {
  margin: 0 0 4px;
  color: var(--fs-color-primary-text);
  font-size: 14px;
  font-weight: 600;
}

/* Short catalogue entries: two calm columns instead of one long ladder. */
.fs-workspace-home__section-content ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px var(--fs-space-4);
  margin: 0;
  padding-left: 18px;
  color: var(--fs-color-text);
  font-size: 14px;
  line-height: 1.5;
}

/* The global reset drops markers; a catalogue needs them to read as a list. */
.fs-workspace-home__section-content li {
  list-style: disc;
}

.fs-workspace-home__section-content li::marker {
  color: var(--fs-color-primary);
}

.fs-workspace-home__section-content figure {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  grid-column: 2;
  grid-row: 1 / -1;
  min-height: 168px;
}

/* Out of flow above, so the caption keeps its own row over the foot of the photo. */
.fs-workspace-home__section figcaption {
  position: relative;
  padding: 8px 10px;
  background: rgb(255 255 255 / 86%);
  font-size: 12px;
}

/*
 * Mobile home: cover.
 *
 * The announcement runs to all four edges of the top of the screen and the mark
 * stands on it. That is why the phone has no identity bar: the bar would spend a
 * row saying what the cover already says, above the only image on the screen.
 */
.fs-mobile-cover {
  position: relative;
  isolation: isolate;
}

.fs-mobile-cover__bar {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fs-space-3);
  padding: calc(env(safe-area-inset-top) + 10px) 16px 0;
}

.fs-mobile-cover__brand img {
  display: block;
  width: auto;
  max-width: 58vw;
  height: 43px;
  object-fit: contain;
}

/* A clear, reachable assistant control over the photo. */
.fs-mobile-cover__assistant {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  background: rgb(255 255 255 / 78%);
  border: 1px solid rgb(255 255 255 / 88%);
  box-shadow: 0 4px 14px rgb(20 17 13 / 22%);
  border-radius: var(--fs-radius-lg);
  backdrop-filter: blur(8px);
}

.fs-mobile-cover__assistant img {
  display: block;
  width: 24px;
  height: 24px;
}

/*
 * Everything below the cover rides on one sheet. Its rounded edge laps over the
 * foot of the photo, which is what says the cover lies behind the page rather
 * than being its first block. Same surface as the canvas, so the corner is only
 * visible where it crosses the image.
 */
.fs-mobile-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--fs-space-3);
  margin-top: -16px;
  padding: 16px 14px 6px;
  background: var(--fs-color-canvas);
  border-radius: 22px 22px 0 0;
}

/*
 * Mobile home: personal KPI cards.
 *
 * The one block on the screen that carries a solid accent surface. It is the
 * measurement the home screen exists to answer, so it is allowed to outrank the
 * white panels around it — and it is the only block that does. The bar inside
 * keeps one fixed fill: a progress bar measures, it does not grade, so its
 * colour never changes with the value.
 */
.fs-workspace-kpis {
  position: relative;
  display: grid;
  gap: var(--fs-space-2);
  min-width: 0;
}

.fs-workspace-kpis__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 1fr);
  gap: var(--fs-space-3);
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.fs-workspace-kpis__track > .fs-mobile-kpi {
  scroll-snap-align: start;
}

.fs-workspace-kpis__carousel {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  background: rgb(255 255 255 / 82%);
  border: 1px solid rgb(255 255 255 / 92%);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(4 42 74 / 18%);
  backdrop-filter: blur(6px);
  transform: translateX(-50%);
}

.fs-workspace-kpis__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  background: var(--fs-color-border);
  border: 0;
  border-radius: 50%;
  transition: width 0.18s ease, background-color 0.18s ease;
}

.fs-workspace-kpis__dot[aria-selected="true"] {
  width: 12px;
  background: var(--fs-color-text-muted);
  border-radius: 999px;
}

.fs-workspace-kpis__dot:focus-visible {
  outline: none;
  box-shadow: var(--fs-focus-ring);
}

.fs-workspace-kpis:has(.fs-workspace-kpis__carousel) .fs-mobile-kpi {
  padding-bottom: 42px;
}

.fs-workspace-sidebar-kpis {
  position: relative;
  z-index: 1;
  min-width: 0;
  margin: 0 var(--fs-space-2) var(--fs-space-2);
}

.fs-workspace-sidebar-kpis .fs-workspace-kpis__track {
  grid-auto-columns: 100%;
  gap: 0;
  padding-bottom: 0;
  scrollbar-width: none;
}

.fs-workspace-sidebar-kpis .fs-workspace-kpis__track::-webkit-scrollbar {
  display: none;
}

.fs-workspace-sidebar-kpis .fs-mobile-kpi {
  gap: var(--fs-space-2);
  min-height: 0;
  padding: 12px;
  border-radius: var(--fs-radius-md);
}

.fs-workspace-sidebar-kpis .fs-mobile-kpi__value strong,
.fs-workspace-sidebar-kpis .fs-mobile-kpi__primary strong {
  font-size: 32px;
}

.fs-workspace-sidebar-kpis .fs-mobile-kpi__breakdown {
  grid-template-columns: 1fr;
  gap: var(--fs-space-2);
}

.fs-workspace-sidebar-kpis .fs-mobile-kpi__primary {
  display: flex;
  align-items: baseline;
  gap: var(--fs-space-2);
  min-width: 0;
  padding: 0 0 var(--fs-space-2);
  border-right: 0;
  border-bottom: 1px solid var(--fs-color-primary-line);
}

.fs-workspace-sidebar-kpis .fs-mobile-kpi__destination {
  display: none;
}

.fs-workspace-desktop-dashboard__kpis .fs-mobile-kpi {
  min-height: 184px;
  padding: 14px 16px;
  border-radius: var(--fs-radius-lg);
  box-shadow: none;
}

.fs-workspace-desktop-dashboard__kpis .fs-mobile-kpi__value strong,
.fs-workspace-desktop-dashboard__kpis .fs-mobile-kpi__primary strong {
  font-size: 36px;
}

.fs-mobile-kpi {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--fs-space-3);
  padding: 16px 16px 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(158deg, #2f7ac4 0%, var(--fs-color-primary) 76%);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgb(16 85 143 / 28%);
}

/*
 * Two soft discs cropped by the card. They give the one accent surface on the
 * screen some depth without putting anything on it that has to be read; the
 * negative z-index keeps them above the fill and behind every figure.
 */
.fs-mobile-kpi::before,
.fs-mobile-kpi::after {
  position: absolute;
  z-index: -1;
  background: rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.fs-mobile-kpi::before {
  top: -40px;
  right: -30px;
  width: 150px;
  height: 150px;
}

.fs-mobile-kpi::after {
  bottom: -58px;
  left: -36px;
  width: 122px;
  height: 122px;
}

/* Operational counters use their own deep teal surface and a quiet technical lattice. */
.fs-mobile-kpi--breakdown {
  color: #fff;
  background:
    linear-gradient(120deg, transparent 0 54%, rgb(255 255 255 / 5%) 54% 55%, transparent 55% 100%),
    repeating-linear-gradient(145deg, rgb(255 255 255 / 4%) 0 1px, transparent 1px 14px),
    linear-gradient(155deg, #16788a 0%, #15588f 100%);
  border: 0;
  box-shadow: 0 8px 22px rgb(12 81 113 / 28%);
}

.fs-mobile-kpi--breakdown::before,
.fs-mobile-kpi--breakdown::after {
  display: block;
  background: transparent;
  border: 14px solid rgb(255 255 255 / 7%);
  border-radius: 32%;
  transform: rotate(28deg);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__title,
.fs-mobile-kpi--breakdown .fs-mobile-kpi__freshness,
.fs-mobile-kpi--breakdown .fs-mobile-kpi__primary span,
.fs-mobile-kpi--breakdown .fs-mobile-kpi__metrics dt {
  color: rgb(255 255 255 / 74%);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__primary {
  border-color: rgb(255 255 255 / 22%);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metrics div {
  background: rgb(255 255 255 / 11%);
  border: 1px solid rgb(255 255 255 / 12%);
  box-shadow: none;
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--success {
  background: rgb(44 143 71 / 36%);
  border-color: rgb(176 226 187 / 38%);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--warning {
  background: rgb(180 119 0 / 28%);
  border-color: rgb(255 220 139 / 32%);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--info {
  background: rgb(25 104 171 / 32%);
  border-color: rgb(176 216 248 / 30%);
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--success dd {
  color: #dff5e2;
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--warning dd {
  color: #ffecb8;
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__metric--info dd {
  color: #d9efff;
}

.fs-mobile-kpi--breakdown .fs-mobile-kpi__destination {
  color: rgb(255 255 255 / 84%);
}

.fs-mobile-kpi__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fs-space-2);
}

/* The same structural label as any other mobile home block, on a dark surface. */
.fs-mobile-kpi__title {
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: var(--fs-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fs-mobile-kpi__periods {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  background: rgb(255 255 255 / 16%);
  border-radius: var(--fs-radius-sm);
}

.fs-mobile-kpi__period {
  padding: 4px 11px;
  color: rgb(255 255 255 / 82%);
  background: transparent;
  border: 0;
  border-radius: calc(var(--fs-radius-sm) - 2px);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.fs-mobile-kpi__period[aria-selected="true"] {
  color: var(--fs-color-primary-text);
  background: var(--fs-color-surface);
}

.fs-mobile-kpi__period:focus-visible {
  outline: 2px solid var(--fs-color-surface);
  outline-offset: 1px;
}

.fs-mobile-kpi__figure {
  display: grid;
  gap: 10px;
}

/* `display` above would otherwise reveal the periods the switcher has hidden. */
.fs-mobile-kpi__figure[hidden] {
  display: none;
}

.fs-mobile-kpi__value {
  display: flex;
  align-items: baseline;
  gap: var(--fs-space-2);
  margin: 0;
}

.fs-mobile-kpi__value strong {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.fs-mobile-kpi__unit {
  color: rgb(255 255 255 / 84%);
  font-size: var(--fs-text-sm);
  font-weight: 600;
}

/* Arrow plus signed value: the direction is never carried by colour alone. */
.fs-mobile-kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px 8px;
  background: rgb(255 255 255 / 18%);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fs-mobile-kpi__bar {
  height: 8px;
  overflow: hidden;
  background: rgb(255 255 255 / 26%);
  border-radius: 999px;
}

/*
 * One fixed fill, warm against the blue. It measures rather than grades: the
 * gradient is the same at 4% and at 96%, so the colour never tells the reader
 * that a number is good or bad — only the number does.
 */
.fs-mobile-kpi__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffd84d, #ffefa8);
  border-radius: inherit;
}

.fs-mobile-kpi__scale {
  display: flex;
  justify-content: space-between;
  gap: var(--fs-space-2);
  margin: 0;
  color: rgb(255 255 255 / 84%);
  font-size: 12px;
  font-weight: 600;
}

.fs-mobile-kpi__freshness {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: 11px;
}

.fs-mobile-kpi__stale {
  color: var(--fs-color-warning-subtle);
}

.fs-mobile-kpi__loader {
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgb(255 255 255 / 35%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fs-kpi-spin 700ms linear infinite;
}

@keyframes fs-kpi-spin {
  to { transform: rotate(360deg); }
}

.fs-mobile-kpi__breakdown {
  display: grid;
  gap: var(--fs-space-3);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}

.fs-mobile-kpi__primary {
  display: grid;
  align-content: center;
  min-width: 92px;
  padding-right: var(--fs-space-3);
  border-right: 1px solid rgb(255 255 255 / 22%);
}

.fs-mobile-kpi__primary strong {
  font-size: 42px;
  line-height: 1;
}

.fs-mobile-kpi__primary span,
.fs-mobile-kpi__metrics dt {
  color: rgb(255 255 255 / 72%);
  font-size: 11px;
}

.fs-mobile-kpi__metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.fs-mobile-kpi__metrics div {
  padding: 8px;
  background: rgb(255 255 255 / 12%);
  border-radius: var(--fs-radius-sm);
}

.fs-mobile-kpi__metrics dt,
.fs-mobile-kpi__metrics dd {
  margin: 0;
}

.fs-mobile-kpi__metrics dd {
  margin-top: 2px;
  font-size: var(--fs-text-lg);
  font-weight: 700;
}

.fs-mobile-kpi__metric--success { box-shadow: inset 0 -2px var(--fs-color-success-line); }
.fs-mobile-kpi__metric--warning { box-shadow: inset 0 -2px var(--fs-color-warning-line); }
.fs-mobile-kpi__metric--info { box-shadow: inset 0 -2px var(--fs-color-primary-line); }

.fs-mobile-kpi-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--fs-space-2);
  min-height: 64px;
  color: var(--fs-color-text-muted);
  background: var(--fs-color-surface);
  border-radius: var(--fs-radius-lg);
  font-size: var(--fs-text-sm);
}

.fs-mobile-kpi-empty .fs-mobile-kpi__loader {
  border-color: var(--fs-color-border);
  border-top-color: var(--fs-color-primary);
}

.fs-mobile-kpi__destination {
  justify-self: end;
  color: rgb(255 255 255 / 84%);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .fs-workspace-home__hero {
    grid-template-columns: 1fr;
  }

  .fs-workspace-home__hero-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fs-workspace-home__highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Narrow: the photo becomes a band under the copy rather than a third column. */
  .fs-workspace-home__section:has(.fs-workspace-home__section-content figure) {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .fs-workspace-home__section-content figure {
    grid-column: 1;
    grid-row: auto;
    height: 170px;
  }
}

@media (max-width: 760px) {
  .fs-workspace-desktop-quick-access,
  .fs-workspace-home {
    display: none;
  }

  .fs-mobile-sheet .fs-workspace-kpis__track {
    grid-auto-columns: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-padding-inline: 0;
    scrollbar-width: none;
  }

  .fs-mobile-sheet .fs-workspace-kpis__track::-webkit-scrollbar {
    display: none;
  }

}

@media (max-width: 420px) {
  .fs-mobile-kpi__breakdown {
    grid-template-columns: 1fr;
  }

  .fs-mobile-kpi__primary {
    display: flex;
    align-items: baseline;
    gap: var(--fs-space-2);
    padding: 0 0 var(--fs-space-2);
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 22%);
  }
}
