/* Tell — WhatsApp-API aus der Schweiz
   Gemeinsames Stylesheet. Keine externen Abhängigkeiten. */

:root {
  --bg: #ffffff;
  --bg-sunk: #f5f6f7;
  --bg-raised: #ffffff;
  --border: #dfe2e5;
  --border-strong: #c4c9ce;
  --text: #16191c;
  --text-muted: #5c646c;
  --text-faint: #838b93;
  --accent: #0f6b60;
  --accent-hover: #0b544b;
  --accent-soft: #e6f1ef;
  --warn-bg: #fdf6e6;
  --warn-border: #e5cf94;
  --warn-text: #6b5312;
  --code-bg: #1c2126;
  --code-text: #e6e9ec;
  --code-comment: #8c959e;
  --code-string: #a8d5a2;
  --code-key: #8fc7e8;
  --radius: 6px;
  --maxw: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --bg-sunk: #1b1f23;
    --bg-raised: #1b1f23;
    --border: #2c3237;
    --border-strong: #3d454c;
    --text: #e8eaec;
    --text-muted: #a3abb2;
    --text-faint: #7d858c;
    --accent: #4fb3a4;
    --accent-hover: #6ac4b6;
    --accent-soft: #16302c;
    --warn-bg: #2a2416;
    --warn-border: #5c4c22;
    --warn-text: #d8c48a;
    --code-bg: #0f1215;
    --code-text: #e6e9ec;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Grundelemente ---------- */

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; margin-top: 2.5rem; }
h3 { font-size: 1.1rem; margin-top: 1.8rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

strong { font-weight: 600; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.875em;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { padding-bottom: 4rem; }

/* ---------- Kopfzeile ---------- */

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.brand:hover { text-decoration: none; }
.brand .by {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-faint);
}

nav.site {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  flex-wrap: wrap;
}
nav.site a { color: var(--text-muted); }
nav.site a:hover { color: var(--accent); }
nav.site a[aria-current="page"] { color: var(--text); font-weight: 500; }

/* ---------- Hero ---------- */

.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 2.4rem;
  max-width: 18em;
}
.hero .lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 40em;
  margin-bottom: 1.75rem;
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.8rem; }
  h1 { font-size: 1.7rem; }
}

/* ---------- Knöpfe ---------- */

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #0b1214; }
}

.btn-secondary {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--bg-raised);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Karten / Raster ---------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg-raised);
}
.card h3 { margin-top: 0; font-size: 1rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Hinweiskasten ---------- */

.notice {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.notice h3 { margin-top: 0; color: inherit; }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice a { color: inherit; text-decoration: underline; }

.panel {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-sunk);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.panel p:last-child { margin-bottom: 0; }

/* ---------- Code ---------- */

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
pre .c { color: var(--code-comment); }
pre .s { color: var(--code-string); }
pre .k { color: var(--code-key); }

/* ---------- Tabellen ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  min-width: 460px;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-weight: 600;
  background: var(--bg-sunk);
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ---------- Preise ---------- */

.price-main {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--bg-raised);
  margin: 1.5rem 0;
}
.price-tag {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.price-tag .unit {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}
.price-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

ul.check { list-style: none; padding-left: 0; }
ul.check li {
  padding-left: 1.5rem;
  position: relative;
}
ul.check li::before {
  content: "–";
  position: absolute;
  left: 0.35rem;
  color: var(--accent);
  font-weight: 600;
}

ul.cross { list-style: none; padding-left: 0; }
ul.cross li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
}
ul.cross li::before {
  content: "×";
  position: absolute;
  left: 0.35rem;
  color: var(--text-faint);
}

/* ---------- Fusszeile ---------- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-sunk);
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
footer.site a { color: var(--text-muted); text-decoration: underline; }
footer.site a:hover { color: var(--accent); }
footer.site .foot-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
footer.site p { margin: 0 0 0.35rem; }

.small { font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Sprungmarke ---------- */

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 0.5rem;
  background: var(--bg);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  z-index: 100;
}
