/* RevenueOps – artikkelit
   Fontit ovat omalla palvelimella (fonts/), ei ulkoista fonttipalvelua. */

@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("fonts/open-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --burgundy: #491C1D;   /* sivuston pääväri */
  --burgundy-2: #6E3436; /* kuvien toinen sävy */
  --rose: #C9A1A2;       /* lisäykset ja korostukset kuvissa */
  --ink: #231F20;        /* logon musta */
  --muted: #5E5556;
  --line: #E4D9D9;
  --tint: #F6F0F0;
  --paper: #FFFFFF;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  font: 400 1.125rem/1.7 var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }

a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--burgundy); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Ylä- ja alapalkki */
.site-header { background: var(--burgundy); color: #fff; }
.site-header .bar {
  max-width: 72rem; margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header .logo { display: inline-flex; align-items: center; color: #fff; text-decoration: none; font: 600 1.4rem/1 var(--head); }
.site-header .logo img { height: 2.25rem; width: auto; display: block; }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { color: #fff; text-decoration: none; font: 500 1.05rem/1 var(--head); letter-spacing: .02em; padding: .5rem 0; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-header :focus-visible, .site-footer :focus-visible, .cta :focus-visible { outline-color: #fff; }

.site-footer { background: var(--burgundy); color: #fff; margin-top: 5rem; }
.site-footer .bar { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; }

/* Artikkelin palstat: teksti 42rem, kuvat ja taulukot leveämpinä */
.article {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1.25rem, 1fr)
    [wide-start] minmax(0, 5rem)
    [content-start] min(42rem, 100% - 2.5rem)
    [content-end] minmax(0, 5rem)
    [wide-end] minmax(1.25rem, 1fr) [full-end];
  padding-top: 2rem;
}
.article > * { grid-column: content; }
.article > .fig, .article > .table-wrap, .article > .cta { grid-column: wide; }

.crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 1.5rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: var(--rose); }
.crumbs a { color: var(--muted); }

h1, h2, h3 { font-family: var(--head); color: var(--ink); text-wrap: balance; }
h1 {
  font-weight: 600; color: var(--burgundy);
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.35rem); line-height: 1.08;
  margin: 0 0 1rem;
}
h2 { font-weight: 500; font-size: clamp(1.55rem, 1.3rem + .9vw, 1.9rem); line-height: 1.2; margin: 3.25rem 0 .9rem; }
h3 { font-weight: 500; font-size: 1.28rem; line-height: 1.3; margin: 2rem 0 .4rem; }
p { margin: 0 0 1.1rem; }
.byline { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.lead { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.35rem); line-height: 1.6; }

ul, ol { padding-left: 1.4rem; margin: 0 0 1.3rem; }
li { margin: 0 0 .55rem; }
li::marker { color: var(--burgundy); font-weight: 600; }

blockquote {
  margin: 1.4rem 0; padding: 1rem 1.25rem;
  border-left: 4px solid var(--burgundy); background: var(--tint);
  font-size: 1.1rem;
}
blockquote p { margin: 0; }

/* Taulukot: kapealla näytöllä jokainen rivi pinoutuu kortiksi */
.table-wrap { margin: 1.75rem 0 2rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
th { text-align: left; font-weight: 600; background: var(--tint); padding: .7rem .85rem; vertical-align: bottom; border-bottom: 2px solid var(--burgundy); }
td { padding: .75rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 600; }
.num-table td:not(:first-child), .num-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 40rem) {
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { border: 1px solid var(--line); border-top: 3px solid var(--burgundy); margin: 0 0 1rem; }
  td { display: grid; grid-template-columns: minmax(6.5rem, 38%) 1fr; gap: .75rem; border-bottom: 1px solid var(--line); }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .9rem; }
  td:first-child { background: var(--tint); }
  .num-table td:not(:first-child) { text-align: left; white-space: normal; }
}

/* Kuvat */
.fig { margin: 2.25rem 0 2.5rem; padding: clamp(1.1rem, 3vw, 2.25rem); background: var(--tint); border-radius: 4px; }
.fig figcaption { margin-top: 1.25rem; font-size: .95rem; line-height: 1.55; color: var(--muted); max-width: 42rem; }
.fig .fig-title { font: 500 1.15rem/1.3 var(--head); margin: 0 0 1.1rem; color: var(--ink); }

/* 1. Kokonaiskuva (SVG) */
.hub svg { display: block; width: 100%; max-width: 40rem; margin: 0 auto; }
.hub .node rect { fill: var(--paper); stroke: var(--burgundy); stroke-width: 2; }
.hub .node text { font: 500 21px var(--head); fill: var(--ink); }
.hub .spoke { stroke: var(--burgundy); stroke-width: 2; }
.hub .ring { fill: none; stroke: var(--rose); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.hub .core circle { fill: var(--burgundy); }
.hub .core text { font: 600 27px var(--head); fill: #fff; }
.hub .core .sub { font: 400 14px var(--body); fill: #F1E3E3; }
.hub-list { display: none; }
@media (max-width: 34rem) {
  .hub svg { display: none; }
  .hub-list { display: block; }
  .hub-core { margin: 0 auto 1rem; width: 9.5rem; height: 9.5rem; border-radius: 50%; background: var(--burgundy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 600 1.45rem/1.1 var(--head); text-align: center; }
  .hub-core span { font: 400 .8rem/1.3 var(--body); color: #F1E3E3; margin-top: .25rem; }
  .hub-list ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
  .hub-list li { margin: 0; background: var(--paper); border: 2px solid var(--burgundy); border-radius: 999px; text-align: center; padding: .5rem .4rem; font: 500 1.02rem/1.2 var(--head); }
}

/* 2. Myyntisuppilo */
.funnel { list-style: none; margin: 0 auto; padding: 0; max-width: 38rem; }
.funnel li { margin: 0; }
.funnel .stage {
  width: var(--w); min-width: 15.5rem; margin: 0 auto; flex-wrap: wrap;
  background: var(--burgundy); color: #fff; border-radius: 3px;
  display: flex; align-items: baseline; justify-content: center; gap: .55rem;
  padding: .6rem 1rem;
}
.funnel .num { font: 600 1.65rem/1.1 var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel .lbl { font-size: .98rem; }
.funnel .rate { text-align: center; font-size: .88rem; color: var(--muted); padding: .45rem 0 .5rem; position: relative; }
.funnel .result { background: var(--paper); color: var(--burgundy); border: 2px solid var(--burgundy); }

/* 3. Vivut: kertyvä pylväs */
.levers { display: grid; gap: 1.1rem; }
.lever-label { font-size: .95rem; margin-bottom: .3rem; }
.lever-row { display: grid; grid-template-columns: 1fr 6.5rem; align-items: center; gap: .9rem; }
.lever-track { height: 2.1rem; display: flex; background: var(--paper); border-radius: 2px; overflow: hidden; }
.lever-track .base { background: var(--burgundy); }
.lever-track .gain { background: var(--rose); border-left: 2px solid var(--paper); }
.lever-value { font: 600 1.25rem/1 var(--head); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .9rem; color: var(--muted); margin: 1.25rem 0 0; }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: .95rem; height: .95rem; display: inline-block; border-radius: 2px; }
.legend .k-base { background: var(--burgundy); }
.legend .k-gain { background: var(--rose); }

/* 4. CRM-kauppa minimitasolla */
.deal { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--burgundy); border-radius: 3px; max-width: 36rem; margin: 0 auto; padding: 1.25rem 1.4rem; }
.deal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.deal-title { font: 500 1.2rem/1.3 var(--head); }
.deal-value { font: 600 1.4rem/1 var(--head); color: var(--burgundy); }
.deal-stages { list-style: none; display: flex; gap: 3px; padding: 0; margin: 1rem 0 1.2rem; }
.deal-stages li { flex: 1; margin: 0; text-align: center; font-size: .78rem; padding: .35rem .2rem; background: var(--tint); color: var(--muted); }
.deal-stages .done { background: var(--rose); color: var(--ink); }
.deal-stages .current { background: var(--burgundy); color: #fff; font-weight: 600; }
.deal-fields { margin: 0; display: grid; gap: .75rem; }
.deal-fields div { display: grid; grid-template-columns: 1.9rem 1fr; column-gap: .6rem; }
.deal-fields .n { grid-row: span 2; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--burgundy); color: #fff; font: 600 .9rem/1.6rem var(--head); text-align: center; }
.deal-fields dt { font-size: .85rem; color: var(--muted); }
.deal-fields dd { margin: 0; font-weight: 600; line-height: 1.45; }
.deal-note { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px dashed var(--line); font-size: .95rem; }
.deal-note .k { font-size: .85rem; color: var(--muted); display: block; margin-bottom: .2rem; }
.deal-note p { margin: 0; }

/* 5. Myyntiputki ja 6. kolme kohtaa */
.pipeline, .flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: st; }
.pipeline { grid-template-columns: repeat(5, 1fr); }
.flow { grid-template-columns: repeat(3, 1fr); max-width: 46rem; }
.pipeline li, .flow li {
  counter-increment: st; margin: 0; position: relative;
  background: var(--paper); border-top: 4px solid var(--burgundy); padding: .9rem .9rem 1rem;
  display: flex; flex-direction: column; gap: .5rem; font-size: .92rem; line-height: 1.45;
}
.pipeline li::before, .flow li::before { content: counter(st); font: 600 .95rem/1 var(--head); color: var(--burgundy); }
.pipeline li:not(:last-child)::after, .flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -.85rem; top: 1.6rem; width: .7rem; height: .7rem;
  border-top: 3px solid var(--burgundy); border-right: 3px solid var(--burgundy); transform: rotate(45deg);
}
.st-name, .fl-name { font: 500 1.1rem/1.2 var(--head); }
.st-rule, .fl-desc { color: var(--ink); }
.st-exit { margin-top: auto; border-left: 3px solid var(--rose); padding-left: .55rem; color: var(--muted); font-size: .86rem; }
.fl-out { margin-top: auto; font-weight: 600; color: var(--burgundy); }
@media (max-width: 52rem) {
  .pipeline, .flow { grid-template-columns: 1fr; gap: 1.6rem; }
  .pipeline li:not(:last-child)::after, .flow li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -1.2rem; transform: translateX(-50%) rotate(135deg); }
}

/* 7. SPIN-portaat */
.stairs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; align-items: end; counter-reset: none; }
.stairs li {
  margin: 0; background: var(--burgundy); color: #fff; padding: 1rem .9rem 1.1rem;
  min-height: calc(8.5rem + var(--s) * 2.4rem);
  display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem; border-radius: 3px 3px 0 0;
}
.stairs li:nth-child(1) { background: #6E3436; }
.stairs li:nth-child(2) { background: #5E2829; }
.stairs .letter { font: 600 3rem/1 var(--head); }
.stairs .s-title { font: 500 1.2rem/1.2 var(--head); }
.stairs .s-en { font-size: .8rem; color: #EBD7D7; }
.stairs .s-desc { font-size: .9rem; line-height: 1.4; margin-top: .35rem; }
.need-shift {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: .9rem; font-size: .9rem;
}
.need-shift .span { grid-column: 3 / 5; display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; }
.need-shift .line { flex: 1; height: 3px; background: var(--burgundy); position: relative; }
.need-shift .line::after { content: ""; position: absolute; right: -2px; top: -5px; border-left: 10px solid var(--burgundy); border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; }
@media (max-width: 44rem) {
  .stairs { grid-template-columns: 1fr; gap: .5rem; }
  .stairs li { min-height: 0; margin-left: calc(var(--s) * .9rem); border-radius: 3px; display: grid; grid-template-columns: 2.6rem 1fr; column-gap: .8rem; align-items: center; }
  .stairs .letter { grid-row: span 3; font-size: 2.4rem; }
  .stairs .s-desc { grid-column: 2; margin-top: 0; }
  .need-shift { grid-template-columns: 1fr; }
  .need-shift .span { grid-column: 1; }
}

/* 8. Pelikirjan sisällys */
.toc { list-style: none; counter-reset: luku; padding: 0; margin: 0; background: var(--paper); border-left: 10px solid var(--burgundy); max-width: 40rem; }
.toc li { counter-increment: luku; margin: 0; display: grid; grid-template-columns: 3.2rem 1fr; column-gap: .4rem; padding: 1rem 1.25rem 1rem .9rem; border-bottom: 1px solid var(--line); }
.toc li:last-child { border-bottom: 0; }
.toc li::before { content: counter(luku); grid-row: span 2; font: 600 2rem/1 var(--head); color: var(--burgundy); }
.toc .t-part { font: 500 1.2rem/1.25 var(--head); }
.toc .t-desc { font-size: .95rem; color: var(--muted); line-height: 1.5; }

/* 9. Mittaristo ajassa */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 44rem; }
.m-axis { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .7rem; font: 500 1rem/1 var(--head); color: var(--muted); }
.m-axis .ln { height: 3px; background: var(--rose); }
.m-axis .now { color: #fff; background: var(--burgundy); padding: .35rem .7rem; border-radius: 2px; }
.m-axis .ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .85rem; margin-top: -.2rem; }
.m-block { background: var(--paper); padding: 1rem 1.1rem; border-top: 4px solid var(--burgundy); display: flex; flex-direction: column; gap: .25rem; }
.m-block.team { grid-column: 1 / -1; border-top-color: var(--rose); }
.m-name { font: 500 1.15rem/1.2 var(--head); }
.m-q { font-weight: 600; color: var(--burgundy); }
.m-list { font-size: .92rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 36rem) { .metrics { grid-template-columns: 1fr; } }

/* 10. Ostajan matka */
.journey { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
.band { font: 500 .95rem/1 var(--head); padding: .5rem .7rem; color: #fff; border-radius: 2px; }
.band.mkt { grid-column: 1 / 5; grid-row: 1; background: var(--burgundy-2); }
.band.sales { grid-column: 3 / 7; grid-row: 2; background: var(--burgundy); }
.j-stages { grid-column: 1 / -1; grid-row: 3; list-style: none; margin: .4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; counter-reset: st; }
.j-stages li { counter-increment: st; margin: 0; background: var(--paper); padding: .75rem .7rem .85rem; border-top: 3px solid var(--rose); font-size: .9rem; line-height: 1.4; display: flex; flex-direction: column; gap: .3rem; }
.j-stages li.meet { border-top-color: var(--burgundy); }
.j-stages li::before { content: counter(st); font: 600 .9rem/1 var(--head); color: var(--burgundy); }
.j-name { font: 500 1.02rem/1.2 var(--head); }
.j-sub { color: var(--muted); font-size: .84rem; }
.j-owner { display: none; font-size: .8rem; font-weight: 600; color: var(--burgundy); }
@media (max-width: 52rem) {
  .journey { grid-template-columns: 1fr; }
  .band { display: none; }
  .j-stages { grid-row: auto; grid-template-columns: 1fr; margin: 0; }
  .j-owner { display: block; }
}

/* Lue lisää, usein kysyttyä, kirjoittaja */
.related ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.related li { margin: 0; border-bottom: 1px solid var(--line); }
.related a { display: block; padding: .85rem 0; font: 500 1.12rem/1.35 var(--head); text-decoration: none; }
.related a:hover { text-decoration: underline; }
.faq h3 { margin-top: 1.6rem; }
.source { font-size: .95rem; color: var(--muted); }
.author { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.author h2 { font-size: 1.2rem; margin: 0 0 .6rem; color: var(--muted); }
.author .name { font: 500 1.3rem/1.2 var(--head); margin-bottom: .4rem; }
.author p { font-size: 1rem; }

/* Yhteydenotto */
.cta { margin: 2.5rem 0 0; background: var(--burgundy); color: #fff; border-radius: 4px; padding: clamp(1.5rem, 4vw, 2.75rem); }
.cta h2 { color: #fff; margin: 0 0 .7rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); max-width: 34rem; }
.cta p { max-width: 38rem; color: #F3E7E7; }
.cta .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.btn { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .7rem 1.2rem; border-radius: 3px; font: 500 1.05rem/1.1 var(--head); letter-spacing: .02em; text-decoration: none; }
.btn-primary { background: #fff; color: var(--burgundy); }
.btn-secondary { color: #fff; border: 2px solid #fff; }
.btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.cta .more { margin: 1.25rem 0 0; font-size: .98rem; }
.cta .more a { color: #fff; }

/* Artikkelilistaus */
.series { list-style: none; counter-reset: a; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.series li { counter-increment: a; display: grid; grid-template-columns: 2.6rem 1fr; column-gap: .6rem; padding: 1.3rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.series li::before { content: counter(a); grid-row: span 2; font: 600 1.7rem/1.1 var(--head); color: var(--burgundy); }
.series a { font: 500 1.35rem/1.25 var(--head); text-decoration: none; }
.series a:hover { text-decoration: underline; }
.series p { margin: .35rem 0 0; color: var(--muted); font-size: 1rem; }

@media print {
  .site-header, .site-footer, .cta .actions, .skip { display: none; }
  .fig { break-inside: avoid; }
}
