/* ==========================================================================
   HSC — HAUT SURFACE COMPILER
   Homepage projection, HSC RC2 with integration repairs.
   © Haut Forvalting AS (Org.nr. 931 603 760) — Altibedrift.
   Konfidensiell arkitektur/arbeidsdokument. Uautorisert kopiering/distribusjon forbudt.
   SCOPE: body[data-ws-experience="2"][data-ws-home-surface="1"] main
   ========================================================================== */

/* 1. TOKENS & BASE */
body[data-ws-experience="2"][data-ws-home-surface="1"] main {
  --hs-paper: #f4f3ef;
  --hs-forest: #102724;
  --hs-forest-light: #1c3d39;
  --hs-lime: #d2f34c;
  --hs-mint: #96e0c6;
  --hs-teal: #77b8b4;
  --hs-line-light: rgba(16, 39, 36, 0.1);
  --hs-line-dark: rgba(255, 255, 255, 0.15);

  background-color: var(--hs-paper);
  font-family: system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main *,
body[data-ws-experience="2"][data-ws-home-surface="1"] main *::before,
body[data-ws-experience="2"][data-ws-home-surface="1"] main *::after {
  box-sizing: inherit;
}

/* 2. TYPOGRAFI & KONTRAST (Overstyrer eksisterende cascade) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main h1,
body[data-ws-experience="2"][data-ws-home-surface="1"] main h2,
body[data-ws-experience="2"][data-ws-home-surface="1"] main h3 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: clamp(12px, 2vw, 16px);
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
body[data-ws-experience="2"][data-ws-home-surface="1"] main h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
body[data-ws-experience="2"][data-ws-home-surface="1"] main h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-kicker,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hs-forest-light);
  margin-bottom: 16px;
  display: block;
}

/* LØSER KONTRASTFEIL: Tvinger lyse variabler på mørke flater */
body[data-ws-experience="2"][data-ws-home-surface="1"] main [data-ui-surface="dark"],
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel {
  background-color: var(--hs-forest);
  --wx-text: #ffffff !important;
  --wx-copy: #d1dcd8 !important;
  color: var(--wx-text);
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main [data-ui-surface="dark"] .home-v2-kicker {
  color: var(--hs-lime);
}

/* LØSER KONTRASTFEIL 2: Tvinger mørke variabler på Lime/Papir-flater inni dark context */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .button--primary,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__button,
body[data-ws-experience="2"][data-ws-home-surface="1"] main [data-ui-surface="paper"] {
  background-color: var(--hs-paper);
  --wx-text: #102724 !important;
  --wx-copy: #40574f !important;
  color: var(--wx-text) !important;
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .button--primary,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__button {
  background-color: var(--hs-lime);
}

/* 3. LAYOUT & RYTME (Mindre padding, dynamisk clamp) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-section,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero {
  padding: 0 5vw;
  margin-bottom: clamp(48px, 8vw, 80px);
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero {
  padding-top: clamp(24px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 5vw, 48px);
  align-items: center;
}

@media (min-width: 1024px) {
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero {
    grid-template-columns: 1fr 1fr;
  }
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-section__head {
  max-width: 800px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

/* 4. KOMPONENTER & KNAPPER (Native touch 44px) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main a { text-decoration: none; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-text-link {
  font-weight: 600; color: inherit; border-bottom: 1px solid currentColor; display: inline-flex; min-height: 44px; align-items: center;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .button,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; font-weight: 600; border-radius: 4px; cursor: pointer; border: none;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .button--secondary {
  background-color: transparent; border: 1px solid var(--hs-line-dark); color: #ffffff !important;
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__actions,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-explain__actions,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-convert__actions {
  display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0;
}

/* 5. CTA PANEL (Geometrisk detalj, tekst foran) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: 24px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid rgba(210, 243, 76, 0.4);
  transform: translate(6px, 6px);
  border-radius: inherit; pointer-events: none;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__action {
  border-top: 1px solid var(--hs-line-dark); padding-top: 24px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__button {
  width: 100%; justify-content: space-between; margin-bottom: 12px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__trust {
  display: flex; gap: 12px; list-style: none; padding: 0; margin: 0; font-size: 0.75rem; opacity: 0.9;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__trust li::before { content: "· "; color: var(--hs-lime); }

/* 6. GRID SYSTEM (Strict minmax 1fr, 1 kolonne mobil) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-now__grid,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .traffic-editorial-index__grid,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-job-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
}

@media (min-width: 768px) {
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-now__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .traffic-editorial-index__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 7. KORT FLATER (Kategoriaksenter og luft) */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .traffic-editorial-index__grid a,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-job-grid article {
  background: #ffffff;
  border: 1px solid var(--hs-line-light);
  padding: clamp(20px, 3vw, 32px);
  border-radius: 6px;
  display: flex; flex-direction: column;
  position: relative;
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story span,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .traffic-editorial-index__grid span,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-job-grid span {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 12px;
}

/* Kategori-aksenter via border-top/farger */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story--ai { border-top: 4px solid var(--hs-lime); }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story--marketing { border-top: 4px solid var(--hs-mint); }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story--norway { border-top: 4px solid var(--hs-teal); }

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story b,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .traffic-editorial-index__grid b,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-job-grid a {
  margin-top: auto; padding-top: 24px; font-weight: 600; font-size: 0.875rem; color: var(--hs-forest);
}

/* 8. Signal map: preserve baseline positions and connector geometry. */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-ai {
  gap: 32px; padding: clamp(24px, 4vw, 40px); border-radius: 12px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__node {
  --wx-text: #ffffff; --wx-copy: #d1dcd8;
  border-color: #56776d; background: #1c3d39; border-radius: 8px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub {
  background: #d2f34c; border-color: #d2f34c; border-radius: 8px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub :is(span,strong,small) {
  color: #102724 !important; opacity: 1;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__node :is(span,small) {
  color: #d1dcd8 !important; opacity: 1; font-size: .8rem;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__lines path {
  stroke: #96e0c6; stroke-width: 1.5;
}

/* 9. SKJEMA & NYHETSBREV */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-convert {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; border-radius: 8px; padding: clamp(24px, 5vw, 48px);
}
@media (min-width: 1024px) {
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-convert { grid-template-columns: 1fr 1fr; align-items: start; }
}

body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter {
  padding: clamp(24px, 4vw, 40px); border-radius: 8px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--hs-line-light);
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter input[type="email"] {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--hs-line-light); border-radius: 4px; font-size: 1rem;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter__topics {
  display: flex; flex-wrap: wrap; gap: 16px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter label {
  display: flex; align-items: center; gap: 8px; font-size: 0.875rem; cursor: pointer; min-height: 44px;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter button {
  background: var(--hs-forest); color: #ffffff; min-height: 48px; border: none; font-weight: 600; border-radius: 4px; cursor: pointer;
}

/* 10. OMTALE */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-mention-traffic {
  background: var(--hs-forest-light); color: #ffffff; padding: clamp(48px, 6vw, 80px) 5vw; text-align: center;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-mention-traffic__inner {
  max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; align-items: center;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-mention-traffic a {
  color: var(--hs-lime); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center;
}


/* Integration: resolve legacy !important layout rules inside the homepage only. */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) !important;
  padding-inline: 0; align-items: stretch;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-section { padding-inline: 0; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__copy {
  background: transparent !important; border: 0; box-shadow: none; padding: clamp(20px, 3vw, 40px);
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-ai,
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-convert {
  padding: clamp(24px, 4vw, 40px);
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-mention-traffic {
  --wx-text: #ffffff; --wx-copy: #d1dcd8;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel { min-width: 0; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-trust { flex-wrap: wrap; gap: 12px 24px; }
@media (max-width: 767px) {
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2 { width: calc(100% - 32px); }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero {
    grid-template-columns: minmax(0, 1fr) !important; gap: 24px; padding-top: 16px;
  }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__copy { padding: 16px 4px; }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2 h1 { font-size: clamp(2.2rem, 9.5vw, 3rem); }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2 h2 { font-size: clamp(1.7rem, 7vw, 2.15rem); }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main :is(.home-v2-now__grid,.traffic-editorial-index__grid,.home-v2-job-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main :is(.home-v2-ai,.home-v2-convert,.home-v2-explain) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__trust { flex-wrap: wrap; }
  body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-newsletter { padding: 20px; }
}

/* Typography and geometry within the existing gateway. */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel {
  min-height: 100%; height: 100%; justify-content: space-between; overflow: hidden;
  background: radial-gradient(ellipse at 100% 0, #2a5947 0, transparent 58%), #102724;
  border: 1px solid #547363; box-shadow: 0 20px 50px #10272418;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel > * { position: relative; z-index: 2; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel::before {
  content: ""; position: absolute; width: 220px; height: 220px; right: -115px; top: -105px;
  border: 1px solid #b2f46d38; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 24px #b2f46d09, 0 0 0 48px #b2f46d07, 0 0 0 72px #b2f46d05;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4 h2 { max-width: 20ch; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__lede { font-size: 1.0625rem; line-height: 1.65; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__copy h1 { max-width: 15ch; letter-spacing: -.045em; }

/* Observed preview repairs: inherited narrow title widths and pseudo-element geometry. */
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-story h3 {
  max-width: none !important; width: auto; text-wrap: balance;
}
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__panel::after { content: none; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-home-check-v4__action { width: 100%; max-width: none; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .home-v2-hero__copy h1 { text-wrap: balance; }
body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub {
  --ui-fg: #102724; --ui-body: #40574f;
}
html body[data-ws-experience="2"][data-ws-home-surface="1"] main .ws-signal-map__hub :is(span,strong,small) {
  color: #102724 !important; -webkit-text-fill-color: currentColor !important;
}
