AkurAI Build
Menu

Public repository / 4fac5c7826068a0d615a09851633816b41204468

AkurAI-Notes / site/frontend/styles.css

Latest change bdf7c9c318161bf8ea889239ed60d40de39453ff - AKURAI-NOTES-8 fix sidebar scrolling and add top search dropdown by Ólafur Búi Ólafsson

:root {
  --bg: #060912; --bg-2: #0a1020; --panel: #0e162b; --panel-2: #141d38;
  --border: #1a2542; --border-2: #24345a;
  --fg: #eef3ff; --muted: #8899bb; --dim: #5c72a0;
  --accent: #5b8cff; --accent-2: #7af0d0;
  --ok: #3ddc84; --warn: #f5b945; --info: #58b2ff; --danger: #ff6b6b;
  --radius: 14px; --shadow: 0 24px 60px -28px #000;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1100px 560px at 75% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent),
              radial-gradient(820px 440px at 5% 0%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent), var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; row-gap: 10px;
  padding: 15px 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--accent); display: inline-flex; }
.brand .mark svg { width: 17px; height: 17px; vertical-align: middle; }
.brand-dim { color: var(--dim); font-weight: 600; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; min-width: 0; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }

.hero { padding: 80px 0 56px; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); }
.hero h1 { margin: 22px auto 14px; font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; max-width: 16ch; }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0 auto 30px; color: var(--muted); font-size: 19px; max-width: 64ch; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent; transition: transform .04s, filter .15s, background .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent), #4577ec); color: #fff; box-shadow: 0 10px 26px -12px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--panel-2); color: var(--fg); border-color: var(--border-2); }
.btn-secondary:hover { background: #212a4d; }

.status { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
.status.ok { color: var(--ok); border-color: #1d3a2a; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 64px 0; }
.feature { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.feature-icon { display: block; width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.feature h3 { margin: 12px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 40px 24px 48px; }
.footer-cols { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-cols nav { display: grid; gap: 8px; }
.footer-cols a { color: var(--muted); font-size: 14px; }
.footer-cols a:hover { color: var(--fg); }
.site-footer .small { max-width: 1080px; margin: 28px auto 0; color: var(--dim); }

/* ═══════════════════════════════════════════════════════════════════════════
   WORKSPACE — Notion-like notes app (route: /app)
   Quiet surfaces, hairline borders, one accent, document-first editor.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --ws-sidebar: 288px;
  --ws-nav-h: 57px;
  --ws-hover: color-mix(in srgb, var(--fg) 7%, transparent);
  --ws-active: color-mix(in srgb, var(--accent) 16%, transparent);
  --ws-row-radius: 7px;
}

/* Visible keyboard focus for every custom interactive surface in the workspace */
.workspace :focus-visible,
.ws-menu :focus-visible,
.ws-overlay :focus-visible,
.note-row:focus-visible,
.pal-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.ed-title:focus-visible, .ed-body:focus-visible { outline: none; }

/* App chrome: collapse the marketing nav + hide the marketing footer so the
   workspace owns the viewport. Body gets .is-app from app.html. */
body.is-app { overflow: hidden; }
body.is-app .site-footer { display: none; }
body.is-app .nav { border-bottom: 1px solid var(--border); backdrop-filter: none; background: var(--bg-2); }

.workspace {
  display: grid;
  grid-template-columns: var(--ws-sidebar) minmax(0, 1fr);
  height: calc(100vh - var(--ws-nav-h));
  background: var(--bg);
  overflow: hidden;
}
.workspace * { box-sizing: border-box; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.ws-sidebar {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
}
.ws-side-head { padding: 14px 14px 8px; display: grid; gap: 10px; }
.ws-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ws-avatar {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.ws-user-meta { min-width: 0; line-height: 1.25; display: block; }
.ws-user-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-user-sub { display: block; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ws-search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--muted); font: inherit; font-size: 13px;
  cursor: pointer; text-align: left; transition: border-color .12s, color .12s;
}
.ws-search-btn:hover { border-color: var(--border-2); color: var(--fg); }
.ws-search-btn .kbd { margin-left: auto; font-size: 11px; color: var(--dim); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-family: var(--mono); }
.ws-search-btn svg { width: 15px; height: 15px; flex: none; }

.ws-nav { padding: 4px 8px; display: grid; gap: 1px; }
.ws-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 20px; scrollbar-width: thin; }
.ws-scroll::-webkit-scrollbar { width: 9px; }
.ws-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg-2); }

.ws-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 30px; padding: 4px 8px; border-radius: var(--ws-row-radius);
  color: var(--muted); font-size: 13.5px; font: inherit; font-size: 13.5px;
  background: none; border: 0; cursor: pointer; text-align: left; position: relative;
  transition: background .1s, color .1s;
}
.ws-item:hover { background: var(--ws-hover); color: var(--fg); }
.ws-item.active { background: var(--ws-active); color: var(--fg); font-weight: 600; }
.ws-item .ico { width: 16px; height: 16px; flex: none; display: grid; place-items: center; color: var(--dim); }
.ws-item.active .ico { color: var(--accent); }
.ws-item .label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-item .count { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ws-item svg { width: 16px; height: 16px; }

.ws-section-label {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 12px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim);
}
.ws-section-label .add {
  margin-left: auto; width: 20px; height: 20px; border-radius: 5px; border: 0;
  background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center;
}
.ws-section-label .add:hover { background: var(--ws-hover); color: var(--fg); }

/* Tree rows: notebooks (branch) + notes (leaf), nested by --depth */
.ws-tree { padding: 0 8px; display: grid; gap: 1px; }
.ws-row { padding-left: calc(8px + var(--depth, 0) * 15px); }
.ws-twist {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center;
  border-radius: 4px; color: var(--dim); cursor: pointer; transition: transform .12s, background .1s;
}
.ws-twist:hover { background: var(--ws-hover); color: var(--fg); }
.ws-twist.open { transform: rotate(90deg); }
.ws-twist.leaf { visibility: hidden; }
.ws-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.ws-row .row-actions { margin-left: auto; display: none; gap: 2px; flex: none; }
.ws-row:hover .row-actions { display: flex; }
.ws-icon-btn {
  width: 22px; height: 22px; border-radius: 5px; border: 0; background: none;
  color: var(--dim); cursor: pointer; display: grid; place-items: center;
}
.ws-icon-btn:hover { background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--fg); }
.ws-icon-btn svg { width: 15px; height: 15px; }

.ws-side-foot { padding: 8px; border-top: 1px solid var(--border); display: grid; gap: 1px; }

/* Mobile drawer toggle */
.ws-drawer-btn { display: none; }
.ws-scrim { display: none; }

/* ── Main pane ───────────────────────────────────────────────────────────── */
.ws-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.ws-topbar {
  display: flex; align-items: center; gap: 10px; min-height: 46px;
  padding: 8px 20px; border-bottom: 1px solid var(--border); flex: none;
}
.ws-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; }
.ws-crumbs .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ws-crumbs .crumb:hover { color: var(--fg); }
.ws-crumbs .sep { color: var(--dim); }
.ws-topbar .spacer { flex: 1 1 auto; }

/* ── Top search ──────────────────────────────────────────────────────────── */
.ws-top-search { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer; flex: none; transition: border-color .12s, color .12s; }
.ws-top-search:hover { border-color: var(--border-2); color: var(--fg); }
.ws-top-search svg { width: 16px; height: 16px; }

.ws-main { position: relative; }
.ws-search-drop { position: absolute; top: 100%; right: 20px; width: min(420px, calc(100vw - 40px)); z-index: 100; background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; animation: dropin .12s ease; }
@keyframes dropin { from { transform: translateY(-4px); opacity: 0; } }
.ws-search-head { display: flex; align-items: center; gap: 10px; padding: 4px 14px; border-bottom: 1px solid var(--border); }
.ws-search-head svg { width: 17px; height: 17px; color: var(--dim); flex: none; }
.ws-search-head input { flex: 1 1 auto; border: 0; background: none; color: var(--fg); font: inherit; font-size: 14px; padding: 12px 0; }
.ws-search-head input:focus { outline: none; }
.ws-search-head input::placeholder { color: var(--dim); }
.ws-search-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
.ws-search-results .ws-empty { padding: 28px 14px; }
.ws-search-results .sr-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ws-search-results .sr-item:hover, .ws-search-results .sr-item.sel { background: var(--ws-hover); }
.sr-item .sr-ico { color: var(--dim); display: grid; place-items: center; }
.sr-item .sr-title { font-weight: 600; font-size: 14px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item .sr-snip { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sr-item .sr-score { font-size: 11px; color: var(--dim); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.ws-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ws-canvas { max-width: 820px; margin: 0 auto; padding: 48px 56px 30vh; }

/* Editor */
.ed-title {
  width: 100%; border: 0; background: none; color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 700; font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; padding: 0; margin: 0 0 6px;
  resize: none; overflow: hidden;
}
.ed-title:focus { outline: none; }
.ed-title::placeholder { color: var(--dim); }
.ed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.ed-metabtn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--panel);
  color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .12s, color .12s;
}
.ed-metabtn:hover { border-color: var(--border-2); color: var(--fg); }
.ed-metabtn svg { width: 14px; height: 14px; }
.ed-metabtn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ed-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--fg);
  background: color-mix(in srgb, var(--chip, var(--accent)) 22%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--chip, var(--accent)) 45%, transparent);
}
.tag-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chip, var(--accent)); }
.tag-chip button { border: 0; background: none; color: inherit; cursor: pointer; opacity: .6; padding: 0; display: grid; place-items: center; }
.tag-chip button:hover { opacity: 1; }
.tag-chip button svg { width: 12px; height: 12px; }

.ed-body {
  width: 100%; min-height: 50vh; border: 0; background: none; color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.75; padding: 0; resize: none; overflow: hidden;
}
.ed-body:focus { outline: none; }
.ed-body::placeholder { color: var(--dim); }
.ed-body.mono { font-family: var(--mono); font-size: 14px; }

/* Markdown preview */
.md { color: var(--fg); font-size: 16px; line-height: 1.75; }
.md h1, .md h2, .md h3 { letter-spacing: -0.01em; line-height: 1.25; margin: 1.4em 0 .5em; }
.md h1 { font-size: 27px; } .md h2 { font-size: 22px; } .md h3 { font-size: 18px; }
.md p { margin: 0 0 1em; } .md ul, .md ol { margin: 0 0 1em; padding-left: 1.4em; }
.md li { margin: .2em 0; }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1em; }
.md pre code { background: none; border: 0; padding: 0; }
.md blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 3px solid var(--border-2); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }

/* Note list (notebook / all / recent / archived / tag views) */
.ws-listhead { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 6px; }
.ws-listhead .lh-dot { width: 30px; height: 30px; border-radius: 8px; flex: none; margin-top: 4px; }
.ws-listhead h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; }
.ws-listhead .lh-desc { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.ws-listhead .spacer { flex: 1 1 auto; }
.ws-listmeta { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; color: var(--dim); font-size: 12.5px; }
.ws-notelist { display: grid; gap: 2px; margin-top: 8px; }
.note-row {
  display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 9px; cursor: pointer; border: 1px solid transparent;
  transition: background .1s, border-color .1s;
}
.note-row:hover { background: var(--panel); border-color: var(--border); }
.note-row .nr-ico { color: var(--dim); display: grid; place-items: center; }
.note-row .nr-main { min-width: 0; display: block; }
.note-row .nr-title { display: block; font-size: 15px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row .nr-title .archived-badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 4px; padding: 0 4px; margin-left: 8px; }
.note-row .nr-snip { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.note-row .nr-side { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; }
.note-row .nr-tags { display: flex; gap: 4px; }
.note-row .nr-tag { width: 8px; height: 8px; border-radius: 50%; }
.note-row .nr-date { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Search results reuse note-row; score pill */
.score-pill { font-size: 11px; color: var(--dim); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }

/* Empty / loading / error states */
.ws-empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.ws-empty .ei { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--dim); }
.ws-empty h2 { margin: 0 0 6px; font-size: 18px; color: var(--fg); font-weight: 600; }
.ws-empty p { margin: 0 auto 18px; max-width: 40ch; font-size: 14px; }
.ws-skeleton { display: grid; gap: 8px; padding: 8px; }
.ws-skeleton .sk { height: 42px; border-radius: 9px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Primary/ghost buttons scoped to workspace (reuse global .btn where sensible) */
.ws-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--panel-2); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter .12s, background .12s; }
.ws-btn:hover { background: color-mix(in srgb, var(--fg) 10%, var(--panel-2)); text-decoration: none; }
.ws-btn svg { width: 15px; height: 15px; }
.ws-btn.primary { background: linear-gradient(180deg, var(--accent), #4577ec); border-color: transparent; color: #fff; }
.ws-btn.primary:hover { filter: brightness(1.08); }
.ws-btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: color-mix(in srgb, var(--danger) 10%, var(--panel)); }
.ws-btn.danger:hover { background: color-mix(in srgb, var(--danger) 18%, var(--panel)); }

/* ── Popover menu ────────────────────────────────────────────────────────── */
.ws-menu {
  position: fixed; z-index: 120; min-width: 200px; padding: 5px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: 0 18px 44px -18px #000, 0 0 0 1px color-mix(in srgb, var(--fg) 4%, transparent);
  display: grid; gap: 1px;
}
.ws-menu button, .ws-menu a {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px;
  border: 0; background: none; color: var(--fg); font: inherit; font-size: 13.5px;
  border-radius: 6px; cursor: pointer; text-align: left;
}
.ws-menu button:hover, .ws-menu a:hover { background: var(--ws-hover); text-decoration: none; }
.ws-menu button.danger { color: var(--danger); }
.ws-menu button.danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.ws-menu svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.ws-menu button.danger svg { color: var(--danger); }
.ws-menu .sep { height: 1px; background: var(--border); margin: 4px 2px; }
.ws-menu .mlabel { padding: 6px 9px 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ws-menu .swatch-row { display: flex; gap: 6px; padding: 4px 9px 7px; flex-wrap: wrap; }
.ws-swatch { width: 20px; height: 20px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.ws-swatch.sel { border-color: var(--fg); }
.ws-menu .menu-check { margin-left: auto; color: var(--accent); }

/* ── Modal / dialog ──────────────────────────────────────────────────────── */
.ws-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: color-mix(in srgb, #000 55%, transparent); padding: 20px;
  animation: fade .12s ease;
}
@keyframes fade { from { opacity: 0; } }
.ws-dialog {
  width: min(460px, 100%); background: var(--panel); border: 1px solid var(--border-2);
  border-radius: 14px; box-shadow: var(--shadow); padding: 22px; animation: pop .14s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.ws-dialog h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.ws-dialog p.sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.ws-field { display: grid; gap: 6px; margin-bottom: 14px; }
.ws-field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ws-input, .ws-textarea {
  width: 100%; border: 1px solid var(--border-2); border-radius: 8px; background: var(--bg-2);
  color: var(--fg); font: inherit; font-size: 14px; padding: 9px 11px;
}
.ws-input:focus, .ws-textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: transparent; }
.ws-textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.ws-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Command palette (search) */
.ws-palette { align-items: flex-start; padding-top: 12vh; }
.ws-palbox { width: min(600px, 100%); background: var(--panel); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: pop .14s ease; }
.ws-palhead { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border-bottom: 1px solid var(--border); }
.ws-palhead svg { width: 18px; height: 18px; color: var(--dim); flex: none; }
.ws-palhead input { flex: 1 1 auto; border: 0; background: none; color: var(--fg); font: inherit; font-size: 16px; padding: 15px 0; }
.ws-palhead input:focus { outline: none; }
.ws-palmode { font-size: 11px; color: var(--dim); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.ws-palresults { max-height: 52vh; overflow-y: auto; padding: 6px; }
.pal-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.pal-item:hover, .pal-item.sel { background: var(--ws-hover); }
.pal-item .pi-ico { color: var(--dim); display: grid; place-items: center; }
.pal-item .pi-title { font-weight: 600; font-size: 14.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .pi-snip { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* Toasts (bottom-right, per house rules) */
.ws-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 10px; width: min(340px, calc(100vw - 36px)); }
.ws-toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 11px;
  box-shadow: var(--shadow); color: var(--fg); font-size: 13.5px; animation: toastin .18s ease;
}
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }
.ws-toast.leaving { animation: toastout .18s ease forwards; }
@keyframes toastout { to { transform: translateY(10px); opacity: 0; } }
.ws-toast .tico { flex: none; margin-top: 1px; }
.ws-toast.ok .tico { color: var(--ok); } .ws-toast.err .tico { color: var(--danger); } .ws-toast.info .tico { color: var(--info); }
.ws-toast .tmsg { flex: 1 1 auto; line-height: 1.4; }
.ws-toast .tclose { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 0; }
.ws-toast .tclose:hover { color: var(--fg); }
.ws-toast svg { width: 16px; height: 16px; }

.save-status { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.save-status.saving::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.save-status.saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .ws-toast, .ws-dialog, .ws-palbox, .ws-overlay, .ws-skeleton .sk { animation: none !important; }
  .ws-twist { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .ws-sidebar {
    position: fixed; top: var(--ws-nav-h); bottom: 0; left: 0; width: min(300px, 84vw);
    z-index: 90; transform: translateX(-100%); transition: transform .2s ease;
  }
  body.is-app.drawer-open .ws-sidebar { transform: translateX(0); }
  body.is-app.drawer-open .ws-scrim { display: block; position: fixed; inset: var(--ws-nav-h) 0 0 0; z-index: 80; background: color-mix(in srgb, #000 45%, transparent); }
  .ws-drawer-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--fg); cursor: pointer; }
  .ws-drawer-btn svg { width: 18px; height: 18px; }
  .ws-canvas { padding: 28px 20px 30vh; }
  .ed-title { font-size: 30px; }
  .ws-listhead h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-sidebar { transition: none; }
}

/* Legacy single-panel pages (settings/search fallback templates) */
.app-shell { width: min(1180px, calc(100% - 40px)); margin: 36px auto 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.app-panel { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h1 { margin: 2px 0 0; font-size: 24px; }
.section-kicker { margin: 0; color: var(--accent-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.empty-state { margin: 0; padding: 28px; border: 1px dashed var(--border-2); border-radius: 8px; color: var(--muted); background: var(--bg-2); }
@media (max-width: 820px) {
  .features { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
}