/*
 * Shared styles for every thescarlet.nl page (#1528). Linked as /site.css.
 * Anything only one page uses stays in that page's own <style> block, which
 * loads after this file and so wins at equal specificity.
 */

/* Colour tokens */
:root {
  --primary: #D32F2F;
  --on-primary: #FFFFFF;
  --primary-container: #FFEBEE;
  --on-primary-container: #B71C1C;
  --surface: #FAFAFA;
  --on-surface: #1E2328;
  --surface-variant: #F0F2F5;
  --on-surface-variant: #5A6571;
  --page: #FFFFFF;
  --rule: #E5E8EB;
  --card: #F9FAFB;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #FF5252;
    --on-primary: #370000;
    --primary-container: #441010;
    --on-primary-container: #FFCDD2;
    --surface: #14181B;
    --on-surface: #E8ECEF;
    --surface-variant: #1E2327;
    --on-surface-variant: #9AA6B2;
    --page: #0C0F12;
    --rule: #262D33;
    --card: #161B1F;
  }
}

/* Base typography and layout */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--on-surface);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 3rem 1.5rem 2.5rem;
}
.wrap {
  max-width: 44rem;
  margin: 0 auto;
}
main {
  padding: 2.5rem 1.5rem 4rem;
}
section {
  margin-bottom: 2.5rem;
}
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 1.5rem;
  color: var(--on-surface-variant);
  font-size: 0.875rem;
  text-align: center;
}
.site-version {
  font-variant-numeric: tabular-nums;
}
h1 {
  margin: 0 0 .3rem;
  font-size: 2.2rem;
  letter-spacing: -.025em;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1.15;
}
h2 {
  font-size: 1.3rem;
  margin: 0 0 1rem;
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .4rem;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: .55rem;
}
h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 1.1em;
  background: var(--primary);
  border-radius: 3px;
}
p {
  margin: 0 0 1.2rem;
}
ul, ol {
  margin: 0 0 1.2rem;
  padding-left: 1.5rem;
}
li {
  margin-bottom: 0.4rem;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
code {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  padding: .15rem .35rem;
  border-radius: .25rem;
  font-size: .88em;
}
.tagline {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 1.05rem;
}
.nav-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.nav-back:hover {
  text-decoration: underline;
}
.brand-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--primary);
}
.brand-header-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.pimpernel-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Key-value card: a two-column label/value table that stacks on phones. */
.details-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1.5rem;
}
.details-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.details-card th,
.details-card td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
.details-card tr:last-child th,
.details-card tr:last-child td {
  border-bottom: none;
}
.details-card th {
  width: 38%;
  color: var(--on-surface-variant);
  font-weight: 600;
}
.details-card td {
  color: var(--on-surface);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Wide data tables scroll sideways inside their own box rather than the page. */
.scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
}
.scroll table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: .93rem;
}
.scroll th,
.scroll td {
  text-align: left;
  vertical-align: top;
  padding: .75rem .95rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.scroll thead th {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  font-weight: 600;
}
.scroll tr:last-child td,
.scroll tr:last-child th {
  border-bottom: none;
}

@media (max-width: 480px) {
  header {
    padding: 2rem 1.25rem 1.75rem;
  }
  main {
    padding: 1.75rem 1.25rem 3rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .brand-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .pimpernel-logo {
    width: 52px;
    height: 52px;
  }
  .details-card table,
  .details-card tbody,
  .details-card tr,
  .details-card th,
  .details-card td {
    display: block;
  }
  .details-card th {
    width: auto;
    padding: .75rem 1rem .2rem;
    border-bottom: none;
  }
  .details-card td {
    padding: 0 1rem .75rem;
    border-bottom: none;
  }
  .details-card tr:not(:last-child) {
    border-bottom: 1px solid var(--rule);
  }
}
