/* standardoperatingprocedure.app: mobile-first, breakpoints 768px / 1024px */
:root {
  --bg: #ffffff;
  --bg-soft: #f3f7fb;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5a6778;
  --border: #dde4ec;
  --accent: #0b6fc7;
  --accent-hover: #085799;
  --accent-soft: #e6f1fb;
  --on-accent: #ffffff;
  --logo-filter: none;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1722;
    --bg-soft: #16202e;
    --surface: #182333;
    --text: #e6ebf1;
    --muted: #a3afbf;
    --border: #2a384b;
    --accent: #4aa3f0;
    --accent-hover: #7bbcf5;
    --accent-soft: #1a2d44;
    --on-accent: #07121f;
    --logo-filter: invert(1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-top: .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  padding: .75em 1.3em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-sm { padding: .45em 1em; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.5) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 60px; gap: 8px 12px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.2; min-width: 0; flex: 1 1 0; }
.brand img { filter: var(--logo-filter); width: 30px; height: 30px; flex: none; }
@media (min-width: 480px) { .brand { font-size: 1.05rem; gap: 10px; } .brand img { width: 36px; height: 36px; } }
.menu-toggle { flex: none;
  font: inherit; font-weight: 600; font-size: .95rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: .4em .9em; cursor: pointer;
}
.site-nav { width: 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0 0 12px; display: flex; flex-direction: column; gap: 2px; }
.site-nav a:not(.btn) { display: block; padding: .55em 0; color: var(--text); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--accent); }
.site-nav .btn { margin-top: 6px; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }
.no-js .menu-toggle { display: none; }

@media (min-width: 900px) {
  .brand { flex: none; }
  .menu-toggle { display: none; }
  .site-nav, .js .site-nav { display: block; width: auto; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 22px; padding: 0; }
  .site-nav .btn { margin-top: 0; }
  .site-nav .lang { border-left: 1px solid var(--border); padding-left: 18px; }
}

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

/* Hero (home) */
.hero { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); padding: 32px 0 16px; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
.hero-grid > picture img { border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.hero .lead { font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
@media (min-width: 1024px) {
  .hero { padding: 56px 0 32px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}

/* Sections */
.section { padding: 40px 0; }
.section-soft { background: var(--bg-soft); }
.section > .wrap > h2:first-child { margin-top: 0; }
.intro { max-width: 800px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tile h3 { margin-top: 0; }
.tile p:last-child, .tile ul:last-child { margin-bottom: 0; }

.feature { display: grid; gap: 24px; align-items: center; margin: 32px 0; }
.feature h3 { margin-top: 0; font-size: 1.35rem; }
.feature picture { max-width: 320px; margin: 0 auto; }
.feature-wide picture { max-width: 560px; }
@media (min-width: 768px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 48px; }
  .feature.reverse > :first-child { order: 2; }
}
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.7em; position: relative; margin-bottom: .35em; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.quote { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; max-width: 720px; margin: 0 auto; }
.quote blockquote { margin: 0; font-size: clamp(1.2rem, 3vw, 1.5rem); font-style: italic; line-height: 1.45; }
.quote img { border-radius: 50%; width: 88px; height: 88px; }
.quote p { margin: 0; }
.quote .role { color: var(--muted); font-size: .95rem; }

.faq dt { font-weight: 700; font-size: 1.1rem; margin-top: 1.2em; }
.faq dd { margin: .3em 0 0; }

/* Article / prose */
.prose { max-width: 72ch; }
.prose h2 { scroll-margin-top: 80px; }
.prose figure { margin: 24px 0; }
.prose figure img { border-radius: var(--radius); }
.prose .fig-narrow { max-width: 300px; margin-left: auto; margin-right: auto; }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .tip { padding: 12px 18px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.prose .definition { font-size: 1.15rem; }
.prose .video { position: relative; aspect-ratio: 16 / 9; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px; text-align: left; }
.meta { color: var(--muted); font-size: .92rem; }
.hero-img { margin: 16px 0 24px; }
.hero-img img { border-radius: var(--radius); }

.cta { margin: 40px 0; padding: 24px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--border); }
.cta h2 { margin-top: 0; font-size: 1.4rem; }

/* Cards */
.page-head { margin-bottom: 24px; max-width: 800px; }
.cards { display: grid; gap: 20px; margin-bottom: 48px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 16px 18px 18px; }
.card h2, .card h3 { font-size: 1.15rem; margin: 0 0 .35em; color: var(--text); }
.card-link:hover h2, .card-link:hover h3 { color: var(--accent); }
.card p { margin-bottom: .5em; font-size: .97rem; }
.card .meta { font-size: .85rem; }
.related h2 { margin-top: 0; }

.notfound { padding: 40px 16px; }

/* Footer */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 36px 0 16px; margin-top: 24px; font-size: .97rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand, .footer-h { font-weight: 700; margin-bottom: .4em; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: .3em; }
.copyright { color: var(--muted); font-size: .88rem; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
