
  :root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); scroll-behavior: smooth; }
  body { background: #F6F5F1; color: #2E3640; -webkit-font-smoothing: antialiased; }

  /* Expanded width for display type – the architectural voice of the brand */
  .wide   { font-stretch: 118%; letter-spacing: -0.02em; }
  .narrow { font-stretch: 78%; }
  .tracked { letter-spacing: 0.32em; }

  /* Faint structural grid, as in the reference sheet */
  .grid-bg {
    background-image:
      linear-gradient(rgba(46,54,64,.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(46,54,64,.055) 1px, transparent 1px);
    background-size: 64px 64px;
  }
  .blueprint {
    background-color: #EEF4F7;
    background-image:
      linear-gradient(rgba(46,192,250,.22) 1px, transparent 1px),
      linear-gradient(90deg, rgba(46,192,250,.22) 1px, transparent 1px),
      linear-gradient(rgba(46,192,250,.10) 1px, transparent 1px),
      linear-gradient(90deg, rgba(46,192,250,.10) 1px, transparent 1px);
    background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  }

  /* Viewfinder corners – taken straight from the logo */
  .vf { --c: rgba(46,54,64,.55); --s: 22px; --w: 1.5px; position: relative; }
  .vf::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(var(--c),var(--c)) left top / var(--s) var(--w),
      linear-gradient(var(--c),var(--c)) left top / var(--w) var(--s),
      linear-gradient(var(--c),var(--c)) right top / var(--s) var(--w),
      linear-gradient(var(--c),var(--c)) right top / var(--w) var(--s),
      linear-gradient(var(--c),var(--c)) left bottom / var(--s) var(--w),
      linear-gradient(var(--c),var(--c)) left bottom / var(--w) var(--s),
      linear-gradient(var(--c),var(--c)) right bottom / var(--s) var(--w),
      linear-gradient(var(--c),var(--c)) right bottom / var(--w) var(--s);
    background-repeat: no-repeat;
    transition: inset .35s cubic-bezier(.2,.7,.2,1), filter .35s;
  }
  .vf-hover:hover::before, .vf-hover:focus-visible::before, .vf-hover:focus-within::before {
    --c: #2EC0FA; inset: -6px; filter: none;
  }
  .vf-hover { transition: box-shadow .35s, border-color .35s; }
  .vf-hover:hover { box-shadow: 0 0 0 1px rgba(46,192,250,.55), 0 24px 48px -28px rgba(46,54,64,.35); }

  /* The sight line – one orchestrated load moment */
  .sightline { transform-origin: left; animation: draw 1.4s cubic-bezier(.6,0,.2,1) .2s both; }
  .sightline-dot { animation: pop .4s ease-out 1.5s both; }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes pop  { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

  /* Stylized video placeholder */
  .video-ph {
    background:
      radial-gradient(60% 80% at 70% 40%, rgba(46,192,250,.30), transparent 60%),
      radial-gradient(50% 60% at 20% 80%, rgba(46,192,250,.10), transparent 60%),
      linear-gradient(160deg, #E8EEF2 0%, #F4F6F7 100%);
    background-size: 160% 160%, 160% 160%, 100% 100%;
    animation: drift 18s ease-in-out infinite alternate;
  }
  @keyframes drift { from { background-position: 0% 0%, 100% 100%, 0 0; } to { background-position: 100% 60%, 0% 30%, 0 0; } }
  .scan { background: repeating-linear-gradient(0deg, rgba(46,54,64,.03) 0 1px, transparent 1px 3px); }

  /* Portal panels widen on hover (desktop) */
  @media (min-width: 900px) {
    .portal { display: flex; }
    .portal > a { flex: 1 1 0; transition: flex-grow .6s cubic-bezier(.2,.7,.2,1); }
    .portal:hover > a { flex-grow: .8; }
    .portal > a:hover, .portal > a:focus-visible { flex-grow: 1.4; }
  }

  /* Subtle icon motion (lives inside the SVG symbols, so every logo instance gets it) */
  .ic-brackets { transform-box: view-box; transform-origin: 50px 50px; animation: ic-focus 6s ease-in-out infinite; }
  .ic-pulse    { transform-box: fill-box; transform-origin: center; animation: ic-pulse 3s ease-in-out infinite; }
  .ic-blink    { animation: ic-blink 3s ease-in-out infinite; }
  .ic-nudge    { transform-box: fill-box; transform-origin: center; animation: ic-nudge 3s ease-in-out infinite; }
  .ic-ray      { stroke-dasharray: 1; animation: ic-ray 7s ease-in-out infinite; }
  .ic-cross    { transform-box: fill-box; transform-origin: center; animation: ic-cross 7s ease-in-out infinite; }
  @keyframes ic-focus { 0%, 100% { transform: scale(1); } 50% { transform: scale(.96); } }
  @keyframes ic-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
  @keyframes ic-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
  @keyframes ic-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.2px); } }
  @keyframes ic-ray   { 0% { stroke-dashoffset: 1; opacity: 1; } 35%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes ic-cross { 0%, 30% { opacity: .3; transform: rotate(-45deg); } 40%, 85% { opacity: 1; transform: rotate(0); } 100% { opacity: .3; transform: rotate(0); } }

  :focus-visible { outline: 2px solid #0A78B4; outline-offset: 3px; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }

  /* ---- Rått, taktilt uttryck (guide-sidan) ---- */
  .type { font-family: 'Courier Prime', ui-monospace, 'Courier New', monospace; }
  .tilt-l { transform: rotate(-1.6deg); }
  .tilt-r { transform: rotate(1.3deg); }
  .hl { background: linear-gradient(176deg, transparent 52%, rgba(46,192,250,.55) 52%, rgba(46,192,250,.55) 88%, transparent 88%); padding: 0 .15em; }
  .tape { position: absolute; width: 96px; height: 26px; background: rgba(46,192,250,.42); transform: rotate(-5deg); box-shadow: 0 1px 0 rgba(46,54,64,.08); }
  .torn { clip-path: polygon(0 3%, 7% 0, 18% 2%, 31% 0, 46% 3%, 60% 0, 74% 2%, 88% 0, 100% 3%, 99% 30%, 100% 62%, 98% 100%, 84% 97%, 70% 100%, 55% 97%, 40% 100%, 25% 97%, 10% 100%, 0 97%, 2% 66%, 0 33%); }
  .halftone { background-image: radial-gradient(rgba(46,192,250,.55) 1.6px, transparent 1.7px); background-size: 12px 12px; border-radius: 50%; }
  .halftone-light { background-image: radial-gradient(rgba(246,245,241,.6) 1.6px, transparent 1.7px); background-size: 12px 12px; border-radius: 50%; }
  @media (prefers-reduced-motion: reduce) { .tilt-l, .tilt-r { transform: none; } }

  /* Scroll reveal (only when JS runs, never for reduced motion) */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

  /* YouTube-spelaren får full storlek direkt, så att YouTube väljer HD */
  [data-yt] iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  /* Kollage: bredare kort på mobil så att texten får plats */
  @media (max-width: 640px) { .cl-wide { width: 58% !important; } }

  /* Platshållartext som inte blir indexerad text */
  .ph-label::before { content: attr(data-ph); }

  /* subnav-offset: plats för meny + flikrad när man hoppar till ett avsnitt */
  @media (min-width: 768px) { html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 124px); } }

  /* Inget sidledsscroll på mobil från lutande kort och kollage */
  main { overflow-x: clip; }

  /* Tjänsteflikarna får plats på en rad i mobilen */
  @media (max-width: 639px) { nav[aria-label="Siktlinjen Medias tjänster"] .text-sm { gap: 14px; font-size: 13px; } }
