/* ==========================================================================
   SwissInfoCloud setup guides — single stylesheet, no framework.
   ========================================================================== */

:root {
  --accent: #f05f40;
  --accent-dark: #d4462a;
  --text: #222;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --bg: #fff;
  --bg-soft: #f7f7f7;
  --radius: 8px;
  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

main {
  flex: 1;
  padding-bottom: 48px;
}

a {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-dark);
}

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

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

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

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

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--bg-soft);
}

/* Current service, driven by <body data-section="..."> set in each page. */
[data-section="safemail"] .site-nav a[data-section="safemail"],
[data-section="safevoice"] .site-nav a[data-section="safevoice"],
[data-section="safebox"] .site-nav a[data-section="safebox"],
[data-section="safeoffice"] .site-nav a[data-section="safeoffice"] {
  color: #fff;
  background: var(--accent);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "›";
  padding: 0 8px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* ---------- Intro (home and service pages) ---------- */

.intro {
  padding: 32px 0 8px;
  text-align: center;
}

.intro h1 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
}

.intro__lead {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

/* ---------- Tile grid ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tile:hover,
.tile:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tile__title {
  font-size: 22px;
  font-weight: 600;
}

.tile__text {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.tile__icon {
  width: 120px;
  height: 120px;
  margin-top: 20px;
  object-fit: contain;
}

.tiles--os .tile__icon {
  width: 96px;
  height: 96px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .tiles {
    grid-template-columns: 1fr;
  }

  .tile__icon {
    width: 88px;
    height: 88px;
  }
}

/* ---------- Guide pages ---------- */

.guide-header {
  padding: 24px 0 8px;
}

.guide-header h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
}

.os-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.os-switch a {
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

.os-switch a:hover {
  border-color: var(--accent);
}

.os-switch a[aria-current="page"] {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.toc {
  margin: 20px 0 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-soft);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.guide-section {
  max-width: 860px;
  margin-top: 32px;
  padding-top: 8px;
}

.guide-section + .guide-section {
  border-top: 1px solid var(--line);
}

.guide-section h2 {
  margin: 16px 0;
  font-size: clamp(22px, 3vw, 28px);
  scroll-margin-top: 16px;
}

.guide-section h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.guide-section p {
  margin: 0 0 12px;
}

.guide-section a {
  overflow-wrap: anywhere;
}

.guide-section figure {
  margin: 16px 0 24px;
}

.guide-section figure img {
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 14px;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer__copy {
  margin-left: auto;
  align-self: flex-end;
}

@media (max-width: 560px) {
  .site-footer__copy {
    margin-left: 0;
  }
}
