/*
  Site-wide styles for the SEO practice site (seo-test.lunelukkio.com).
  Palette borrowed from color-samples/right-blue-green-gray.html
  (dark/mid/light/ink/muted/paper/hair design tokens).
  No JavaScript, no external fonts/CDNs, no motion beyond a short
  color transition on hover/focus.
*/

:root {
  --dark: #9cc9e5;   /* refresh blue: structural accent (header bg, borders, pills) */
  --mid: #cae5d3;    /* morning wing: secondary tint (hover states) */
  --light: #dfe2ea;  /* clear rain: light tint (code background, pill background) */
  --ink: #20262b;    /* body text */
  --muted: #6b7480;  /* secondary text: captions, nav separators */
  --paper: #f6f7f8;  /* page background */
  --hair: #e3e6ea;   /* hairline borders */
  /* Darker tint of --dark, used only where text sits on --paper/white and
     needs enough contrast to stay readable (headings, links). --dark itself
     stays reserved for backgrounds, borders and other non-text uses. */
  --accent-text: #3d7aa0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 6vw;
}

/* Header */
.site-header {
  background: var(--dark);
  color: var(--ink);
  padding: 2.2rem 0 1.6rem;
}

.site-header h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lang-switch {
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
}
.lang-switch a {
  color: var(--ink);
  opacity: 0.75;
  text-decoration: underline;
  transition: opacity 0.18s;
}
.lang-switch a:hover { opacity: 1; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.1rem;
  color: rgba(32, 38, 43, 0.4); /* mutes the "|" separators between links */
  font-size: 0.86rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: background-color 0.18s, color 0.18s;
}
.site-nav a:hover { background: var(--mid); }

/* Main content */
main { padding: 2.6rem 0 3.4rem; }

main h2 {
  margin: 2.6rem 0 1rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--dark);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 600;
  color: var(--ink);
}
main h2:first-of-type { margin-top: 1.4rem; }

main p { margin: 0 0 1.1rem; }
main ul { margin: 0 0 1.4rem; padding-left: 1.4rem; }
main li { margin: 0 0 0.5rem; }

main a {
  color: var(--accent-text);
  transition: color 0.18s;
}
main a:hover { color: var(--ink); }

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  background: var(--light);
  color: var(--ink);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Diagram figures: wrap each inline SVG in a card, matching the
   reference page's swatch/demo-card treatment. SVG internals are
   untouched; only the surrounding figure is styled. */
.diagram {
  margin: 1.8rem 0 2.2rem;
  padding: 1.2rem 1.2rem 1rem;
  background: #ffffff;
  border: 1px solid var(--hair);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(20, 30, 45, 0.05);
  text-align: center;
}
.diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.diagram figcaption {
  margin-top: 0.9rem;
  text-align: left;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}
.diagram figcaption a { color: var(--accent-text); }

@media (max-width: 760px) {
  .wrap { padding: 0 5vw; }
  .site-nav { gap: 0.25rem 0.05rem; font-size: 0.8rem; }
  .site-nav a { padding: 0.28rem 0.5rem; }
  .diagram { padding: 1rem 0.8rem 0.9rem; }
}
