:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #2c2c2b;
  --muted: #787774;
  --rule: #ebebea;
  --hover: #f1f1ef;
  --red: #cf5148;
  --blue: #387dc9;
  --green: #50946e;
  --purple: #9a6bb4;
  --bg-blue: #e5f2fc;
  --bg-green: #e8f1ec;
  --bg-tan: #f5ede9;
  --bg-purple: #f3ebf9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #191919;
    --fg: #e9e9e7;
    --muted: #979390;
    --rule: #2f2f2e;
    --hover: #2a2a29;
    --red: #e37f78;
    --blue: #6bb0f5;
    --green: #7cc79a;
    --purple: #c9a2dd;
    --bg-blue: #1f2d3d;
    --bg-green: #1e2d24;
    --bg-tan: #2e2620;
    --bg-purple: #2b2333;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919;
  --fg: #e9e9e7;
  --muted: #979390;
  --rule: #2f2f2e;
  --hover: #2a2a29;
  --red: #e37f78;
  --blue: #6bb0f5;
  --green: #7cc79a;
  --purple: #c9a2dd;
  --bg-blue: #1f2d3d;
  --bg-green: #1e2d24;
  --bg-tan: #2e2620;
  --bg-purple: #2b2333;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, "system-ui", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: 708px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}
header.site .crumb-link {
  text-decoration: none;
  color: var(--muted);
  padding: 2px 4px;
  border-radius: 3px;
}
header.site .crumb-link:hover { background: var(--hover); }
header.site .crumb-current { padding: 2px 4px; color: var(--muted); }
header.site .crumb-sep { color: var(--rule); padding: 0 2px; }

.page-icon {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  margin: 22px 0 18px;
  box-shadow: 0 0 0 1px var(--rule);
}
.page-icon.round { border-radius: 50%; }

h1, h2, h3 {
  font-weight: 700;
  color: var(--fg);
  text-wrap: balance;
}

h1 { font-size: 2.4em; margin: 0 0 12px; line-height: 1.2; }
h2 {
  font-size: 1.3em;
  margin: 1.7em 0 0.5em;
}
h3 { font-size: 1.05em; margin: 1.3em 0 0.4em; font-weight: 600; }

p, ul, ol, table { margin: 0.6em 0; }
ul, ol { padding-left: 1.6em; }
li { margin: 0.25em 0; }

a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(56,125,201,0.35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.meta {
  color: var(--muted);
  font-size: 0.9em;
  margin-bottom: 1.6em;
}

.overflow-table { overflow-x: auto; margin: 0.85em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92em; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; font-size: 0.85em; }

hr { border: none; border-top: 1px solid var(--rule); margin: 2em 0; }

.intro { font-size: 1.02em; }

/* hub: My Projects list, colored rows matching each app's Notion accent */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0.8em 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.project-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.98em;
}
.project-list img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex: none;
}
.project-list .row-memo { background: var(--bg-blue); }
.project-list .row-aurora { background: var(--bg-green); }
.project-list .row-scribe { background: var(--bg-tan); }
.project-list .row-alcove { background: var(--bg-purple); }

/* app page: legal doc links, colored like Notion's mention links */
.legal-links {
  list-style: none;
  padding: 0;
  margin: 0.7em 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-links a {
  display: block;
  padding: 4px 4px;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  font-weight: 500;
}
.legal-links .doc-terms a { color: var(--blue); text-decoration-color: rgba(56,125,201,0.4); }
.legal-links .doc-privacy-policy a { color: var(--green); text-decoration-color: rgba(80,148,110,0.4); }
.legal-links .doc-data-collection a { color: var(--red); text-decoration-color: rgba(207,81,72,0.4); }

footer.site {
  margin-top: 3.5em;
  padding-top: 1.4em;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85em;
}
footer.site a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  a, .crumb-link, .project-list a { transition: background-color 0.1s ease, text-decoration-color 0.1s ease; }
}
