/* Betbelt site (betbelt.app). One stylesheet for every page. No web fonts, no third party files, and no script on any
   page. Phone width first: one column, a 16 px side gutter, every tap target at least 44 px.
   Brand: accent #1C7A61 (the app's AccentColor), darker #15614F for link text and pressed states. */

:root {
  --bg: #fbfaf7;
  --surface: #f3f1ea;
  --tint: #eaf3ef;
  --text: #1b1d1c;
  --muted: #535956;
  --line: #dcd8cf;
  --accent: #1c7a61;
  --accent-dark: #15614f;
  --link: #15614f;
  --on-accent: #ffffff;
  --ph-bg: #fff3d1;
  --ph-line: #b8862a;
  --ph-text: #4f3a00;
  --focus: #1c7a61;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --surface: #1b1f1d;
    --tint: #16241f;
    --text: #e8ebe9;
    --muted: #a9b0ac;
    --line: #2e3431;
    --accent: #4dbd97;
    --accent-dark: #74d3b1;
    --link: #7fd8b8;
    --on-accent: #0b1f18;
    --ph-bg: #3a2f12;
    --ph-line: #b8862a;
    --ph-text: #f3dea4;
    --focus: #7fd8b8;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

/* Skip link: hidden until it has keyboard focus. */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* Header: the mark, the name and three links. */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark img { width: 28px; height: 28px; display: block; }
.site-nav { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--link);
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

main { padding: 22px 0 48px; }

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.005em; }
h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.4375rem; line-height: 1.25; margin: 40px 0 10px; }
h3 { font-size: 1.0625rem; line-height: 1.35; margin: 24px 0 4px; }
p, ul, ol, table { margin: 0 0 14px; }
ul, ol { padding-left: 1.25rem; }
li { margin: 0 0 6px; }
li > ul { margin-top: 6px; }
strong { font-weight: 650; }

.lede { font-size: 1.1875rem; line-height: 1.45; }
.meta { color: var(--muted); font-size: 0.9375rem; margin-bottom: 20px; }
.note { color: var(--muted); font-size: 0.9375rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Links inside running text: padding grows the touch area to 44 px without changing the line spacing. */
main p a,
main li a,
main td a { padding: 12px 0; }
.tap { white-space: nowrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--accent-dark);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent); }
.button:active { transform: translateY(1px); }
@media (prefers-color-scheme: dark) {
  .button { background: var(--accent); }
  .button:hover { background: var(--accent-dark); }
}

/* Home: the first screen. */
.hero { padding-bottom: 8px; }
.hero h1 { font-size: 1.75rem; line-height: 1.22; max-width: 24ch; }
.nowrap { white-space: nowrap; }
.hero .lede { max-width: 36rem; }
.for { color: var(--muted); margin-bottom: 20px; }
.status {
  margin: 0 0 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 4px 10px 10px 4px;
  background: var(--surface);
}
.status p { margin: 0 0 12px; }
.status p:last-child { margin-bottom: 0; }
.status .button { width: 100%; }

/* Home: numbered steps. */
.steps { list-style: none; padding: 0; margin: 0 0 8px; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 48px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--accent-dark);
}
.steps strong { display: block; margin-bottom: 2px; }

/* Home: the two people. */
.roles { display: grid; gap: 14px; margin: 0 0 8px; }
.role {
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 4px 4px 10px 10px;
  background: var(--surface);
}
.role h3 { margin-top: 0; font-size: 1.125rem; }
.role .term { color: var(--muted); font-size: 0.9375rem; margin-bottom: 10px; }
.role ul { margin-bottom: 0; }
@media (min-width: 46rem) {
  .roles { grid-template-columns: 1fr 1fr; }
}

/* A box for the help lines and short asides. Nothing inside is rounded, so no nested radius rule applies. */
.panel {
  margin: 32px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--tint);
}
.panel h2 { margin-top: 0; font-size: 1.25rem; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel h3 {
  margin: 26px 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

/* Help lines: one per row, the number large enough to tap. */
.lines { list-style: none; padding: 0; margin: 0 0 14px; }
.lines li { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.lines li:first-child { border-top: 0; padding-top: 0; }
.lines .who { display: block; font-weight: 650; }
.lines .what { display: block; color: var(--muted); font-size: 0.9375rem; }

/* Something the code or the owner has not settled yet. Visible on purpose; grep "Placeholder" before going live. */
.ph {
  display: inline;
  padding: 1px 4px;
  border: 1px dashed var(--ph-line);
  border-radius: 4px;
  background: var(--ph-bg);
  color: var(--ph-text);
  font-size: 0.9375em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Two column tables that fit a phone without sideways scrolling. */
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
th:first-child, td:first-child { width: 56%; }

/* "On this page": folded so the first screen on a phone shows the content, not a list of links. */
.toc-box {
  margin: 20px 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.toc-box summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-weight: 650;
  cursor: pointer;
}
.toc-box summary { list-style: none; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary::after { content: "Show"; margin-left: auto; font-weight: 400; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.toc-box[open] summary::after { content: "Hide"; }
.toc-box summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.toc-box .toc { margin: 0; padding: 0 16px 8px 2.25rem; }
.toc { padding-left: 1.25rem; columns: 1; }
.toc li { margin: 0; }
.toc a { display: inline-block; min-height: 44px; padding: 10.5px 0; line-height: 1.35; }
@media (min-width: 46rem) {
  .toc { columns: 2; column-gap: 32px; }
  .toc li { break-inside: avoid; }
}

.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.site-foot .wrap { padding-top: 12px; padding-bottom: 28px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-bottom: 6px; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-foot p { margin: 0; }

@media (min-width: 46rem) {
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 2.75rem; }
  main { padding-top: 44px; }
  .status .button { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}
