/*
 * Shared styling for the published NetPad pages.
 *
 * Same-origin and self-contained: no webfonts, no CDN, nothing fetched from
 * anywhere else. A page making a no-network claim should not be phoning out
 * while an administrator reads it.
 */

:root {
  color-scheme: light dark;
  --surface: #fbfcfd;
  --ink: #11161c;
  --muted: #5b6b7b;
  --rule: #e2e7ec;
  --raised: #ffffff;
  --sunken: #f2f5f8;
  --orange: #e8720c;
  --green: #1d8a4e;
  --green-wash: #e8f4ee;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'Consolas', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #11161c;
    --ink: #f0f3f6;
    --muted: #94a4b4;
    --rule: #242e39;
    --raised: #171e26;
    --sunken: #0c1116;
    --orange: #f59331;
    --green: #43b978;
    --green-wash: #10271c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 48px 24px 80px;
  max-width: 720px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

h2 {
  margin: 40px 0 12px;
  font-size: 19px;
}

.lede {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 17px;
}

.updated {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

/* The whole decision, in one box, before anything else. */
.facts {
  margin-bottom: 32px;
  padding: 4px 20px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: var(--raised);
}

.fact {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.fact:first-child {
  border-top: 0;
}

.fact dt {
  color: var(--muted);
  font-size: 14px;
}

.fact dd {
  margin: 0;
}

.yes {
  color: var(--green);
  font-weight: 600;
}

table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

pre {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

ul {
  padding-left: 20px;
}

li {
  margin: 6px 0;
}

.highlight {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--green-wash);
}

/* ---------------------------------------------------------- landing page --- */

.hero {
  margin-bottom: 40px;
}

.mark {
  display: block;
  margin-bottom: 16px;
}

.landing h1 {
  font-size: 34px;
}

.landing .lede {
  margin-bottom: 24px;
  max-width: 34em;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.07);
}

.button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* On the landing page the left column names a group rather than a field, so it
   carries more weight than the label column elsewhere. */
.landing th {
  width: 170px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 560px) {
  .landing table,
  .landing tbody,
  .landing tr,
  .landing th,
  .landing td {
    display: block;
    width: auto;
  }

  .landing th {
    padding-bottom: 2px;
    border-bottom: 0;
  }
}

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

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

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