/*
 * choreturn.app — one stylesheet for every page.
 *
 * The colours are the app's own standard palette (app/lib/core/theme/
 * ct_colors.dart): light by day, night when the device asks for it. The
 * font is the app's Instrument Sans, served from this site rather than a
 * font CDN, so reading the privacy policy does not tell anyone else you did.
 */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #ffffff;
  --ink: #1b1f24;
  --secondary: #5a6472;
  --hairline: #e3e7ec;
  --surface: #eef1f4;
  --accent: #0f766e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #151b26;
    --ink: #f1f3f6;
    --secondary: #a3acbc;
    --hairline: #2a3344;
    --surface: #1e2633;
    --accent: #f0a35b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

header.site {
  max-width: 40rem;
  margin: 0 auto;
  padding: 20px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

header.site a.home {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

nav.lang a { margin-left: 12px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.25rem; margin: 40px 0 8px; }
h3 { font-size: 1.05rem; margin: 28px 0 4px; }

p, li { margin: 0 0 12px; }
ul { padding-left: 1.2em; }

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

.lede { color: var(--secondary); margin-bottom: 32px; }
.meta { color: var(--secondary); font-size: 15px; }

section.lang + section.lang {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--hairline);
}

.box {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}

.box p:last-child, .box ul:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 15px;
}

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

th { font-weight: 600; }

footer.site {
  max-width: 40rem;
  margin: 0 auto;
  padding: 24px 16px 48px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 15px;
}

footer.site a { margin-right: 16px; }

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  table { font-size: 14px; }
}
