:root {
  --blue: #203646;
  --blue-mid: #29455f;
  --blue-soft: #8aa6b2;
  --coral: #c95b47;
  --coral-dark: #a94633;
  --sand: #f5ebdd;
  --paper: #fffdf9;
  --ink: #252a2e;
  --muted: #69757d;
  --line: #ded7cd;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --hand: Noteworthy, "Bradley Hand", "Segoe Print", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--sand); font-family: var(--body); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; height: 100vh; padding: 27px 22px 22px; color: var(--paper); background: var(--blue); }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 27px; color: inherit; text-decoration: none; }
.brand-house { width: 54px; height: 48px; flex: 0 0 auto; padding: 5px 4px 4px; color: var(--ink); background: var(--sand); clip-path: polygon(5% 28%,47% 1%,96% 25%,94% 96%,3% 100%); stroke-width: 11; transform: rotate(2deg); overflow: visible; }
.brand-house-detail { stroke-width: 6; }
.brand-lockup { display: grid; align-content: center; line-height: .76; }
.brand-la { margin: 0 0 3px 4px; color: var(--coral); font-family: var(--hand); font-size: 15px; transform: rotate(-7deg); }
.brand-name { color: var(--paper); font-family: var(--display); font-size: 27px; letter-spacing: .01em; text-transform: uppercase; }
.nav-label { margin: 20px 11px 8px; color: #91a8b5; font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; min-height: 45px; padding: 0 13px; color: #c8d7de; font-family: var(--hand); font-weight: 900; text-decoration: none; }
.nav-item.active { position: relative; color: var(--paper); font-weight: 800; }
.nav-item.active::before { content: ""; position: absolute; top: 7px; bottom: 5px; left: -7px; width: 7px; background: var(--coral); transform: rotate(-3deg); }
.count { display: grid; place-items: center; min-width: 24px; height: 24px; margin-left: auto; padding: 0 6px; color: var(--paper); background: var(--coral); font-family: var(--hand); font-size: 13px; font-weight: 900; clip-path: polygon(7% 4%,100% 1%,93% 94%,2% 100%); }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 17px 8px 0; border-top: 1px solid rgba(255,255,255,.13); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; color: var(--blue); background: #f2c3b8; font-size: 12px; font-weight: 900; border-radius: 50%; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 13px; }
.sidebar-foot small { margin-top: 2px; color: #91a8b5; font-size: 11px; }

.content { position: relative; min-width: 0; padding: 34px 38px 70px 62px; background: var(--paper); overflow: hidden; }
.content::before { content: ""; position: absolute; top: 92px; right: 26px; width: 70px; height: 23px; border-top: 4px solid rgba(201,91,71,.18); border-bottom: 3px solid rgba(32,54,70,.12); transform: rotate(-7deg); pointer-events: none; }
.mobile-head { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 4px; color: var(--blue-mid); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 3px; color: var(--blue); font-family: var(--display); font-size: clamp(42px,4vw,64px); font-weight: 900; line-height: .92; letter-spacing: -.025em; text-transform: uppercase; }
.intro { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.rough-icon-button { display: grid; place-items: center; width: 43px; height: 43px; border: 0; color: var(--blue); background: var(--sand); clip-path: polygon(4% 8%,94% 0,100% 91%,7% 100%); cursor: pointer; }
.rough-icon-button svg { width: 21px; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button { display: inline-flex; align-items: center; min-height: 43px; padding: 0 17px; border: 0; color: var(--paper); background: var(--blue); font-family: var(--hand); font-size: 16px; font-weight: 900; text-decoration: none; clip-path: polygon(2% 0,100% 5%,97% 100%,0 92%); cursor: pointer; }

.day-ledger { display: grid; grid-template-columns: 106px minmax(260px,1fr) minmax(350px,.9fr); align-items: stretch; margin: 0 0 42px 12px; color: var(--paper); background: var(--coral); transform: rotate(-.25deg); }
.day-stamp { position: relative; z-index: 2; display: grid; place-items: center; align-content: center; min-height: 128px; color: var(--paper); background: var(--blue); clip-path: polygon(5% 2%,98% 7%,94% 96%,0 100%); transform: translate(-18px,-11px) rotate(-4deg) scale(1.08); }
.day-stamp span { font-family: Georgia,serif; font-size: 49px; line-height: .85; }
.day-stamp small { margin-top: 9px; font-family: var(--display); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.day-progress { padding: 20px 26px; border-right: 2px solid rgba(37,42,46,.3); }
.ledger-label { display: block; margin-bottom: 7px; font-family: var(--display); font-size: 31px; font-weight: 900; line-height: .9; text-transform: uppercase; }
.day-progress strong { display: block; font-family: var(--hand); font-size: 18px; font-weight: 800; transform: rotate(-1deg); }
.day-progress p { margin: 8px 0 0; font-size: 12px; }
.progress-track { height: 5px; margin-top: 14px; background: rgba(255,253,249,.35); }
.progress-track span { display: block; height: 100%; background: var(--blue); transition: width .2s ease; }
.day-facts { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; }
.day-facts div { display: flex; flex-direction: column; justify-content: center; padding: 16px; border-right: 1px solid rgba(37,42,46,.28); }
.day-facts div:last-child { border: 0; }
.day-facts dt { margin-bottom: 8px; font-family: var(--display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.day-facts dd { margin: 0; font-family: Georgia,serif; font-size: 18px; font-weight: 700; }

.dashboard { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(270px,.72fr); gap: 30px; align-items: start; }
.section-head { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; padding: 0 0 13px; }
.section-head::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; border-top: 5px solid var(--blue); transform: rotate(-.3deg); }
.section-head h2, .panel h2 { margin: 0; color: var(--blue); font-family: var(--display); font-size: 38px; line-height: .9; text-transform: uppercase; }
.section-head a { color: var(--blue-mid); font-family: var(--hand); font-weight: 800; text-decoration: none; transform: rotate(-2deg); }
.task-list { display: grid; }
.task { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; min-height: 88px; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.task::before { content: ""; position: absolute; top: 25px; left: -14px; width: 5px; height: 30px; background: var(--coral); transform: rotate(2deg); }
.task:nth-child(even)::before { background: var(--blue-soft); transform: rotate(-2deg); }
.check { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--blue-soft); color: var(--paper); background: var(--paper); border-radius: 2px; cursor: pointer; }
.check svg { width: 17px; opacity: 0; stroke-width: 3; }
.task-title { margin-bottom: 7px; color: var(--ink); font-family: Georgia,serif; font-size: 16px; font-weight: 700; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.task-meta span { display: inline-flex; align-items: center; gap: 5px; }
.task-meta span + span::before { content: "·"; margin-right: 3px; color: var(--coral); font-weight: 900; }
.rough-meta-icon { width: 16px; height: 16px; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-2deg); }
.prep { color: var(--blue-mid); font-weight: 700; }
.task-action { min-width: 88px; min-height: 39px; padding: 0 13px; border: 0; color: var(--paper); background: var(--blue); clip-path: polygon(2% 0,100% 5%,97% 100%,0 92%); font-family: var(--hand); font-size: 17px; font-weight: 900; cursor: pointer; transform: rotate(1deg); }
.task-action:hover, .task.running .task-action { background: var(--coral-dark); }
.task.done { padding-right: 158px; }
.task.done > * { opacity: .42; }
.task.done .check { background: var(--blue); border-color: var(--blue); opacity: 1; }
.task.done .check svg { opacity: 1; }
.task.done .task-title { text-decoration: line-through; }
.task.done::after { content: "TERMINÉ"; position: absolute; z-index: 4; top: 50%; right: 3px; padding: 5px 12px 3px; border: 4px solid var(--coral); color: var(--coral); background: rgba(255,253,249,.92); font-family: var(--hand); font-size: 31px; font-weight: 900; letter-spacing: .02em; line-height: 1; transform: translateY(-50%) rotate(-7deg); pointer-events: none; }
.later { margin: 34px -18px 0; padding: 23px 20px 18px; background: var(--sand); clip-path: polygon(.4% 1%,99.5% 0,100% 98%,0 100%); transform: rotate(.15deg); }
.later .section-head { padding-bottom: 8px; }
.later .section-head::after { content: none; }
.later .section-head h2 { font-size: 25px; }

.right-column { display: grid; gap: 24px; }
.panel { margin: 0; }
.prep-panel { padding: 22px 20px 24px; color: var(--paper); background: var(--blue); clip-path: polygon(1% 0,100% 2%,98% 100%,0 97%); transform: rotate(.5deg); }
.prep-panel h2 { margin-bottom: 17px; color: var(--paper); font-size: 29px; }
.prep-card { padding: 17px 18px 18px; color: var(--ink); background: var(--paper); transform: rotate(-1deg); }
.prep-date { margin-bottom: 7px; color: var(--coral-dark); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.prep-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.prep-card p { margin-bottom: 14px; color: #514b47; font-size: 12px; line-height: 1.45; }
.answer-row { display: flex; gap: 8px; }
.answer-row button { min-height: 34px; padding: 0 10px; border: 0; color: var(--blue); background: var(--sand); font-family: var(--hand); font-size: 15px; font-weight: 900; cursor: pointer; }
.answer-row .answer-yes { color: var(--paper); background: var(--coral); }
.week-panel { padding: 21px 19px 24px; background: var(--sand); clip-path: polygon(0 2%,99% 0,100% 98%,1% 100%); transform: rotate(-.4deg); }
.week-panel h2 { margin-bottom: 19px; font-size: 24px; }
.week-list { display: grid; gap: 13px; }
.week-row { display: grid; grid-template-columns: 30px 1fr 48px; align-items: center; gap: 9px; font-size: 11px; }
.week-row i { height: 6px; background: rgba(32,54,70,.15); }
.week-row b { display: block; height: 100%; background: var(--coral); }
.week-row em { color: var(--muted); font-style: normal; text-align: right; }
.tip { display: flex; gap: 12px; margin: 0 6px; padding: 5px 0 13px; }
.tip > span { color: var(--coral); font-family: var(--hand); font-size: 26px; font-weight: 900; }
.tip strong { display: block; font-family: var(--hand); font-size: 17px; font-weight: 800; transform: rotate(-1deg); }
.tip p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.bottom-nav { display: none; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 330px; padding: 13px 16px; color: var(--paper); background: var(--blue); font-size: 13px; font-weight: 700; clip-path: polygon(1% 4%,100% 0,97% 96%,3% 100%); }

@media (max-width: 1040px) {
  .day-ledger { grid-template-columns: 94px 1fr; }
  .day-facts { grid-column: 2; background: rgba(255,253,249,.12); }
  .dashboard { grid-template-columns: minmax(0,1fr) 300px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; padding-bottom: 68px; }
  .sidebar { display: none; }
  .content { padding: 0 21px 48px; overflow: hidden; }
  .content::before { top: 90px; right: 16px; }
  .mobile-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -21px 25px; padding: 14px 18px; color: var(--paper); background: var(--blue); }
  .mobile-head .brand { padding: 0; }
  .mobile-head .brand-house { width: 43px; height: 39px; padding: 4px; stroke-width: 12; }
  .mobile-head .brand-la { font-size: 12px; }
  .mobile-head .brand-name { font-size: 21px; }
  .mobile-head .rough-icon-button { color: var(--paper); background: transparent; }
  .topbar { align-items: end; }
  .topbar .top-actions .rough-icon-button { display: none; }
  .topbar .primary-button { width: 43px; padding: 0; font-size: 0; }
  .topbar .primary-button span { margin: auto; font-size: 25px; }
  h1 { max-width: 315px; font-size: 46px; }
  .intro { max-width: 300px; }
  .day-ledger { grid-template-columns: 70px minmax(0,1fr); margin: 0 0 34px 8px; }
  .day-stamp { min-height: 108px; transform: translate(-12px,-8px) rotate(-4deg) scale(1.06); }
  .day-stamp span { font-size: 39px; }
  .day-progress { padding: 16px 15px; border: 0; }
  .ledger-label { font-size: 26px; }
  .day-progress strong { font-size: 15px; }
  .day-facts { grid-column: 1 / -1; }
  .day-facts div { padding: 12px 9px; }
  .day-facts dd { font-size: 14px; }
  .dashboard { display: block; }
  .section-head h2 { font-size: 31px; }
  .task { grid-template-columns: auto minmax(0,1fr) auto; column-gap: 10px; }
  .task-title { font-size: 14px; }
  .task-action { min-width: 76px; padding: 0 9px; font-size: 15px; }
  .task.done { padding-right: 112px; }
  .task.done::after { right: 0; padding: 4px 8px 2px; font-size: 23px; }
  .later { margin-right: -8px; margin-left: -8px; padding-right: 12px; padding-left: 12px; }
  .right-column { margin-top: 28px; }
  .bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); height: 64px; background: var(--blue); }
  .bottom-nav a { position: relative; display: grid; place-items: center; color: #adbec6; font-family: var(--hand); font-size: 12px; font-weight: 900; text-decoration: none; }
  .bottom-nav a.active { color: var(--paper); }
  .bottom-nav a.active::after { content: ""; position: absolute; right: 20%; bottom: 8px; left: 20%; border-top: 3px solid var(--coral); transform: rotate(-2deg); }
  .toast { right: 14px; bottom: 78px; left: 14px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
