/* SKYLEO Portal — "Spokojny" look (2026 redesign). Loaded last: it redefines
   the tokens from tokens.css and restyles the shared sp-* components.
   Atkinson Hyperlegible, 18px text, white cards on a warm page, pill
   buttons in one blue accent. Status colours keep their meaning. */
:root,
[data-theme='light'] {
  color-scheme: light;
  --page: #f5f4f0;
  --surface-000: #ffffff;
  --surface-100: #efede7;
  --surface-200: #e2e0da;
  --ink: #1b1b19;
  --ink-muted: #55534e;
  --ink-faint: #6e6b64;
  --line: #e2e0da;
  --line-strong: #8c887f;
  --focus: #1f4fd1;
  --on-ink: #ffffff;
  --accent: #1f4fd1;
  --accent-strong: #1f4fd1;
  --accent-hover: #163a9e;
  --accent-soft: #e8eefc;
  --on-accent: #ffffff;
  --status-ok: #1e7a3e;
  --status-warn: #9a5b00;
  --status-down: #b3261e;
  --status-ok-soft: #e5f3ea;
  --status-warn-soft: #fdf1dc;
  --status-down-soft: #f9e7e5;
  --status-ok-ink: #1e6a38;
  --status-warn-ink: #7a4b00;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-display: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-text: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --content-max: 1120px;
}
[data-theme='dark'] {
  color-scheme: dark;
  --page: #121211;
  --surface-000: #1e1e1c;
  --surface-100: #282825;
  --surface-200: #3a3934;
  --ink: #f2f1ec;
  --ink-muted: #bdbab2;
  --ink-faint: #a29f97;
  --line: #3a3934;
  --line-strong: #8c887f;
  --focus: #93acff;
  --on-ink: #121211;
  --accent: #93acff;
  --accent-strong: #2f5be0;
  --accent-hover: #b5c6ff;
  --accent-soft: #23305a;
  --on-accent: #ffffff;
  --status-ok: #6fcf8e;
  --status-warn: #f0b44c;
  --status-down: #f2786d;
  --status-ok-soft: #173322;
  --status-warn-soft: #3a2c12;
  --status-down-soft: #3d1a17;
  --status-ok-ink: #8fd9a8;
  --status-warn-ink: #f7d9a0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --page: #121211;
    --surface-000: #1e1e1c;
    --surface-100: #282825;
    --surface-200: #3a3934;
    --ink: #f2f1ec;
    --ink-muted: #bdbab2;
    --ink-faint: #a29f97;
    --line: #3a3934;
    --line-strong: #8c887f;
    --focus: #93acff;
    --on-ink: #121211;
    --accent: #93acff;
    --accent-strong: #2f5be0;
    --accent-hover: #b5c6ff;
    --accent-soft: #23305a;
    --on-accent: #ffffff;
    --status-ok: #6fcf8e;
    --status-warn: #f0b44c;
    --status-down: #f2786d;
    --status-ok-soft: #173322;
    --status-warn-soft: #3a2c12;
    --status-down-soft: #3d1a17;
    --status-ok-ink: #8fd9a8;
    --status-warn-ink: #f7d9a0;
  }
}

/* Base */
.sp-root {
  background: var(--page);
  font-size: 18px;
  line-height: 1.5;
}
.sp-main a:not([class]),
.sp-text-link {
  color: var(--accent);
}
.sp-main a:not([class]):hover,
.sp-text-link:hover {
  color: var(--accent-hover);
}
.sp-eyebrow {
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.sp-page-title {
  font: 700 40px/1.15 var(--font-display);
  letter-spacing: 0;
}
.sp-section-title {
  font: 700 24px/1.25 var(--font-display);
  letter-spacing: 0;
}
.sp-section-meta,
.sp-rule,
.sp-contact {
  font-size: 16px;
  line-height: 24px;
}

/* Cards: every page section sits on a white card */
.sp-section {
  background: var(--surface-000);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.sp-section .sp-section {
  border: 0;
  padding: 0;
  border-radius: 0;
}
@media (max-width: 640px) {
  .sp-section {
    padding: var(--space-3) 20px;
    border-radius: 18px;
  }
}

/* Header and desktop navigation */
.sp-shell-header {
  background: var(--surface-000);
  border-bottom: 1px solid var(--line);
  padding: var(--space-2)
    max(var(--space-4), calc((100% - var(--content-max)) / 2 + 32px));
  min-height: 72px;
}
.sp-wordmark {
  font-size: 22px;
  letter-spacing: 0.02em;
}
.sp-wordmark span {
  font-weight: 700;
}
.sp-wordmark b {
  font-weight: 700;
  color: var(--accent);
}
.sp-root .sp-header nav a {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  gap: var(--space-2);
}
.sp-root .sp-header nav a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
  box-shadow: none;
  border-radius: 999px;
}
.sp-root .sp-header nav a:hover {
  background: var(--surface-100);
  color: var(--ink);
}
[data-theme='dark'] .sp-root .sp-header nav a[aria-current='page'],
html[data-theme='dark'] .sp-header nav a[aria-current='page'] {
  color: var(--ink);
}
.sp-header__client {
  font-size: 16px;
}
.sp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--status-warn);
  color: #ffffff;
  font: 700 13px/1 var(--font-text);
}
[data-theme='dark'] .sp-badge {
  color: #1b1b19;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .sp-badge {
    color: #1b1b19;
  }
  html:not([data-theme]) .sp-header nav a[aria-current='page'] {
    color: var(--ink);
  }
}

/* Main column */
.sp-main {
  padding: var(--space-5) 32px var(--space-6);
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .sp-main {
    padding: var(--space-4) 16px var(--space-5);
    gap: var(--space-3);
  }
  .sp-page-title {
    font-size: 30px;
  }
}

/* Buttons and fields */
.sp-btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 700 17px/24px var(--font-text);
}
.sp-root .sp-btn--primary {
  background: var(--accent-strong);
  color: var(--on-accent);
}
.sp-root .sp-btn--primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
[data-theme='dark'] .sp-root .sp-btn--primary:hover {
  background: #2449b8;
}
.sp-root .sp-btn--secondary {
  background: var(--surface-000);
  color: var(--ink);
  border-color: var(--line-strong);
}
.sp-root .sp-btn--ghost {
  color: var(--ink);
}
.sp-field label {
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
}
.sp-input {
  min-height: 48px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 18px;
}
textarea.sp-input {
  padding: 12px var(--space-3);
}
.sp-input:focus-visible {
  border-color: var(--accent-strong);
}
.sp-tag {
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0;
}

/* Tabs (content types, filters) become pills */
.sp-root .sp-tabs {
  border-bottom: 0;
  gap: var(--space-2);
}
.sp-root .sp-tabs a {
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-000);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  padding: 0 16px;
}
.sp-root .sp-tabs a[aria-current='page'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--page);
  font-weight: 700;
  box-shadow: none;
}
.sp-root .sp-tabs a[aria-current='page'] small {
  color: inherit;
}

/* Stat tiles, notes, messages, incidents: rounded */
.sp-stat,
.sp-note,
.sp-admin-message,
.sp-incident {
  border-radius: var(--radius-md);
}
.sp-incident {
  border: 1px solid var(--line);
}

/* Lists of entries become cards */
.sp-root .sp-entries {
  gap: var(--space-2);
}
.sp-root .sp-entry-row {
  background: var(--surface-000);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--space-3);
}

/* Desktop "Więcej" next to the header links */
.sp-root .sp-more-toggle {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}
.sp-root .sp-more-toggle:hover,
.sp-root .sp-more-toggle[aria-expanded='true'],
.sp-root .sp-more-toggle[aria-current='page'] {
  background: var(--accent-soft);
}
.sp-root .sp-more-toggle[aria-current='page'] {
  color: var(--accent);
  font-weight: 700;
}
.sp-tabbar .sp-icon,
.sp-tile .sp-icon {
  stroke-width: 2;
}

/* Phone tab bar with icons */
.sp-tabbar a,
.sp-tabbar button {
  position: relative;
  flex-direction: column;
  gap: 2px;
}
.sp-tabbar .sp-badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
}
@media screen and (max-width: 959px) {
  .sp-root .sp-tabbar {
    background: var(--surface-000);
    padding: 4px 4px env(safe-area-inset-bottom);
  }
  .sp-root .sp-tabbar a,
  .sp-root .sp-tabbar button {
    min-height: 60px;
    font: 400 14px/18px var(--font-text);
    color: var(--ink-muted);
  }
  .sp-root .sp-tabbar [aria-current='page'],
  .sp-root .sp-tabbar [aria-expanded='true'] {
    color: var(--accent);
    font-weight: 700;
    box-shadow: none;
  }
  html.sp-js .sp-main {
    padding-bottom: calc(64px + var(--space-5) + env(safe-area-inset-bottom));
  }
}

/* Request cards: progress steps and one-tap answers */
.sp-request {
  background: var(--surface-000);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sp-request--waiting {
  border: 2px solid var(--status-warn);
}
.sp-request__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
}
.sp-request__title {
  margin: 0;
  font: 700 22px/1.25 var(--font-display);
}
.sp-request__when {
  color: var(--ink-muted);
  font-size: 15px;
}
.sp-request__flag {
  display: inline-flex;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--status-warn-soft);
  color: var(--status-warn-ink);
  font-size: 15px;
  font-weight: 700;
}
.sp-request__flag--done {
  background: var(--status-ok-soft);
  color: var(--status-ok-ink);
}
.sp-request__flag--muted {
  background: var(--surface-100);
  color: var(--ink-muted);
}
.sp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
  font-size: 15px;
  line-height: 20px;
}
.sp-steps li {
  border-top: 6px solid var(--surface-200);
  padding-top: 8px;
  color: var(--ink-muted);
}
.sp-steps li[data-state='done'] {
  border-top-color: var(--accent-strong);
  color: var(--ink);
}
.sp-steps li[data-state='current'] {
  border-top-color: var(--status-warn);
  color: var(--ink);
  font-weight: 700;
}
@media (max-width: 640px) {
  .sp-steps {
    font-size: 0;
    gap: 4px;
  }
  .sp-steps li {
    padding-top: 0;
  }
  .sp-request {
    padding: var(--space-3) 20px;
  }
}
.sp-steps__now {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
}
.sp-request__quote {
  margin: 0;
  color: var(--ink-muted);
}
.sp-request__question {
  margin: 0;
  font-weight: 700;
}
.sp-request__answers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.sp-request__other {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sp-request__other summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Start page */
.sp-hello {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sp-hello__summary {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 48ch;
}
.sp-hello__summary strong {
  color: var(--ink);
}
@media (max-width: 640px) {
  .sp-hello__summary {
    font-size: 18px;
  }
}
.sp-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}
.sp-root .sp-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  min-height: 150px;
  border-radius: var(--radius-lg);
  background: var(--surface-000);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.sp-root .sp-tile:hover {
  border-color: var(--accent-strong);
  color: var(--ink);
}
.sp-root .sp-tile--primary {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}
.sp-root .sp-tile--primary:hover {
  color: var(--on-accent);
  background: var(--accent-hover);
}
.sp-tile .sp-icon {
  width: 32px;
  height: 32px;
  stroke-width: 2;
  color: var(--accent);
}
.sp-tile--primary .sp-icon {
  color: inherit;
}
.sp-tile__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}
.sp-tile__text {
  font-size: 17px;
  color: var(--ink-muted);
}
.sp-tile--primary .sp-tile__text {
  color: inherit;
  opacity: 0.9;
}
@media (max-width: 640px) {
  .sp-tiles {
    gap: var(--space-2);
  }
  .sp-root .sp-tile {
    flex-direction: row;
    align-items: center;
    min-height: 64px;
    padding: 18px 20px;
  }
  .sp-tile__title {
    font-size: 19px;
  }
  .sp-tile__text {
    display: none;
  }
}
.sp-columns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.sp-columns > * {
  flex: 1 1 420px;
  min-width: 0;
}
.sp-recent {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-recent li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.sp-recent li:first-child {
  border-top: 0;
}
.sp-recent small {
  color: var(--ink-muted);
  font-size: 15px;
}

/* Composer for a new request */
.sp-composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sp-composer .sp-btn {
  align-self: flex-start;
}
@media (max-width: 640px) {
  .sp-composer .sp-btn {
    align-self: stretch;
  }
}

/* Editor: the value currently on the website, under a changed field */
.sp-live-value {
  font-size: 15px;
  color: var(--ink-muted);
}
.sp-request-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.sp-site-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.sp-recent__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
}

/* Entry state, in words and colour */
.sp-flag {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink-muted);
}
.sp-flag--published {
  color: var(--status-ok-ink);
}
.sp-flag--changed {
  color: var(--status-warn-ink);
}
.sp-flag--scheduled {
  color: var(--accent);
}

/* 90 days must fit inside a card on a phone */
@media (max-width: 640px) {
  .sp-uptime {
    gap: 1px;
  }
  .sp-uptime i {
    min-width: 1px;
  }
}

/* Header: one line of links, "Więcej" with them, the account as a pill */
.sp-root .sp-header .sp-navigation {
  flex-wrap: nowrap;
  align-items: center;
}
.sp-root .sp-header nav a {
  white-space: nowrap;
}
.sp-root .sp-header a.sp-header__client {
  display: inline-block;
  line-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-root .sp-header a.sp-header__client:hover {
  background: var(--surface-100);
}
.sp-request__flag {
  align-self: flex-start;
}
/* Desktop header: the theme button shows only its icon, like the account
   pill next to it; its name stays for screen readers. */
@media screen and (min-width: 960px) {
  .sp-root .sp-header .sp-theme-toggle {
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
  .sp-root .sp-header .sp-theme-toggle .sp-theme-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Statistics and protection (2026-11): share lists, Web Vitals split bars */
.sp-lead p {
  margin: 0;
  font-size: 20px;
  line-height: 30px;
}
.sp-lead p + p {
  margin-top: var(--space-1);
  font-size: 18px;
}
.sp-card,
.sp-share {
  margin: 0;
  min-width: 0;
  background: var(--surface-000);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.sp-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}
.sp-share__list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.sp-share__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}
.sp-share__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sp-share__name small,
.sp-share__value small {
  font-size: 14px;
  line-height: 20px;
}
.sp-share__value {
  display: flex;
  flex-direction: column;
  align-items: end;
  font-weight: 700;
  white-space: nowrap;
}
.sp-share__track {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--surface-200);
  overflow: hidden;
}
.sp-share__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}
.sp-share__rest .sp-share__name {
  color: var(--ink-muted);
}
.sp-share__rest .sp-share__track i {
  background: var(--ink-faint);
}
.sp-path {
  font: inherit;
  font-size: 16px;
}
.sp-section-intro {
  margin: 0 0 var(--space-3);
  max-width: 70ch;
}
.sp-vsplit {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.sp-vsplit .sp-vital__value {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}
.sp-vsplit__bar {
  position: relative;
  display: flex;
  gap: 2px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-200);
}
.sp-vsplit__part {
  flex-basis: 0;
}
.sp-vsplit__part--ok,
.sp-vsplit__key--ok span {
  background: var(--status-ok);
}
.sp-vsplit__part--warn,
.sp-vsplit__key--warn span {
  background: var(--status-warn);
}
.sp-vsplit__part--down,
.sp-vsplit__key--down span {
  background: var(--status-down);
}
/* Google's goal: 75% of visits in the good band. */
.sp-vsplit__goal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 75%;
  border-left: 2px dashed var(--surface-000);
}
.sp-vsplit__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-3);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-muted);
}
.sp-vsplit__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sp-vsplit__key b {
  color: var(--ink);
}
.sp-vsplit__key span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.sp-protect-state {
  margin-bottom: var(--space-3);
}
@media screen and (max-width: 959px) {
  .sp-share-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .sp-card,
  .sp-share {
    padding: var(--space-3) 20px;
    border-radius: 18px;
  }
  .sp-lead p {
    font-size: 18px;
    line-height: 27px;
  }
}
