/*
 * Mentr site styles, taken from the app's design tokens (src/constants/tokens.ts): Figtree in three weights, warm
 * paper and ink, one accent for things you can act on (links, buttons), white surfaces set apart by a hairline, and no
 * shadows. The accent is the app's placeholder berry; change it here and in tokens.ts together.
 * Figtree is served from this site (fonts/, SIL Open Font License) so no visitor data goes to a font service.
 */

@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('fonts/figtree-400.woff') format('woff'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('fonts/figtree-600.woff') format('woff'); }
@font-face { font-family: 'Figtree'; font-weight: 800; font-display: swap; src: url('fonts/figtree-800.woff') format('woff'); }

:root {
  color-scheme: light dark;
  --bg: #FAF9F7;
  --surface: #FFFFFF;
  --sunk: #F1EEEA;
  --text: #1B1A19;
  --text2: #66625D;
  --separator: #E7E3DE;
  --border: #8F8983;
  --accent: #AD1F55;
  --on-accent: #FFFFFF;
  --danger: #B42318;
  --success: #1B6E3C;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1F1D1C;
    --sunk: #2A2826;
    --text: #F3F1EE;
    --text2: #A6A09A;
    --separator: #34312E;
    --border: #6F6963;
    --accent: #FF86B2;
    --on-accent: #141312;
    --danger: #FF7B6B;
    --success: #5CCB86;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/24px 'Figtree', system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 560px; margin: 0 auto; padding: 48px 16px 64px; }
main.doc { max-width: 680px; }

/* Type: 32 · 22 · 17 · 15 · 13, weights 400 · 600 · 800, as in the app. */
h1 { font-size: 32px; line-height: 38px; font-weight: 800; letter-spacing: -0.6px; margin: 0; }
h2 { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.3px; margin: 40px 0 8px; }
.doc h2 { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: 0; margin: 32px 0 8px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 20px; margin: 0 0 12px; }
li::marker { color: var(--text2); }
strong { font-weight: 600; }
.secondary { color: var(--text2); }
.intro { margin-top: 12px; }
h1 + .status { margin-top: 24px; }
#reset > p:first-child { margin-top: 8px; }
.caption { font-size: 13px; line-height: 18px; color: var(--text2); }

/* Links are the accent and underlined, so they never rely on colour alone. */
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Brand: the app icon's lowercase m on an accent tile, and the name. */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; color: var(--text); text-decoration: none; }
.brand .tile { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand .tile path { stroke: var(--on-accent); }
.brand .name { font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.4px; }

/* Grouped surface with inset dividers, like the app's lists. */
.group { background: var(--surface); border: 1px solid var(--separator); border-radius: 14px; margin: 8px 0; overflow: hidden; }
.group > .row { padding: 14px 16px; position: relative; }
.group > .row + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--separator); }
.row .title { font-weight: 600; display: block; }
.row .detail { font-size: 15px; line-height: 21px; color: var(--text2); display: block; margin-top: 2px; }
.step { display: flex; gap: 12px; align-items: baseline; }
.step .n { font-size: 13px; line-height: 18px; font-weight: 800; color: var(--text2); width: 16px; flex: none; }
.note { font-size: 13px; line-height: 18px; color: var(--text2); padding: 0 16px; margin: 0 0 12px; }
.label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text2); padding: 0 16px; margin: 32px 0 0; }

/* Forms, as TextField and Button in the app. */
.field-label { display: block; font-size: 15px; line-height: 21px; font-weight: 600; margin: 16px 0 6px; }
input {
  font: inherit; color: var(--text); background: var(--surface);
  width: 100%; min-height: 52px; padding: 0 14.5px; border: 1.5px solid var(--border); border-radius: 12px;
}
input:focus { outline: none; border: 2px solid var(--accent); padding: 0 14px; }
button {
  font: 600 17px/22px 'Figtree', system-ui, sans-serif; color: var(--on-accent); background: var(--accent);
  width: 100%; min-height: 52px; margin-top: 24px; border: 0; border-radius: 14px; cursor: pointer;
}
button:hover { opacity: .9; }
button:disabled { opacity: .4; cursor: default; }

/* Status message: a coloured rule and coloured text on the surface, as Notice in the app. */
.status { display: block; background: var(--surface); border: 1px solid var(--separator); border-left: 3px solid var(--text2); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.status:empty { display: none; }
.status.ok { border-left-color: var(--success); color: var(--success); }
.status.err { border-left-color: var(--danger); color: var(--danger); }

.meta { font-size: 13px; line-height: 18px; color: var(--text2); margin: 12px 0 24px; }

footer { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; font-size: 13px; line-height: 18px; color: var(--text2); }
.doc + footer, footer.doc { max-width: 680px; }
footer a { color: var(--text2); }

.hidden { display: none !important; }
