/* Luxury House Works hub. Charcoal / grey / brass palette, Basecamp-style layout:
   centered column, top nav, project pages made of tool cards. */

@font-face { font-family: 'Source Serif 4'; src: url('/assets/fonts/serif-roman.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('/assets/fonts/serif-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/assets/fonts/sans-roman.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/assets/fonts/sans-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  /* Luxury House Works: charcoal primary, soft grey surfaces, brass accent.
     Label colors (clay/rose/twilight/sky/sage) stay for folders and docs. */
  --primary: #2B2E33; --primary-deep: #1C1E22; --primary-soft: #4A4F57; --primary-faint: #8C919A;
  --bg: #F1F1EF; --bg-deep: #E4E4E0; --surface: #FFFFFF; --surface-soft: #F8F8F6;
  --ink: #1E2023; --ink-soft: #4B4F55; --ink-mute: #80858C;
  --line: #D9DAD6; --line-soft: #E8E8E4;
  --accent: #B08D57; --accent-deep: #8F7142; --gold: #C9A961;
  --ok: #4F7A5A; --warn: #B08D57; --bad: #B5533C;
  --clay: #B66C51; --rose: #B8526B; --twilight: #6B4566; --sky: #5F8FA6; --sage: #6E8A6B;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(30,32,35,.05), 0 6px 18px -8px rgba(30,32,35,.16);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100dvh; }
body.bare { background: var(--primary); color: var(--bg); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1, .h1 { font-size: 2rem; } h2, .h2 { font-size: 1.5rem; } h3, .h3 { font-size: 1.2rem; } .h4 { font-size: 1.05rem; font-family: var(--serif); font-weight: 600; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration-color: var(--primary-faint); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.mute { color: var(--ink-mute); } .small { font-size: .875rem; } .center { text-align: center; }
.row { display: flex; align-items: center; flex-wrap: wrap; } .gap { gap: .6rem; } .between { justify-content: space-between; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 99; }

/* Top bar ---------------------------------------------------------------- */
.topbar { background: var(--primary); color: var(--bg); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 1rem; height: 56px; }
.brand { color: var(--surface); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--bg); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; left: 7px; top: 6px; width: 7px; height: 11px; border: solid var(--primary); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.brand-mark.lg { width: 48px; height: 48px; border-radius: 12px; } .brand-mark.lg::after { left: 15px; top: 11px; width: 12px; height: 20px; border-width: 0 5px 5px 0; }
.topnav { display: flex; gap: .15rem; margin-left: auto; margin-right: auto; }
.topnav a { color: var(--bg); text-decoration: none; white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.topnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.topnav a.is-active { background: var(--bg); color: var(--primary); }
.badge { background: var(--sunset); color: #fff; font-size: .72rem; padding: 1px 7px; border-radius: 999px; font-weight: 700; vertical-align: 1px; }
.topbar-right { margin-left: auto; }
.menu { position: relative; } .menu > summary { list-style: none; cursor: pointer; display: flex; } .menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow); min-width: 230px; padding: .4rem 0; z-index: 30; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: .5rem 1rem; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); }
.menu-head { padding: .6rem 1rem; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }

/* Page ------------------------------------------------------------------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 16px 5rem; }
.page.narrow, .narrow { max-width: 720px; }
.flash { max-width: var(--maxw); margin: 1rem auto -0.5rem; padding: .7rem 1rem; border-radius: var(--r-sm); background: var(--primary); color: var(--surface); font-weight: 600; }
.flash-error { background: var(--bad); } .flash.inline { margin: 0 0 1rem; }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.card.soft { background: var(--surface-soft); box-shadow: none; border: 1px solid var(--line-soft); }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-title h1 { margin: 0; }
.empty { color: var(--ink-mute); background: var(--surface-soft); border: 1px dashed var(--line); border-radius: var(--r); padding: 1.25rem; text-align: center; }
.client-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--gold); color: var(--ink); text-align: center; padding: .4rem 1rem calc(.4rem + env(safe-area-inset-bottom)); font-size: .9rem; font-weight: 600; z-index: 15; }

/* Buttons / forms --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary); color: var(--surface); border: 0; border-radius: 999px; padding: .55rem 1.1rem; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--primary-deep); color: #fff; }
.btn.secondary { background: var(--bg-deep); color: var(--primary); } .btn.secondary:hover { background: var(--line); }
.btn.accent { background: var(--accent); } .btn.accent:hover { background: var(--accent-deep); }
.btn.sm { padding: .35rem .8rem; font-size: .85rem; } .btn.block { width: 100%; justify-content: center; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); } .btn.danger:hover { background: #F6E9E6; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; text-decoration-color: var(--primary-faint); }
.inline { display: inline; }
label.field, .field { display: block; margin-bottom: .9rem; }
.field > span, .field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url], input[type=number], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .7rem; font: inherit; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 2.6em; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary-faint); outline-offset: 1px; border-color: var(--primary-soft); }
.check { display: flex; align-items: center; gap: .5rem; font-size: .95rem; cursor: pointer; } .check input { width: 18px; height: 18px; accent-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; } .file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn span { border: 1px dashed var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; color: var(--ink-soft); } .file-btn:hover span { border-color: var(--primary-soft); color: var(--primary); }
.file-btn.has-files span { border-style: solid; background: var(--surface-soft); }
.picker legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; padding: 0; } .picker { border: 0; padding: 0; margin: 0 0 .9rem; }
.picker-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.picker-item { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem .25rem .3rem; cursor: pointer; font-size: .9rem; background: #fff; }
.picker-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picker-item.is-on, .picker-item:has(input:checked) { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.pill { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .75rem; font: 600 .85rem var(--sans); color: var(--ink-soft); cursor: pointer; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pill-on { border-color: var(--primary-soft); color: var(--primary); background: #E8E9EB; } .pill-on .dot { background: var(--primary-soft); }
.item-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--bg-deep); color: var(--ink-soft); }
.tag-sun { background: #F3EBDD; color: #7A5B2E; } .tag-sage { background: #E8E9EB; color: var(--primary); } .tag-rose { background: #F3DDE3; color: var(--rose); }

/* Avatars ---------------------------------------------------------------- */
.avatar { --av: var(--primary-soft); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--av); color: #fff; font: 700 .8rem var(--sans); flex: none; letter-spacing: .02em; }
.avatar-sm { width: 26px; height: 26px; font-size: .65rem; } .avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-row { display: flex; } .avatar-row .avatar { margin-right: -6px; border: 2px solid var(--surface); }

/* Home ------------------------------------------------------------------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; } .project-card { min-width: 0; }
.project-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; min-height: 150px; text-decoration: none; color: inherit; position: relative; transition: transform .12s; }
.project-card:hover { transform: translateY(-2px); color: inherit; }
.project-card h3 { margin: 0; font-size: 1.15rem; } .project-card .desc { color: var(--ink-soft); font-size: .92rem; margin: 0; flex: 1; }
.project-card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--ink-mute); }
.project-card .pin { position: absolute; top: 10px; right: 10px; }
.pin button { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--line); padding: 4px; line-height: 1; } .pin button.on, .pin button:hover { color: var(--gold); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 1.5rem 0 .75rem; } .section-head h2 { margin: 0; }
.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.mini-list { list-style: none; margin: 0; padding: 0; } .mini-list li { display: flex; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line-soft); font-size: .93rem; align-items: baseline; }
.mini-list li:first-child { border-top: 0; } .mini-list .when { color: var(--ink-mute); flex: none; min-width: 5.5em; font-size: .85rem; }

/* Project ---------------------------------------------------------------- */
.project-head { margin-bottom: 1rem; }
.crumbs { font-size: .9rem; color: var(--ink-mute); margin-bottom: .5rem; } .crumbs a { color: var(--ink-soft); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.tooltabs { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.tooltabs::-webkit-scrollbar { display: none; }
.tooltabs a { white-space: nowrap; padding: .5rem .8rem; text-decoration: none; color: var(--ink-soft); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tooltabs a.is-active { color: var(--primary); border-color: var(--accent); }
.project-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.project-hero h1 { margin-bottom: .2rem; } .project-hero .desc { color: var(--ink-soft); max-width: 60ch; margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; } .tool-card { min-width: 0; }
.tool-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; min-height: 190px; display: flex; flex-direction: column; }
.tool-card h2 { font-size: 1.2rem; margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; } .tool-card h2 a { text-decoration: none; }
.tool-card .ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; font-weight: 800; flex: none; }
.ico-todos { background: var(--primary-soft); } .ico-schedule { background: var(--accent); } .ico-docs { background: var(--twilight); } .ico-checkins { background: var(--gold); }
.tool-card ul { list-style: none; margin: 0; padding: 0; font-size: .93rem; } .tool-card li { padding: .35rem 0; border-top: 1px solid var(--line-soft); display: flex; gap: .5rem; align-items: center; }
.tool-card li a { text-decoration: none; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-card .more { margin-top: auto; padding-top: .6rem; font-size: .85rem; }
.tool-card .blurb { color: var(--ink-mute); font-size: .9rem; }
.people-strip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; } .side > * { min-width: 0; }

/* Lists / to-dos ---------------------------------------------------------- */
.todolist { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.todolist-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .4rem; } .todolist-head h2 { margin: 0; font-size: 1.2rem; flex: 1; } .todolist-head h2 a { text-decoration: none; }
.progress { width: 30px; height: 30px; flex: none; }
.todos { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line-soft); }
.todo:first-child { border-top: 0; }
.todo .box { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; cursor: pointer; }
.todo .text { flex: 1; min-width: 0; } .todo .text a { text-decoration: none; color: var(--ink); }
.todo.is-done .text a { text-decoration: line-through; color: var(--ink-mute); }
.todo .meta { display: inline-flex; gap: .45rem; align-items: center; margin-left: .4rem; font-size: .8rem; color: var(--ink-mute); vertical-align: middle; flex-wrap: wrap; }
.todo .meta .late { color: var(--bad); font-weight: 700; } .todo .meta .today { color: var(--gold); font-weight: 700; }
.todo .grip { cursor: grab; color: var(--line); user-select: none; padding: 2px 4px; margin-top: 1px; } .todo.dragging { opacity: .4; }
.todo-group { margin-top: 1rem; } .todo-group h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); font-family: var(--sans); margin: 0 0 .25rem; }
.add-todo { margin-top: .6rem; }
.add-todo .quick { display: flex; gap: .5rem; } .add-todo .quick input { flex: 1; }
.add-todo details { margin-top: .5rem; } .add-todo summary { cursor: pointer; font-size: .9rem; color: var(--ink-soft); }
.list-desc { color: var(--ink-soft); margin: 0 0 .6rem; }
.done-toggle { margin-top: .8rem; font-size: .9rem; }
.item-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; } .item-head h1 { margin: 0; font-size: 1.6rem; flex: 1; }
.item-meta { color: var(--ink-mute); font-size: .9rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.item-meta strong { color: var(--ink-soft); }
.prose { line-height: 1.6; } .prose h2, .prose h3, .prose h4 { margin-top: 1.2em; } .prose ul, .prose ol { padding-left: 1.4em; } .prose blockquote { border-left: 3px solid var(--line); margin: 0; padding: .2rem 1rem; color: var(--ink-soft); }
.prose code { background: var(--bg-deep); padding: 1px 5px; border-radius: 4px; font-size: .9em; } .prose p:last-child { margin-bottom: 0; }
.mention { background: #E8E9EB; color: var(--primary); border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* Comments / attachments ------------------------------------------------- */
.comments { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.comment { display: flex; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); } .comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: .9rem; margin-bottom: .2rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.comment-form { display: flex; gap: .75rem; padding-top: 1rem; } .comment-form textarea { margin-bottom: .5rem; }
.attachments { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.attach { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .35rem .6rem; font-size: .88rem; text-decoration: none; background: #fff; max-width: 100%; }
.attach-img { padding: 0; overflow: hidden; } .attach-img img { display: block; max-height: 160px; max-width: 240px; object-fit: cover; }
.file-ico { width: 14px; height: 18px; border: 2px solid var(--ink-mute); border-radius: 2px; display: inline-block; position: relative; flex: none; }

/* Schedule --------------------------------------------------------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; } .cal-head h2 { margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; }
.cal .dow { background: var(--bg-deep); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: .3rem; text-align: center; color: var(--ink-soft); font-weight: 700; }
.cal .day { background: var(--surface); min-width: 0; overflow: hidden; min-height: 92px; padding: .3rem .35rem; font-size: .8rem; position: relative; }
.cal .day.pad { background: var(--surface-soft); } .cal .day.today .n { background: var(--accent); color: #fff; }
.cal .n { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; font-weight: 700; margin-bottom: .2rem; }
.cal .ev { display: block; background: #E8E9EB; color: var(--primary); border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cal .ev.timed { background: transparent; border-left: 3px solid var(--accent); border-radius: 0; padding-left: 4px; }
.cal .ev.td { background: #F3EBDD; color: #7A5B2E; }
.cal .day.add { cursor: pointer; } .cal .day.add:hover { outline: 2px solid var(--primary-faint); outline-offset: -2px; }
.agenda { list-style: none; margin: 0; padding: 0; } .agenda li { display: flex; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.agenda .d { flex: none; width: 7.5em; color: var(--ink-mute); font-size: .9rem; } .agenda a { text-decoration: none; font-weight: 600; }
.event-date { font-family: var(--serif); font-size: 1.1rem; color: var(--accent); }

/* Docs & Files ---------------------------------------------------------------- */
.docs-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.docs-bar .spacer { flex: 1; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.doc-tile { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: .9rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .4rem; min-height: 130px; position: relative; overflow: hidden; }
.doc-tile:hover { color: var(--ink); transform: translateY(-2px); }
.doc-tile .kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); font-weight: 700; }
.doc-tile .t { font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.doc-tile .thumb { height: 70px; background-size: cover; background-position: center; border-radius: 6px; margin: -.2rem 0 .1rem; background-color: var(--bg-deep); }
.doc-tile .foot { margin-top: auto; font-size: .78rem; color: var(--ink-mute); }
.doc-tile.folder { background: var(--surface-soft); border: 1px solid var(--line-soft); box-shadow: none; }
.doc-tile.folder .t::before { content: '📁 '; }
.doc-tile .swatch { position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.c-sage { background: var(--sage); } .c-sun { background: var(--accent); } .c-clay { background: var(--clay); } .c-rose { background: var(--rose); } .c-twilight { background: var(--twilight); } .c-sky { background: var(--sky); }
.docs-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.docs-list li { display: flex; gap: .8rem; align-items: center; padding: .6rem 1rem; border-top: 1px solid var(--line-soft); } .docs-list li:first-child { border-top: 0; }
.docs-list a { text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.doc-view img.full { max-width: 100%; border-radius: var(--r-sm); }
.doc-view iframe { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.editor { font-family: var(--sans); min-height: 50vh; line-height: 1.6; }
.md-help { font-size: .82rem; color: var(--ink-mute); }

/* Check-ins -------------------------------------------------------------- */
.question-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.question-card h2 { font-size: 1.25rem; margin: 0 0 .25rem; } .question-card h2 a { text-decoration: none; }
.question-card .sched { color: var(--ink-mute); font-size: .9rem; }
.answer { display: flex; gap: .8rem; padding: 1rem 0; border-top: 1px solid var(--line-soft); } .answer-body { flex: 1; min-width: 0; }
.answer .who { font-weight: 600; } .answer .who small { color: var(--ink-mute); font-weight: 400; }
.answer-form textarea { min-height: 7em; }
.date-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.date-tabs a { font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; background: var(--bg-deep); text-decoration: none; color: var(--ink-soft); }
.date-tabs a.is-active { background: var(--primary); color: var(--surface); }
.days-pick { display: flex; gap: .3rem; flex-wrap: wrap; } .days-pick label { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; cursor: pointer; font-size: .9rem; background: #fff; }
.days-pick label:has(input:checked) { background: var(--primary); color: var(--surface); border-color: var(--primary); } .days-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pending-ask { background: #F3EBDD; border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1rem; }

/* Hey / activity / my stuff --------------------------------------------- */
.notifs { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.notifs li { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border-top: 1px solid var(--line-soft); } .notifs li:first-child { border-top: 0; }
.notifs li.unread { background: #F6F2EA; } .notifs .t { flex: 1; min-width: 0; } .notifs .t a { text-decoration: none; }
.notifs .t .ctx { display: block; font-size: .82rem; color: var(--ink-mute); }
.day-head { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin: 1.4rem 0 .4rem; }
.activity { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.activity li { display: flex; gap: .7rem; padding: .6rem 1rem; border-top: 1px solid var(--line-soft); align-items: flex-start; font-size: .95rem; } .activity li:first-child { border-top: 0; }
.activity li a { text-decoration: none; }
.subnav { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.subnav a { padding: .35rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink-soft); background: var(--bg-deep); font-size: .92rem; }
.subnav a.is-active { background: var(--primary); color: var(--surface); }
.group-head { font-family: var(--sans); font-size: .95rem; margin: 1.2rem 0 .4rem; display: flex; align-items: center; gap: .5rem; } .group-head .n { background: var(--bg-deep); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.group-head.late { color: var(--bad); }
.find-form { display: flex; gap: .5rem; margin-bottom: 1.5rem; } .find-form input { flex: 1; font-size: 1.1rem; }

/* Adminland / people ----------------------------------------------------------- */
.people-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; font-size: .93rem; }
.people-table th, .people-table td { padding: .6rem .9rem; text-align: left; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.people-table th { background: var(--bg-deep); border-top: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.people-table tr.archived td { opacity: .5; }
.person-row { display: flex; align-items: center; gap: .6rem; }
.invite-link { background: var(--surface-soft); border: 1px dashed var(--line); padding: .6rem .8rem; border-radius: var(--r-sm); font-family: ui-monospace, monospace; font-size: .85rem; word-break: break-all; }
.person-pick { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: var(--r-sm); cursor: pointer; } .person-pick:hover { background: var(--surface-soft); }
.person-pick input { width: 18px; height: 18px; accent-color: var(--primary); }
.person-pick .nm { flex: 1; } .person-pick small { display: block; color: var(--ink-mute); }

/* Sign-in -------------------------------------------------------------------- */
.bare-wrap { max-width: 420px; margin: 0 auto; padding: 8vh 16px 3rem; }
.bare-brand { text-align: center; margin-bottom: 1.5rem; } .bare-brand h1 { color: var(--surface); font-size: 1.6rem; margin: .6rem 0 0; }
.bare .card { color: var(--ink); }
.bare-foot { text-align: center; color: var(--primary-faint); font-size: .85rem; margin-top: 2rem; }
.bare a { color: var(--bg); }
.bare .card a { color: var(--primary); }

/* Responsive ------------------------------------------------------------------ */
@media (max-width: 760px) {
  .topbar-in { height: auto; flex-wrap: wrap; padding: .5rem 16px; gap: .5rem; }
  .topnav { order: 3; width: 100%; justify-content: flex-start; gap: .1rem; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .topnav a { padding: 6px 8px; font-size: .9rem; }
  .side, .strip, .grid-2 { grid-template-columns: 1fr; }
  .cal .day { min-height: 60px; padding: .2rem; } .cal .ev { font-size: .68rem; padding: 0 3px; }
  .comment-form .avatar, .comment .avatar { display: none; }
  .page { padding-top: 1rem; }
  h1, .h1 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Calendar (shared + per-household) ------------------------------------------ */
.cal-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.cal-title { display: flex; align-items: baseline; gap: .6rem; } .cal-title h1 { margin: 0; }
.cal-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-deep); border-radius: 999px; padding: 3px; }
.seg a { padding: .45rem .95rem; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--ink-soft); font-size: .92rem; min-height: 36px; display: inline-flex; align-items: center; }
.seg a.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.hh-filter { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.hh-chip { --hc: var(--primary-soft); display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; text-decoration: none; color: var(--ink-soft); font-size: .88rem; font-weight: 600; background: var(--surface); min-height: 36px; }
.hh-chip .dot, .hh-dot, .day-group .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hc); display: inline-block; flex: none; }
.hh-dot { margin-right: .4rem; vertical-align: 1px; }
.hh-chip.is-on { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.hh-chip.is-on .dot { box-shadow: 0 0 0 2px var(--surface); }
.cal-head h2 { font-size: 1.3rem; }
.cal .day { min-height: 118px; padding: .35rem .4rem; }
.cal .day .n { text-decoration: none; color: var(--ink); } .cal .day.pad .n { color: var(--ink-mute); }
.cal .day.today .n { background: var(--accent); color: #fff; }
.cal .day .more { display: block; font-size: .75rem; color: var(--ink-mute); text-decoration: none; padding: 1px 5px; } .cal .day .more:hover { color: var(--primary); }
.chip { --hc: var(--primary-soft); display: block; max-width: 100%; border-radius: 5px; padding: 2px 6px 2px 8px; margin-bottom: 3px; text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 4px solid var(--hc); background: color-mix(in srgb, var(--hc) 14%, #fff); }
.chip:hover { background: color-mix(in srgb, var(--hc) 26%, #fff); color: var(--ink); }
.chip-timed { background: var(--surface); border-left-width: 2px; padding-left: 9px; } .chip-timed b { color: var(--hc); font-weight: 700; margin-right: 2px; }
.chip-todo { background: transparent; border-left-style: dotted; font-weight: 500; color: var(--ink-soft); }
.chip .box-ico { display: inline-block; width: 10px; height: 10px; border: 1.5px solid var(--hc); border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.chip-sub { display: block; font-size: .76rem; font-weight: 500; color: var(--ink-mute); white-space: normal; }
.cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wday { background: var(--surface); min-width: 0; min-height: 50vh; display: flex; flex-direction: column; }
.wday.today .wday-head .n { background: var(--accent); color: #fff; }
.wday-head { display: flex; flex-direction: column; align-items: center; padding: .5rem 0 .35rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-soft); background: var(--surface-soft); }
.wday-head .wd { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); font-weight: 700; }
.wday-head .n { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%; }
.wday-body { padding: .4rem .4rem; flex: 1; }
.wday-body .chip { white-space: normal; padding: .4rem .5rem .4rem .6rem; margin-bottom: .4rem; font-size: .86rem; }
.wday-empty { color: var(--line); display: block; text-align: center; padding-top: 1rem; }
.cal-day { max-width: 760px; }
.day-group { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: .9rem; }
.day-group h3 { font-family: var(--sans); font-size: .95rem; display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; } .day-group h3 a { text-decoration: none; color: var(--ink); }
.day-group .chip, .list-day .chip { white-space: normal; padding: .55rem .7rem .55rem .8rem; margin-bottom: .45rem; font-size: .95rem; }
.cal-list { max-width: 760px; } .list-day { margin-bottom: .4rem; }
.cal-legend { margin-top: .5rem; }
.swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--hc); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2.5px var(--hc); }
.project-card { border-top: 4px solid var(--hc, var(--line)); }
.project-hero h1::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--hc, transparent); margin-right: .5rem; vertical-align: 2px; }

/* Touch + iPad ---------------------------------------------------------------- */
.btn, .pill, .seg a, .hh-chip, .tooltabs a, .topnav a, .subnav a { min-height: 40px; }
.todo .box, .check input { width: 20px; height: 20px; }
@media (hover: none) { .todo .grip { display: none; } .project-card:hover, .doc-tile:hover { transform: none; } }
/* iPad portrait (834) through landscape (1024-1366): comfortable, not cramped */
@media (min-width: 761px) and (max-width: 1100px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .side { grid-template-columns: minmax(0, 1fr) 260px; }
  .cal .day { min-height: 104px; } .chip { font-size: .76rem; }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1101px) { .cal .day { min-height: 130px; } .wday { min-height: 56vh; } }
@media (max-width: 760px) {
  .cal-week { grid-template-columns: 1fr; } .wday { min-height: 0; } .wday-head { flex-direction: row; gap: .6rem; justify-content: flex-start; padding: .5rem .8rem; } .wday-empty { display: none; } .wday:not(.today) .wday-body:has(> .wday-empty) { display: none; }
  .cal-month .day { min-height: 64px; padding: .2rem; } .cal-month .chip { font-size: .62rem; padding: 0 3px; border-left-width: 3px; } .cal-month .chip b { display: none; }
  .cal-top { align-items: flex-start; } .seg a { padding: .45rem .7rem; }
}

/* Questionnaire (/questionnaire) */
.q-banner { display: flex; align-items: center; gap: 1rem; justify-content: space-between; background: var(--surface); border-left: 5px solid var(--accent); border-radius: var(--r); box-shadow: var(--shadow); padding: .9rem 1.1rem; margin: 0 0 1.25rem; text-decoration: none; color: var(--ink); line-height: 1.4; }
.q-banner:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.q-banner .btn { flex: none; }
.q-page .lede { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.q-section h2 { margin-top: 0; }
.q { padding: 1rem 0; border-top: 1px solid var(--line-soft); }
.q:first-of-type { border-top: 0; }
.q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.q-label { font-weight: 600; font-size: 1rem; display: flex; gap: .55rem; align-items: baseline; }
.q-num { color: var(--accent); font: 700 .8rem var(--sans); min-width: 1.4em; }
.q-help { margin: .25rem 0 .6rem 2em; }
.q input[type=text], .q textarea { width: 100%; margin-top: .4rem; font-size: 1rem; }
.q textarea { min-height: 5.5em; }
.q-checks { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1rem; margin-top: .5rem; }
.q-checks .check { padding: .3rem 0; min-height: 40px; }
.q-saved { font-size: .78rem; color: var(--sage, #5F7B59); font-weight: 600; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.q-saved.is-on { opacity: 1; }
.q-grid-wrap { overflow-x: auto; margin-top: .5rem; }
.q-grid { width: 100%; border-collapse: collapse; font-size: .92rem; }
.q-grid th, .q-grid td { padding: .45rem .5rem; border-top: 1px solid var(--line-soft); text-align: center; }
.q-grid thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.q-grid tbody th { text-align: left; font-weight: 500; }
.q-grid td label { display: flex; justify-content: center; align-items: center; min-height: 40px; cursor: pointer; }
.q-grid input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); }
@media (max-width: 640px) { .q-checks { grid-template-columns: 1fr; } .q-banner { flex-direction: column; align-items: flex-start; } }
