/* Le Carnet Agri — feuille de style (mobile-first, langage visuel validé par Cédric sur l'alpha) */
:root {
  --ink: #244653;
  --ink-hover: #345a69;
  --text: #263f49;
  --muted: #657982;
  --bg: #f3f6f8;
  --line: #e2e9ec;
  --green: #587966;
  --green-deep: #3f5c4b;
  --pale: #edf4ef;
  --gold: #edc460;
  --gold-soft: #fcf2d9;
  --gold-text: #82651f;
  --blue: #eaf1f5;
  --blue-text: #547383;
  --red: #a24836;
  --red-soft: #fff0ed;
  --radius: 16px;
  --sidebar: 246px;
  --nav-h: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--ink); }
svg.ico { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: -5px; }
h1, h2, h3 { margin: 0; font-family: Bahnschrift, 'Segoe UI', system-ui, sans-serif; color: var(--ink); }
h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.6px; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0.4rem 0; }
small, .small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.mt { margin-top: 0.8rem; }
.right { text-align: right; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #3c88a9; outline-offset: 2px; }

/* ---------- Layout: sidebar (desktop) / topbar + bottom nav (mobile) ---------- */
.sidebar {
  display: none; position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: #fff; border-right: 1px solid var(--line); padding: 28px 18px 16px;
  flex-direction: column; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: Bahnschrift, 'Segoe UI', sans-serif; font-size: 20px; font-weight: 600; line-height: 1.15; }
.brand small { display: block; font: 11px/1.5 'Segoe UI', sans-serif; color: var(--muted); }
.brand-icon { background: var(--ink); color: #fff; width: 37px; height: 43px; border-radius: 13px 13px 18px 18px; display: grid; place-items: center; flex-shrink: 0; }
.brand-icon svg.ico { width: 24px; height: 28px; }
.side-nav { display: grid; gap: 6px; margin-top: 28px; }
.nav-item { display: flex; gap: 12px; align-items: center; border-radius: 9px; padding: 12px 14px; min-height: 46px; font-weight: 500; color: #61727a; font-size: 14px; text-decoration: none; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--ink); color: #fff; }
.sidebar-bottom { margin-top: auto; padding: 24px 6px 0; border-top: 1px solid var(--line); }
.sidebar-bottom .nav-item { padding-left: 6px; }
.sidebar-bottom p { font-size: 15px; line-height: 1.4; color: var(--ink); margin: 0 0 10px; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 18px; gap: 12px; }
.topbar .brand { font-size: 19px; }
.topbar .brand .brand-icon { width: 30px; height: 35px; border-radius: 10px 10px 14px 14px; }
.topbar .brand .brand-icon svg.ico { width: 19px; height: 22px; }
.breadcrumb { display: none; font-size: 13px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.avatar { border-radius: 50%; background: #e7eee9; color: var(--green); width: 36px; height: 36px; display: grid; place-items: center; font-size: 12px; font-weight: 700; text-decoration: none; border: 0; }
main.container { padding: 22px 18px 30px; width: 100%; max-width: 1180px; margin: 0 auto; flex: 1; }
main.container.with-nav { padding-bottom: calc(var(--nav-h) + 24px); }
.footer { padding: 0 18px 20px; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 12px; }
.with-nav + .footer { padding-bottom: calc(var(--nav-h) + 16px); }

.mobile-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  padding: 7px 5px max(7px, env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); justify-content: space-around;
}
.mobile-nav .nav-item { padding: 8px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 56px; font-size: 9.5px; border-radius: 8px; min-height: 0; }
.mobile-nav .nav-item.active { background: var(--pale); color: var(--green); }

@media (min-width: 901px) {
  .sidebar { display: flex; }
  .shell { margin-left: var(--sidebar); }
  .topbar { height: 72px; padding: 0 34px; }
  .topbar .brand { display: none; }
  .breadcrumb { display: block; }
  main.container { padding: 30px 34px 40px; }
  main.container.with-nav { padding-bottom: 40px; }
  .footer { padding: 0 34px 22px; }
  .with-nav + .footer { padding-bottom: 22px; }
  .mobile-nav { display: none; }
  h1 { font-size: 32px; }
}

/* ---------- Page header ---------- */
.page-title { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 20px; }
.page-title > .btn { width: 100%; }
.page-title .inline-form .btn { width: 100%; }
.page-title p { color: var(--muted); margin: 6px 0 0; font-size: 13px; max-width: 520px; }
.page-title > .btn { flex-shrink: 0; white-space: nowrap; }
.date-label { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; margin-bottom: 16px; }
.back-link svg.ico { transform: rotate(180deg); width: 16px; height: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-heading h2 { font-size: 18px; }
.section-count { font-size: 11px; background: var(--bg); padding: 3px 7px; border-radius: 5px; color: var(--muted); }
.text-button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 0; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.text-button svg.ico { width: 16px; height: 16px; }

/* ---------- Panels & cards ---------- */
.panel, .card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 0 0 18px; }
.panel.narrow, .card.narrow { max-width: 460px; margin: 16px auto; }
.panel h2, .card h2 { margin-bottom: 12px; }
.grid-2col { display: grid; gap: 18px; grid-template-columns: 1fr; }
.grid-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.side-column .panel { padding: 18px; }
@media (min-width: 1000px) {
  .grid-2col { grid-template-columns: minmax(0, 1fr) 300px; }
  .grid-cards { grid-template-columns: 1fr 1fr; }
}
.welcome-panel { background: var(--ink); color: #fff; border-radius: 18px; position: relative; overflow: hidden; padding: 24px 22px; min-height: 180px; display: flex; align-items: center; margin-bottom: 18px; }
.welcome-copy { position: relative; z-index: 1; max-width: 68%; }
.welcome-copy h2 { color: #fff; font-size: 23px; line-height: 1.25; margin: 8px 0; }
.welcome-copy p { color: #cedbdd; font-size: 13px; margin: 0; }
.welcome-copy .text-button { color: #fff; margin-top: 12px; }
.label-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: #dfe9e8; }
.label-dot::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.egg-scene { position: absolute; right: -38px; top: 6px; width: 225px; height: 200px; transform: scale(.78) rotate(-11deg); display: grid; place-items: center; }
.egg-orbit { border: 1px solid #ffffff14; position: absolute; width: 245px; height: 245px; border-radius: 50%; }
.egg-orbit:nth-child(2) { width: 180px; height: 180px; }
.egg-tray { padding: 15px; display: grid; grid-template-columns: repeat(3, 34px); gap: 10px; background: #365a64; border: 1px solid #648087; border-radius: 16px; box-shadow: 8px 12px 0 #193a44; transform: rotate(4deg); }
.egg { width: 33px; height: 42px; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; background: #eee5d3; box-shadow: inset -6px -3px 0 #d6c5a8, 0 3px 2px #193a4455; position: relative; }
.egg:nth-child(3n) { background: #d4a47c; box-shadow: inset -6px -3px 0 #bb8762, 0 3px 2px #193a4455; }
@media (min-width: 901px) { .egg-scene { right: 14px; transform: rotate(-11deg); } .welcome-panel { min-height: 200px; padding: 26px 29px; } }

/* ---------- Stats strips and cards ---------- */
.stats-strip { display: flex; padding: 14px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.mini-stat { flex: 1; border-right: 1px solid var(--line); padding: 0 14px; }
.mini-stat:first-child { padding-left: 0; }
.mini-stat:last-child { border: 0; }
.mini-stat strong { display: block; font-size: 26px; font-family: Bahnschrift, 'Segoe UI', sans-serif; font-weight: 500; line-height: 1.15; color: var(--ink); }
.mini-stat small { display: block; margin-top: 4px; font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 14px 10px; }
.stat-card strong { font-size: 27px; font-family: Bahnschrift, 'Segoe UI', sans-serif; display: block; margin: 8px 0; color: var(--ink); font-weight: 500; }
.stat-card small { display: block; font-size: 10.5px; }
@media (min-width: 901px) { .stat-grid { gap: 18px; } .stat-card { padding: 22px; } .stat-card strong { font-size: 34px; } .stat-card small { font-size: 12px; } }
.chart-row { display: grid; grid-template-columns: 90px 1fr 84px; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.chart-row:last-child { border-bottom: 0; }
.chart-bar { height: 13px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.chart-bar span { display: block; height: 100%; background: #7f9f8a; border-radius: 4px; }
.chart-value { text-align: right; color: var(--muted); font-size: 11px; }
.chart-value strong { color: var(--ink); }
@media (min-width: 901px) { .chart-row { grid-template-columns: 140px 1fr 110px; font-size: 13px; gap: 18px; } }
.inline-pair { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; font-size: 13px; }
.inline-pair strong { color: var(--ink); }

/* ---------- Tags, notices, flash ---------- */
.tag, .badge { display: inline-flex; align-items: center; border-radius: 6px; padding: 4px 8px; background: var(--pale); color: var(--green); font-size: 11px; font-weight: 600; white-space: nowrap; }
.tag.gold, .badge-warn { background: var(--gold-soft); color: var(--gold-text); }
.tag.blue { background: var(--blue); color: var(--blue-text); }
.tag.gray, .badge-muted { background: var(--bg); color: var(--muted); }
.tag.red, .badge-danger { background: var(--red-soft); color: var(--red); }
.notice { background: #edf3f6; border-radius: 9px; padding: 12px 15px; font-size: 12.5px; color: #55707d; margin: 14px 0; line-height: 1.65; }
.notice.gold { background: var(--gold-soft); color: var(--gold-text); }
.notice.red { background: var(--red-soft); color: var(--red); }
.notice.green { background: var(--pale); color: var(--green-deep); }
.flash { padding: 12px 15px; border-radius: 10px; margin: 0 0 16px; font-size: 13.5px; font-weight: 500; }
.flash-ok { background: var(--pale); color: var(--green-deep); }
.flash-err { background: var(--red-soft); color: var(--red); }
.flash-warn { background: var(--gold-soft); color: var(--gold-text); }
.alert { padding: 10px 14px; border-radius: 9px; margin: 8px 0; font-size: 13px; }
.alert-warn { background: var(--gold-soft); color: var(--gold-text); }
.alert-danger { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue); color: var(--blue-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 11px 18px; border-radius: 9px; min-height: 46px; font-weight: 600; font-size: 14px; line-height: 1.35;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; text-align: center;
}
.btn svg.ico { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-hover); }
.btn-secondary { border-color: #cfdbdf; background: #fff; color: var(--ink); }
.btn-secondary:hover { background: var(--bg); }
.btn-soft { background: var(--pale); color: var(--green); }
.btn-soft:hover { background: #e2ece4; }
.btn-danger { background: #fff; color: var(--red); border-color: #e4c3bc; }
.btn-danger:hover { background: var(--red-soft); }
.btn-link { background: none; color: var(--muted); border: 0; text-decoration: underline; min-height: 40px; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 12.5px; width: auto; min-width: 0; }
.btn + .btn { margin-top: 8px; }
.actions { display: grid; gap: 8px; margin: 14px 0 4px; }
.actions .btn + .btn { margin-top: 0; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.actions-row .btn, .actions-row .inline-form { width: auto; flex: 1 1 auto; }
.actions-row .btn + .btn { margin-top: 0; }
.inline-form { display: inline-block; margin: 0; }
.inline-form .btn { margin: 0; width: auto; }
.form-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.form-actions .btn { flex: 1; width: auto; }
.form-actions .btn + .btn { margin-top: 0; }
@media (min-width: 901px) {
  .btn { width: auto; min-width: 150px; }
  .btn-small, .item-actions .btn { min-width: 0; }
  .btn + .btn { margin-top: 0; margin-left: 8px; }
  .actions { display: flex; flex-wrap: wrap; }
  .actions-row .btn, .actions-row .inline-form { flex: 0 1 auto; }
  .form-actions { justify-content: flex-end; }
  .form-actions .btn { flex: 0 0 auto; }
  .form-grid.stack { grid-template-columns: 1fr 1fr; }
  .page-title { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .page-title > .btn, .page-title .inline-form .btn { width: auto; }
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-bottom: 15px; font-weight: 600; color: var(--text); }
.field label { font-weight: 600; }
.field input, .field select, .field textarea, .search {
  width: 100%; border: 1px solid #cddadf; border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--text);
  font-weight: 400; font-size: 16px; min-height: 46px;
}
.field textarea { resize: vertical; min-height: 88px; }
.field .help { font-weight: 400; color: var(--muted); font-size: 12px; margin: 0; }
.field .error { color: var(--red); font-weight: 500; font-size: 12.5px; margin: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.req { color: var(--red); }
.field-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin-top: 1px; flex: none; accent-color: var(--green); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 88px; gap: 0 10px; }
.form-grid.stack { grid-template-columns: 1fr; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 2px; margin: 0 0 15px; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; font-size: 13px; color: var(--ink); }
legend small { display: block; font-weight: 400; }
.group-block { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row small { display: block; }
.switch { width: 42px; height: 24px; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }

/* ---------- Lists, lots, reminders, timeline ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); padding: 12px 0; }
.list li:first-child { border-top: 0; padding-top: 0; }
.item-title { font-weight: 600; color: var(--ink); }
.item-meta { color: var(--muted); font-size: 12.5px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.item-actions .btn { width: auto; min-width: 0; min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
.item-actions .btn + .btn { margin-top: 0; margin-left: 0; }
.lot-list { display: grid; gap: 13px; }
.lot-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: inherit; transition: border-color .15s; }
.lot-card:hover { border-color: #91aaa5; }
.lot-card-top { display: flex; justify-content: space-between; gap: 8px; }
.lot-identity { display: flex; align-items: center; gap: 10px; }
.lot-identity h3 { font-size: 16px; }
.lot-identity small { display: block; margin-top: 2px; }
.lot-symbol { background: #f2eee5; color: #8e7752; width: 40px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.lot-symbol.green { background: var(--pale); color: var(--green); }
.lot-symbol svg.ico { width: 24px; height: 28px; }
.lot-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 10px; font-size: 12px; color: var(--muted); }
.lot-numbers strong { color: var(--ink); font-weight: 600; }
.lot-numbers > span { display: inline-flex; align-items: center; gap: 6px; }
.lot-numbers svg.ico { width: 15px; height: 15px; }
.progress-track { height: 5px; border-radius: 8px; background: #edf1f2; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: #709482; border-radius: 8px; }
.progress-track span.over { background: var(--red); }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); gap: 8px; }
.lot-bottom { border-top: 1px solid #edf1f3; margin-top: 14px; padding-top: 12px; display: flex; justify-content: space-between; font-size: 12px; align-items: center; gap: 8px; }
.lot-bottom span { display: inline-flex; align-items: center; gap: 6px; }
.lot-bottom svg.ico { width: 15px; height: 15px; }
.capacity-row { margin-top: 14px; }
.capacity-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; gap: 8px; }
.capacity-row .progress-track { height: 4px; }
.reminder { padding: 14px 0; border-bottom: 1px solid var(--line); }
.reminder:last-of-type { border-bottom: 0; }
.reminder-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.reminder h3 { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; margin: 3px 0; }
.reminder p { font-size: 12.5px; color: var(--muted); margin: 0; }
.reminder .item-actions { margin-top: 10px; }
.reminder.done { opacity: .65; }
.timeline-item { display: flex; gap: 14px; position: relative; padding: 0 0 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 29px; bottom: 0; width: 1px; background: var(--line); }
.timeline-dot { width: 27px; height: 27px; border-radius: 50%; background: var(--bg); color: var(--muted); display: grid; place-items: center; font-size: 11px; flex-shrink: 0; font-weight: 600; }
.timeline-dot.current { background: var(--gold); color: #58451a; }
.timeline-dot.done { background: var(--pale); color: var(--green); }
.timeline-dot.late { background: var(--red-soft); color: var(--red); }
.timeline-dot.verify { background: var(--blue); color: var(--blue-text); }
.timeline-item h3 { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; margin-bottom: 2px; }
.timeline-item p { font-size: 12.5px; color: var(--muted); margin: 0; }
.timeline-body { flex: 1; min-width: 0; }
.event { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.event:last-child { border: 0; padding-bottom: 0; }
.event small { display: block; margin-top: 3px; }
.event .item-actions { margin-top: 6px; }
.detail-head { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 20px; margin-bottom: 20px; }
.detail-title { display: flex; gap: 14px; align-items: center; }
.detail-title h1 { font-size: 24px; margin-top: 6px; }
.detail-info { display: flex; gap: 14px 24px; flex-wrap: wrap; padding: 18px 0 0; margin-top: 16px; border-top: 1px solid var(--line); }
.detail-info > div { width: calc(50% - 12px); }
.detail-info strong { display: block; font-size: 14px; margin-top: 3px; color: var(--ink); }
@media (min-width: 901px) { .detail-info > div { width: auto; } .detail-title h1 { font-size: 29px; } }
.machine-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; margin-bottom: 14px; }
.machine-visual { height: 110px; background: #eaf0f3; display: grid; place-items: center; }
.machine-visual.hatcher { background: #eef2ec; }
.machine-drawing { width: 130px; height: 80px; border: 2px solid #788e99; border-radius: 17px 17px 8px 8px; background: #fff9; padding: 12px; position: relative; box-shadow: 0 8px 0 #ccd9df; }
.machine-window { margin-top: 6px; height: 40px; background: #e2ebef; border: 1px solid #a6b8c0; border-radius: 7px; display: flex; justify-content: center; align-items: center; gap: 5px; }
.machine-window .egg { width: 14px; height: 19px; box-shadow: inset -2px -2px 0 #d6c5a8; }
.machine-info { padding: 18px; }
.machine-info h3 { font-size: 19px; margin: 8px 0 3px; }
.machine-info p { font-size: 13px; color: var(--muted); margin: 0; }
.machine-info .actions-row { margin-top: 14px; }
.empty { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 40px 18px; }
.empty svg.ico { width: 44px; height: 44px; color: var(--green); margin-bottom: 10px; }
.empty p { color: var(--muted); margin: 8px 0 18px; }
.module-card { display: flex; gap: 14px; padding: 20px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.module-card > div { flex: 1; min-width: 180px; }
.module-card p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.module-card svg.ico { width: 34px; height: 34px; color: var(--green); }
.guide-teaser { background: #e6eee8; border-radius: 14px; padding: 20px; }
.guide-teaser svg.ico { width: 28px; height: 28px; color: var(--green); margin-bottom: 12px; }
.guide-teaser h3 { font-size: 18px; margin-bottom: 8px; }
.guide-teaser p { font-size: 12.5px; color: #586e60; line-height: 1.6; margin: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 600; white-space: nowrap; color: var(--ink); font-size: 12px; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; color: var(--ink); background: var(--pale); }

/* ---------- Articles ---------- */
.articles { display: grid; grid-template-columns: 1fr; gap: 13px; }
.article-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; display: grid; grid-template-columns: 96px 1fr; }
.article-art { display: grid; place-items: center; background: #e1ebef; color: #4e7384; min-height: 100%; }
.article-art svg.ico { width: 40px; height: 40px; stroke-width: 1.2; }
.article-art.green { background: #e7eee7; color: #6f886a; }
.article-art.yellow { background: #f5edda; color: #a18b50; }
.article-text { padding: 16px; }
.article-text h2 { margin: 6px 0; font-size: 18px; line-height: 1.3; }
.article-text p { font-size: 12.5px; color: var(--muted); margin: 0; }
.article-text small { display: block; margin-top: 10px; }
@media (min-width: 1000px) { .articles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .article-card { display: block; } .article-art { height: 150px; } .article-text { padding: 22px; } }
.article-body { max-width: 720px; margin: auto; background: #fff; padding: 22px; border-radius: 16px; border: 1px solid var(--line); }
.article-body h1 { font-size: 27px; margin: 14px 0 6px; }
.article-body h2 { margin: 24px 0 10px; }
.article-body p { margin: 12px 0; line-height: 1.8; color: #3e5560; }
.article-body ul, .article-body ol { line-height: 1.7; color: #3e5560; }
.article-body table { margin: 12px 0; }
.article-body .article-art { border-radius: 10px; height: 130px; margin: 18px 0; }
@media (min-width: 901px) { .article-body { padding: 32px; } }

.hero { text-align: center; padding: 30px 8px; max-width: 560px; margin: 0 auto; }
.hero h1 { font-size: 34px; }
.hero .lead { font-size: 16px; color: var(--text); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
