/* Minu — the public site.
 *
 * The palette is the app's, lifted from lib/ui/theme/minu_colors.dart so the
 * page somebody lands on and the app they install look like the same thing.
 * Four values come from CGI's brand — #200A58, #5236AB, #E11937 and the
 * lavender tint; the rest are derived.
 *
 * Dark mode follows the system, for the same reason the app has it: a white
 * page at night is a lamp. */

:root {
  --canvas: #ffffff;
  --surface: #f7f6fb;
  --raised: #ece9f6;
  --line: #dcd7ec;
  --ink: #200a58;
  --text: #333333;
  --dim: #56506b;
  --faint: #6f6885;
  --primary: #5236ab;
  --on-primary: #ffffff;
  --live: #e11937;
  --ok: #0f7b5f;
  --wait: #a85b00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #100b1c;
    --surface: #171125;
    --raised: #201830;
    --line: #302645;
    --ink: #e7e2f5;
    --text: #d5cfe6;
    --dim: #a79fc0;
    --faint: #8d84a8;
    --primary: #b3a0ee;
    --on-primary: #17102a;
    --live: #ff6b81;
    --ok: #4bc79f;
    --wait: #e0a052;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.wrap.wide { max-width: 52rem; }

/* ------------------------------------------------------------------ nav */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  position: sticky; top: 0; z-index: 10;
}
.topbar .inner {
  max-width: 52rem; margin: 0 auto; padding: .85rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.topbar .mark {
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--primary); text-decoration: none; margin-right: auto;
}
.topbar a:not(.mark) {
  color: var(--dim); text-decoration: none; font-size: .92rem; font-weight: 500;
}
.topbar a:not(.mark):hover, .topbar a[aria-current="page"] { color: var(--primary); }

/* --------------------------------------------------------------- typography */

.brand {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--primary); margin: 0 0 .6rem;
}
h1 { color: var(--ink); font-size: 2.1rem; line-height: 1.18; margin: 0 0 .6rem; letter-spacing: -.025em; }
h2 { color: var(--ink); font-size: 1.3rem; line-height: 1.3; margin: 2.75rem 0 .7rem; letter-spacing: -.01em; }
h3 { color: var(--ink); font-size: 1.02rem; margin: 1.75rem 0 .4rem; }
p, li { color: var(--text); }
a { color: var(--primary); text-underline-offset: 2px; }
ul, ol { padding-left: 1.15rem; }
li { margin: .4rem 0; }
strong { color: var(--ink); font-weight: 650; }
.stamp { color: var(--faint); font-size: .9rem; margin: 0; }
.rule { height: 3px; width: 3rem; background: var(--primary); border-radius: 2px; margin: 1.25rem 0 2.25rem; }
header.page { border-bottom: 2px solid var(--primary); padding-bottom: 1.25rem; margin-bottom: 2rem; }

/* -------------------------------------------------------------- components */

.lede, .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.25rem 1.4rem; margin: 1.5rem 0;
}
.lede { margin: 0 0 2rem; }
.lede p, .card p { margin: .55rem 0; }
.lede p:first-child, .card p:first-child { margin-top: 0; }
.lede p:last-child, .card p:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--primary); background: var(--raised);
  padding: .9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 1.5rem 0;
}
.note.legal { border-left-color: var(--live); }
.note.good { border-left-color: var(--ok); }
.note p { margin: .4rem 0; font-size: .96rem; }
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

.tag {
  display: inline-block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: var(--primary); margin-bottom: .35rem;
}
.tag.red { color: var(--live); }
.tag.green { color: var(--ok); }

/* Wide content scrolls inside itself; the page body never does. */
.scroll { overflow-x: auto; margin: 1.25rem 0; }
table { border-collapse: collapse; width: 100%; min-width: 33rem; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 650; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }

.links { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.5rem 0; }
.pill {
  display: inline-block; padding: .55rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--raised);
  text-decoration: none; font-size: .95rem; font-weight: 600; color: var(--primary);
}
.pill.solid { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

a:focus-visible, .pill:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px;
}

/* ------------------------------------------------------------------ footer */

footer.site {
  margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--faint); font-size: .9rem;
}
footer.site a { color: var(--dim); }
footer.site p { margin: .35rem 0; color: var(--faint); }
