@import url('/fonts.css');
:root{color-scheme:dark;--bg:#171a28;--rail:#121522;--panel:#222637;--input:#191d2d;--hover:#2b3045;--selected:#383754;--line:#3b415a;--text:#f3f2fc;--muted:#b5bed5;--accent:#b5a3ff;--link:#d3c8ff;--on-accent:#1b1433;--positive:#9ae8bf;--negative:#ffb3bd}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;font-size:14px}button,input,textarea,select{font:inherit}a{color:inherit;text-decoration:none}button,.button{border:1px solid transparent;border-radius:7px;padding:10px 16px;background:var(--accent);color:var(--on-accent);cursor:pointer;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover,.button:hover{filter:brightness(1.08)}button:disabled{opacity:.5;cursor:wait}.quiet{background:transparent;color:var(--muted);border-color:var(--line)}.danger{color:var(--negative)}input,textarea,select{color:var(--text);background:var(--input);border:1px solid var(--line);border-radius:6px;padding:11px;width:100%}input:focus,textarea:focus,button:focus-visible,a:focus-visible,select:focus{outline:2px solid var(--accent);outline-offset:2px}textarea{resize:vertical;line-height:1.65}label{display:block;color:var(--muted);font-size:13px;margin:16px 0}label input{margin-top:8px}.sidebar{position:fixed;width:172px;inset:0 auto 0 0;padding:32px 12px;background:var(--input);border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:18px;font-weight:600;letter-spacing:-.4px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:600;color:var(--muted)}nav{display:flex;flex-direction:column;gap:6px}nav a{display:flex;gap:13px;padding:13px;border-radius:7px;color:var(--muted);font-size:17px}nav a span{font-size:13px}nav a.active{background:var(--selected);color:var(--text)}nav a:hover{background:var(--hover)}.sidebar-bottom{margin-top:auto;color:var(--muted);font-size:11px}.sidebar-bottom button{display:block;width:100%;margin-top:17px}.workspace{margin-left:172px}main{padding:42px 44px;max-width:1500px;margin:auto}h1{font-size:34px;font-weight:500;letter-spacing:-1.2px;margin:8px 0 12px}h2{font-size:20px;font-weight:500;letter-spacing:-.4px}p{line-height:1.6}.muted,.subtitle{color:var(--muted)}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:32px}.heading p{margin-bottom:0}.tag{font-size:10px;border:1px solid var(--line);border-radius:5px;padding:4px 7px;color:var(--muted)}.editor-footer,.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.editor-footer{font-size:11px;color:var(--muted)}.toolbar{margin-bottom:22px;flex-wrap:wrap}.toolbar input,.toolbar select{width:auto;max-width:240px}.actions{display:flex;gap:8px;flex-wrap:wrap}.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:9px}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--muted);font-weight:500;background:var(--panel)}th,td{padding:17px;border-bottom:1px solid var(--line)}td{font-size:12px}td button,td .button{padding:6px 9px;font-size:11px}tr:last-child td{border-bottom:0}.empty{padding:60px 20px;text-align:center;color:var(--muted)}.app-frame{width:100%;height:100dvh;border:0;background:var(--bg);display:block}main.embedded{padding:0;max-width:none}.loading{padding:50px;color:var(--muted)}#notice{position:fixed;bottom:25px;right:25px;max-width:480px;background:var(--selected);border:1px solid var(--line);padding:15px 22px;border-radius:9px;z-index:10;box-shadow:0 10px 50px #0008}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;width:min(900px,94vw);padding:25px}dialog::backdrop{background:#000a}dialog textarea{height:55vh;font-family:ui-monospace,monospace;font-size:13px;tab-size:2;white-space:pre}dialog .editor-footer{margin-top:18px}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-heading h2{margin:6px 0}.login-card{width:min(410px,92vw);padding:40px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb, var(--panel) 90%, transparent)}.login-card>.eyebrow{margin-top:30px}.login-card h1{font-size:30px}.login-card button{width:100%;margin-top:10px}#error{color:var(--negative);font-size:12px}.storage{font-size:12px;color:var(--muted)}@media(max-width:900px){.sidebar{padding:25px 12px}main{padding:28px 22px}}@media(max-width:620px){.sidebar{position:static;width:auto;padding:16px;border-right:0;border-bottom:1px solid var(--line)}.sidebar-bottom{display:none}.brand{font-size:16px}nav{flex-direction:row;overflow-x:auto;margin-top:15px;gap:3px}nav a{padding:9px;white-space:nowrap;gap:6px}nav a span{font-size:11px}.workspace{margin-left:0}main{padding:25px 18px}.heading{align-items:flex-start;gap:10px}h1{font-size:28px}}

/* Workspace identity */
.sidebar {
  color: var(--text);
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 52%, color-mix(in srgb, var(--accent) 12%, transparent)), var(--rail);
}
.sidebar .brand {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-size: 21px;
  font-weight: 700;
}
.sidebar nav { margin-top: 18px; }
.sidebar nav a { align-items: center; border: 1px solid transparent; }
.sidebar nav a.active .nav-icon { color: var(--accent); }
.sidebar nav a.active {
  background: linear-gradient(90deg, var(--selected), var(--hover));
  border-color: var(--line);
  color: var(--text);
  box-shadow: inset 2px 0 var(--accent);
}
@media (max-width: 620px) {
  .sidebar .brand { padding-bottom: 0; border-bottom: 0; font-size: 18px; }
  .sidebar nav { margin-top: 12px; }
}
.eyebrow { color: var(--accent); }
nav a.active { box-shadow: inset 2px 0 var(--accent); }
h1 { font-weight: 700; }
h2 { font-weight: 600; }


.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
  background:
    radial-gradient(ellipse at 65% 12%, color-mix(in srgb, var(--accent) 23%, transparent), transparent 55%),
    radial-gradient(ellipse at 8% 90%, color-mix(in srgb, var(--link) 17%, transparent), transparent 50%),
    repeating-linear-gradient(135deg, transparent 0 28px, color-mix(in srgb, var(--text) 4%, transparent) 28px 29px),
    var(--bg);
}
.login-card {
  padding: clamp(24px, 6vw, 40px);
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px #050610a8;
}
@media (max-width: 620px) {
  }

.overview-artwork {
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(76vw, 640px);
  color: var(--link);
  opacity: .22;
  pointer-events: none;
}
.overview-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.overview-panel, .overview-notes {
  --tone: var(--link);
  --surface-glow: color-mix(in srgb, var(--accent) 19%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(ellipse at 95% 0%, var(--surface-glow), transparent 68%), var(--panel);
  padding: clamp(14px, 3vw, 24px);
  animation: overview-enter .24s ease-out both;
}
.wellness-panel { --tone: var(--link); --surface-glow: color-mix(in srgb, var(--positive) 14%, var(--panel)); }
.goals-panel { --tone: var(--link); --surface-glow: color-mix(in srgb, var(--negative) 13%, var(--panel)); grid-row: span 3; }
.drive-panel { --tone: var(--link); --surface-glow: var(--selected); }
.panel-heading, .overview-notes { display: flex; align-items: center; gap: 12px; }
.panel-heading h2 { margin: 0; }
.panel-heading a, .overview-notes > :last-child { margin-left: auto; color: var(--tone); }
.panel-heading a { padding: 6px; }
.panel-heading a:hover { text-decoration: underline; }
.panel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--tone);
  background: var(--bg);
  font-size: 20px;
}
.panel-content { margin-top: 18px; }
.panel-message, .panel-caption { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.panel-message button { margin-left: 6px; padding: 4px 8px; }
.overview-metrics { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.overview-metrics strong { display: block; font-size: clamp(22px, 4vw, 32px); font-variant-numeric: tabular-nums; }
.overview-metrics small, .overview-metrics span { color: var(--muted); font-size: 12px; }
.activity-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 10px; }
.activity-day { display: grid; gap: 6px; text-align: center; color: var(--muted); font-size: 11px; }
.activity-track, .storage-meter { display: flex; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; }
.activity-track { align-items: end; height: 40px; }
.activity-track > span, .storage-meter > span { display: block; background: linear-gradient(135deg, var(--surface-glow), var(--tone)); }
.activity-track > span { width: 100%; height: var(--fill); transform-origin: bottom; animation: activity-rise .35s ease-out both; }
.storage-meter { margin-top: 14px; height: 8px; }
.storage-meter > span { width: var(--fill); transform-origin: left; animation: meter-fill .35s ease-out both; }
.goal-summary { list-style: none; padding: 0; margin: 12px 0 0; }
.goal-summary li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.goal-art { display: grid; place-items: center; flex: 0 0 38px; height: 38px; background: var(--bg); border-radius: 8px; }
.goal-art svg { width: 25px; height: 25px; }
.goal-label { min-width: 0; }
.goal-label span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.goal-count { margin-left: auto; color: var(--tone); font-variant-numeric: tabular-nums; }
.overview-notes:hover { border-color: var(--tone); }

@keyframes overview-enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes activity-rise { from { transform: scaleY(0); } }
@keyframes meter-fill { from { transform: scaleX(0); } }
@media (max-width: 950px) {
  .overview-grid { grid-template-columns: 1fr; }
  .goals-panel { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .overview-panel, .overview-notes, .activity-track > span, .storage-meter > span { animation: none; }
}

.brand-icon { width: 38px; height: 38px; flex: 0 0 auto; }
.login-card .brand-icon { width: 54px; height: 54px; }
.sidebar .brand {
  gap: 9px;
  letter-spacing: -.6px;
  color: var(--text);
  --brand-mid: color-mix(in srgb, var(--brand-start), var(--brand-end));
  --brand-spark: color-mix(in srgb, var(--brand-end) 75%, var(--text));
}
.sidebar:is(:not([data-neuron-theme]), [data-neuron-theme="starlight"]) .brand {
  --brand-wordmark: #efedff;
  --brand-start: initial;
  --brand-end: initial;
}
.sidebar:is([data-neuron-theme="ink"], [data-neuron-theme="oled"]) .brand {
  --brand-start: #ff55ae;
  --brand-end: #53edff;
  --brand-mid: #a976ff;
  --brand-spark: #80ffcb;
}
.sidebar .brand:hover, .sidebar .brand[aria-current="page"] { color: var(--link); }
#rail-toggle {
  border-color: transparent;
  padding: 8px;
  border-radius: 8px;
}
#rail-toggle:hover { color: var(--text); background: var(--selected); }
.sidebar nav { margin-top: 8px; }
.nav-icon { width: 19px; height: 19px; flex: 0 0 auto; }
.sidebar-bottom button { display: flex; align-items: center; }
.rail-collapsed .sidebar { width: 72px; padding-inline: 12px; }
.rail-collapsed .workspace { margin-left: 72px; }
.rail-collapsed .brand,
.rail-collapsed nav a { justify-content: center; }
.rail-collapsed .brand > span,
.rail-collapsed nav a > span,
.rail-collapsed #rail-toggle > span { display: none; }
.rail-collapsed #rail-toggle svg { transform: scaleX(-1); }

@media (max-width: 620px) {
  body:has(.workspace) { display: flex; flex-direction: column; min-height: 100dvh; }
  .workspace, .workspace main.embedded { display: flex; flex: 1; flex-direction: column; }
  .workspace main:not(.embedded) { width: 100%; }
  .workspace main.embedded { width: 100%; margin: 0; }
  .app-frame { flex: 1; height: auto; }
  .sidebar, .rail-collapsed .sidebar { position: relative; width: auto; }
  .rail-collapsed .workspace { margin-left: 0; }
  .rail-collapsed .brand { justify-content: flex-start; }
  .sidebar-bottom { display: contents; }
  #rail-toggle { position: absolute; top: 15px; right: 16px; width: auto; margin: 0; }
  #rail-toggle > span { display: none; }
  .sidebar nav { margin-top: 10px; }
  .rail-collapsed nav a { flex: 1; }
}


.brand > span > img { display: block; }


.notes-app {
  --notes-accent: var(--link);
  --notes-icon: var(--link);
}
.notes-app h1 { margin: 18px 0; font-size: clamp(28px, 5vw, 42px); }
.notes-app h1:empty { display: none; }
.notes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.notes-toolbar .actions { margin-left: auto; flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; }
.notes-toolbar .notes-back { min-width: 0; padding-right: 4px; gap: 4px; }
.notes-toolbar .notes-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-toolbar .actions button { padding-inline: 10px; }
.notes-app button:not(.quiet):not(.notes-row) { background: var(--notes-accent); }
.notes-back, .notes-toolbar #new-folder { color: var(--notes-accent); }
.notes-back { border-color: transparent; padding-left: 0; }
.notes-rows {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.notes-rows li + li { border-top: 1px solid var(--line); }
.notes-row {
  width: 100%;
  min-height: 42px;
  padding-block: 7px;
  gap: 6px;
  justify-content: flex-start;
  text-align: left;
  color: var(--text);
  background: transparent;
  border-radius: 0;
}
.notes-row:focus-visible { outline-offset: -3px; }
.notes-row:hover { background: var(--panel); }
.notes-row svg { flex: 0 0 auto; color: var(--notes-icon); }
.notes-row strong { flex: 1; overflow-wrap: anywhere; }
.notes-list-pane .notes-row strong { font-weight: 400; }
.notes-app #new-note {
  background: transparent;
  border: 0;
  padding: 5px 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--notes-accent);
}
.notes-app #new-note:hover { color: var(--text); }
.notes-row small, .notes-row > span { color: var(--muted); }
.notes-writing { display: flex; flex: 1; flex-direction: column; min-height: 0; margin-top: 22px; }
.notes-writing #note-content {
  background: transparent;
  border-color: transparent;
  padding-inline: 0;
}
.notes-writing #note-content { flex: 1; min-height: 0; resize: none; font-size: 16px; line-height: 1.65; }
.notes-writing .editor-footer { flex: 0 0 auto; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.notes-writing #note-content:focus { outline: none; }

body:has(.notes-workspace) { display: flex; flex-direction: column; height: 100dvh; }
body:has(.notes-workspace) > .sidebar { flex-shrink: 0; }
.workspace:has(.notes-workspace) { display: flex; flex: 1; flex-direction: column; min-height: 0; }
main:has(> .notes-workspace) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  container-type: inline-size;
  width: 100%;
  max-width: none;
  padding: 0;
}
.notes-workspace { flex: 1; min-height: 0; }
.notes-workspace .notes-pane { padding: 16px; }
.notes-workspace .notes-pane { height: 100%; min-height: 0; min-width: 0; overflow: auto; }
.notes-workspace .notes-editor-pane { display: flex; flex-direction: column; }
.notes-workspace .notes-toolbar { flex: 0 0 auto; }
.notes-workspace .notes-pane > .actions { margin-bottom: 6px; gap: 6px; }
.notes-workspace #new-folder { margin-top: 4px; border-color: transparent; }
.notes-workspace .notes-row[aria-pressed="true"] { background: var(--selected); }

@container (width < 520px) {
  .notes-workspace[data-pane="folders"] > .notes-pane:not(.notes-folders),
  .notes-workspace[data-pane="list"] > .notes-pane:not(.notes-list-pane),
  .notes-workspace[data-pane="editor"] > .notes-pane:not(.notes-editor-pane) { display: none; }
}

@container (520px <= width < 750px) {
  .notes-workspace {
    display: grid;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
  }
  .notes-workspace[data-pane="editor"] > .notes-folders,
  .notes-workspace:not([data-pane="editor"]) > .notes-editor-pane { display: none; }
  .notes-workspace .notes-pane + .notes-pane { padding-left: 16px; border-left: 1px solid var(--line); }
  .notes-workspace h1 { font-size: 24px; overflow-wrap: anywhere; }
  .notes-workspace .notes-row { padding-inline: 8px; flex-wrap: wrap; }
}

@container (width >= 750px) {
  .notes-workspace {
    display: grid;
    grid-template-columns: clamp(145px, 16cqw, 185px) clamp(165px, 19cqw, 220px) minmax(0, 1fr);
    background: var(--panel);
  }
  .notes-workspace .notes-pane { padding: clamp(14px, 2cqw, 26px); }
  .notes-workspace :is(.notes-folders, .notes-list-pane) { padding-inline: 12px; }
  .notes-workspace .notes-pane + .notes-pane { border-left: 1px solid var(--line); }
  .notes-workspace .notes-editor-pane { background: var(--bg); }
  .notes-workspace h1 { margin-top: 0; font-size: 23px; overflow-wrap: anywhere; }
  .notes-workspace #back-to-folders { display: none; }
  .notes-workspace .notes-rows { border: 0; border-radius: 8px; }
  .notes-workspace .notes-row { padding-inline: 8px; flex-wrap: wrap; }
}

main:has(> .drive-browser) { container-type: inline-size; max-width: none; padding: 0; }
.drive-browser {
  display: grid;
  grid-template-columns: clamp(130px, 19cqw, 188px) minmax(0, 1fr);
  min-height: 100dvh;
}
.drive-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.drive-rail h1 { font-size: 22px; margin: 0; }
.drive-new { position: relative; align-self: flex-start; }
.drive-new summary {
  cursor: pointer;
  list-style: none;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
}
.drive-new summary:hover { color: var(--text); }
.drive-new summary::-webkit-details-marker { display: none; }
.drive-new-options {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  left: 0;
  width: min(204px, 60vw);
  padding: 4px 0;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px #0006;
}
.drive-new-options button {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 11px;
  border: 0;
  border-radius: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
}
.drive-new-options button:hover { background: var(--hover); }
.drive-new-options hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); margin: 4px 0; }
.drive-new-options .nav-icon { color: var(--accent); }
.drive-folder-label { padding: 10px 8px 2px; color: var(--muted); font-size: 11px; }
.drive-star { color: var(--accent); }
.drive-folders { display: grid; gap: 4px; }
.drive-folder {
  justify-content: flex-start;
  text-align: left;
  overflow-wrap: anywhere;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  padding-inline-start: calc(8px + var(--folder-indent, 0px));
  font-size: 13px;
  font-weight: 400;
}
.drive-folder:hover { background: var(--panel); }
.drive-folder[aria-pressed="true"] { background: var(--selected); color: var(--text); }
.drive-storage { margin-top: auto; display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.drive-storage-label { display: flex; align-items: center; gap: 8px; color: var(--text); }
.drive-storage meter {
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  margin: 5px 0 3px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}
.drive-storage meter::-webkit-meter-bar { height: 4px; border: 0; border-radius: 999px; background: var(--line); }
.drive-storage meter::-webkit-meter-optimum-value { border-radius: 999px; background: var(--accent); }
.drive-storage meter::-moz-meter-bar { border-radius: 999px; background: var(--accent); }
.drive-content { min-width: 0; padding: 20px clamp(14px, 2.5vw, 32px); }
.drive-toolbar { display: flex; align-items: center; gap: 10px; }
.drive-toolbar #file-search { max-width: 580px; border-radius: 20px; padding-inline: 16px; }
.drive-toolbar #folder-filter { display: none; }
.drive-content h2 { margin: 24px 0 10px; overflow-wrap: anywhere; }
.drive-table { border: 0; border-radius: 0; }
.drive-table th, .drive-table td { padding: 11px 10px; }
.drive-table td { font-size: 13px; }
.drive-table tbody tr:hover { background: var(--panel); }
.drive-name { min-width: 135px; overflow-wrap: anywhere; }
.drive-name svg { color: var(--accent); margin-right: 8px; vertical-align: middle; }
@container (width < 550px) {
  .drive-browser { grid-template-columns: minmax(0, 1fr); }
  .drive-rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .drive-folders { display: none; }
  .drive-storage { margin: 0 0 0 auto; }
  .drive-toolbar #folder-filter { display: block; width: min(42%, 180px); }
}

.drive-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-width: 830px;
  padding: 3px 6px 3px 14px;
  border-radius: 28px;
  background: var(--panel);
  color: var(--muted);
}
.drive-search:focus-within { box-shadow: 0 0 0 1px var(--accent); }
.drive-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.drive-toolbar .drive-search #file-search {
  min-width: 0;
  max-width: none;
  padding: 8px 0;
  background: transparent;
  border: 0;
  outline: 0;
}
#drive-search-options {
  flex: none;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px;
  border-radius: 50%;
}
#drive-search-options:hover, #drive-search-options.filters-active { color: var(--accent); background: var(--selected); }
#drive-advanced { width: min(680px, calc(100% - 24px)); }
#drive-filters label {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--text);
}
#drive-filters input, #drive-filters select { margin: 0; min-width: 0; }
#drive-filters small { display: block; color: var(--muted); margin-top: 5px; }
.drive-filter-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.drive-rail,
.notes-workspace .notes-folders,
.notes-workspace .notes-list-pane {
  background: linear-gradient(165deg, var(--rail) 0%, var(--bg) 52%, var(--input) 100%);
}
.notes-workspace .notes-editor-pane { background: var(--bg); }

/* Keep navigation dividers close to the surrounding dark surfaces. */
.sidebar,
.sidebar .brand,
.drive-rail,
.notes-workspace .notes-pane + .notes-pane,
.notes-workspace .notes-rows,
.notes-workspace .notes-rows li + li {
  border-color: color-mix(in srgb, var(--line) 55%, transparent);
  border-width: .5px;
}
.sidebar nav a.active { border-color: color-mix(in srgb, var(--line) 70%, transparent); }

:is(#folder-context, #note-context) {
  position: fixed;
  inset: auto;
  margin: 0;
  min-width: 150px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px #0006;
}
:is(#folder-context, #note-context) button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 7px 9px;
  border: 0;
  font-size: 13px;
  font-weight: 400;
}
:is(#folder-context, #note-context) button:hover { background: var(--hover); }

.notes-row.note-drop-target {
  outline: 1px solid var(--notes-accent);
  outline-offset: -2px;
  background: var(--selected);
}
#notes-move-dialog { width: min(410px, 94vw); }
#notes-move-dialog select { margin-top: 6px; }
#notes-move-dialog .actions { justify-content: flex-end; }

.drive-content,
.notes-workspace .notes-editor-pane {
  background-image: var(--corner-artwork);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: min(78%, 590px) auto;
}
.drive-content { --corner-artwork: url('/drive-artwork.svg'); }
.notes-workspace .notes-editor-pane { --corner-artwork: url('/notes-artwork.svg'); }

#new-folder-dialog { width: min(410px, calc(100% - 32px)); padding: 24px; border-radius: 16px; }
#new-folder-heading { margin: 0 0 16px; }
#new-folder-dialog .quiet { border-color: transparent; color: var(--accent); }
#new-folder-error { margin: 8px 0 0; color: var(--negative); font-size: 13px; }

.drive-folder-grid:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 8px;
  margin: 0 0 16px;
}
.drive-folder-grid button { justify-content: flex-start; text-align: left; padding: 8px 10px; color: var(--text); }
.drive-folder-grid button:hover { background: var(--panel); }
.drive-folder-grid button span { overflow-wrap: anywhere; min-width: 0; }
.drive-folder-grid svg { color: var(--accent); }

.drive-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 10px;
}
.drive-list-heading h2 { margin: 0; min-width: 0; }
.drive-view-controls, .drive-layout-toggle { display: flex; align-items: center; gap: 6px; }
#drive-sort { width: auto; padding: 5px 8px; font-size: 12px; }
.drive-layout-toggle { gap: 0; border: 1px solid var(--line); border-radius: 999px; }
.drive-layout-toggle button { width: 36px; height: 28px; padding: 0; border: 0; border-radius: 999px; }
.drive-layout-toggle button[aria-pressed="true"] { background: var(--selected); color: var(--text); }
.drive-folder-row .drive-name button { border: 0; padding: 0; font-weight: 400; color: var(--text); text-align: left; }
.drive-folder-row .drive-name svg { margin: 0; }
.drive-table[data-layout="grid"] table { display: block; }
.drive-table[data-layout="grid"] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.drive-table[data-layout="grid"] tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}
.drive-table[data-layout="grid"] tr { display: grid; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.drive-table[data-layout="grid"] td { padding: 4px; border: 0; }
.drive-table[data-layout="grid"] .drive-folder-row td:not(:first-child):not(.drive-actions-cell) { display: none; }
.drive-table[data-layout="grid"] .drive-folder-row .drive-name button { width: 100%; justify-content: flex-start; }
.drive-table[data-layout="grid"] tr:has(.empty) { grid-column: 1 / -1; border: 0; background: transparent; }

/* Drive typography and icons */
.drive-browser { font-size: 16.8px; }
.drive-rail h1 { font-size: 26.4px; }
.drive-list-heading h2 { font-size: 24px; }
.drive-folder, .drive-new-options button, .drive-table td, #drive-filters label { font-size: 15.6px; }
.drive-new summary, .drive-storage, #drive-sort { font-size: 14.4px; }
.drive-folder-label { font-size: 13.2px; }
.drive-table th { font-size: 12px; }
.drive-table td :is(button, .button) { font-size: 13.2px; }
.drive-table .drive-folder-row button { font-size: inherit; }
.drive-browser :is(.nav-icon, .drive-search svg, .drive-name > svg) { width: 23px; height: 23px; }

.drive-browser .drive-layout-toggle .nav-icon { width: 17px; height: 17px; }

/* Compact file actions, shared by list and grid layouts. */
.drive-actions-cell { width: 42px; text-align: right; white-space: nowrap; }
.drive-actions-cell :is(.drive-starred, .drive-more) { width: 32px; height: 32px; vertical-align: middle; padding: 0; border: 0; border-radius: 50%; }
.drive-starred { color: var(--accent); }
.drive-browser .drive-starred > .nav-icon { width: 16px; height: 16px; fill: currentColor; }
.drive-more:hover, .drive-more[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.drive-starred:hover { background: var(--hover); }
.drive-table[data-layout="grid"] tr { position: relative; }
.drive-table[data-layout="grid"] .drive-name { padding-right: 34px; }
.drive-table[data-layout="grid"] tr:has(.drive-starred) .drive-name { padding-right: 66px; }
.drive-table[data-layout="grid"] .drive-actions-cell { position: absolute; right: 8px; top: 8px; width: auto; }
#drive-item-menu {
  position: fixed; inset: auto; margin: 0; min-width: 190px; max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px); overflow-y: auto; padding: 5px;
  border: .5px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 10px;
  background: var(--panel); color: var(--text); box-shadow: 0 10px 30px #0007;
}
#drive-item-menu :is(button, a) {
  display: flex; align-items: center; justify-content: flex-start; width: 100%; padding: 9px 12px;
  border: 0; border-radius: 5px; background: transparent; color: inherit;
  font: inherit; font-size: 14px; font-weight: 400; text-decoration: none; text-align: left;
}
#drive-item-menu :is(button, a):is(:hover, :focus-visible) { background: var(--hover); outline: none; }
#drive-item-menu .danger { color: var(--negative); }
#drive-item-menu hr { margin: 4px 6px; border: 0; border-top: .5px solid color-mix(in srgb, var(--line) 70%, transparent); }
.drive-file-dialog { width: min(430px, calc(100% - 32px)); padding: 24px; border-radius: 16px; }
.drive-file-dialog h2 { margin: 0 0 18px; }
.drive-file-dialog .muted { overflow-wrap: anywhere; }
.drive-file-dialog .quiet { border-color: transparent; }
.drive-dialog-error { color: var(--negative); font-size: 14px; }

#editor.file-workspace { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; }
#file-editor-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.drive-table tr[tabindex] { cursor: default; }
.drive-table tr[tabindex]:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

#new-document-dialog label{display:block;margin:16px 0 7px;color:var(--muted);font-size:13px}#new-document-dialog #document-type-hint{margin:10px 0 0;color:var(--muted);font-size:12px;line-height:1.5}#new-document-dialog select{width:100%;min-height:44px}

/* App rail grows by scrolling, without widening the established shell. */
.sidebar #app-nav{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}.sidebar #app-nav::-webkit-scrollbar{display:none}.sidebar #app-nav a{flex:none}.sidebar .brand,.sidebar-bottom{flex-shrink:0}.sidebar #app-nav span{white-space:nowrap}.utility-main{padding:0;max-width:none}@media(max-width:620px){.sidebar #app-nav{overflow-x:auto;overflow-y:hidden;flex-direction:row}}

#sign-out { gap: 8px; color: var(--muted); }
#sign-out[hidden], .rail-collapsed #sign-out > span { display: none; }
@media (max-width:620px) {
  #sign-out { position: absolute; top: 15px; right: 58px; width: auto; margin: 0; }
  #sign-out > span { display: none; }
}

.theme-settings { max-width: 960px; margin: 0 auto; }
.settings-nav { flex-direction: row; margin: 12px 0 24px; border-bottom: 1px solid var(--line); }
.settings-nav a[aria-current] { border-bottom: 2px solid var(--accent); border-radius: 0; color: var(--text); padding-inline: 4px; }
.theme-section { margin-top: 24px; }
.theme-section h2 { margin-bottom: 5px; }
.theme-section p { margin-top: 0; color: var(--muted); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.theme-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  align-content: start;
  gap: 5px;
  padding: 12px;
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  text-align: left;
}
.theme-option[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-option small { color: var(--muted); font-weight: 400; }
.theme-swatch { display: flex; width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--swatch-bg); }
.theme-swatch i { width: 23%; background: var(--swatch-rail); }
.theme-swatch b { position: relative; flex: 1; margin: 7px; border-radius: 3px; background: var(--swatch-panel); }
.theme-swatch b::before { content: ""; position: absolute; left: 6px; top: 5px; width: 24%; height: 3px; background: var(--swatch-accent); border-radius: 3px; }
.theme-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 8px 16px; }
.theme-app-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(118px, 1.15fr); align-items: center; gap: 8px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.theme-app-row select { min-width: 0; }
.theme-status { min-height: 1.6em; color: var(--muted); }

main.embedded { position: relative; }
.app-frame[data-theme-pending] { visibility: hidden; }
.theme-frame-status { position: absolute; top: 24px; inset-inline: 24px; text-align: center; color: var(--muted); }

.sidebar:is([data-neuron-theme="graphite"], [data-neuron-theme="paper-ink"]) .brand {
  --brand-mid: var(--brand-end);
  --brand-spark: var(--brand-end);
}
.theme-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.theme-filters input { flex: 1 1 160px; min-width: 0; }
.theme-filters select { width: auto; }
.theme-grid { max-height: min(46vh, 420px); overflow: auto; padding: 2px 4px 5px 2px; }
.theme-card { position: relative; display: grid; min-width: 0; }
.theme-card:has(.theme-edit-button) .theme-option { padding-bottom: 43px; }
.theme-edit-button { position: absolute; bottom: 8px; right: 8px; padding: 4px 10px; font-size: 12px; }
.theme-gallery-empty { grid-column: 1 / -1; }
.theme-status { margin: 6px 0 0; }
dialog.theme-editor { width: min(520px, 94vw); max-height: 92dvh; }
.theme-editor h2 { margin: 0 0 12px; }
.theme-editor label { margin: 4px 0 6px; }
.theme-editor-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 16px 0; }
.theme-editor-colors input { display: block; height: 34px; padding: 3px; cursor: pointer; }
.theme-editor-preview { display: grid; gap: 8px; padding: 12px; border-radius: 8px; background: var(--preview-bg); color: var(--preview-text); }
.theme-editor-preview > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.theme-editor-preview > div:first-child { justify-content: flex-start; }
.theme-editor-preview > div:last-child { padding: 8px; border-radius: 6px; background: var(--preview-panel); }
.theme-editor-preview i { width: 24px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--preview-logo-start), var(--preview-logo-end)); }
.theme-preview-button { padding: 5px 9px; border-radius: 5px; background: var(--preview-accent); color: var(--preview-on-accent); }
.theme-editor-warning, .theme-editor-error { margin: 8px 0; color: var(--negative); font-size: 13px; }
.theme-editor-warning:empty, .theme-editor-error:empty { display: none; }
.theme-editor-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

:root[data-neuron-theme="oled"] {
  --oled-action: linear-gradient(115deg, #ff55ae, #a976ff 47%, #53edff);
}
:root[data-neuron-theme="oled"] main :is(.drive-new > summary, #chat-send) {
  background: var(--oled-action);
  color: #171022;
  font-weight: 700;
}
:root[data-neuron-theme="oled"] main .drive-new > summary { padding: 7px 14px; }

.hidden-lock-icon { flex: none; vertical-align: middle; color: var(--accent); }
[data-hidden-sensitive][hidden] { display: none !important; }
.hidden-locked-screen { padding: 32px; }

:root[data-neuron-theme="oled"] main #new-note {
  background: transparent;
  color: var(--accent);
}
:root[data-neuron-theme="oled"] main #new-note:hover {
  background: transparent;
  color: var(--link);
}
