/* afinabc.fi v1 — AFINA Business Connect ry
   No external resources, no scripts. Visual grammar: solid line = done, dashed line = planned. */

@font-face {
  font-family: "Lora";
  src: url("/assets/fonts/Lora-Variable.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --mist: #edf2ef;
  --ink: #1e2b29;
  --muted: #52615e;
  --spruce: #17524c;
  --spruce-deep: #0e3b36;
  --linden: #efc94c;
  --rule: #c9d5d1;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --measure: 40rem;
  --wide: 68rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--spruce);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--spruce-deep); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--spruce);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--spruce);
  color: #fff;
}
.skip:focus { left: 1rem; top: 1rem; color: #fff; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------------------------------------------------------- header */

.site-header { border-bottom: 1px solid var(--rule); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--linden);
  box-shadow: inset 0 0 0 2px var(--spruce);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--spruce);
}
.brand-rest { font-size: 0.95rem; color: var(--muted); }

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.75rem;
}

.main-nav ul,
.lang ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-block;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
}
.main-nav a:hover { border-bottom-color: var(--rule); }
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--spruce);
  color: var(--spruce);
  font-weight: 600;
}

.lang { font-size: 0.9rem; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); text-decoration: underline; }
.lang a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--linden);
  text-decoration-thickness: 3px;
}

/* ---------------------------------------------------------- type */

main { padding: 2.5rem 0 4.5rem; }

.content { max-width: var(--measure); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--spruce-deep);
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem);
  letter-spacing: -0.01em;
}
h2 { margin: 2.75rem 0 0.75rem; font-size: 1.55rem; }
h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }

p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.content ul:not([class]) > li + li { margin-top: 0.4rem; }
.main-nav li, .lang li { margin: 0; }

.lead { max-width: 36rem; font-size: 1.2rem; }

/* ---------------------------------------------------------- home hero */

.hero {
  display: grid;
  gap: 2rem;
  align-items: start;
  padding-bottom: 0.5rem;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
  .hero h1 { margin-top: 0.4rem; }
}

.status {
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 6px;
  background: var(--mist);
}
.status h2 { margin: 0 0 1rem; font-size: 1.2rem; }

/* ---------------------------------------------------------- route: solid = done, dashed = planned */

.route {
  margin: 0;
  padding: 0;
  list-style: none;
}
.route li {
  position: relative;
  margin: 0;
  padding: 0 0 1.35rem 2.1rem;
}
.route li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--spruce);
}
.route li::after {
  content: "";
  position: absolute;
  left: calc(0.8rem - 1px);
  top: 1.45rem;
  bottom: 0.1rem;
  border-left: 2px solid var(--spruce);
}
.route li.now::before {
  background: var(--linden);
  box-shadow: inset 0 0 0 2px var(--spruce);
}
.route li.now::after,
.route li.planned::after { border-left-style: dashed; }
.route li.planned::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--spruce);
}
.route li:last-child { padding-bottom: 0; }
.route li:last-child::after { display: none; }

.route-when { display: block; font-size: 0.875rem; color: var(--muted); }
.route-what { display: block; }
.route-tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--linden);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend span::before {
  content: "";
  width: 1.6rem;
  border-top: 2px solid var(--spruce);
}
.legend .legend-dashed::before { border-top-style: dashed; }

/* ---------------------------------------------------------- planned steps (a real sequence) */

.steps {
  position: relative;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.55rem;
  bottom: -0.35rem;
  border-left: 2px dashed var(--spruce);
}
.steps li:last-child::after { display: none; }
.steps li {
  position: relative;
  margin: 0;
  padding: 0.55rem 0 1rem 3.1rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--spruce);
  color: var(--spruce);
  font-family: var(--serif);
  font-weight: 600;
}
.steps p { margin: 0; }

/* ---------------------------------------------------------- notes, facts, quotes */

.note {
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--spruce);
  border-radius: 0 6px 6px 0;
  background: var(--mist);
}
.note.planned { border-left-style: dashed; }

.facts {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0 0 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 0.1rem; }
  .facts dd { margin-bottom: 0.7rem; }
  .facts dd:last-child { margin-bottom: 0; }
}

.source, .quote-note, .checked { font-size: 0.9rem; color: var(--muted); }

blockquote {
  margin: 0 0 0.6rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--linden);
  background: var(--mist);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- lists of links */

.toc {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.toc li {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 700px) {
  .toc li { grid-template-columns: 13rem 1fr; gap: 1.5rem; align-items: baseline; }
}
.toc a {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }
.toc span { color: var(--muted); }

.sources {
  margin: 1.5rem 0 1rem;
  padding: 0;
  list-style: none;
}
.sources li {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.sources li:last-child { border-bottom: 1px solid var(--rule); }
.sources a { font-size: 1.1rem; font-weight: 600; }
.sources .domain { display: block; font-size: 0.85rem; color: var(--muted); }
.sources p { margin: 0.3rem 0 0; }

/* ---------------------------------------------------------- footer */

.site-footer {
  padding: 2.25rem 0 2.5rem;
  background: var(--spruce-deep);
  color: #e8efec;
  font-size: 0.95rem;
}
.site-footer a { color: #ffffff; }
.site-footer :focus-visible { outline-color: var(--linden); }
.site-footer p { margin: 0 0 0.3rem; }
.footer-grid { display: grid; gap: 1rem 3rem; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: auto auto; justify-content: start; }
}
.footer-org {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}
.footer-small { margin-top: 1.25rem; font-size: 0.85rem; color: #b9cbc6; }

/* ---------------------------------------------------------- 404 */

.notfound section + section { margin-top: 2rem; }
