:root {
  --blue: #000091;
  --blue-soft: #e3e3fd;
  --ink: #161616;
  --muted: #666666;
  --bg: #f6f6f6;
  --card: #ffffff;
  --line: #e5e5e5;
  --warn: #ce0500;
  --ok: #18753c;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border-top: 4px solid var(--blue);
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
h2 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }

button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
a { color: var(--blue); }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: white;
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 12px; }
.noscript { padding: 24px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--blue);
}
.logo:hover { text-decoration: none; }
.logo svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted, .sub { color: var(--muted); }
.sub { margin-top: 6px; font-weight: 400; }
.error { color: var(--warn); font-weight: 700; }

.stamp {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

.btn, .btn-line, .btn-primary, .btn-ghost, .btn-punch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}
.btn:hover, .btn-line:hover, .btn-primary:hover, .btn-punch:hover { text-decoration: none; }
.btn, .btn-line, .btn-primary {
  border: 1px solid transparent;
  padding: 10px 16px;
  background: transparent;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: #1212ff; }
.btn-line { border-color: #ddd; background: #fff; color: var(--ink); }
.btn-line:hover { background: #f6f6f6; }
.btn-block { width: 100%; }

.btn-punch {
  appearance: none;
  width: 100%;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  padding: 12px 16px;
}
.btn-punch:hover { background: #1212ff; }

.punch .btn-ghost,
.side .btn-ghost {
  color: var(--blue);
  border: 1px solid var(--blue);
  background: #fff;
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
.punch .btn-ghost:hover,
.side .btn-ghost:hover { background: var(--blue-soft); }

.punch .row-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.card, .day, .person, .feature, .auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}
.card { padding: 16px; }
.card h2, .annonce h2 { margin-top: 4px; }
.link-card { display: block; text-decoration: none; color: inherit; }
.link-card:hover { border-color: var(--blue); text-decoration: none; }

.page { display: grid; gap: 16px; margin-top: 16px; }
.stack { display: grid; gap: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.dash-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; align-items: start; }

.landing { max-width: 960px; margin: 0 auto; padding: 8px 24px 48px; }
.land-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.hero { padding: 40px 0 8px; max-width: 36rem; }
.hero h1 { font-size: 2rem; }
.lede { margin-top: 12px; color: #3a3a3a; max-width: 36rem; }
.hero-actions { margin-top: 20px; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 36px;
}
.feature { padding: 16px; min-height: 0; }
.feature strong { display: block; font-size: 1rem; margin-bottom: 6px; }

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.auth {
  min-height: calc(100vh - 4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 32px;
  gap: 20px;
  background: #fff;
}
.auth-card {
  width: min(440px, 100%);
  padding: 24px;
  display: grid;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 9, 0.08);
}
.auth-card h1 { font-size: 1.5rem; }

form, .field { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 0.95rem; font-weight: 700; }

input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #929292;
  border-radius: 4px;
  padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 2px; }
textarea { min-height: 120px; resize: vertical; }
input[type="checkbox"] { width: auto; }

.pw { display: flex; gap: 8px; align-items: center; }
.pw input { flex: 1; }
.pw button {
  width: auto;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #929292;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
}

.demo-block { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.demo-accounts { display: grid; gap: 8px; }
.demo-accounts button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  color: var(--ink);
}
.demo-accounts button strong { color: var(--blue); }
.demo-accounts button span { color: var(--muted); font-size: 13px; font-weight: 400; }
.demo-accounts button:hover { border-color: var(--blue); background: #f4f4fd; }
.more-accounts { font-size: 14px; color: var(--muted); }
.more-accounts summary { color: var(--blue); font-weight: 700; }
.more-accounts ul { margin: 8px 0 0; padding-left: 18px; }

.wait { width: min(640px, 100%); margin: 0 auto; padding: 24px 18px 64px; }
.wait-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.wait h1 { font-size: 1.75rem; margin: 8px 0; }

.stepper { display: grid; }
.step-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.rail { display: flex; flex-direction: column; align-items: center; }
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #929292;
  margin-top: 6px;
  background: #fff;
}
.step-row.done .dot { background: var(--blue); border-color: var(--blue); }
.step-row.current .dot { background: #fff; border-color: var(--blue); box-shadow: inset 0 0 0 3px var(--blue); }
.line { width: 2px; flex: 1; background: #e5e5e5; min-height: 22px; }
.step-row:last-child .line { visibility: hidden; }
.step-copy { padding-bottom: 14px; }
.step-copy h2 { font-size: 1rem; }
.step-copy p { color: var(--muted); margin-top: 2px; }

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 4px); background: var(--bg); }
.main { min-width: 0; }

.side {
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: calc(100vh - 4px);
}
.side-note { margin: 2px 0 0 30px; color: var(--muted); font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; flex: 1; min-height: 0; overflow: auto; }
.nav a, .tabbar a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.nav a { padding: 8px 10px; border-radius: 4px; font-weight: 600; }
.nav a:hover { background: #f6f6f6; text-decoration: none; }
.nav a.active { background: var(--blue-soft); color: var(--blue); }
.nav svg, .tabbar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.side-foot { margin-top: 12px; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); flex: none; }
.who { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.who:hover { text-decoration: none; }
.who em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }

.avatar, .avatar-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  flex: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 1.5rem; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.content { padding: 8px 24px 48px; }

.punch {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  display: grid;
  gap: 10px;
}
.punch-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.punch .kicker { color: var(--muted); }
.punch-time {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.punch-worked { min-height: 1.5em; }
.punch-hint { color: var(--muted); font-size: 14px; }
.punch label { font-size: 13px; font-weight: 700; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }

.timeline { position: relative; height: 42px; }
.timeline-track, .timeline-fill { position: absolute; top: 8px; height: 6px; border-radius: 99px; }
.timeline-track { left: 0; right: 0; background: #eee; }
.timeline-fill { background: var(--blue); }
.timeline-scale { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; }
.timeline-scale span { position: absolute; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.timeline-scale span:first-child { transform: none; }

.big-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.meter { height: 6px; background: #eee; border-radius: 99px; margin: 12px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); }
.meter span.is-over { background: #b34000; }
.mini { display: flex; gap: 16px; padding: 0; margin: 8px 0 0; list-style: none; font-size: 14px; }
.mini strong { font-variant-numeric: tabular-nums; }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; margin-top: 12px; }
.bar { display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.bar strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 11px; }
.bar-track { width: 100%; height: 88px; background: #eee; border-radius: 2px; display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill { width: 100%; background: var(--blue); }
.bar.is-late .bar-fill { background: var(--warn); }
.bar.is-abs .bar-track { background: #fde8e7; }
.bar.is-today .bar-track { outline: 2px solid var(--blue); }

.switch { display: flex; flex-wrap: wrap; gap: 6px; }
.switch button { border-radius: 4px; border: 1px solid var(--line); background: #fff; padding: 8px 12px; font-weight: 700; }
.switch button.on { background: var(--blue); color: #fff; border-color: var(--blue); }

.table-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.ledger th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-weight: 700;
  padding: 8px;
  border-bottom: 2px solid var(--line);
  background: #fff;
}
.ledger td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger td.num, .ledger th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger tr.is-abs td { background: #fff4f4; }
.ledger tr.is-today td { background: #f4f4fd; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-ok, .badge-in { background: #b8fec9; color: #18753c; }
.badge-late, .badge-abs { background: #ffe9e6; color: var(--warn); }
.badge-pause, .badge-wait { background: #ffe8ad; color: #6e4c00; }
.badge-off, .badge-soon { background: #eee; color: #3a3a3a; }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.day { padding: 10px; min-height: 150px; }
.day header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.day header strong { font-size: 1.15rem; font-weight: 700; }
.day.is-today { box-shadow: inset 0 3px 0 var(--blue); }
.day.is-before { opacity: 0.7; }
.session { border-radius: 4px; padding: 8px; margin-top: 8px; }
.session .when { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.session p { font-size: 14px; margin-top: 2px; }
.session.cours { background: #e3e3fd; }
.session.atelier { background: #f6f6f6; }
.session.projet { background: #fee7fc; }
.tag { font-size: 12px; color: var(--warn); font-weight: 700; }

.modules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.modules li { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.mod-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.mod-top span { color: var(--blue); font-weight: 700; }
.progress { height: 6px; background: #eee; border-radius: 99px; margin-top: 12px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--blue); }

.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks li.ok { color: var(--ok); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 12px; }
.facts dt { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 700; }

.doc-list { display: grid; gap: 8px; }
.doc-list button {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.doc-list button:hover { border-color: var(--blue); }
.doc-list strong { display: block; }
.doc-list span { color: var(--muted); font-size: 13px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi-grid .card strong { font-size: 1.5rem; font-weight: 700; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }

.search { max-width: 320px; }

.person { padding: 0; }
.person summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.person summary::-webkit-details-marker { display: none; }
.person summary .badge { margin-left: auto; }
.person summary em { display: block; font-style: normal; color: var(--muted); font-size: 13px; }
.person-body { padding: 0 14px 14px; }

.annonce + .annonce { margin-top: 12px; }
.section-title { font-size: 1.15rem; }

.toast {
  background: #e3e3fd;
  border: 1px solid #b1b1f8;
  color: #000091;
  padding: 12px 14px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.toast button { border: 0; background: transparent; font-weight: 700; color: inherit; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 22, 0.45);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}
.modal-card {
  background: #fff;
  width: min(640px, 100%);
  max-height: min(80vh, 760px);
  overflow: auto;
  border-radius: 4px;
  padding: 20px;
  display: grid;
  gap: 10px;
}
.modal-card p { line-height: 1.5; }
body.modal-open { overflow: hidden; }

.tabbar { display: none; }
.text-btn { border: 0; background: transparent; padding: 0; font-weight: 700; color: var(--blue); }

@media (max-width: 1000px) {
  .features, .kpi-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .tabbar {
    display: flex;
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 0 0 78px;
    flex-direction: column;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 2px;
    border-radius: 4px;
    gap: 2px;
    color: #3a3a3a;
  }
  .tabbar a.active { color: var(--blue); background: var(--blue-soft); }
  .dash-grid, .split, .facts, .features, .week, .kpi-grid { grid-template-columns: 1fr; }
  .landing { padding: 8px 16px 40px; }
  .content { padding: 8px 16px 110px; }
  .top { padding: 14px 16px; }
  .hero h1, .wait h1 { font-size: 1.5rem; }
}

.features-3 { grid-template-columns: repeat(3, 1fr); }
.side-note { margin: 8px 8px 0; line-height: 1.35; }
.nav a { justify-content: flex-start; }
.nav .count, .tabbar .count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.tabbar .count { margin-left: 4px; }
.grid-2, .grid-3 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1.2fr 0.8fr 0.8fr; }
.field-end { display: flex; align-items: end; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.person-list { display: grid; gap: 8px; }
.person-row, .msg {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
}
.person-row em, .msg span { display: block; font-style: normal; color: var(--muted); font-size: 13px; font-weight: 400; }
.person-row.is-on, .msg.is-on { border-color: var(--blue); background: #f4f4fd; }
.msg { display: grid; gap: 2px; }
.msg.is-unread { box-shadow: inset 3px 0 0 var(--blue); }
.msg-body { white-space: pre-wrap; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.offer-card h2 { font-size: 1.05rem; }
.week { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.week-scroll { overflow-x: auto; }
.day header span { text-transform: capitalize; }
.pay { font-size: 1.05rem !important; }

@media (max-width: 1100px) {
  .offer-grid, .features-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .grid-2, .grid-3, .offer-grid, .features-3 { grid-template-columns: 1fr; }
  .week { min-width: 0; grid-template-columns: 1fr; }
  .field-end { align-items: stretch; }
}

.mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.logo { font-size: 1.05rem; }
.lead { margin-top: 2px; color: var(--muted); font-size: 0.95rem; font-weight: 400; max-width: 42rem; }
.top { align-items: center; }
.top h1 { font-size: 1.35rem; }
.side { padding: 20px 14px; }
.nav a.active { box-shadow: inset 3px 0 0 var(--blue); }
.side-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.points { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.points li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.points span { color: var(--muted); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.stats div { padding: 14px 16px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.stats strong { display: block; margin-top: 4px; font-size: 1.05rem; }
.identity { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px; }
.identity h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.home .split > .card { min-height: 220px; }
.quiet { padding: 28px 24px; }
.deposit-list { list-style: none; margin: 8px 0 0; padding: 0; }
.deposit-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.deposit-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.identity .sub strong { color: var(--ink); }

.agenda { list-style: none; margin: 4px 0 0; padding: 0; }
.agenda li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.agenda li:first-child { border-top: 0; padding-top: 2px; }
.agenda span { grid-row: span 2; color: var(--muted); font-size: 13px; padding-top: 2px; }
.agenda em { font-style: normal; color: var(--muted); font-size: 14px; }

.inbox { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px; align-items: start; }
.inbox textarea { min-height: 96px; }
.empty { color: var(--muted); }
.empty-card { min-height: 120px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.week { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.week-end { grid-template-columns: 1fr 1fr; }
.session {
  background: #f4f4fd;
  border-left: 3px solid var(--blue);
}
.session .row-actions { margin-top: 6px; gap: 10px; }
.checks.compact { margin-top: 10px; gap: 4px; }
.checks.compact li { font-size: 14px; }
.offer-card { display: flex; flex-direction: column; gap: 8px; }
.offer-card .row-actions { margin-top: auto; }
.ledger .btn-line { padding: 6px 10px; }
h3 { font-size: 1rem; margin-top: 4px; }
.mod-top span { color: var(--muted); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-card.wide { width: min(480px, 100%); }
.key-input, .mono, .key-code { font-family: Consolas, "Courier New", monospace; letter-spacing: 0.08em; }
.key-input { text-transform: uppercase; font-weight: 700; }
.mono { font-weight: 700; white-space: nowrap; }
.key-code { font-size: 1.5rem; font-weight: 700; color: var(--blue); }
.key-card { background: var(--blue-soft); border: 1px solid #b1b1f8; border-radius: 4px; padding: 16px; }
.offer-lock { background: #f6f6f6; border-radius: 4px; padding: 12px 14px; }
.identity .badge { margin-top: 8px; }

@media (max-width: 860px) {
  .points li, .inbox, .stats, .week, .week-end { grid-template-columns: 1fr; }
  .stats div + div { border-left: 0; border-top: 1px solid var(--line); }
  .identity { flex-direction: column; }
  .agenda li { grid-template-columns: 1fr; }
  .agenda span { grid-row: auto; }
}

.landing {
  max-width: none;
  min-height: calc(100vh - 4px);
  display: flex;
  flex-direction: column;
  padding: 0 28px 16px;
}
.land-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px 48px;
  align-items: center;
  width: min(1080px, 100%);
  margin: 0 auto;
}
.hero { padding: 0; max-width: none; }
.hero h1 { font-size: 2.25rem; }
.points { margin: 0; border-top: 0; }
.points li:first-child { border-top: 1px solid var(--line); }
.site-foot { margin-top: 0; }

.gate {
  min-height: calc(100vh - 4px);
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}
.gate-side {
  background: var(--blue);
  color: #fff;
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.gate-side .logo { color: #fff; }
.gate-side .mark { background: #fff; color: var(--blue); }
.gate-side h1 { font-size: 1.85rem; margin-top: 28px; max-width: 16ch; }
.gate-side p { margin-top: 12px; max-width: 34ch; color: #e3e3fd; }
.gate-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gate-steps li { display: grid; gap: 2px; }
.gate-steps strong { font-size: 0.95rem; }
.gate-steps span { color: #e3e3fd; font-size: 0.92rem; }
.gate-main {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px 20px;
  background: var(--bg);
}
.gate-main .auth-card { margin: 0; }

.shell {
  height: calc(100vh - 4px);
  overflow: hidden;
}
.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.top { padding: 10px 16px; align-items: center; }
.top > div { display: grid; gap: 0; min-width: 0; }
.top h1 { font-size: 1.2rem; }
.lead { margin: 0; font-size: 0.875rem; }
.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
}
.page:not(.inbox) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  min-height: 100%;
}
.page:not(.inbox) > :last-child { flex: 1; }
.work-split { flex: 1; min-height: 280px; }
.work-split > section { min-height: 100%; }
.board .split > section { min-height: 100%; }
.inbox { height: 100%; min-height: 420px; }
.inbox > .stack:first-child { overflow: auto; }
.plan .week { align-items: stretch; }
.plan .day { min-height: 180px; }
.offer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1200px) {
  .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .shell { height: auto; overflow: visible; }
  .main { display: block; }
  .content { overflow: visible; padding-bottom: 110px; }
  .page:not(.inbox) { min-height: 0; }
  .page:not(.inbox) > :last-child { flex: none; }
  .top > div { display: block; }
  .top h1, .lead { white-space: normal; }
  .land-grid, .gate, .work-split { grid-template-columns: 1fr; }
  .landing { min-height: 0; padding: 0 16px 24px; }
  .gate-side { padding: 20px 16px 8px; gap: 16px; }
  .gate-side h1 { margin-top: 16px; font-size: 1.5rem; }
  .gate-steps { display: none; }
  .hero h1 { font-size: 1.7rem; }
  .offer-grid { grid-template-columns: 1fr; }
}

:root {
  --blue: #002040;
  --blue-soft: #e7eef6;
  --gold: #f8b008;
  --ink: #002040;
  --muted: #5c6b7a;
  --bg: #d7d5d2;
  --line: #d9cba8;
}
body {
  background: var(--bg);
  border-top: 4px solid var(--gold);
}
.btn-primary:hover, .btn-punch:hover { background: #16375c; }
.logo { display: block; line-height: 0; color: inherit; }
.logo img { width: 210px; height: auto; display: block; }
.logo-hero img { width: min(100%, 340px); }
.side { background: #f3f2f0; }
.card, .auth-card, .stats, .day, .ledger, .top { background: #fafaf8; }
.side .logo img { width: 100%; }
.nav a.active {
  background: #fff4cc;
  color: var(--blue);
  box-shadow: inset 3px 0 0 var(--gold);
}
.card, .auth-card, .stats { border-top: 3px solid var(--gold); }
.auth-card { border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 32, 64, 0.08); }
.gate { background: var(--bg); grid-template-columns: minmax(340px, 520px) minmax(0, 1fr); }
.gate-side {
  background:
    radial-gradient(420px 220px at 20% 0%, rgba(248, 176, 8, 0.18), transparent 70%),
    #fffdf8;
  color: var(--ink);
  justify-content: center;
  padding: 32px 36px;
  gap: 8px;
}
.brand-card {
  background: var(--blue);
  color: #fff;
  border-radius: 18px;
  padding: 22px 22px 8px;
  box-shadow: 0 16px 36px rgba(0, 32, 64, 0.18);
}
.brand-card .kicker { color: var(--gold); }
.brand-card h1 { color: #fff; font-size: 1.7rem; margin: 4px 0 0; max-width: none; }
.brand-card > p { color: #d5deea; margin-top: 8px; max-width: 36ch; }
.gate-steps { counter-reset: step; gap: 0; margin-top: 8px; }
.gate-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.gate-steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.gate-steps strong { display: block; color: #fff; }
.gate-steps span { color: #d5deea; font-size: 0.92rem; }
.gate-main { background: transparent; }
.top, .land-bar { background: #f3f2f0; }

@media (max-width: 860px) {
  .gate-steps { display: grid; }
  .logo-hero img { width: min(100%, 320px); }
  .gate-side { padding: 20px 16px; }
}

.page:not(.inbox) > :last-child { flex: none; }
.work-split > section { min-height: 0; }
.connect {
  min-height: calc(100vh - 4px);
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: #d7d5d2;
}
.connect-card {
  width: min(680px, 100%);
  background: #f7f6f4;
  border-radius: 20px;
  border-top: 4px solid var(--gold);
  padding: 28px 32px 24px;
  box-shadow: 0 12px 36px rgba(0, 32, 64, 0.08);
  display: grid;
  gap: 16px;
}
.connect-card .logo { justify-self: center; }
.code-wait {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 700;
}
.gear {
  width: 52px;
  height: 52px;
  animation: gear-spin 1s linear infinite;
}
@keyframes gear-spin { to { transform: rotate(360deg); } }
.connect-head h1 { font-size: 1.85rem; }
.connect-head p { margin-top: 8px; color: var(--muted); max-width: 46rem; }
.connect-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.connect-links, .connect-foot { margin: 0; }
.connect-steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.connect-steps li {
  background: #efeeec;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--gold);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}
.connect-steps span { color: var(--muted); font-size: 0.95rem; font-weight: 400; }
.page.work { flex: 1; min-height: 0; height: auto; }
.desk {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 12px;
}
.desk-offers { min-height: 0; overflow: auto; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}
.pick strong { font-size: 0.92rem; }
.pick span { color: var(--muted); font-size: 12px; font-weight: 600; }
.pick:hover, .pick.is-on { border-color: var(--gold); background: #fff6d6; }
.page.sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; }
.sheet > :first-child { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .connect-steps, .connect-actions, .pick-grid, .page.sheet, .desk { grid-template-columns: 1fr; }
  .page.work { height: auto; }
  .desk-offers { overflow: visible; }
  .sheet > :first-child { grid-column: auto; }
  .connect-card { padding: 24px 18px; }
}

.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.option-card { text-decoration: none; color: inherit; display: grid; gap: 6px; align-content: start; min-height: 112px; }
.option-card:hover { text-decoration: none; border-color: var(--gold); }
.option-card strong { font-size: 1.05rem; }
.option-card span { color: var(--muted); }
.mission-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.page.stack { display: grid; gap: 12px; }
@media (max-width: 860px) {
  .option-grid, .mission-row { grid-template-columns: 1fr; display: grid; }
  .mission-row { align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .gear { animation: none; }
}
