/* The look of swissnexlab.com, following swissnex's own site: black type,
   red accents, light grey and black bands. Used by the home page and by the
   apps list the server generates at /apps/. */
:root {
  --red: #f50000;        /* buttons, lines, large text: 4.3 to 1 on white */
  --red-text: #d10000;   /* red at text size: 5.7 to 1 on white */
  --ink: #1a1b20;
  --mid: #4a4a4a;
  --line: #dfdfdf;
  --grey: #f0f0f0;
  --paper: #ffffff;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
a:hover { color: var(--red-text); }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header: logo on the left, as on swissnex.org */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 9.5rem; height: auto; color: var(--red); flex: none; }
.brand .lab { font-size: 1.35rem; font-weight: 400; letter-spacing: 0.01em; border-left: 1px solid var(--line); padding-left: 1rem; line-height: 1.1; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-nav a { font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red-text); }

/* Bands */
.band { padding: 4rem 0; }
.band--grey { background: var(--grey); }
.band--dark { background: var(--ink); color: #fff; }
.band--dark a { text-decoration-color: var(--red); }
.band--dark a:hover { color: #fff; text-decoration-thickness: 3px; }

h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 1rem; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
/* Short red line under a heading, as under swissnex's section titles */
.ruled::after { content: ""; display: block; width: 3rem; height: 3px; background: var(--red); margin-top: 0.9rem; }
.lead { font-size: 1.25rem; max-width: 40rem; }
p { margin: 0 0 1rem; }
.quiet { color: var(--mid); font-size: 0.95rem; }
.band--dark .quiet { color: #dfdfdf; }

/* Buttons: the outlined, letter-spaced capitals of swissnex's "READ MORE" */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--red);
  color: var(--red-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn:hover, .btn:focus-visible { background: var(--red); color: #fff; }
.btn--solid { background: var(--red); color: #fff; }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--ink); border-color: var(--ink); }
.band--dark .btn { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Three columns on wide screens, as on swissnex.org; one on a phone */
.cols { display: grid; gap: 2rem; }
@media (min-width: 40rem) { .cols { grid-template-columns: repeat(3, 1fr); } }
.cols h3::after { content: ""; display: block; width: 2rem; height: 2px; background: var(--red); margin-top: 0.6rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); background: var(--paper); }
table { border-collapse: collapse; width: 100%; }
caption { text-align: left; padding: 0.8rem 1rem 0; }
th, td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
thead th { border-bottom: 2px solid var(--ink); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 700; }
td a { overflow-wrap: anywhere; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

.site-foot { padding: 2rem 0; font-size: 0.9rem; color: var(--mid); border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.site-foot a { text-decoration-color: var(--line); }

@media print {
  .skip, .site-nav, .actions { display: none; }
  .band--dark { background: #fff; color: #000; }
  a { text-decoration: none; }
}
