:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #273647;
  background: #f5f7fa;
  font-size: 14px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1280px; margin: auto; padding: 0 40px 56px; }
a { color: #315ab4; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -1px; font-weight: 650; }
h2 { font-size: 18px; margin-bottom: 12px; }
h3 { font-size: 21px; letter-spacing: -.4px; line-height: 1.4; }
h4 { font-size: 13px; font-weight: 600; }
p { margin: 8px 0; }
button, input { font: inherit; }
button {
  background: #2f4d69; color: #fff; border: 1px solid #2f4d69;
  border-radius: 8px; padding: 9px 15px; font-weight: 600; cursor: pointer;
}
button:hover { background: #20394f; }
button.quiet { background: #fff; color: #41536a; border-color: #dce2e9; padding: 5px 12px; }
input:not([type="hidden"]) { border: 1px solid #b5c1cf; border-radius: 6px; padding: 8px; max-width: 100%; }
:focus-visible { outline: 3px solid #678ed2; outline-offset: 4px; }
form { margin: 0; }
summary { cursor: pointer; font-weight: 550; }
summary:hover { color: #315ab4; }
.app-header { min-height: 90px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: #26394d; font-size: 17px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.brand-icon { display: grid; place-items: center; background: #304d68; color: #fff; width: 34px; height: 34px; border-radius: 10px; letter-spacing: -1px; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #586a7c; }
.connection { background: #eaf0f5; color: #41556a; border: 1px solid #dbe4ed; padding: 4px 10px; border-radius: 20px; }
.mode-banner { border: 1px solid #d4e1ed; background: #edf3f8; color: #4c647c; padding: 14px 18px; border-radius: 10px; display: flex; gap: 18px; align-items: baseline; font-size: 12px; }
.mode-banner strong { color: #2e4e6d; white-space: nowrap; }
.connection-details { font-size: 12px; color: #66768a; margin: 10px 0 26px; }
.page-heading, .day-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: 1.5px; font-weight: 650; color: #6a7b8f; margin: 0 0 6px; text-transform: uppercase; }
.badge { border: 1px solid #dce3eb; color: #6a7b8f; border-radius: 20px; padding: 4px 11px; font-size: 12px; white-space: nowrap; }
.intro { color: #6a7888; font-size: 13px; max-width: 820px; margin-top: 10px; }
.recent-days { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 20px 0; white-space: nowrap; }
.recent-days > span { font-size: 11px; font-weight: 650; color: #718095; margin-right: 10px; }
.recent-days a { background: #fff; color: #55687b; border: 1px solid #e0e6ee; border-radius: 7px; padding: 5px 11px; font-size: 12px; text-decoration: none; }
.recent-days a:hover { border-color: #7897b9; }
.day-card { background: #fff; border: 1px solid #e0e6ed; border-radius: 14px; padding: 25px 28px 18px; margin-bottom: 20px; box-shadow: 0 3px 10px #233c591f; scroll-margin-top: 20px; }
.day-heading { margin-bottom: 24px; }
.day-actions { display: flex; align-items: center; gap: 26px; }
.day-total { text-align: right; display: flex; flex-direction: column; }
.day-total strong { font-size: 26px; line-height: 1.2; color: #293f55; letter-spacing: -.7px; }
.day-total span { font-size: 11px; color: #78879a; margin-top: 4px; }
.timeline-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.muted { color: #748398; font-size: 12px; }
.timeline { overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: #ccd6e2 #f4f6f9; }
.timeline-track { display: flex; list-style: none; padding: 0; margin: 0; width: max-content; min-width: 100%; }
.timeline-slot { position: relative; width: 96px; flex: 1 0 96px; padding-right: 4px; }
.timeline-slot time { display: block; font-size: 11px; color: #6a7b8f; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.block { min-height: 115px; border-radius: 6px; border: 1px solid var(--edge, #dbe2ea); border-top: 3px solid var(--ink, #c0cbd8); padding: 10px 7px 7px; background: var(--tint, #f5f7fa); color: var(--ink, #718095); display: flex; flex-direction: column; gap: 5px; font-size: 12px; overflow-wrap: anywhere; }
.block strong { font-weight: 650; line-height: 1.4; }
.block-category { font-size: 11px; line-height: 1.5; }
.block-state { margin-top: auto; font-size: 9px; font-weight: 600; }
.estimated { background-image: repeating-linear-gradient(135deg, transparent, transparent 5px, #ffffff90 5px, #ffffff90 8px); }
.uncertain { border-bottom: 2px dotted var(--ink, #9c783e); }
.gap { background: #f8fafc; border: 1px dashed #dce3eb; color: #8491a2; justify-content: center; text-align: center; font-size: 10px; }
.legend { display: flex; gap: 20px; color: #718095; font-size: 10px; margin: 9px 0 20px; flex-wrap: wrap; }
.legend > span { display: flex; align-items: center; gap: 6px; }
.legend-mark { width: 13px; height: 13px; border-radius: 3px; border: 1px solid #c4d2e0; background-color: #e6eef8; display: inline-block; }
.project-totals { display: flex; flex-wrap: wrap; gap: 12px; border-top: 1px solid #edf0f5; padding-top: 18px; }
.project-total { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #e4e9f0; border-radius: 8px; font-size: 12px; }
.project-total strong { margin-left: 12px; color: #31475e; font-variant-numeric: tabular-nums; }
.project-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink, #a37831); }
.project-0 { --ink: #4261a4; --tint: #edf1fd; --edge: #d9e2f5; }
.project-1 { --ink: #356b67; --tint: #e8f4ef; --edge: #cce5dd; }
.project-2 { --ink: #83508f; --tint: #f5edf8; --edge: #e7d6ed; }
.project-3 { --ink: #a15b39; --tint: #fdf0e7; --edge: #f1dccd; }
.project-4 { --ink: #596b9d; --tint: #edf0f8; --edge: #d6def0; }
.project-5 { --ink: #7d6c32; --tint: #f8f4e4; --edge: #e9e0bf; }
.project-6 { --ink: #3d708a; --tint: #e9f4fa; --edge: #cce3ef; }
.project-7 { --ink: #94627d; --tint: #faedf4; --edge: #ecd4e2; }
.project-8 { --ink: #586c43; --tint: #f0f5e9; --edge: #dce7cd; }
.project-9 { --ink: #715ba5; --tint: #f1ecfa; --edge: #dfd6ee; }
.unallocated { --ink: #946b27; --tint: #fff7e7; --edge: #efdfbd; }
.legend-mark.unallocated { background-color: var(--tint); border-color: var(--edge); }
.group-details { margin-top: 17px; font-size: 12px; color: #66768a; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 12px; text-align: left; }
th { color: #718095; font-weight: 550; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e9edf3; }
.unallocated-notice { background: #fff8ec; border: 1px solid #efe2c8; color: #8a682e; border-radius: 7px; padding: 10px 12px; margin: 18px 0 0; font-size: 12px; }
.unallocated-notice span { color: #8d7d63; }
.allocation-clear { color: #748398; font-size: 11px; margin: 15px 0 0; }
.empty-state { border: 1px dashed #dce4ee; background: #fafbfd; padding: 20px; border-radius: 9px; color: #718095; font-size: 12px; }
.empty-state strong { font-size: 14px; color: #52667d; font-weight: 550; }
.empty-state p { margin-bottom: 0; }
.notice { padding: 12px; border: 1px solid #e0e6ed; border-radius: 7px; background: #f8fafc; color: #65758a; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.settings-card { border: 1px solid #e0e6ed; background: #fff; border-radius: 12px; padding: 24px; }
.settings-card h3 { font-size: 15px; }
.settings-card p { color: #718095; font-size: 12px; }
.settings-card section { margin: 16px 0; }
.settings-card button { background: #fff; color: #4c6179; border-color: #d4dde8; padding: 6px 12px; font-size: 12px; }
.settings-card h2:not(:first-child) { margin-top: 24px; }
.danger-zone { border-top: 1px solid #dce3ec; margin-top: 32px; padding-top: 20px; color: #778496; font-size: 12px; }
.danger-zone h2 { margin-top: 14px; }
.danger-zone form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.danger-zone button { background: #fff; color: #9a4c4c; border-color: #dcc5c5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  main { padding: 0 16px 32px; }
  .app-header { align-items: flex-start; padding: 20px 0; flex-direction: column; gap: 12px; }
  .account { justify-content: flex-start; gap: 10px; }
  .mode-banner { flex-direction: column; gap: 4px; }
  .connection-details { margin-bottom: 22px; }
  .page-heading { align-items: flex-start; }
  h1 { font-size: 27px; }
  .page-heading .badge { display: none; }
  .day-card { padding: 20px 16px 16px; }
  .day-heading { align-items: flex-start; }
  .day-actions { flex-direction: column; align-items: flex-end; gap: 10px; }
  .day-total strong { font-size: 23px; }
  .day-actions button { font-size: 12px; padding: 7px 10px; }
  .timeline-heading { flex-direction: column; gap: 3px; }
  .settings-grid { grid-template-columns: 1fr; }
  .project-total { flex: 1 1 100%; }
  .project-total strong { margin-left: auto; }
}
