:root {
  color-scheme: light;
  --ink: #2a3a39;
  --muted: #4c605b;
  --accent: #2a3a39;
  --paper: #f4f0e7;
  --card: #fff;
  --line: #c8d2cd;
  --tint: #d8e4e4;
  --sage: #88a69a;
  --peach: #dda78f;
  --clay: #b4654a;
  --serif: Caladea, Cambria, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font-family: Carlito, Calibri, -apple-system, system-ui, sans-serif;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell {
  max-width: 43rem;
  margin: auto;
  padding: 0 16px 32px;
  padding: env(safe-area-inset-top,0) max(16px,env(safe-area-inset-right,0px)) max(32px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
}
.masthead, .relay, .days, .item, .pick, .option, .check, .task-nav { display: flex; align-items: center; }
.masthead { justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--line); padding: 8px 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a, button, input, select, textarea { -webkit-tap-highlight-color: rgba(20,84,72,.15); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #b4542e; outline-offset: 2px;
}
.brand { display:inline-flex; flex-direction:column; justify-content:center; min-height:50px; text-decoration:none; flex:0 1 auto; }
.brand strong { font: bold 2rem/.96 var(--serif); letter-spacing:-.045em; }
.brand span { margin-top:3px; font:italic .81rem/1.1 var(--serif); color:#895038; }
button {
  min-height: 44px; min-width: 44px; max-width:100%; padding: .58rem .85rem;
  font-family:inherit; font-size:1rem; font-weight:650; line-height:1.25; border: 0; border-radius: .55rem; color: white;
  background: var(--accent); cursor:pointer; white-space:normal; overflow-wrap:anywhere;
}
.link, .muted-button { color:var(--accent); background:transparent; font-size:.88rem; padding: .35rem .45rem; }
.task-nav {
  position: sticky; top: 0; z-index: 2; justify-content:stretch; padding: 5px 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.task-nav a {
  flex:1; min-width:0; min-height:44px; display:flex; align-items:center; justify-content:center;
  border-radius: .45rem; font-size: .96rem; font-weight:650; text-decoration:none; text-align:center;
}
.task-nav [aria-current=page] { color:var(--ink); background:#e8e3d8; box-shadow:inset 0 -3px var(--clay); }
.cover {
  display:flex; align-items:center; justify-content:space-between; position:relative; isolation:isolate;
  padding:.85rem 1.15rem; margin:.8rem 0 .5rem; min-height:6.4rem;
  border-radius:.8rem; background:var(--ink); color:var(--paper);
}
.cover-copy { flex:1 1 auto; min-width:0; }
.cover h1 { margin:0; font-size:2rem; font-size:clamp(1.95rem,7.5vw,3.1rem); }
.welcome h1 { font-size:2.2rem; font-size:clamp(2.05rem,8.5vw,3.4rem); }
.cover-copy > p { margin:.4rem 0 0; line-height:1.35; }
.cover-copy > .eyebrow { margin:0 0 .3rem; color:var(--peach); }
.cover-copy #count { display:inline-block; color:var(--peach); font-weight:bold; }
.portrait { flex:0 0 4.8rem; margin-left:.65rem; position:relative; }
.portrait::before { content:""; position:absolute; left:-5%; top:8%; width:105%; padding-top:105%; border-radius:50%; background:#3a4c49; }
.portrait img { position:relative; display:block; width:100%; height:auto; }
.welcome { padding:1.25rem; min-height:10rem; }
.welcome .portrait { flex-basis:6.2rem; }
.welcome .cover-copy > p { max-width:21rem; color:var(--paper); }
@media (min-width:460px) { .portrait { flex-basis:5rem; } .welcome .portrait { flex-basis:8.3rem; } }
@media (max-width:360px) { .welcome .portrait { flex-basis:5.2rem; } .cover { padding:.8rem; } .portrait { flex-basis:3.5rem; } }

.eyebrow { margin:0 0 .28rem; color:var(--muted); font-size:.81rem; font-weight:650; letter-spacing:.035em; }
h1,h2,h3,p,label,legend,strong,small,.check span:last-child,button { word-wrap:break-word; word-break:break-word; overflow-wrap:anywhere; }
h1,h2 { font-family:var(--serif); font-weight:bold; line-height:1.11; }
h1 { font-size:2.6rem; font-size:clamp(2.4rem,8vw,3.6rem); margin:0; letter-spacing:-.04em; }
h2 { font-size:1.6rem; margin:0; }
h3 { font-size:1.05rem; margin:0 0 .3rem; }
.sub { color:var(--muted); margin:.45rem 0; }
.days { flex-wrap:wrap; margin-bottom:.65rem; }
.days, .task-nav { flex-wrap:wrap; }
.days { gap:.15rem 1rem; margin:.35rem 0 .2rem; }
.days a { min-height:44px; display:inline-flex; align-items:center; font-size:.92rem; }
.days [aria-current=page] { font-weight:750; color:var(--ink); text-decoration:none; }
/* The main menu holds on one line: five words on a phone, the last ones reached by a swipe if needed. */
.main-nav { flex-wrap:nowrap; justify-content:space-between; gap:.15rem .7rem; margin:0; border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none; }
.main-nav::-webkit-scrollbar { display:none; }
.main-nav a { flex:0 0 auto; white-space:nowrap; text-decoration:none; }
.main-nav [aria-current=page] { box-shadow:inset 0 -3px var(--clay); }
.account [aria-current=page] { font-weight:750; color:var(--ink); text-decoration:none; }
@media (max-width:400px) { .main-nav { gap:.15rem .45rem; } .main-nav a { font-size:.86rem; } }
@media (max-width:340px) { .main-nav { gap:.15rem .2rem; } .main-nav a { font-size:.8rem; } }
.relay { flex-wrap:wrap; justify-content:space-between; gap:.55rem; border-radius:.85rem; background:var(--tint); padding:.9rem 1rem; }
.relay > * { min-width:0; max-width:100%; }
.relay strong { font-size:1.2rem; }
.section-head { margin:1.2rem 0 .55rem; }
.child h3 { color:#8d4c35; }
.card,.child { border-radius:.8rem; border:1px solid var(--line); background:var(--card); padding: .9rem; margin:.65rem 0; min-width:0; }
.form-panel { margin-top:1rem; scroll-margin-top:4rem; }
.item { justify-content:space-between; gap:.25rem; border-top:1px solid var(--line); }
.item .check {
  flex:1; min-width:0; min-height:48px; padding:.5rem 0;
  text-align:left; font-weight:500; background:transparent; color:var(--ink);
}
.check span:last-child { min-width:0; overflow-wrap:anywhere; }
.mark { flex:0 0 22px; margin-right:.6rem; height:22px; border:1.5px solid #7b9186; border-radius:6px; text-align:center; }
.done .mark { background:var(--accent); color:white; }
.done span:last-child { text-decoration:line-through; color:var(--muted); }
.check small { display:block; color:var(--muted); }
.muted-button { flex:0 0 auto; max-width:38%; font-weight:500; }
.stack { display:flex; flex-direction:column; align-items:stretch; margin-top:1rem; }
.stack > :not([type=hidden]) ~ :not([type=hidden]) { margin-top:1rem; }
.stack > *, label, fieldset, select { min-width:0; }
.stack > label:not(.option), .stack > button { display:block; }
.stack > button { width:100%; }
label,legend { font-weight:550; }
input:not([type=hidden]):not([type=radio]):not([type=checkbox]),select,textarea {
  display:block; width:100%; max-width:100%; min-height:46px; margin-top:4px; padding:.55rem;
  border:1px solid #94a79a; border-radius:.45rem; background:white; color:var(--ink); font:inherit; font-size:max(1rem,16px);
}
textarea { resize:vertical; min-height:5rem; }
fieldset { margin:0; padding:.45rem .6rem; border:1px solid var(--line); border-radius:.55rem; }
legend { max-width:100%; }
.pick { flex-wrap:wrap; }
.pick .option { margin:.12rem .4rem .12rem 0; }
.option { min-height:44px; min-width:44px; max-width:100%; padding:.35rem .6rem; border:1px solid var(--line); border-radius:.45rem; cursor:pointer; }
.option:has(input:checked) { background:var(--tint); border-color:var(--accent); }
.option input { flex:0 0 auto; width:18px; height:18px; margin:0 .42rem 0 0; accent-color:var(--accent); }
.notice,.inline-feedback { background:#f7edd8; border-left:3px solid #ae602f; padding:.65rem .75rem; }
.notice ul, .steps { margin: .35rem 0 0; padding-left: 1.15rem; }
.notice li, .steps li { margin: .4rem 0; }
.help h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); margin-bottom: .5rem; }
.help h2 { font-size: 1.35rem; margin: 1.15rem 0 .35rem; }
.help h3 { margin-top: .9rem; }
.help ul, .help ol { margin: .3rem 0 .8rem; padding-left: 1.2rem; }
.help li { margin: .35rem 0; }
.help code { font-size: .92em; }
[hidden] { display:none !important; }
@media (min-width:600px) { .shell { padding-left:28px; padding-right:28px; } .card,.child { padding:1.2rem; } }
@media (max-height:480px) { .task-nav { position:static; } }
@media (max-width:360px) { .shell { padding-left:12px; padding-right:12px; } .item { align-items:flex-start; } }

.export { display:inline-flex; min-height:44px; align-items:center; margin-top:.75rem; }

.account, .rename, .rule-row { display:flex; flex-wrap:wrap; gap:.45rem; align-items:center; justify-content:space-between; min-width:0; }
.account a,.back,summary { min-height:44px; display:inline-flex; align-items:center; }
.account { justify-content:flex-end; font-size:.89rem; }
.rename, .rule-row { padding:.55rem 0; border-bottom:1px solid var(--line); }
.rename label,.rule-row > div { flex:1 1 9em; }
.rule-row small { display:block; color:var(--muted); }
details { margin-top:.55rem; }
summary { cursor:pointer; font-weight:650; text-decoration:underline; }
@media (max-width:360px) { .account { gap:.1rem; } .brand strong { font-size:1.7rem; } }

.agenda-row { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:.2rem .75rem; padding:.65rem 0; min-height:44px; border-bottom:1px solid var(--line); }
.agenda-row > * { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.agenda-row span { color:var(--muted); }
.agenda-add { display:inline-flex; align-items:center; min-height:44px; padding:.55rem .85rem; border-radius:.55rem; background:var(--ink); color:var(--paper); font-weight:650; }

.child-dot { display:inline-block; width:.85rem; height:.85rem; border-radius:50%; margin-right:.5rem; background:#517063; }
.tone-bleu { background:#54778b; }.tone-ocre { background:#b67b26; }.tone-rose { background:#ad6485; }
.tone-lilas { background:#8568a5; }.tone-corail { background:#bc644c; }.tone-menthe { background:#429184; }.tone-ardoise { background:#566174; }
.source-path { display:block; word-break:break-all; user-select:all; }
details > summary { display:list-item; width:100%; min-width:44px; max-width:100%; padding:.65rem 0; word-break:break-word; overflow-wrap:anywhere; }
.child-dot { flex:none; vertical-align:middle; }

.source-list h2 { margin-bottom: .4rem; }
.source-row, .week-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; }
.source-row { padding: .85rem 0; border-top: 1px solid var(--line); }
.source-row:last-child { padding-bottom: .15rem; }
.source-person { min-width: 0; overflow-wrap: anywhere; }
.source-person strong, .source-person span { display: block; }
.source-action { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .85rem; border-radius: .55rem; background: var(--tint); color: var(--ink); font-weight: 650; text-decoration: none; }
.sync-state { font-weight: 650; color: var(--ink); }
.copy-control { text-decoration: underline; }
.week-tools { margin: .7rem 0; }
.source-filter > div { display: flex; align-items: stretch; gap: .5rem; }
.source-filter select { margin-top: 0; flex: 1; }
.source-filter label { display: inline-block; margin-bottom: .25rem; }
.week-day .agenda-row small { display: block; flex-basis: 100%; color: var(--muted); }
.week-day:not(.quiet-day) { border-left: 4px solid var(--sage); }
.quiet-day { background: transparent; }
.quiet-day h2 { font-size: 1.15rem; }
