:root {
  --red: #dc4c3e;
  --bg-sidebar: #fcfaf8;
  --bg-main: #ffffff;
  --bg-elev: #ffffff;      /* cartes, dialogues, boutons */
  --bg-soft: #faf9f7;      /* colonnes des tableaux */
  --bg-mute: #f0efed;      /* chips, commentaires */
  --bg-hover-row: #fafafa;
  --text: #202020;
  --text-soft: #666;
  --text-faint: #999;
  --border: #eee;
  --border-strong: #ddd;
  --hover: #f2efed;
  --active: #ffefe5;
  --p1: #d1453b;
  --p2: #eb8909;
  --p3: #246fe0;
  --p4: #999;
  --hl-date-bg: #d8f0e2;   --hl-date-fg: #0a7a3d;
  --hl-recur-bg: #e9e0f7;  --hl-recur-fg: #6a3fb5;
  --hl-project-bg: #e3ecfb; --hl-project-fg: #1d5fc4;
  --hl-label-bg: #fdeacc;  --hl-label-fg: #a36407;
  --hl-prio-bg: #fbdedb;   --hl-prio-fg: #c53727;
}

[data-theme="dark"] {
  color-scheme: dark;      /* widgets natifs (date, heure, select) en sombre */
  --bg-sidebar: #242220;
  --bg-main: #1c1b1a;
  --bg-elev: #2a2827;
  --bg-soft: #232120;
  --bg-mute: #35322f;
  --bg-hover-row: #232120;
  --text: #eceae7;
  --text-soft: #b3afaa;
  --text-faint: #7f7b76;
  --border: #383533;
  --border-strong: #4a4644;
  --hover: #322f2d;
  --active: #42302a;
  --p4: #8a8a8a;
  --hl-date-bg: #1d3a2a;   --hl-date-fg: #7fd6a2;
  --hl-recur-bg: #322a44;  --hl-recur-fg: #c2a8f0;
  --hl-project-bg: #223350; --hl-project-fg: #93b8f2;
  --hl-label-bg: #40331b;  --hl-label-fg: #ecc078;
  --hl-prio-bg: #46261f;   --hl-prio-fg: #f2988a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-main);
  font-size: 14px;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s; }
button:active { transform: scale(.97); }
:focus-visible { outline: 2px solid var(--p3); outline-offset: 2px; border-radius: 4px; }
#fab, #mobile-nav, #drawer-overlay { display: none; }

/* ---------- Login ---------- */
#login-overlay {
  position: fixed; inset: 0; background: var(--bg-sidebar);
  display: flex; align-items: center; justify-content: center;
}
#login-form {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  padding: 40px; width: 340px; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}
.login-logo {
  width: 56px; height: 56px; border-radius: 14px; background: var(--red);
  color: #fff; font-size: 32px; line-height: 56px; margin: 0 auto 12px;
}
#login-form h1 { margin: 0 0 4px; font-size: 22px; }
#login-form p { margin: 0 0 20px; color: var(--text-soft); }
#login-form input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; margin-bottom: 12px;
}
#login-form button {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  background: var(--red); color: #fff; font-weight: 600;
}
.login-error { color: var(--p1); margin-top: 10px; min-height: 1em; }

/* ---------- Layout ---------- */
#app { display: flex; height: 100vh; }
#sidebar {
  width: 280px; flex-shrink: 0; background: var(--bg-sidebar);
  border-right: 1px solid var(--border); padding: 14px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
#main { flex: 1; overflow-y: auto; padding: 28px 48px; max-width: 900px; }

.sidebar-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px; }
.app-logo {
  width: 26px; height: 26px; border-radius: 7px; background: var(--red);
  color: #fff; text-align: center; line-height: 26px; font-size: 15px;
}
.app-name { font-weight: 700; font-size: 16px; flex: 1; }
.icon-btn {
  border: none; background: none; color: var(--text-faint); font-size: 15px;
  padding: 4px 7px; border-radius: 6px;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

#search-input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; background: var(--bg-elev);
}

nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: none; background: none; text-align: left;
  padding: 7px 8px; border-radius: 7px; color: var(--text); font-size: 14px;
}
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--active); color: var(--red); font-weight: 600; }
.nav-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft);
}
.nav-icon svg { width: 17px; height: 17px; display: block; }
.nav-item.active .nav-icon { color: var(--red); }
.icon-btn svg { width: 16px; height: 16px; display: block; }
.chip-ico {
  width: 12px; height: 12px; display: inline-block;
  vertical-align: -1.5px; margin-right: 1px;
}
.count { margin-left: auto; color: var(--text-faint); font-size: 12px; }
.proj-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin: 0 4px; }
.proj-logo {
  width: 18px; height: 18px; border-radius: 5px; object-fit: cover;
  flex-shrink: 0; margin: 0 0 0 1px; background: var(--bg-mute);
}
.proj-logo.sm { width: 14px; height: 14px; border-radius: 4px; margin-right: 3px; vertical-align: -3px; }
.pf-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#pf-logo-preview {
  width: 40px; height: 40px; border-radius: 9px; object-fit: cover;
  border: 1px solid var(--border);
}
.pf-logo-btn { display: inline-block; cursor: pointer; }
.pf-logo-hint { font-size: 11.5px; color: var(--text-faint); flex-basis: 100%; }
.proj-edit { margin-left: auto; visibility: hidden; }
.nav-item:hover .proj-edit { visibility: visible; }

.sidebar-section {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 0 8px; color: var(--text-soft); font-weight: 600;
}

/* ---------- Vue principale ---------- */
#view-header h1 { font-size: 24px; margin: 0 0 4px; }
#view-header .subtitle { color: var(--text-faint); font-size: 13px; }

#quickadd-form {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin: 18px 0 10px;
}
#quickadd-form:focus-within { border-color: var(--red); }
.qa-plus { color: var(--red); font-size: 18px; }
.qa-box { position: relative; flex: 1; height: 22px; }
#quickadd-input, #quickadd-highlight {
  position: absolute; inset: 0; font: inherit; font-size: 14px;
  line-height: 22px; letter-spacing: normal; white-space: pre;
}
#quickadd-input {
  width: 100%; border: none; outline: none; background: none; padding: 0;
  color: transparent; caret-color: var(--text);
}
#quickadd-input::placeholder { color: var(--text-faint); }
#quickadd-input::selection { background: rgba(36,111,224,.25); }
#quickadd-highlight { pointer-events: none; overflow: hidden; color: var(--text); }
#quickadd-highlight .hl { padding: 3px 0; border-radius: 4px; }
.hl-date { background: var(--hl-date-bg); color: var(--hl-date-fg); }
.hl-recur { background: var(--hl-recur-bg); color: var(--hl-recur-fg); }
.hl-project { background: var(--hl-project-bg); color: var(--hl-project-fg); }
.hl-label { background: var(--hl-label-bg); color: var(--hl-label-fg); }
.hl-priority { background: var(--hl-prio-bg); color: var(--hl-prio-fg); }

.group-title {
  font-weight: 700; font-size: 13px; margin: 22px 0 4px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.group-title.overdue { color: var(--p1); }

.task {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.task:hover { background: var(--bg-hover-row); }
.task.dragging, .nav-item.dragging { opacity: .4; }
.nav-item.drop-target, .sidebar-section.drop-target {
  outline: 2px dashed var(--red); outline-offset: -2px; border-radius: 7px;
}
.task-check {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--p4);
  background: none; flex-shrink: 0; margin-top: 2px; position: relative;
  transition: background .12s;
}
.task-check.pr1 { border-color: var(--p1); background: rgba(209,69,59,.08); }
.task-check.pr2 { border-color: var(--p2); background: rgba(235,137,9,.08); }
.task-check.pr3 { border-color: var(--p3); background: rgba(36,111,224,.08); }
.task-check:hover::after, .task.done .task-check::after {
  content: '✓'; position: absolute; inset: 0; font-size: 11px;
  line-height: 15px; text-align: center; color: inherit;
}
.task-check.pr1 { color: var(--p1); } .task-check.pr2 { color: var(--p2); }
.task-check.pr3 { color: var(--p3); } .task-check.pr4 { color: var(--p4); }
.task.done .task-check { background: var(--p4); border-color: var(--p4); color: #fff; }
.task.done .task-content { text-decoration: line-through; color: var(--text-faint); }

.task-body { flex: 1; min-width: 0; }
.task-content { line-height: 1.4; }
.task-desc { color: var(--text-faint); font-size: 12.5px; margin-top: 1px; white-space: pre-line; }
.task-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; align-items: center; flex-wrap: wrap; }
.chip-date { color: var(--text-soft); }
.chip-date.overdue { color: var(--p1); font-weight: 600; }
.chip-date.today { color: #058527; font-weight: 600; }
.chip-label {
  background: var(--bg-mute); border-radius: 20px; padding: 1px 8px; color: var(--text-soft);
}
.chip-project { margin-left: auto; color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.chip-recur { color: #6a3fb5; }

/* ---------- En-tête de vue ---------- */
#view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button {
  border: none; background: var(--bg-elev); padding: 6px 14px; color: var(--text-soft); font-size: 13px;
}
.segmented button.active { background: var(--active); color: var(--red); font-weight: 600; }
.header-btn {
  border: 1px solid var(--border); background: var(--bg-elev); border-radius: 8px;
  padding: 6px 12px; font-size: 13px;
}
.header-btn.danger { color: var(--p1); }
.header-btn.danger:hover { background: #fdf0ef; }

/* ---------- Vues tableau (kanban, planning) ---------- */
/* Les vues tableau s'étalent sur toute la largeur de la fenêtre */
#main.board-mode { max-width: none; }
.board {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto; padding: 16px 0 24px;
}
.board-col {
  /* colonnes fluides : elles se partagent la largeur, plancher à 210px
     (au-delà du plancher, la rangée défile horizontalement) */
  flex: 1 1 0; min-width: 210px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px;
}
.board-col-title {
  font-weight: 700; font-size: 13px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.col-p1 .board-col-title { color: var(--p1); }
.col-p2 .board-col-title { color: var(--p2); }
.col-p3 .board-col-title { color: var(--p3); }
.col-p4 .board-col-title { color: var(--p4); }
.col-overdue .board-col-title { color: var(--p1); }
.col-today .board-col-title { color: #058527; }
.col-nodate .board-col-title { color: var(--text-faint); }
.board-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 30px; }
.board-col.drop-target { outline: 2px dashed var(--red); outline-offset: -2px; }
.board-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.board-card:hover { border-color: #ddd; }
.board-card.dragging { opacity: .4; }
.board-card-top { display: flex; gap: 8px; align-items: flex-start; }
.board-card .task-content { font-size: 13px; line-height: 1.35; }
.board-card .task-meta { margin-top: 6px; font-size: 11.5px; flex-wrap: wrap; }
.board-card .chip-project { margin-left: 0; }

/* ---------- Corbeille ---------- */
.trash-row { align-items: center; cursor: default; }
.trash-row .task-content { color: var(--text-soft); }
.trash-restore {
  border: 1px solid var(--border); background: var(--bg-elev); border-radius: 7px;
  padding: 5px 10px; font-size: 12.5px; white-space: nowrap;
}
.trash-restore:hover { border-color: #058527; color: #058527; }
.trash-purge {
  border: none; background: none; color: var(--text-faint); font-size: 14px; padding: 4px 8px;
}
.trash-purge:hover { color: var(--p1); }

.empty {
  text-align: center; color: var(--text-faint); padding: 60px 0;
}
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- Dialogs ---------- */
dialog {
  border: none; border-radius: 12px; padding: 0; width: 480px; max-width: 92vw;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  background: var(--bg-elev); color: var(--text);
}
dialog input, dialog textarea, dialog select, #login-form input {
  background: var(--bg-elev); color: inherit;
}
dialog::backdrop { background: rgba(0,0,0,.25); }
dialog form { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
dialog h2 { margin: 0; font-size: 17px; }
dialog input[type="text"], dialog input[type="date"], dialog textarea, dialog select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit;
}
#tf-content { font-weight: 600; font-size: 16px; border: none; padding: 4px 0; outline: none; }
#tf-description { border: none; padding: 4px 0; outline: none; resize: vertical; }
.tf-row { display: flex; gap: 10px; }
.tf-row label { flex: 1; }
dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); }
.tf-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.spacer { flex: 1; }
.tf-actions button {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-elev);
}
.tf-actions .primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.tf-actions .danger { color: var(--p1); border-color: transparent; background: none; }
.tf-actions .danger:hover { background: #fdf0ef; }

#tf-comments-section {
  border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.tf-comments-title { font-size: 12px; font-weight: 600; color: var(--text-soft); }
#tf-comments { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.comment {
  background: var(--bg-mute); border-radius: 8px; padding: 8px 10px;
  display: flex; align-items: flex-start; gap: 8px;
}
.comment-body { flex: 1; min-width: 0; }
.comment-text { white-space: pre-line; overflow-wrap: break-word; }
.comment-date { color: var(--text-faint); font-size: 11px; margin-top: 2px; }
.comment-del {
  border: none; background: none; color: var(--text-faint); padding: 0 2px; font-size: 13px;
}
.comment-del:hover { color: var(--p1); }
.tf-comment-add { display: flex; gap: 8px; }
.tf-comment-add input { flex: 1; }
.tf-comment-add button {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-elev);
}
.chip-comments { color: var(--text-faint); }
.chip-done-at { color: var(--text-faint); font-style: italic; }
.tf-meta-info { font-size: 11.5px; color: var(--text-faint); }

#pf-colors { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Réglages ---------- */
dialog h3 { margin: 10px 0 0; font-size: 13px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .4px; }
.settings-status { font-size: 13px; color: var(--text-soft); min-height: 1.2em; }
.settings-hint { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.settings-row { display: flex; gap: 8px; align-items: center; }
.settings-row input[readonly] { flex: 1; font-size: 12px; color: var(--text-soft); }
.ics-projects { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ics-proj { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 13px !important; color: var(--text) !important; }
.tf-row .grow { flex: 2; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0;
}
.color-swatch.selected { border-color: var(--text); }

/* =====================================================================
   Mobile (téléphones et petites tablettes)
   Sidebar → drawer coulissant · barre d'onglets en bas · FAB + bottom
   sheet pour l'ajout rapide · dialogues en feuilles · cibles 44px+
   ===================================================================== */
@media (max-width: 768px) {
  #app { display: block; min-height: 100dvh; }

  /* ---- Sidebar en drawer ---- */
  #sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: min(82vw, 320px); height: 100dvh;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(60, 30, 20, .14);
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  body.drawer-open #sidebar { transform: translateX(0); }

  #drawer-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(32, 24, 20, .38);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  body.drawer-open #drawer-overlay,
  body.qa-open #drawer-overlay { display: block; opacity: 1; pointer-events: auto; }
  #drawer-overlay { display: block; }

  /* ---- Contenu principal ---- */
  #main {
    max-width: none;
    padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
  }
  #view-header { position: sticky; top: 0; z-index: 5; background: var(--bg-main); padding: 6px 0; }
  #view-header h1 { font-size: 21px; }

  /* ---- Quick add en bottom sheet, ouvert par le FAB ---- */
  #quickadd-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--bg-main);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(60, 30, 20, .18);
    transform: translateY(110%);
    transition: transform .22s ease;
  }
  body.qa-open #quickadd-wrap { transform: translateY(0); }
  #quickadd-form { margin: 0; padding: 12px 14px; }
  .qa-box { height: 24px; }
  /* 16px minimum : évite le zoom automatique iOS à la prise de focus */
  #quickadd-input, #quickadd-highlight { font-size: 16px; line-height: 24px; }

  #fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 40;
    width: 56px; height: 56px; border-radius: 50%;
    border: none; background: var(--red); color: #fff; font-size: 28px; line-height: 1;
    box-shadow: 0 6px 18px rgba(220, 76, 62, .4);
    transition: transform .2s ease;
  }
  body.qa-open #fab { transform: rotate(45deg); z-index: 80; }
  body.no-add #fab { display: none; }

  /* ---- Barre d'onglets ---- */
  #mobile-nav {
    display: flex; flex-direction: row; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--bg-main); border-top: 1px solid var(--border);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  }
  .m-nav {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    border: none; background: none; padding: 6px 2px 4px;
    color: var(--text-soft); border-radius: 10px; position: relative;
    min-height: 48px;
  }
  .m-nav.active { color: var(--red); background: var(--active); font-weight: 600; }
  .m-ico { width: 21px; height: 21px; display: inline-flex; }
  .m-ico svg { width: 21px; height: 21px; }
  .m-lbl { font-size: 10.5px; }
  .m-badge {
    position: absolute; top: 2px; right: calc(50% - 22px);
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 10px; padding: 0 5px; min-width: 16px; line-height: 15px;
  }
  .m-badge:empty { display: none; }

  /* ---- Confort tactile des listes ---- */
  .task { padding: 13px 4px; gap: 13px; }
  .task-check { width: 22px; height: 22px; }
  .task-check:hover::after { content: none; }  /* pas d'aperçu hover au doigt */
  .task.done .task-check::after { content: '✓'; }
  .task-content { font-size: 15px; }
  .task-meta { margin-top: 5px; }
  .proj-edit { visibility: visible; }          /* le crayon reste accessible au doigt */
  .nav-item { padding: 11px 8px; }
  .trash-restore { padding: 9px 12px; }

  /* ---- Kanban : colonnes plein écran avec snap horizontal ---- */
  .board { scroll-snap-type: x mandatory; gap: 10px; padding: 12px 0 18px; }
  .board-col {
    scroll-snap-align: start;
    flex: 0 0 84vw; min-width: 84vw; width: 84vw;
  }
  .board-card { padding: 12px; }
  .board-card .task-content { font-size: 14px; }

  /* ---- Planning : agenda vertical (pas de drag & drop au tactile,
          les colonnes horizontales n'apportaient rien) ---- */
  .board.planning {
    flex-direction: column; overflow-x: visible;
    scroll-snap-type: none; gap: 10px;
  }
  .board.planning .board-col { flex: none; min-width: 0; width: 100%; }
  /* jours vides : rangée compacte grisée */
  .board.planning .board-col:has(.board-col-body:empty) {
    padding: 7px 10px; background: none; border-style: dashed;
  }
  .board.planning .board-col:has(.board-col-body:empty) .board-col-title {
    margin-bottom: 0; font-weight: 500; color: var(--text-faint);
  }
  .board.planning .board-col:has(.board-col-body:empty) .board-col-body { min-height: 0; }

  /* ---- Dialogues en feuilles ---- */
  dialog {
    position: fixed; top: auto; bottom: 0; margin: 0;
    width: 100vw; max-width: 100vw;
    border-radius: 18px 18px 0 0;
    max-height: 92dvh; overflow-y: auto;
  }
  dialog form { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .tf-row { flex-wrap: wrap; }
  .tf-row label { min-width: 45%; }
  dialog input[type="text"], dialog input[type="date"], dialog input[type="time"],
  dialog textarea, dialog select, #tf-content, #tf-description,
  #login-form input, #search-input { font-size: 16px; }
  .tf-actions button { padding: 11px 16px; }
  #tf-comments { max-height: 30dvh; }
}

/* Écrans intermédiaires : sidebar plus étroite, marges réduites */
@media (min-width: 769px) and (max-width: 1000px) {
  #sidebar { width: 232px; }
  #main { padding: 24px 28px; }
}
