/* ------------------------------------------------------------------
   Finland's History — tier-3 cloud-stack site
   Visual mood: mimics billiardsky.net — dark charcoal background
   (#1f1f21), neon-lime accent (#e3fc02) + cyan accent (#00fced),
   Oswald display headings + Figtree body, pill radius (40px).
   Dark editorial long-form with sticky TOC + category chips + FAQ +
   related posts.
   ------------------------------------------------------------------ */

:root {
  /* palette (mimics billiardsky.net dark neon mood) */
  --bg-base:        #1f1f21;   /* dark charcoal page background */
  --bg-page:        #27272a;   /* elevated cards / content wells */
  --bg-elevated:    #303034;   /* hover / soft band */
  --bg-soft:        #222225;   /* subtle band */
  --text-strong:    #f5f5f7;   /* near-white */
  --text-base:      #d8d8dc;   /* body text */
  --text-secondary: #a6a6ae;
  --text-muted:     #77777f;
  --heading:        #f5f5f7;   /* white headings */
  --link:           #00fced;   /* cyan interactive */
  --link-hover:     #e3fc02;   /* lime hover */
  --link-soft:      #7df3ff;
  --accent:         #e3fc02;   /* neon lime signature pop */
  --accent-2:       #00fced;   /* neon cyan */
  --line:           #3a3a3e;
  --line-2:         #333337;
  --on-accent:      #131316;
  --inverse-bg:     #18181a;

  /* form & spacing */
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-display: "Oswald", "Segoe UI", system-ui, sans-serif;
  --radius-s: 12px;
  --radius-m: 40px;
  --maxw: 1160px;
  --header-h: 64px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .55);
  --shadow-soft: 0 3px 12px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-base);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--accent); color: var(--on-accent); }
::-moz-selection { background: var(--accent); color: var(--on-accent); }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a.clean { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.5rem; line-height: 1.12; }
h2 { font-size: 1.7rem; margin-top: 1.6rem; }
h3 { font-size: 1.28rem; margin-top: 1.25rem; color: var(--accent-2); }

/* ------------------------- layout containers ------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------ header ------------------------------- */
.site-header {
  background: rgba(31, 31, 33, .92);
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 60;
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.logo a {
  color: var(--heading); font-weight: 700; font-family: var(--font-display);
  font-size: 1.14rem; letter-spacing: -0.01em; text-decoration: none;
}
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.nav a {
  color: var(--text-secondary); font-family: var(--font-display);
  font-size: .9rem; font-weight: 500; padding: 10px 13px; border-radius: var(--radius-s);
  text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--bg-elevated); color: var(--accent-2); }
.nav a.active { color: var(--accent-2); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font-weight: 600; cursor: pointer; color: var(--text-base); }

/* ------------------------------ hero --------------------------------- */
.hero { padding: 64px 0 56px; background: var(--bg-base); }
.category-chip {
  display: inline-block; background: var(--bg-elevated); color: var(--accent-2);
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; padding: 6px 16px; border-radius: 999px;
}
.meta-line {
  color: var(--text-secondary); font-size: .92rem; margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
}
.hero-image { margin-top: 30px; border-radius: var(--radius-m); box-shadow: var(--shadow-card); }
.hero-image figcaption { color: var(--text-muted); font-size: .82rem; margin-top: 6px; }

/* --------------------------- layout: two-col -------------------------- */
.article-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--bg-page); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  padding: 22px 20px;
}
.toc-title { font-family: var(--font-display); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); }
.toc a { display: block; color: var(--text-base); font-size: .9rem; line-height: 1.45; padding: 3px 0; text-decoration: none; }
.toc a:hover { color: var(--accent-2); }
.toc a.toc-h3 { padding-left: 14px; color: var(--text-muted); font-size: .84rem; }

/* --------------------------- page content ----------------------------- */
.page-content { }
.page-content .intro p:first-child { font-size: 1.15rem; color: var(--text-base); }
.page-content p { margin: 0 0 16px; }
.page-content ul { margin: 0 0 16px; padding-left: 24px; }
.page-content ul li { margin-bottom: 6px; }
.section { scroll-margin-top: calc(var(--header-h) + 16px); }
.section h2, .section h3 { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ------------------------------ video card ---------------------------- */
.video-wrap { margin: 26px 0; }
.video-card {
  background: var(--bg-page); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.video-card .video-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--heading); padding: 14px 18px; }
.video-frame { aspect-ratio: 16/9; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* -------------------------------- FAQ --------------------------------- */
.faq { margin-top: 34px; }
.faq-item {
  background: var(--bg-page); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft); padding: 18px 22px; margin-bottom: 12px;
}
.faq-item summary { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--heading); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--accent); }
.faq-item[open] summary::before { content: "- "; }
.faq-item .faq-a { color: var(--text-base); line-height: 1.6; padding-top: 10px; }

/* ----------------------------- related posts --------------------------- */
.related { margin-top: 44px; }
.related h2.related-title { font-size: 1.4rem; margin-bottom: 18px; }
.related-card {
  background: var(--bg-page); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft); overflow: hidden; display: flex; flex-direction: column;
}
.related-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.related-card .related-body { padding: 16px 18px; }
.related-card h3 { font-size: 1.05rem; line-height: 1.35; margin: 0; }
.related-card h3 a { color: var(--heading); text-decoration: none; }
.related-card h3 a:hover { color: var(--accent-2); }
.related-card .related-cat { display: inline-block; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }

/* ------------------------------ homepage ------------------------------ */
.home-hero { padding: 72px 0 20px; text-align: center; }
.home-hero h1 { font-size: 2.8rem; text-align: center; }
.home-hero .lede { max-width: 780px; margin: 22px auto; color: var(--text-base); font-size: 1.15rem; line-height: 1.7; }
.home-hero .hero-image { max-width: 960px; margin: 14px auto; border-radius: var(--radius-m); box-shadow: var(--shadow-card); }
.home-intro {
  margin-top: 8px; text-align: center; max-width: 780px; margin-left: auto; margin-right: auto;
}
.home-intro h2 { font-size: 1.45rem; }
.home-intro p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; margin: 14px 0 8px; }
.category-band { margin: 54px 0 30px; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
.cat-card {
  background: var(--bg-page); border: 1px solid var(--line-2); border-radius: 24px;
  box-shadow: var(--shadow-soft); overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: var(--heading);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.cat-card .cat-img { aspect-ratio: 16/7; object-fit: cover; width: 100%; }
.cat-card .cat-body { padding: 20px 22px; }
.cat-card h2 { font-size: 1.25rem; margin: 0; color: var(--heading); }
.cat-card p { color: var(--text-secondary); font-size: .95rem; line-height: 1.5; margin-top: 8px; }
.cat-card .cat-count { color: var(--accent-2); font-size: .85rem; font-weight: 600; margin-top: 10px; }

/* intro band with tier-2 link lives inside a H2 on the homepage */
.h2-link { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid var(--accent-2); }
.h2-link:hover { color: var(--link-hover); }

/* ------------------------------- footer ------------------------------- */
.site-footer { background: var(--inverse-bg); color: #ececf0; padding: 56px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr repeat(5, 1fr); gap: 28px; align-items: start; }
.site-footer .f-brand .f-logo { color: #fff; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.site-footer .f-brand p { color: #b9b9c2; font-size: .9rem; line-height: 1.55; margin-top: 10px; }
.f-col h4 { color: var(--accent-2); font-size: .78rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 12px; }
.f-col a { color: #c9c9d2; font-size: .9rem; text-decoration: none; display: block; padding: 3px 0; line-height: 1.4; }
.f-col a:hover { color: var(--accent); }
.site-footer .f-bottom { text-align: center; border-top: 1px solid #333; color: #b9b9c2; font-size: .85rem; padding-top: 18px; margin-top: 26px; }
.f-bottom a { color: var(--accent-2); text-decoration: none; }
.f-bottom a:hover { color: var(--accent); }

/* ------------------------------ utility ------------------------------- */
.utility-hero { padding: 56px 0 20px; }
.utility-hero h1 { font-size: 2.3rem; }
.simple-list { list-style: none; padding: 0; }
.simple-list li { margin: 8px 0; }
.simple-list a { color: var(--text-base); text-decoration: none; }
.simple-list a:hover { color: var(--accent-2); }
.privacy-block { max-width: 820px; margin: 20px auto; background: var(--bg-page); border: 1px solid var(--line-2); border-radius: 24px; padding: 32px 34px; }
.privacy-block p { margin: 0 0 15px; }
.privacy-block h2 { font-size: 1.4rem; }
.privacy-block h3 { font-size: 1.1rem; }

/* ------------------------------ responsive ----------------------------- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 18px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle { display: inline-block; }
  body.menu-open .nav { display: flex; flex-direction: column; align-items: flex-start; width: 100%; background: var(--bg-page); box-shadow: var(--shadow-card); }
  body.menu-open .nav a { width: 100%; }
  .site-header .wrap { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.14rem; }
  .home-hero h1 { font-size: 2.1rem; }
  .category-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .home-hero { padding: 52px 0 16px; }
}