/* Keep the calendar's macOS palette; project colors carry the visual identity. */
:root { --bg:#faf9f6; --surface:#fff; --surface2:#f5f3ee; --border:#e8e4dc; --text:#1d1d1f; --text2:#636366; --muted:#78787d; --accent:#007aff; --radius:12px; --shadow:0 1px 3px rgba(0,0,0,.04),0 4px 12px rgba(0,0,0,.025); --green:#34c759; --red:#d93025; --orange:#a66000; }
body { font-size:13px; line-height:1.5; }
button,input,select,textarea { font-family:inherit; }
button,a { touch-action:manipulation; }
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[contenteditable]:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.wrap { max-width:1280px; padding:0 24px 80px; }
/* The shared destinations stay consistent; the Hub uses compact toolbar buttons. */
.research-site-nav { gap:16px; padding:12px 0; margin-bottom:0; border-color:var(--border); color:var(--text2); }
.research-site-nav .research-site-brand { font-size:17px; color:var(--text); }
.research-site-nav nav { gap:6px; }
.research-site-nav nav a { padding:5px 11px; border:1px solid var(--border); border-radius:7px; background:var(--surface); font-size:12px; }
.research-site-nav a:hover { color:var(--accent); text-decoration:none; }
.research-site-nav [aria-current=page] { color:var(--text); }
.research-site-nav a:focus-visible { outline-color:var(--accent); }
.hub-intro { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:16px 0; }
.hub-date { display:flex; gap:14px; align-items:baseline; flex-wrap:wrap; }
.hub-intro h1 { font-size:21px; font-weight:650; letter-spacing:-.4px; line-height:1.3; }
.hub-intro .dt { color:var(--text2); font-size:12px; }
.quiet-button { border:1px solid var(--border); border-radius:7px; padding:6px 10px; background:var(--surface); color:var(--text2); cursor:pointer; font-size:12px; white-space:nowrap; }
.quiet-button:hover { color:var(--accent); border-color:var(--accent); }
.hub-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1.05fr) minmax(0,.82fr); gap:12px; align-items:start; }
.section-heading { display:flex; gap:10px; align-items:center; justify-content:space-between; margin-bottom:10px; }
.section-heading h2 { font-size:14px; font-weight:650; }
.section-caption { font-size:11px; color:var(--text2); margin:0; }
.text-button { border:0; background:transparent; color:var(--accent); font-size:11px; cursor:pointer; padding:4px 0; }
.focus-panel,.week-block,.worklog-card,.hub-lower { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.focus-panel > .section-heading { padding:10px 14px; margin:0; border-bottom:1px solid var(--border); background:#fcfbf9; }
.focus-row { position:relative; padding:10px 14px 9px 18px; border-bottom:1px solid var(--border); }
.focus-row:last-child { border-bottom:0; }
.focus-row::before { content:''; position:absolute; left:7px; top:12px; bottom:12px; width:3px; border-radius:3px; background:var(--project-color,var(--accent)); }
.focus-title-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.focus-title { color:var(--text); text-decoration:none; font-size:15px; line-height:1.5; font-weight:650; min-width:0; }
.focus-title:hover { color:var(--accent); }
.focus-open { color:var(--muted); font-size:11px; font-weight:400; }
.focus-badge,.proj-badge { flex-shrink:0; background:var(--project-tint,var(--surface2)); color:var(--project-ink,var(--text2)); padding:2px 7px; border-radius:5px; font-size:10px; font-weight:550; white-space:nowrap; }
.focus-state { color:var(--text2); font-size:12px; margin:3px 0 5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.focus-next { background:var(--project-tint,var(--surface2)); border-radius:5px; padding:5px 7px; font-size:13px; line-height:1.5; display:flex; align-items:baseline; gap:7px; }
.focus-next-label { color:var(--project-ink,var(--text2)); font-size:10px; flex-shrink:0; font-weight:600; }
.focus-links { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; margin-top:5px; font-size:10px; color:var(--text2); }
.focus-links a { color:var(--accent); text-decoration:none; font-size:11px; }
.focus-links a:hover { text-decoration:underline; }
.focus-empty { padding:20px 14px; color:var(--text2); }
.focus-empty p { margin-bottom:10px; }
.focus-chooser { background:var(--surface2); padding:10px 14px; border-bottom:1px solid var(--border); }
.focus-choice { display:flex; gap:8px; align-items:center; padding:6px 0; font-size:12px; cursor:pointer; }
.focus-choice input { accent-color:var(--accent); width:16px; height:16px; }
.week-block { margin:0; }
.week-body { padding:0; }
.week-hdr { background:#fcfbf9; color:var(--text); padding:11px 14px; border-bottom:1px solid var(--border); align-items:center; }
.week-hdr-title { font-size:14px; letter-spacing:0; font-weight:650; }
.week-hdr-range { opacity:1; font-size:11px; color:var(--text2); font-variant-numeric:tabular-nums; }
.week-row { padding:10px 14px; border-color:var(--border); gap:9px; }
.week-row:hover { background:#fbfaf8; }
.week-text { font-size:13px; line-height:1.5; }
.week-meta { margin-top:5px; gap:6px; }
.week-proj { font-size:10px; background:var(--project-tint,var(--surface2)); color:var(--project-ink,var(--text2)); padding:2px 6px; border-radius:4px; font-weight:550; }
.week-proj.empty { color:var(--text2); }
.week-due { font-size:10px; color:var(--text2); padding:0; }
.week-due.hot-soon { color:var(--orange); }
.week-due.hot-overdue { color:var(--red); }
.week-due.hot-unconfirmed { color:var(--orange); }
.week-check { background:var(--surface); width:16px; height:16px; border-radius:50%; border:1px solid #b4b4b8; margin-top:1px; padding:0; }
.week-check:hover { border-color:var(--project-color,var(--accent)); background:var(--project-tint,var(--surface2)); }
.week-empty { font-size:12px; text-align:left; padding:14px; }
.week-add { width:100%; text-align:left; font-size:11px; padding:9px 14px; color:var(--accent); }
.week-note { color:var(--text2); font-size:10px; padding:8px 14px; background:#fcfbf9; }
.worklog-card { margin:0; }
.worklog-head { padding:11px 12px; gap:6px; border-bottom:1px solid var(--border); background:#fcfbf9; }
.worklog-title { font-size:14px; letter-spacing:0; text-transform:none; font-weight:650; }
.worklog-link { font-size:11px; color:var(--accent); }
.worklog-body { padding:10px 12px; }
.worklog-metrics { display:grid; grid-template-columns:1.15fr 1fr; gap:8px; margin-bottom:8px; }
.worklog-metric { background:var(--surface2); border-radius:7px; padding:8px 9px; }
.worklog-num { font-size:19px; font-weight:650; line-height:1.3; }
.worklog-label { margin-top:2px; font-size:10px; text-transform:none; letter-spacing:0; color:var(--text2); }
.worklog-list { gap:0; }
.worklog-event { padding:8px 0; border-top:1px solid var(--border); gap:7px; font-size:11px; align-items:flex-start; }
.worklog-time { font-size:10px; width:32px; padding-top:1px; }
.worklog-msg-main { white-space:nowrap; line-height:1.5; }
.worklog-msg-sub { font-size:10px; margin-top:2px; white-space:nowrap; }
.worklog-empty { font-size:12px; text-align:left; padding:10px 0; }
.hub-lower { margin-top:14px; padding:12px 14px; }
.project-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:6px; }
.project-filters { display:inline-flex; gap:2px; padding:3px; border-radius:8px; background:var(--surface2); }
.project-filter { border:0; border-radius:5px; color:var(--text2); padding:4px 13px; background:transparent; font-size:11px; cursor:pointer; }
.project-filter.active { background:var(--surface); color:var(--text); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.1); }
.project-search { border:1px solid var(--border); background:var(--surface2); color:var(--text); padding:6px 10px; border-radius:7px; width:232px; font-size:11px; }
.sec-label { font-size:10px; letter-spacing:0; color:var(--text2); margin:9px 0 3px; padding:0 2px; text-transform:none; }
.proj-card { background:transparent; border:0; border-top:1px solid var(--border); border-radius:0; margin:0; box-shadow:none; }
.proj-card-head,.proj-card.archived .proj-card-head { display:flex; padding:8px 2px; align-items:center; gap:10px; }
.proj-card-head:hover { background:#fcfbf9; }
.proj-stripe { width:4px; height:30px; min-height:0; align-self:center; margin:0; border-radius:3px; background:var(--project-color,var(--accent)); }
.proj-title { font-size:13px; font-weight:600; }
.proj-sub { font-size:11px; color:var(--text2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proj-sub:empty { display:none; }
.proj-status { font-size:12px; color:var(--text2); }
.proj-right { flex-direction:row; gap:14px; align-items:center; }
.proj-badge { min-width:64px; text-align:center; }
.proj-todo-count { font-size:10px; color:var(--text2); min-width:37px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.project-progress { display:flex; align-items:center; gap:7px; }
.project-progress-track { width:44px; height:4px; border-radius:3px; background:var(--surface2); overflow:hidden; }
.project-progress-track > span { display:block; height:100%; background:var(--project-color,var(--accent)); border-radius:3px; }
.proj-pct { font-size:10px; width:28px; font-variant-numeric:tabular-nums; }
.pin-button { font-size:10px; border:1px solid var(--border); background:var(--surface); padding:4px 7px; border-radius:6px; color:var(--text2); cursor:pointer; min-width:58px; }
.pin-button[aria-pressed=true] { color:var(--project-ink,var(--accent)); background:var(--project-tint,var(--surface2)); border-color:transparent; }
.project-lit { font-size:11px; color:var(--accent); text-decoration:none; white-space:nowrap; }
.maintenance { border-top:1px solid var(--border); margin-top:12px; }
.maintenance summary { padding:10px 2px; cursor:pointer; color:var(--text2); font-size:12px; }
.maintenance-links { display:flex; flex-wrap:wrap; gap:8px 20px; padding:2px 0 5px; }
.maintenance-links a { color:var(--accent); font-size:12px; text-decoration:none; }
.maintenance-links a:hover { text-decoration:underline; }
.maintenance .worklog-card { margin:6px 0; }
.archive-toggle { letter-spacing:0; font-size:12px; }
.archive-block { margin-top:8px; }
.banner { font-size:12px; margin-bottom:10px; }
.load-state { padding:20px 0; color:var(--text2); }
.load-state button { margin-top:10px; }
.save-error { outline:1px solid var(--red); }
body.edit-mode .proj-sub,body.edit-mode .proj-title,body.edit-mode .proj-status { border-bottom:1px dashed var(--border); }
body.edit-mode .proj-sub { white-space:normal; }
#edit-fab { bottom:20px; right:76px; }
#timer-fab { bottom:20px; right:24px; }
#edit-fab-btn,#t-btn { width:40px; height:40px; border-radius:10px; box-shadow:var(--shadow); font-size:17px; }
#edit-fab-hint { display:none; }
#edit-fab-btn { border:1px solid var(--border); background:var(--surface); }
#edit-fab-btn.active { background:var(--text); }
@media(max-width:1100px) {
  .wrap { padding:0 20px 80px; }
  .hub-grid { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
  #today-summary { grid-column:1 / -1; }
  #today-summary .worklog-body { display:grid; grid-template-columns:220px minmax(0,1fr); gap:16px; align-items:start; }
  #today-summary .worklog-metrics { margin:0; }
  #today-summary .worklog-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 14px; }
  #today-summary .worklog-event { padding:2px 0; border:0; }
  #today-summary .worklog-empty { margin:0; padding:5px 0; }
  .proj-right { gap:10px; }
}
@media(max-width:700px) {
  .wrap { padding:0 12px 76px; }
  .research-site-nav { flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 0; }
  .research-site-nav .research-site-brand { font-size:16px; }
  .research-site-nav nav { gap:5px; }
  .research-site-nav nav a { font-size:11px; padding:4px 8px; }
  .hub-intro { margin:12px 0; gap:8px; }
  .hub-date { display:block; }
  .hub-intro h1 { font-size:19px; }
  .hub-intro .dt { font-size:10px; margin-top:3px; }
  .hub-intro > .quiet-button { font-size:10px; padding:6px 8px; }
  .hub-grid { grid-template-columns:1fr; gap:10px; }
  #today-summary { grid-column:auto; }
  #today-summary .worklog-body { display:block; }
  #today-summary .worklog-metrics { margin-bottom:8px; }
  #today-summary .worklog-list { display:block; }
  #today-summary .worklog-event { padding:6px 0; border-top:1px solid var(--border); }
  .hub-lower { margin-top:10px; padding:10px 12px; }
  .project-search { width:100%; }
  .project-filters { width:100%; }
  .project-filter { flex:1; padding:4px 8px; }
  .proj-card-head { flex-wrap:wrap; gap:4px 9px; padding:9px 0; }
  .proj-info { flex-basis:calc(100% - 16px); }
  .proj-right { width:100%; padding-left:13px; gap:9px; flex-wrap:wrap; margin-top:0; }
  .proj-badge { min-width:0; }
  .project-progress-track { width:32px; }
  .proj-right .pin-button { margin-left:auto; }
  .proj-actions { margin:4px 0 0 13px; }
  .focus-title { font-size:15px; }
  .worklog-metric:last-child { grid-column:auto; }
}
.create-dialog { width:min(440px,calc(100% - 32px)); margin:auto; padding:24px; border:1px solid var(--border); border-radius:12px; background:var(--bg); color:var(--text); }
.create-dialog::backdrop { background:rgba(29,29,31,.25); }
.create-dialog h2 { font-size:19px; margin-bottom:18px; }
.create-dialog label { display:block; font-size:13px; margin-top:14px; }
.create-dialog label[hidden] { display:none; }
.create-dialog input { display:block; width:100%; font-size:14px; margin-top:6px; padding:9px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text); }
.create-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
#create-error { color:var(--red); font-size:12px; margin-top:10px; }
