/* =============================================================================
   Kry UPN Migration Hub — shared stylesheet
   Brand tokens lifted from upn_migration_hub.html mock.
   Used by /en/, /sv/, /no/ pages.
   ============================================================================= */

:root {
  /* Brand palette */
  --blue-900: #002845;
  --blue-500: #03A3F4;
  --blue-100: #E6FBFF;
  --primary-500: #39CFBA;
  --primary-100: #EEFAF7;
  --pink-500: #FE6F89;
  --orange-500: #FF9732;
  --orange-100: #FFE9C8;
  --yellow-100: #FFFAD0;
  --yellow-500: #FBD100;

  /* Surface + text */
  --text: #002845;
  --text-muted: #4a6577;
  --bg: #ffffff;
  --bg-soft: #f7fbfd;
  --border: #d9e5ec;

  /* Geometry */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0, 40, 69, 0.06), 0 2px 6px rgba(0, 40, 69, 0.04);
  --shadow-md: 0 4px 10px rgba(0, 40, 69, 0.08), 0 10px 30px rgba(0, 40, 69, 0.06);

  /* Typography (no CDN fonts — system fallbacks only) */
  --font-display: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--blue-900);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; line-height: 1.2; margin-top: 0; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--blue-500); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* =============================================================================
   Layout
   ============================================================================= */

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* =============================================================================
   Site nav (top bar)
   ============================================================================= */

.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.site-nav .brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-900);
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-nav .brand::before {
  content: "";
  width: 28px; height: 28px;
  background: var(--blue-900);
  border-radius: 6px;
  display: inline-block;
  position: relative;
}
.site-nav .brand::after {
  content: "K";
  position: absolute;
  margin-left: -22px;
  margin-top: 1px;
  color: var(--primary-500);
  font-weight: 700;
  font-size: 1rem;
}
.site-nav .nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav .nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav .nav-links a:hover {
  color: var(--blue-900);
  text-decoration: none;
}
body[data-page="home"] .nav-links a.nav-home,
body[data-page="login-guide"] .nav-links a.nav-login,
body[data-page="apps"] .nav-links a.nav-apps {
  color: var(--blue-900);
  border-bottom-color: var(--primary-500);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-toggle a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.lang-toggle a:hover {
  color: var(--blue-900);
  text-decoration: none;
}
.lang-toggle a.active {
  background: white;
  color: var(--blue-900);
  box-shadow: var(--shadow-sm);
}

/* =============================================================================
   Hero
   ============================================================================= */

.hero {
  padding: 44px 44px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(57, 207, 186, 0.18), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(3, 163, 244, 0.12), transparent 55%),
    var(--blue-100);
  position: relative;
  overflow: hidden;
  margin-top: 24px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 24px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600;
  color: var(--blue-900);
  background: white;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 40, 69, 0.1);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px;
  background: var(--primary-500); border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(57, 207, 186, 0.25);
}

.hero p.lead {
  font-size: 1.1rem; color: var(--text-muted); max-width: 540px;
}

.hero-key {
  background: white;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary-500);
}
.hero-key .label-row {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); font-weight: 600; margin-bottom: 8px;
}
.hero-key .upn-line {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  word-break: break-all;
  margin: 8px 0;
}
.hero-key .upn-line.old {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--pink-500);
  text-decoration-thickness: 2px;
}
.hero-key .upn-line.new {
  color: var(--blue-900);
  font-weight: 600;
}
.hero-key .arrow { color: var(--primary-500); font-weight: 700; margin: 4px 0; font-size: 1.1rem; }
.hero-key .pwd-note {
  font-size: 0.85rem; color: var(--text-muted); margin: 12px 0 0;
}
.hero-key .market-group { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--border); }
.hero-key .market-group:first-of-type { border-top: 0; padding-top: 0; }
.hero-key .market-label {
  font-size: 0.78rem; font-weight: 600; color: var(--blue-900);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* =============================================================================
   Country / timeline cards
   ============================================================================= */

.status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}
@media (max-width: 720px) { .status-row { grid-template-columns: 1fr; } }
.status-row.solo {
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
}

.country-card {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: white;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.country-card .flag-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.country-card .flag { font-size: 1.4rem; }
.country-card .country-name {
  font-weight: 600; color: var(--blue-900);
}
.country-card .status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--orange-100); color: #a05a00;
  width: fit-content;
  margin-top: 4px;
}
.country-card.complete .status-pill {
  background: var(--primary-100); color: #0a8870;
}
.country-card .date-line {
  font-size: 1.4rem; font-weight: 600; color: var(--blue-900);
  font-family: var(--font-display);
  margin-top: 6px;
}
.country-card .meta-line {
  font-size: 0.88rem; color: var(--text-muted);
}

/* Event-stack — visualises the Sun → Mon rhythm */
.country-card .event-stack {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.country-card .event {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
}
.country-card .event.live {
  background: var(--primary-100);
  border-color: rgba(57, 207, 186, 0.45);
}
.country-card .event-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
.country-card .event-text { flex: 1; }
.country-card .event-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
}
.country-card .event-date {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--blue-900);
  font-family: var(--font-display);
  margin-top: 2px;
  display: block;
}
.country-card .event.live .event-label { color: #0a8870; }
.country-card .event-arrow {
  text-align: center;
  color: var(--primary-500);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 0.6;
  margin: -2px 0;
}

.country-card .countdown {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}
.country-card .event.live .countdown { color: #0a8870; }

.country-card .event-time {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Pre-change checklist (Section 02) */
.prep-list {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 28px 22px 44px;
  margin: 0;
}
.prep-list li {
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.55;
}
.prep-list li:last-child { margin-bottom: 0; }

/* =============================================================================
   Sections
   ============================================================================= */

section { margin-top: 56px; }
.section-head { margin-bottom: 24px; }
.section-head .num {
  font-size: 0.78rem; font-weight: 700;
  color: var(--primary-500);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.section-head h2 { margin-bottom: 4px; }
.section-head .sub { color: var(--text-muted); }

/* =============================================================================
   Important callout
   ============================================================================= */

.callout {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--yellow-100);
  border-left: 4px solid var(--orange-500);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.callout-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 2px;
}
.callout strong { color: var(--blue-900); }
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }

/* Softer information note — for timing/scheduling info that's not a warning */
.info-note {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--blue-100);
  border-left: 4px solid var(--blue-500);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-note-icon { font-size: 1.3rem; line-height: 1; margin-top: 2px; }
.info-note strong { color: var(--blue-900); }
.info-note p { margin: 0; }
.info-note p + p { margin-top: 6px; }

/* =============================================================================
   Action steps (3-up)
   ============================================================================= */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.step .step-num {
  width: 36px; height: 36px;
  background: var(--blue-900); color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-family: var(--font-display);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step ul { padding-left: 18px; margin: 0; color: var(--text-muted); font-size: 0.93rem; }
.step ul li { margin-bottom: 6px; }
.step .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-500);
}

/* =============================================================================
   App impact cards
   ============================================================================= */

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) { .impact-grid { grid-template-columns: 1fr; } }

.impact-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--border);
}
.impact-card.good { border-left: 4px solid var(--primary-500); }
.impact-card.warn { border-left: 4px solid var(--orange-500); }
.impact-card.info { border-left: 4px solid var(--blue-500); }
.impact-card h3 {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.impact-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}
.good .impact-icon { background: var(--primary-100); color: #0a8870; }
.warn .impact-icon { background: var(--orange-100); color: #a05a00; }
.impact-card ul { padding-left: 20px; color: var(--text-muted); margin: 0; }
.impact-card ul li { margin-bottom: 6px; }
.impact-card ul li strong { color: var(--blue-900); font-weight: 600; }
.impact-card p.note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* =============================================================================
   FAQ collapsibles
   ============================================================================= */

.faq-list { display: flex; flex-direction: column; gap: 10px; }
details.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
details.faq-item[open] {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-500);
}
details.faq-item summary {
  padding: 16px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-900);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--primary-500);
  transition: transform 0.2s;
  line-height: 1;
}
details.faq-item[open] summary::after { content: "−"; }
details.faq-item .faq-body {
  padding: 0 22px 18px;
  color: var(--text-muted);
}

/* =============================================================================
   Support CTA banner
   ============================================================================= */

.support-banner {
  background: linear-gradient(135deg, var(--blue-900), #003a64);
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  align-items: center;
}
@media (max-width: 720px) {
  .support-banner { grid-template-columns: 1fr; padding: 28px 24px; }
}
.support-banner h2 { color: white; margin: 0 0 8px; }
.support-banner p { color: rgba(255, 255, 255, 0.85); margin: 0; }
.support-cta {
  display: flex; flex-direction: column; gap: 10px;
}
.support-cta a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  background: var(--primary-500);
  color: var(--blue-900);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s;
}
.support-cta a.btn:hover { transform: translateY(-1px); text-decoration: none; }
.support-cta a.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.support-cta .teams-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  text-align: center;
}

/* =============================================================================
   Footer
   ============================================================================= */

footer.site-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site-footer a {
  color: var(--text-muted);
  font-weight: 500;
}
footer.site-footer a:hover {
  color: var(--blue-900);
}

/* =============================================================================
   Login guide page
   ============================================================================= */

.guide-step {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
@media (max-width: 820px) { .guide-step { grid-template-columns: 1fr; } }

.guide-step .guide-num {
  display: inline-flex;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue-900);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.guide-step h3 { margin-bottom: 12px; }
.guide-step .step-note {
  background: var(--bg-soft);
  border-left: 3px solid var(--orange-500);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.93rem;
  color: var(--text);
  margin: 0 0 16px;
}
.guide-step .step-note strong { color: var(--blue-900); }
.guide-step ol {
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}
.guide-step ol li { margin-bottom: 8px; }
.guide-step .screenshot {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow: hidden;
}
.guide-step .screenshot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}
.guide-step .screenshot .caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--blue-900);
  font-weight: 500;
  text-decoration: none;
}
.back-home:hover { background: white; text-decoration: none; }

/* "Print this guide" CTA (login-guide page) — matches .btn green-pill pattern */
.print-cta {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.print-cta .btn-print {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--primary-500);
  color: var(--blue-900);
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s;
  white-space: nowrap;
}
.print-cta .btn-print:hover { transform: translateY(-1px); }
.print-cta-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* =============================================================================
   Apps page (sub-page)
   ============================================================================= */

/* Quick-rule rows inside .hero-key panel */
.hero-key .quick-rule {
  font-size: 0.88rem;
  color: var(--text);
  margin: 10px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.hero-key .quick-rule-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
  width: 20px;
  text-align: center;
}
.hero-key .quick-rule-text {
  flex: 1;
  min-width: 0;
}

/* Per-app summary layout: name on left, one-line status on right */
details.faq-item.app-item summary {
  flex-wrap: wrap;
}
.app-name {
  font-weight: 600;
  color: var(--blue-900);
}
.app-status {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: auto;
  margin-right: 12px;
  text-align: right;
}
@media (max-width: 560px) {
  .app-status { margin-left: 0; text-align: left; width: 100%; margin-top: 4px; }
}

/* Footnote line beneath SSO-apps section */
.section-note {
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
}

/* =============================================================================
   Main-page #systems teaser (links to apps.html)
   ============================================================================= */

.systems-teaser {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}
.systems-teaser .teaser-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.systems-teaser .teaser-row:last-of-type { border-bottom: 0; }
.systems-teaser .teaser-icon {
  font-size: 1.15rem;
  line-height: 1.45;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.systems-teaser .teaser-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.systems-teaser .teaser-text strong { color: var(--blue-900); }
.systems-teaser .teaser-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 22px;
  background: var(--primary-500);
  color: var(--blue-900);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s;
}
.systems-teaser .teaser-cta:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* =============================================================================
   Print stylesheet — login guide friendly for IT desk
   ============================================================================= */

@media print {
  .site-nav, .lang-toggle, footer.site-footer, .back-home, .print-cta {
    display: none !important;
  }
  body { background: white; color: black; }
  .page-wrap { max-width: 100%; padding: 0; }
  .guide-step {
    border: 1px solid #999;
    box-shadow: none;
    page-break-inside: avoid;
    margin-top: 20px;
  }
  details.faq-item { box-shadow: none; }
  details.faq-item .faq-body { display: block !important; }
  details.faq-item summary::after { display: none; }
  a { color: black; text-decoration: underline; }
}
