/* Ralf Media: "Annonsplatsen" */
:root {
    --paper: #ffffff;
    --ink: #000000;
    --graphite: #474747;
    --chrome: #e7e7e2;
    --slot: #5b2ee0;
    --slot-tint: #f2eefd;
    --display: 'Archivo', 'Arial Narrow', sans-serif;
    --serif: 'Source Serif 4', Georgia, serif;
    --main: 640px;
    --rail: 300px;
    --wide: 980px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--graphite);
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slot); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--slot); outline-offset: 2px; }
strong { color: var(--ink); font-weight: 600; }

h1, h2, h3, .display {
    font-family: var(--display);
    font-stretch: 72%;
    font-variation-settings: "wdth" 72;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 52px 0 14px; }
h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.15; margin: 32px 0 8px; }
p { margin: 0 0 20px; }
.lead { font-size: 1.3rem; line-height: 1.5; color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--wide) + 48px); margin: 0 auto; padding: 0 24px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--chrome); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { height: 30px; width: auto; }
.menu { display: flex; align-items: center; gap: 22px; font-family: var(--display); font-size: 0.86rem; font-weight: 500; }
.menu a { color: var(--ink); text-decoration: none; }
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--slot); text-decoration-thickness: 2px; }
.menu-toggle { display: none; }

/* Buttons */
.button {
    display: inline-block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--slot);
    color: #fff;
    border: 2px solid var(--slot);
    border-radius: 2px;
    padding: 12px 20px;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.button.quiet:hover { background: var(--ink); color: #fff; }
.menu .button { color: #fff; padding: 9px 16px; }
.menu .button:hover { text-decoration: none; }

/* Ad slots: the one loud element */
.slot { position: relative; margin-top: 30px; }
.slot-label {
    position: absolute;
    top: -24px; left: 0; right: 0;
    display: flex; justify-content: space-between;
    font-family: var(--display);
    font-size: 0.78rem;
    color: var(--graphite);
    font-variant-numeric: tabular-nums;
}

.slot-label .m { display: none; }
.slot-box { background: var(--slot-tint); }
.slot-label { color: #8a8a85; }
.slot-label .size { color: #8a8a85; }

/* Panorama 980 x 240 */
.panorama { width: 100%; max-width: var(--wide); margin-top: 52px; }
.panorama { margin-top: 44px; }
.panorama .slot-box {
    position: relative; overflow: hidden;
    min-height: 240px;
    padding: 34px 300px 34px 40px;
    background: var(--slot);
    color: #fff;
}
.panorama h1 { color: #fff; }
.panorama .copy p { margin: 14px 0 22px; font-size: 1.12rem; color: #e9e3ff; max-width: 560px; }
.panorama .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panorama .tax { position: absolute; right: 44px; bottom: -36px; width: 210px; height: auto; }
.creative .button { background: #fff; color: var(--ink); border-color: #fff; }
.creative .button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.creative .button.quiet { background: transparent; color: #fff; border-color: #fff; }
.creative .button.quiet:hover { background: #fff; color: var(--ink); }

/* Page body: article + rail */
.page { display: grid; grid-template-columns: minmax(0, var(--main)) var(--rail); gap: 40px; justify-content: space-between; max-width: var(--wide); margin: 40px auto 0; }
.article > :first-child { margin-top: 0; }
.article ul, .article ol { padding-left: 1.2em; margin: 0 0 20px; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--slot); }
.rail { position: relative; }
.halfpage { position: sticky; top: 48px; }
.halfpage .slot-box { position: relative; overflow: hidden; width: 300px; min-height: 600px; padding: 28px 24px; display: flex; flex-direction: column; background: var(--ink); color: #d9d9d4; }
.halfpage h2 { font-size: 2.3rem; margin: 0 0 12px; color: #fff; }
.halfpage p { font-size: 1rem; }
.halfpage .fine { font-size: 0.9rem; margin: 0; position: relative; z-index: 1; }
.halfpage .fine a { color: #fff; }
.halfpage .tax { margin: auto -42px -44px auto; padding-top: 12px; width: 170px; height: auto; flex: none; }
.halfpage .contact-form input { border-color: #fff; }
.halfpage .contact-form .button { background: var(--slot); border-color: var(--slot); color: #fff; }
.halfpage .contact-form .button:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Forms */
.contact-form { display: grid; gap: 10px; margin: 8px 0 16px; }
.contact-form input {
    font-family: var(--display); font-size: 1rem;
    padding: 12px 12px; border: 1px solid #c9c9c3; border-radius: 2px; background: #fff; color: var(--ink); width: 100%;
}
.contact-form input:focus { outline: 2px solid var(--slot); border-color: var(--slot); }
.contact-form button { width: 100%; }

/* Medium rectangle 300 x 250 */
.mrec { width: 300px; }
.mrec .slot-box { width: 300px; height: 250px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }

/* Facts table and data tables */
.facts, .data-table { width: 100%; border-collapse: collapse; margin: 16px 0 28px; font-size: 1rem; }
.facts th, .facts td, .data-table th, .data-table td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--chrome); vertical-align: top; }
.facts th { font-family: var(--display); font-weight: 600; color: var(--ink); width: 40%; }
.data-table th { font-family: var(--display); font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--ink); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* Service list on home */
.service-list { list-style: none; padding: 0; margin: 0; }
.service-list li { padding: 20px 0; border-bottom: 1px solid var(--chrome); }
.service-list a { font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 800; font-size: 2rem; line-height: 1.05; color: var(--ink); text-decoration: none; }
.service-list a:hover { color: var(--slot); }
.service-list p { margin: 6px 0 0; }

/* Process */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--chrome); margin: 0; }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--slot); }

/* Formats */
.formats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 20px; margin: 28px 0; }
.format { display: flex; flex-direction: column; gap: 6px; font-family: var(--display); font-size: 0.85rem; color: var(--ink); }
.format span:first-child { background: var(--slot); }
.format small { color: var(--graphite); font-size: 0.8rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--chrome); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; color: var(--slot); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; font-size: 1.02rem; }

/* Article mock (ad in context) */
.context-demo { margin: 72px 0 0; }
.demo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.demo-head h2 { margin: 0 0 8px; }
.demo-head p { margin: 0; }
.demo-switch { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--display); font-size: 0.95rem; }
.demo-switch button { font: inherit; font-weight: 600; padding: 10px 18px; border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 2px; cursor: pointer; }
.demo-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mock { background: #f6f6f3; padding: 36px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.mock-article { background: #fff; padding: 28px 30px 10px; }
.mock .section-name { font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: #b3261e; margin: 0 0 8px; }
.mock h3 { font-size: 2.1rem; margin: 0 0 10px; }
.mock .byline { font-family: var(--display); font-size: 0.85rem; margin: 0 0 16px; }
.mock-img { margin: 0 0 18px; }
.mock-img svg { display: block; width: 100%; height: auto; }
.mock .text { font-size: 1.02rem; color: #222; }
.mock-side .mrec { margin-top: 24px; }
.ad { font-family: var(--display); color: #fff; }
.ad .brandname { font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.ad .headline { font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 800; font-size: 2.1rem; line-height: 1.02; }
.ad .ad-cta { align-self: flex-start; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.9rem; padding: 9px 14px; }
.demo-caption { font-size: 0.92rem; margin-top: 16px; }

/* Dark band */
.band { background: var(--ink); color: #c9c9c4; margin-top: 72px; padding: 64px 0; }
.band h2 { color: #fff; margin: 0 0 24px; }
.band .wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.band h2 { grid-column: 1 / -1; }
.band-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.band-list a { font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 800; font-size: 2rem; line-height: 1.05; color: #fff; text-decoration: none; border-bottom: 3px solid var(--slot); }
.band-list a:hover { color: #cbbcff; }
.band-list p { margin: 10px 0 0; font-size: 1rem; }
.band-facts { width: 100%; border-collapse: collapse; font-family: var(--display); }
.band-facts th, .band-facts td { padding: 12px 0; border-bottom: 1px solid #333; text-align: left; font-weight: 400; color: #c9c9c4; font-size: 0.95rem; }
.band-facts td { text-align: right; color: #fff; font-weight: 800; font-size: 1.5rem; font-stretch: 72%; font-variation-settings: "wdth" 72; }

/* Blog */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 24px 0; border-bottom: 1px solid var(--chrome); }
.post-list time { font-family: var(--display); font-size: 0.85rem; }
.post-list a.title { display: block; font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 800; font-size: 1.8rem; line-height: 1.05; color: var(--ink); text-decoration: none; margin: 4px 0 8px; }
.post-list a.title:hover { color: var(--slot); }
.post-list p { margin: 0; font-size: 1rem; }
.post-header { max-width: var(--wide); margin: 48px auto 0; }
.post-header .crumbs, .post-header .meta { font-family: var(--display); font-size: 0.88rem; margin: 0 0 14px; }
.post-header .crumbs a { color: var(--graphite); }
.post-header h1 { max-width: 820px; font-size: clamp(2.4rem, 5.4vw, 3.6rem); }
.answer { border-left: 4px solid var(--slot); padding: 4px 0 4px 20px; margin: 0 0 36px; }
.answer h2 { font-size: 1.3rem; margin: 0 0 6px; font-stretch: 100%; font-variation-settings: "wdth" 100; font-weight: 700; }
.answer p { color: var(--ink); font-size: 1.12rem; margin: 0; }
.article blockquote, .article .callout { margin: 28px 0; padding: 0 0 0 20px; border-left: 4px solid var(--ink); color: var(--ink); font-size: 1.15rem; }
.article .callout p:last-child { margin-bottom: 0; }
.takeaways { background: #f6f6f3; padding: 24px 28px; margin: 36px 0; }
.takeaways h2 { margin: 0 0 12px; font-size: 1.6rem; }
.takeaways ul { margin-bottom: 0; }
.related h2 { font-size: 1.6rem; }
.refs { font-size: 0.9rem; }

/* Footer */
.footer { margin-top: 96px; background: #f6f6f3; padding: 56px 0 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer .logo-big img { width: 100%; max-width: 380px; }
.footer h2 { font-size: 1.2rem; margin: 0 0 10px; font-stretch: 100%; font-variation-settings: "wdth" 100; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; font-family: var(--display); font-size: 0.95rem; }
.footer li { margin: 0 0 6px; }
.footer a { color: var(--ink); }
.footer .legal { grid-column: 1 / -1; font-family: var(--display); font-size: 0.85rem; margin: 16px 0 0; }
.footer .legal img { display: inline-block; height: 14px; width: auto; vertical-align: -2px; margin-left: 6px; }

/* Report page */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--chrome); margin: 16px 0 28px; }
.kpis div { padding: 14px 12px 14px 0; }
.kpis b { display: block; font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 800; font-size: 2.2rem; color: var(--ink); line-height: 1; }
.kpis span { font-family: var(--display); font-size: 0.85rem; }
.bar { display: grid; grid-template-columns: 120px 1fr 56px; gap: 12px; align-items: center; font-family: var(--display); font-size: 0.92rem; margin: 0 0 8px; color: var(--ink); }
.bar i { display: block; height: 14px; background: var(--slot); }
.bar .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Responsive */
/* Proof: measured campaigns */
.proof { margin: 72px 0 0; max-width: var(--wide); margin-left: auto; margin-right: auto; }
.proof h2 { margin: 0 0 8px; }
.proof-intro { margin: 0 0 24px; }
.proof-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.proof-list li { margin: 0; padding: 22px 22px 18px; border-top: 4px solid var(--slot); background: var(--slot-tint); }
.proof-list p { margin: 0; font-size: 1rem; }
.proof-list .proof-brand { font-family: var(--display); font-size: 0.92rem; color: var(--ink); }
.proof-list .proof-figure { margin: 10px 0 8px; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--slot); font-stretch: 72%; font-variation-settings: "wdth" 72; }
.proof-note { margin: 12px 0 0; font-size: 0.9rem; }

/* Sidebar: what happens after the form */
.rail-next { margin: auto 0 0; padding-top: 18px; border-top: 1px solid #333; font-size: 0.95rem; }

/* Focus on dark and purple surfaces */
.creative :focus-visible, .band :focus-visible, .halfpage :focus-visible { outline-color: #fff; }

/* Form sending state */
.contact-form button[disabled] { opacity: 0.7; cursor: progress; }

@media (max-width: 1100px) {
    .page { grid-template-columns: 1fr; }
    .rail { order: 2; }
    .halfpage { position: static; }
}
@media (max-width: 900px) {
    .menu { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--chrome); padding: 12px 24px 20px; flex-direction: column; align-items: flex-start; gap: 14px; z-index: 10; font-size: 1.05rem; }
    .masthead { position: relative; }
    .menu-toggle { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 0.95rem; background: none; border: 1px solid var(--ink); padding: 8px 14px; border-radius: 2px; color: var(--ink); cursor: pointer; }
    .masthead.open .menu { display: flex; }
    .mock { grid-template-columns: 1fr; }
    .footer .wrap { grid-template-columns: 1fr 1fr; }
    .footer .logo-big { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .band .wrap { grid-template-columns: 1fr; }
    .panorama .slot-box { padding-right: 220px; }
    .panorama .tax { width: 160px; right: 24px; }
    .proof-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .panorama .slot-box { padding: 26px 22px 34px; }
    .panorama .tax { width: 92px; right: 14px; bottom: -14px; }
    .panorama .actions { max-width: calc(100% - 96px); }
    .proof-list { grid-template-columns: 1fr; }
    .band-list { grid-template-columns: 1fr; }
    .mock { padding: 14px; gap: 20px; }
    .mock-article { padding: 18px 18px 4px; }
    body { font-size: 18px; }
    .slot-label .d { display: none; }
    .slot-label .m { display: inline; }
    .halfpage .slot-box { width: 100%; max-width: 320px; height: auto; min-height: 480px; }
    .mrec, .mrec .slot-box { width: 100%; max-width: 320px; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .bar { grid-template-columns: 96px 1fr 48px; }
    .footer .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.article .service-list, .article .post-list, .article .steps { padding-left: 0; }
.article .service-list li, .article .post-list li { margin-bottom: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
.rail-facts { list-style: none; padding: 18px 0 0; margin: auto 0 0; border-top: 1px solid #333; font-family: var(--display); font-size: 0.92rem; }
.rail-facts li { padding: 6px 0; margin: 0; }
.rail-facts b { display: inline-block; min-width: 64px; color: #fff; font-weight: 800; font-size: 1.35rem; font-stretch: 72%; font-variation-settings: "wdth" 72; }
.halfpage .fine { margin-bottom: 18px; }
/* Highlighted menu item: För byråer */
.menu a.menu-highlight { border: 2px solid var(--ink); border-radius: 2px; padding: 7px 14px; font-weight: 700; text-decoration: none; }
.menu a.menu-highlight:hover, .menu a.menu-highlight[aria-current="page"] { background: var(--ink); color: #fff; text-decoration: none; }
.panorama .hero-list { margin: 14px 0 22px; padding-left: 1.2em; color: #fff; font-size: 1.12rem; line-height: 1.5; max-width: 600px; }
.panorama .hero-list li { margin: 0 0 4px; }
.panorama .hero-list li::marker { color: #cbbcff; }

/* Demo as a step-by-step guide */
.step-tag { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ink); margin: 0 0 14px; }
.step-tag b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--slot); color: #fff; font-size: 0.9rem; flex: none; }
.mock-article .step-tag { padding-bottom: 14px; border-bottom: 1px solid var(--chrome); margin-bottom: 18px; }
.mock mark { background: var(--slot-tint); color: inherit; box-shadow: inset 0 -2px 0 var(--slot); padding: 0 2px; }
.mark-legend { font-family: var(--display); font-size: 0.85rem; color: var(--graphite); margin: 4px 0 18px; }
.mock-side .step + .step { margin-top: 28px; }
.signals { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 0; background: #fff; padding: 18px 20px; font-family: var(--display); font-size: 0.92rem; line-height: 1.35; }
.signals dt { color: var(--graphite); }
.signals dd { margin: 0; color: var(--ink); font-weight: 600; }
.signals dd mark { font-weight: 500; display: inline-block; margin: 0 4px 4px 0; }
.signals dd.match { color: var(--slot); }
.mock-side .step .mrec { margin-top: 30px; }
.mock .mock-article, .mock .mock-side { transition: opacity 0.16s ease, transform 0.16s ease; }
.mock.is-swapping .mock-article, .mock.is-swapping .mock-side { opacity: 0.15; transform: translateY(4px); }
@media (prefers-reduced-motion: reduce) { .mock .mock-article, .mock .mock-side { transition: none; } }
@media (max-width: 640px) { .signals { padding: 14px 16px; } }

/* How it works */
.how { margin: 72px auto 0; max-width: var(--wide); }
.how h2 { margin: 0 0 8px; }
.how-intro { margin: 0 0 28px; }
.how-steps { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.how-steps li { counter-increment: how; position: relative; margin: 0; padding-top: 52px; }
.how-steps li::before { content: counter(how); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--slot); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.how-steps li::after { content: ""; position: absolute; top: 17px; left: 48px; right: -12px; height: 2px; background: var(--chrome); }
.how-steps li:last-child::after { display: none; }
.how-steps h3 { margin: 0 0 8px; font-size: 1.45rem; }
.how-steps p { margin: 0; font-size: 1rem; }
.how-cta { margin: 28px 0 0; }
@media (max-width: 900px) {
    .how-steps { grid-template-columns: 1fr 1fr; }
    .how-steps li::after { display: none; }
}
@media (max-width: 640px) {
    .how-steps { grid-template-columns: 1fr; gap: 20px; }
    .how-steps li { padding: 0 0 0 52px; }
    .how-steps li::before { top: 0; }
}
