/* Metod (/forskning) — method page on Cardinal navy. Extends research.css (header, footer).
   Colour is used sparingly: white and grey, teal only where something passes or is marked. */
.research-lab { background: #050d16; --rm-line: #1a2c40; --rm-line-2: #2b465d; --rm-head: #eef3f7; --rm-body: #b5c0c3; --rm-muted: #8ea3b2; --rm-label: #7f929e; --rm-teal: #84c9be; --rm-action: #4b91b8; }
.research-lab .research-page { overflow-x: clip; }
.research-lab main.rl-main { width: min(1200px, calc(100% - 32px)); max-width: 1200px; margin: 0 auto; }
.research-lab main.rl-main section { scroll-margin-top: 28px; }

.rm-eyebrow { margin: 0; font: 500 11px "Spline Sans Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--rm-muted); }
.rl-main h1, .rl-main h2 { font-family: "Funnel Display", sans-serif; font-weight: 400; color: var(--rm-head); }
.rl-main h1 em, .rl-main h2 em { font-style: normal; color: #9fd6d0; }

/* Calls to action: the platform's blue pill and outlined pill */
.rm-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rm-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font: 600 14px "Funnel Sans", sans-serif; text-decoration: none; white-space: nowrap; transition: background .18s, border-color .18s; }
.rm-primary { background: var(--rm-action); color: #04121c; }
.rm-primary:hover { background: #5ba0c6; }
.rm-secondary { border: 1px solid var(--rm-line-2); color: #e0e8ef; }
.rm-secondary:hover { border-color: var(--rm-action); }
.rm-cta:focus-visible, .rm-sources a:focus-visible { outline: 2px solid var(--rm-action); outline-offset: 3px; }

/* Hero: interactive digit field */
.rm-hero { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 36px; align-items: center; padding: clamp(44px, 6vw, 72px) 0 clamp(48px, 6vw, 76px); }
.rm-hero h1 { margin: 16px 0 18px; font-size: clamp(40px, 5vw, 66px); line-height: 1.03; letter-spacing: -.035em; }
.rm-lede { max-width: 440px; margin: 0 0 28px; font: 400 16px/1.6 "Funnel Sans", sans-serif; color: var(--rm-body); }
.rm-field canvas { display: block; width: 100%; aspect-ratio: 48 / 34; cursor: crosshair; touch-action: none; }

/* Sections */
.rm-block, .rm-closing { padding: clamp(56px, 7vw, 88px) 0; border-top: 1px dashed var(--rm-line); }
.rm-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 34px; }
.rm-head h2 { margin: 12px 0 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.03em; }
.rm-head > p { margin: 0; max-width: 440px; color: var(--rm-muted); font: 400 15px/1.6 "Funnel Sans", sans-serif; }

/* Method cards: tinted panels, like the platform's */
.rm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rm-card { margin: 0; }
.rm-surface { border-radius: 12px; background: rgba(22, 44, 66, .32); overflow: hidden; }
.rm-surface canvas { display: block; width: 100%; aspect-ratio: 16 / 10; }
.rm-card h3 { margin: 16px 0 6px; font: 500 17px "Funnel Sans", sans-serif; color: var(--rm-head); }
.rm-card p { margin: 0; font: 400 14px/1.55 "Funnel Sans", sans-serif; color: var(--rm-muted); }

/* Factor ledger with the platform's factor icons in white */
.rm-ledger { width: 100%; border-collapse: collapse; font-family: "Funnel Sans", sans-serif; }
.rm-ledger thead th { padding: 0 14px 12px 0; text-align: left; font: 500 10px "Spline Sans Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--rm-label); border-bottom: 1px solid var(--rm-line-2); }
.rm-ledger td, .rm-ledger tbody th { padding: 17px 14px 17px 0; vertical-align: top; text-align: left; border-bottom: 1px solid var(--rm-line); font-size: 15px; line-height: 1.55; color: var(--rm-body); }
.rm-ledger tbody th { width: 190px; white-space: nowrap; font: 500 12px/1.9 "Spline Sans Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--rm-head); }
.rm-ledger tbody th svg { width: 19px; height: 19px; margin-right: 12px; vertical-align: -5px; fill: none; stroke: var(--rm-head); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rm-ledger .rm-study { width: 250px; white-space: nowrap; font: 400 12px/1.9 "Spline Sans Mono", monospace; color: var(--rm-muted); }
.rm-ledger .rm-measure { width: 300px; font-size: 14px; color: var(--rm-muted); }
.rm-note { margin: 16px 0 0; font: 400 11px "Spline Sans Mono", monospace; color: var(--rm-label); }

/* Limits */
.rm-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rm-line-2); }
.rm-limits > div { padding: 22px 26px 0 0; }
.rm-limits > div + div { padding-left: 26px; border-left: 1px dashed var(--rm-line); }
.rm-limits p:not(.rm-eyebrow) { margin: 10px 0 0; font: 400 16px/1.6 "Funnel Sans", sans-serif; color: var(--rm-body); }

/* Sources: plain editorial list, white, no dates */
.rm-sources { max-width: 860px; margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(238, 243, 247, .18); counter-reset: rm-src; }
.rm-sources li { counter-increment: rm-src; border-bottom: 1px solid rgba(238, 243, 247, .1); }
.rm-sources a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 14px; align-items: baseline; padding: 16px 0; text-decoration: none; color: var(--rm-head); }
.rm-sources a::before { content: counter(rm-src, decimal-leading-zero); font: 400 12px "Spline Sans Mono", monospace; color: rgba(238, 243, 247, .45); }
.rm-title { font: 400 18px/1.35 "Funnel Display", sans-serif; letter-spacing: -.01em; }
.rm-authors { display: block; margin-top: 4px; font: 400 13px "Funnel Sans", sans-serif; color: rgba(238, 243, 247, .55); }
.rm-ext { color: rgba(238, 243, 247, .4); font-size: 13px; }
.rm-sources a:hover .rm-title { text-decoration: underline; text-decoration-color: rgba(238, 243, 247, .35); text-underline-offset: 5px; }

.rm-closing { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: clamp(64px, 8vw, 96px); }
.rm-closing h2 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }

@media (max-width: 980px) {
  .rm-hero { grid-template-columns: 1fr; gap: 28px; }
  .rm-head, .rm-limits { grid-template-columns: 1fr; gap: 12px; }
  .rm-limits > div + div { padding-left: 0; border-left: 0; border-top: 1px dashed var(--rm-line); }
  .rm-cards { grid-template-columns: 1fr; }
  .rm-ledger .rm-measure { display: none; }
  .rm-ledger tbody th { width: auto; }
  .rm-ledger .rm-study { white-space: normal; width: auto; }
}
@media (max-width: 560px) {
  .rm-ledger thead th:nth-child(3), .rm-ledger td:nth-child(3) { display: none; }
  .rm-title { font-size: 16px; }
  .rm-sources a { grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .rm-cta { transition: none; } }

/* Page accent colours (October 1, 2026): Metod uses Storlek silver; Plattformen (home) keeps teal,
   Bolagsanalys (yellow) and Blueprints (blue) set theirs in their own stylesheets. */
.research-lab main.rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) :is(h1, h2) em { color: #8fa1ac; }

/* Beräkningen and Modellversion (October 3, 2026): the same ledger, with wrapping text columns. */
.rm-inputs td:nth-child(2) { font-size: 14px; }
.rm-inputs .rm-group { width: 240px; font: 400 12px/1.9 "Spline Sans Mono", monospace; color: var(--rm-muted); }
.rm-rules { margin-top: 44px; }
.rm-rules tbody th { width: 220px; }
.rm-rules td { font-size: 14px; max-width: 760px; }
.rm-versions { margin-top: 0; }
.rm-note a { color: inherit; text-decoration: underline; text-decoration-color: var(--rm-line-2); text-underline-offset: 4px; }
.rm-note a:hover { color: var(--rm-head); }
@media (max-width: 980px) {
  .rm-inputs .rm-group { width: auto; white-space: normal; }
  .rm-rules tbody th, .rm-inputs tbody th { white-space: normal; }
}
@media (max-width: 640px) {
  .rm-rules tr, .rm-inputs tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--rm-line); }
  .rm-rules thead, .rm-inputs thead { display: none; }
  .rm-rules tbody th, .rm-rules td, .rm-inputs tbody th, .rm-inputs td { display: block !important; width: auto; padding: 2px 0; border: 0; }
}

/* Phone order as on the home page (October 3, 2026): title, the number field, then the intro and buttons.
   Metod only; the home page shares .rm-hero and has its own phone layout. */
@media (max-width: 980px) {
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero-copy { display: contents; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero .rm-eyebrow { order: 1; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero h1 { order: 2; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero .rm-field { order: 3; margin: 4px 0 26px; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero .rm-lede { order: 4; }
  .rl-main:not(.pf-main):not(.cn-ba):not(.cn-bp):not(.cn-by) .rm-hero .rm-actions { order: 5; }
}

/* Modellversion with the Polaris clip (October 4, 2026): name and text on the left, the clip on the right.
   The clip plays once, muted, when it comes into view and rests on its last frame (research-lab.js). */
.rm-version { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 48px; align-items: center; }
.rm-version h2 { margin: 12px 0 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.03em; }
.rm-version-lead { margin: 18px 0 0; max-width: 420px; color: var(--rm-muted); font: 400 15px/1.6 "Funnel Sans", sans-serif; }
.rm-player { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: #040b14; aspect-ratio: 16 / 9; }
.rm-player video { display: block; width: 100%; height: 100%; object-fit: cover; }
.rm-play { position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 999px; border: 1px solid rgba(238, 243, 247, .22); background: rgba(4, 11, 20, .55); color: #e0e8ef; cursor: pointer; opacity: 0; transition: opacity .3s, border-color .2s; }
.rm-player:hover .rm-play, .rm-play:focus-visible, .rm-player.is-ended .rm-play, .rm-player.is-paused .rm-play { opacity: 1; }
.rm-play:hover { border-color: var(--rm-action); }
.rm-play:focus-visible { outline: 2px solid var(--rm-action); outline-offset: 3px; }
.rm-play svg { width: 14px; height: 14px; fill: currentColor; }
.rm-play .rm-i-pause, .rm-play .rm-i-replay { display: none; }
.rm-player.is-playing .rm-i-play, .rm-player.is-ended .rm-i-play { display: none; }
.rm-player.is-playing .rm-i-pause, .rm-player.is-ended .rm-i-replay { display: block; }
@media (max-width: 980px) { .rm-version { grid-template-columns: 1fr; gap: 28px; } }
@media (prefers-reduced-motion: reduce) { .rm-play { transition: none; } }
