/* Fritt Spel - Minimal tech blog, off-white + electric blue + graphite */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #0057FF;
  --blue-dark: #0044CC;
  --blue-light: #E6EEFF;
  --graphite: #1F2328;
  --graphite-soft: #3A4149;
  --grey: #6E7681;
  --grey-light: #D0D7DE;
  --off-white: #FAFBFC;
  --white: #FFFFFF;
  --border: #E4E7EB;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--graphite);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header - clean, sticky-feel */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.logo {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  font-size: 22px;
  color: var(--graphite);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 2px;
}
.logo span { color: var(--blue); }
nav ul { list-style: none; display: flex; gap: 8px; }
nav a {
  color: var(--graphite-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--blue-light); color: var(--blue); }

/* Hero - modern tech blog article */
.hero {
  padding: 72px 0 40px;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.hero .tag {
  display: inline-block;
  color: var(--blue);
  background: var(--blue-light);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  color: var(--graphite);
  margin-bottom: 20px;
  letter-spacing: -1.5px;
  font-weight: 800;
  max-width: 840px;
}
.hero p.lede {
  font-size: 20px;
  line-height: 1.55;
  max-width: 720px;
  color: var(--grey);
  font-weight: 400;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--grey);
}
.hero-meta strong { color: var(--graphite); font-weight: 600; }
.hero-image {
  width: 100%;
  height: auto;
  margin-top: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 14px 0;
  font-size: 13px;
  color: var(--grey);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Main */
main { padding: 48px 0 32px; }
article { max-width: 720px; margin: 0 auto; }

article h2 {
  font-family: inherit;
  font-size: 28px;
  color: var(--graphite);
  margin: 48px 0 20px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  font-weight: 700;
  scroll-margin-top: 80px;
}
article h2::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--blue);
  margin-bottom: 16px;
  border-radius: 2px;
}
article h3 {
  font-size: 20px;
  color: var(--graphite);
  margin: 28px 0 12px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
article p { margin-bottom: 18px; color: var(--graphite-soft); }
article ul, article ol { margin: 18px 0 18px 22px; }
article li { margin-bottom: 8px; color: var(--graphite-soft); }
article a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue-light); transition: border-color 0.15s; }
article a:hover { border-bottom-color: var(--blue); }
article strong { color: var(--graphite); font-weight: 700; }

/* Inline code style */
article code {
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  background: var(--blue-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 15px;
  color: var(--blue-dark);
  font-weight: 500;
}

/* TOC - card style */
.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0 40px;
  box-shadow: 0 1px 3px rgba(31, 35, 40, 0.04);
}
.toc h2 {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey) !important;
  margin: 0 0 16px !important;
  font-weight: 700;
}
.toc h2::before { display: none; }
.toc ol {
  list-style: none;
  margin: 0;
  columns: 2;
  column-gap: 32px;
}
.toc li {
  padding: 4px 0;
  margin: 0;
  break-inside: avoid;
  padding-left: 22px;
  position: relative;
  font-size: 14px;
  counter-increment: toc-item;
}
.toc {
  counter-reset: toc-item;
}
.toc li::before {
  content: counter(toc-item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--blue);
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
}
.toc a {
  color: var(--graphite-soft);
  text-decoration: none;
  border: none;
}
.toc a:hover { color: var(--blue); }

/* Article images */
.article-image {
  width: 100%;
  height: auto;
  margin: 32px 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.article-image + em {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 28px;
  font-style: normal;
}

/* Info/callout blocks */
.callout {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 15px;
}
.callout strong { color: var(--blue-dark); }

/* Tables */
table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
table th {
  background: var(--off-white);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--graphite);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--graphite-soft);
}
table tr:last-child td { border-bottom: none; }

/* FAQ - accordion clean */
.faq-section { margin: 48px 0; }
.faq-section > h2 {
  border-bottom: none;
  font-size: 28px;
  margin-bottom: 24px;
}
.faq-section details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.faq-section details[open] { border-color: var(--blue); }
.faq-section summary {
  font-size: 16px;
  color: var(--graphite);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 30px;
  font-weight: 600;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  color: var(--blue);
  font-size: 24px;
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p {
  margin-top: 12px;
  color: var(--graphite-soft);
  font-size: 15px;
}

/* Disclaimer */
.disclaimer {
  background: var(--graphite);
  color: var(--white);
  padding: 28px 32px;
  border-radius: 12px;
  margin: 48px 0;
}
.disclaimer h3 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}
.disclaimer p { color: rgba(255,255,255,0.85); margin-bottom: 8px; font-size: 15px; }
.disclaimer a { color: #7FA7FF; border-bottom-color: transparent; }
.disclaimer a:hover { border-bottom-color: #7FA7FF; }

/* Author bio */
.author-bio {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 24px;
  margin: 48px 0;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.author-bio img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--blue-light);
}
.author-bio .who {
  font-size: 18px;
  color: var(--graphite);
  margin-bottom: 2px;
  font-weight: 700;
}
.author-bio .role {
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.author-bio p { font-size: 14px; line-height: 1.6; margin: 0; color: var(--grey); }

/* Related pages */
.related {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 48px 0;
}
.related h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey);
  margin-bottom: 16px;
  font-weight: 700;
}
.related ul { list-style: none; margin: 0; }
.related li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.related li:last-child { border-bottom: none; }
.related a {
  color: var(--graphite);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.related a::after {
  content: "→";
  color: var(--blue);
  font-weight: 400;
}
.related a:hover { color: var(--blue); }

/* Footer */
footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px;
}
footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
footer h4 {
  font-size: 13px;
  color: var(--graphite);
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
footer ul { list-style: none; }
footer li { padding: 4px 0; }
footer a { color: var(--grey); text-decoration: none; font-size: 14px; }
footer a:hover { color: var(--blue); }
footer p { font-size: 14px; line-height: 1.6; color: var(--grey); }
.copyright {
  text-align: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--grey);
}

/* Contact form */
.contact-form {
  background: var(--white);
  padding: 28px;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.contact-form label {
  display: block;
  color: var(--graphite);
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--off-white);
  font-family: inherit;
  font-size: 15px;
  color: var(--graphite);
  border-radius: 6px;
  transition: border-color 0.15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.contact-form button {
  background: var(--blue);
  color: white;
  border: none;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
  border-radius: 6px;
  transition: background 0.15s;
}
.contact-form button:hover { background: var(--blue-dark); }

/* Responsive */
@media (max-width: 768px) {
  .site-header .container { flex-direction: column; gap: 12px; padding: 12px 20px; }
  nav ul { gap: 4px; flex-wrap: wrap; justify-content: center; }
  nav a { font-size: 13px; padding: 6px 10px; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 32px; }
  .hero p.lede { font-size: 17px; }
  article h2 { font-size: 24px; }
  .toc ol { columns: 1; }
  .author-bio { flex-direction: column; text-align: center; }
  footer .container { grid-template-columns: 1fr; gap: 28px; }
  table { font-size: 13px; }
  table th, table td { padding: 8px 10px; }
}

/* Print */
@media print {
  .site-header, footer, nav, .contact-form button { display: none; }
  body { background: white; }
  article { max-width: 100%; }
}
