@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f5f6f3;
  --ink: #1d2420;
  --muted: #747d77;
  --faint: #a6ada7;
  --line: #dde1db;
  --water: #1f5a8a;
  --water-soft: #bccbd8;
  --alarm: #a42a2f;
  --field: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151917;
    --ink: #e6eae6;
    --muted: #8f9890;
    --faint: #5b635d;
    --line: #2a302c;
    --water: #86b6dd;
    --water-soft: #34475a;
    --alarm: #e7787b;
    --field: #1c211e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 32px 24px 96px; }
@media (max-width: 560px) { .wrap { padding: 20px 16px 72px; } }

header.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 72px; }
@media (max-width: 560px) { header.top { margin-bottom: 48px; } }
.wordmark { font-weight: 560; font-size: 15px; letter-spacing: 0.01em; text-decoration: none; }
.crumb { font-size: 15px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); }

h1, h2, h3 { font-weight: inherit; margin: 0; }
.statement { font-size: 54px; line-height: 1.08; font-weight: 300; letter-spacing: -0.025em; }
.statement + .sub { margin-top: 14px; }
@media (max-width: 560px) { .statement { font-size: 40px; } }
.sub { color: var(--muted); font-size: 19px; margin: 0; }
.title { font-size: 40px; line-height: 1.1; font-weight: 340; letter-spacing: -0.02em; }
@media (max-width: 560px) { .title { font-size: 32px; } }

section { margin-top: 80px; }
@media (max-width: 560px) { section { margin-top: 56px; } }
section > h2 { font-size: 15px; color: var(--muted); font-weight: 450; margin-bottom: 18px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.water { color: var(--water); }
.alarm { color: var(--alarm); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
p { margin: 0 0 12px; }

/* Actions du jour : la seule chose qui parle fort */
.actions { margin-top: 56px; }
.action { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.action:last-child { border-bottom: 1px solid var(--line); }
.action .name { font-size: 24px; font-weight: 420; letter-spacing: -0.01em; text-decoration: none; }
.action .amount { font-size: 24px; font-weight: 420; color: var(--water); text-align: right; white-space: nowrap; }
.action .why { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.action.critical .name, .action.critical .amount { color: var(--alarm); }

/* Listes sobres */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.rows .row:last-child { border-bottom: 1px solid var(--line); }
.row .label { font-size: 21px; font-weight: 400; text-decoration: none; letter-spacing: -0.005em; }
.row .meta { color: var(--muted); font-size: 15px; text-align: right; }
.row .meta.attention { color: var(--water); }
.row .meta.alarm { color: var(--alarm); }
.row .note { grid-column: 1 / -1; font-size: 15px; color: var(--muted); margin-top: -2px; }
a.row { text-decoration: none; }
a.row:hover .label { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }

.pot-row { grid-template-columns: minmax(0, 1fr) 120px 64px; }
.pot-row .value { font-size: 21px; text-align: right; font-weight: 360; }
.pot-row .spark { grid-column: 2; grid-row: 1; justify-self: end; }
.pot-row .value { grid-column: 3; grid-row: 1; }
.pot-row .note { grid-column: 1 / -1; }
.pot-row.attention .note { color: var(--water); }
.pot-row.alarm .value, .pot-row.alarm .note { color: var(--alarm); }
@media (max-width: 560px) { .pot-row { grid-template-columns: minmax(0, 1fr) 72px 56px; } }

/* Page pot */
.hero { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.reading { font-size: 120px; line-height: 0.9; font-weight: 230; letter-spacing: -0.045em; }
.reading .unit { font-size: 48px; letter-spacing: -0.02em; margin-left: 6px; color: var(--muted); font-weight: 260; }
.reading.alarm { color: var(--alarm); }
.hero .context { padding-bottom: 10px; color: var(--muted); font-size: 17px; }
@media (max-width: 560px) { .reading { font-size: 92px; } .reading .unit { font-size: 36px; } }
.plants { color: var(--muted); margin-top: 10px; font-size: 17px; }

.next { margin-top: 48px; }
.next .lead { font-size: 26px; line-height: 1.3; font-weight: 380; letter-spacing: -0.01em; }
.next .lead.water { color: var(--water); }
.next .lead.alarm { color: var(--alarm); }
.next ul { list-style: none; padding: 0; margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.next li { margin: 2px 0; }

.chart { margin-top: 20px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-narrow { display: none; }
@media (max-width: 560px) { .chart-wide { display: none; } .chart-narrow { display: block; } }
.chart .legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.chart .legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--ink); }
.chart .legend i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.chart .legend i.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--water); }
.chart .legend i.bar { width: 7px; height: 10px; background: var(--water-soft); }

dl.facts { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 24px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 15px; padding-top: 2px; }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 12px; } }

table.events { width: 100%; border-collapse: collapse; font-size: 16px; }
table.events td { padding: 11px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
table.events tr:last-child td { border-bottom: 1px solid var(--line); }
table.events td.num { text-align: right; white-space: nowrap; padding-left: 16px; }
table.events td.date { color: var(--muted); white-space: nowrap; padding-right: 16px; width: 1%; }

/* Formulaires */
form.stack { display: grid; gap: 22px; max-width: 560px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); align-content: start; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--water); }
.hint { font-size: 13px; color: var(--faint); }
.buttons { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
button, .button {
  font: inherit; font-size: 16px; cursor: pointer; border-radius: 6px; padding: 10px 18px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; display: inline-block;
}
button.quiet, .button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
button.link { background: none; border: none; padding: 0; color: var(--muted); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; font-size: 15px; }
.inline { display: inline; }

.flash { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 40px; font-size: 16px; }
footer.bottom { margin-top: 120px; display: flex; gap: 22px; font-size: 14px; color: var(--faint); flex-wrap: wrap; }
footer.bottom a { color: var(--muted); text-decoration: none; }
footer.bottom a:hover { color: var(--ink); }

.status-line { display: flex; gap: 10px; align-items: baseline; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transform: translateY(-2px); }
.dot.ok { background: var(--muted); }
.dot.off { background: transparent; border: 1px solid var(--faint); }
.dot.err { background: var(--alarm); }
pre.mail { white-space: pre-wrap; font: inherit; font-size: 15px; color: var(--muted); margin: 8px 0 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.volume-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.volume-note input { width: 80px; padding: 4px 8px; font-size: 14px; }
