/* Content layouts; visual primitives live in site-appearance.css. */
html, body { margin: 0; min-height: 100%; }
.macos-page a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app-main { min-width: 0; }
.list-search { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; }
.list-search label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.list-search input { width: 100%; max-width: 420px; font-size: 14px; }
.list-search input::placeholder { color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 32px 12px; font-size: 14px; }
.empty-state button { display: block; margin: 12px auto 0; border: 0; border-radius: 10px; padding: 10px 14px; background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; }
.project-list, .note-list { display: grid; }
.project-thumb, .note-index { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent-strong); background: var(--accent-soft); }
.project-thumb svg { width: 24px; height: 24px; }
.project-copy { min-width: 0; }
.project-copy strong { display: block; }
.project-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.note-index { font: 12px/1.4 var(--site-font); font-variant-numeric: tabular-nums; }
.about-profile { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 16px; padding: 4px 0 24px; border-bottom: 1px solid var(--line); }
.about-profile img { display: block; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 14px; object-fit: cover; }
.about-profile h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.about-profile p { margin: 0; font-size: 13px; color: var(--muted); }
.profile-facts { display: flex; flex-wrap: wrap; gap: 16px 28px; grid-column: 1 / -1; }
.profile-fact { display: grid; gap: 3px; font-size: 12px; }
.profile-fact > span { color: var(--muted); }
.profile-fact strong { font-weight: 500; }
.about-section { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.about-section:last-child { border-bottom: 0; }
.about-section h3 { margin: 0; font-size: 14px; font-weight: 600; }
.about-section p { margin: 0; color: var(--muted); font-size: 14px; }
.about-section-links { display: flex; flex-wrap: wrap; gap: 8px; }
.about-section-links a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 13px; }
.about-section-links svg { width: 16px; height: 16px; }
.about-section-links a:hover { background: var(--accent-soft); color: var(--accent-strong); }
/* Documents keep a table of contents instead of page navigation. */
.page-note-reader .layout { display: grid; align-items: stretch; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr); gap: 0; width: min(1220px, calc(100% - 60px)); height: calc(100svh - 128px); margin: 28px auto 100px; }
.reader-titlebar { grid-column: 1 / -1; position: relative; z-index: 2; }
.page-note-reader .layout > aside { display: flex; flex-direction: column; position: static; height: 100%; max-height: none; min-height: 0; padding: 22px 10px; background: transparent; border-right: 1px solid var(--line); }
.page-note-reader .layout > aside h1 { margin: 0 10px 4px; font-size: 13px; }
.page-note-reader .layout > aside > p { margin: 0 10px; font-size: 11px; color: var(--muted); }
.page-note-reader .layout > aside nav { flex: 1; min-height: 0; margin-top: 16px; padding-right: 0; overflow: auto; }
.page-note-reader .layout > aside nav a { border-radius: 8px; font-size: 12px; padding: 7px 10px; }
.page-note-reader .layout > main { border: 0; border-radius: 0; min-height: 0; max-height: 100%; overflow-y: auto; padding: 28px 32px 64px; font-size: 15px; }
.page-note-reader .layout h1 { font-size: 24px; line-height: 1.4; }
.page-note-reader .layout h2 { font-size: 21px; }
.page-note-reader .layout h3 { font-size: 17px; }
.page-note-reader .layout .hero { margin-bottom: 24px; padding-bottom: 20px; border-color: var(--line); }
.page-note-reader .toc-toggle { display: none; }
@media (max-width: 860px) {
  .list-search { flex-direction: column; align-items: stretch; gap: 6px; }
  .list-search input { max-width: none; }
  .project-thumb, .note-index { width: 38px; height: 38px; border-radius: 8px; }
  .project-thumb svg { width: 21px; height: 21px; }
  .about-section { grid-template-columns: 1fr; gap: 10px; }
  .profile-facts { gap: 12px; }
  .page-note-reader .layout { display: block; width: calc(100% - 24px); height: auto; margin: 60px 12px 100px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .page-note-reader .reader-titlebar { grid-template-columns: minmax(0, 1fr); }
  .reader-titlebar .mac-traffic-lights, .reader-titlebar .chrome-back { display: none; }
  .page-note-reader .layout h2, .page-note-reader .layout h3 { scroll-margin-top: 16px; }
  .page-note-reader .layout > main { overflow-y: visible; padding: 24px 20px 50px; }
  .page-note-reader .toc-toggle { display: inline-flex; position: fixed; align-items: center; justify-content: center; top: 10px; left: 12px; width: 40px; height: 40px; border: 1px solid var(--glass-edge); border-radius: 10px; background: var(--glass-sheen), var(--menu-bg); color: var(--text); backdrop-filter: blur(20px); z-index: 310; cursor: pointer; }
  .page-note-reader .layout > aside { position: fixed; top: 58px; bottom: calc(104px + env(safe-area-inset-bottom, 0px)); left: 10px; width: min(320px, calc(100vw - 20px)); height: auto; max-height: none; padding: 18px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow); transform: translateX(calc(-100% - 18px)); transition: transform 220ms cubic-bezier(.22, 1, .36, 1); z-index: 305; }
  .page-note-reader.toc-open .layout > aside { transform: translateX(0); }
  .page-note-reader .toc-backdrop { background: #0f121260; position: fixed; inset: 0; z-index: 290; }
}
@media print {
  .page-note-reader .layout > aside, .reader-titlebar, .toc-toggle, .toc-backdrop { display: none !important; }
  .page-note-reader .layout { display: block; width: 100%; height: auto; margin: 0; border: 0; box-shadow: none; backdrop-filter: none; }
  .page-note-reader .layout > main { overflow: visible; padding: 0; background: white; color: black; max-height: none; }
}
