:root {
    color-scheme: dark;
    --bg: #171b1d;
    --side: #101517;
    --panel: #202729;
    --line: #344043;
    --text: #edf2f1;
    --muted: #a4b2b2;
    --accent: #79e1c9;
    --accent-dark: #214c45;
    --danger: #ff9c9c;
    --warning: #e9c47c;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button,input,select,textarea { font: inherit; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { font-family: Manrope, Inter, system-ui, sans-serif; letter-spacing: -.025em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .45em; font-weight: 720; }
h2 { font-size: 1.35rem; margin-bottom: .65em; }
h3 { font-size: 1.1rem; }
small,.muted { color: var(--muted); }
small { font-size: .83rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 20; background: var(--panel); padding: 8px; }
.skip:focus { top: 12px; }
.accent { color: var(--accent); }
.warn-text { color: var(--warning); }
.eyebrow { font-size: .72rem; font-weight: 700; color: var(--accent); letter-spacing: .13em; margin-bottom: 12px; text-transform: uppercase; }
.lead { color: #c4d2d0; font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 760px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 1.1rem; font-weight: 700; }
.brand small { display: block; font-size: .7rem; font-weight: 400; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #579e91; background: #23544c; border-radius: 12px; color: #aef9df; font-weight: 850; flex: none; }
.public { background: radial-gradient(ellipse at 50% 0%,#25413f 0%,#171d1f 55%,#101719 100%); }
.public-header { max-width: 1240px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 32px; }
.public-header nav { display: flex; flex-wrap: wrap; gap: 24px; }
.public-header nav a { color: var(--muted); font-size: .9rem; }
.public .content { max-width: 1240px; margin: auto; padding: 20px 32px 60px; }
.public-hero { text-align: center; max-width: 960px; margin: 18px auto 24px; padding: 66px 24px 54px; border-radius: 30px; border: 1px solid #3d6460; background: radial-gradient(ellipse at 80% 0%,#2f6457 0%,transparent 68%), linear-gradient(130deg,#1b3435,#182728); }
.public-hero h1 { font-size: clamp(2.65rem,7vw,5.6rem); line-height: 1.04; font-weight: 850; letter-spacing: -.07em; }
.public-hero .lead { margin: 15px auto 0; }
.api-hero h1 { font-size: clamp(2rem,5.2vw,4rem); letter-spacing: -.045em; }
.api-hero .button { margin-top: 24px; }
.public-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 960px; margin: auto; gap: 16px; }
.public-grid .panel { padding: 28px; border-radius: 22px; background: #20302f; }
.public-grid p { color: var(--muted); }
.terminal { background: #0f1b1c; border: 1px solid #375752; border-radius: 18px; padding: 24px; margin: 26px auto; max-width: 560px; text-align: left; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.workspace .sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; overflow-y: auto; padding: 22px 14px; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar .brand { margin: 0 8px 28px; }
.nav-label { font-size: .67rem; font-weight: 700; letter-spacing: .12em; color: #879897; margin: 14px 10px 7px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { color: #c6d0cf; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: .92rem; }
.side-nav a span { width: 20px; color: #9dbbb5; text-align: center; font-size: 1.05rem; }
.side-nav a:hover,.side-nav .current { background: #263332; color: var(--text); text-decoration: none; }
.side-nav .current { box-shadow: inset 3px 0 var(--accent); }
.side-bottom { margin-top: auto; padding: 24px 10px 0; }
.side-bottom .button { width: 100%; justify-content: flex-start; margin-top: 10px; }
.workspace .sidebar + .content { margin-left: 244px; padding: 34px clamp(18px,3vw,48px) 65px; max-width: 1560px; }
.workspace .public-header + .content { max-width: 1000px; margin: 0 auto; padding: 20px 24px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
.page-head p:last-child { margin-bottom: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 16px; min-width: 0; }
.panel.compact { padding: 15px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(230px,100%),1fr)); gap: 14px; }
.tile-grid .panel { margin-bottom: 0; }
.tile { position: relative; display: block; color: var(--text); padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; transition: background .15s,border-color .15s; }
.tile:hover { text-decoration: none; background: #293735; border-color: #628b83; }
.tile-icon { display: grid; place-items: center; background: #293f3d; color: var(--accent); width: 43px; height: 43px; border-radius: 13px; font-size: 1.4rem; margin-bottom: 17px; }
.tile h2 { font-size: 1.2rem; margin-bottom: .4em; }
.tile p { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.tile .arrow { position: absolute; top: 24px; right: 24px; color: var(--muted); }
.status { display: inline-flex; align-items: center; border: 1px solid #49625c; color: #aad9ca; padding: 3px 9px; border-radius: 100px; font-size: .73rem; white-space: nowrap; }
.status.disabled { color: var(--warning); border-color: #665637; }
.status.public { color: #d2d8d6; border-color: #52605f; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; gap: 6px; border-radius: 9px; background: #303b3c; border: 1px solid #465655; color: var(--text); font-weight: 600; cursor: pointer; font-size: .9rem; text-decoration: none; }
.button:hover { background: #3d4f4c; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #102b26; }
.button.primary:hover { background: #a3f1de; }
.button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button.small { padding: 6px 10px; font-size: .8rem; }
.button.danger { color: var(--danger); background: #38292a; border-color: #684243; }
button:disabled { opacity: .5; cursor: not-allowed; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .84rem; }
input:not([type=checkbox]),textarea,select { width: 100%; min-width: 0; color: var(--text); background: #151b1c; border: 1px solid #465455; border-radius: 9px; padding: 10px 12px; }
input::placeholder,textarea::placeholder { color: #7f8e8c; }
textarea { min-height: 170px; resize: vertical; }
input[type=file] { padding: 7px; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }
.stack { display: grid; gap: 13px; }
.stack > button { justify-self: start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.narrow { max-width: 680px; }
.login-panel { max-width: 430px; margin: 40px auto; padding: 30px; }
.login-panel .button { width: 100%; }
.notice { border: 1px solid #4c605a; background: #263b35; color: #d0e6da; padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; }
.notice.error { border-color: #744d4d; color: #ffb8b8; background: #36282a; }
.error-panel { max-width: 700px; margin: 30px auto; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(180px,100%),1fr)); gap: 12px; margin-bottom: 16px; }
.metric { margin: 0; display: grid; gap: 8px; align-content: start; }
.metric strong { font-size: clamp(1.5rem,3vw,2rem); font-variant-numeric: tabular-nums; line-height: 1.2; }
progress { width: 100%; height: 8px; border: 0; border-radius: 10px; background: #121a1b; accent-color: #79cfb8; }
progress::-webkit-progress-bar { background: #121a1b; border-radius: 10px; }
progress::-webkit-progress-value { background: #79cfb8; border-radius: 10px; }
progress::-moz-progress-bar { background: #79cfb8; border-radius: 10px; }
.mount-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 12px; }
.mount-grid > div { padding: 12px; border-radius: 9px; background: #172122; }
.mount-grid small { display: block; margin: 5px 0 0 15px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #d2aa62; flex: none; }
.dot.on { background: #73ddae; }
.toggles,.filter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(220px,100%),1fr)); gap: 12px; }
.switch { display: flex; align-items: center; gap: 9px; padding: 8px 0; color: var(--text); }
.setting-detail { border-top: 1px solid var(--line); }
.setting-detail summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; list-style: none; }
.setting-detail summary::before { content: '›'; color: var(--muted); }
.setting-detail[open] summary::before { content: '⌄'; }
.setting-detail summary > span:first-of-type { flex: 1; }
.setting-detail small,.setting-row small { display: block; }
.settings-form { padding: 12px 16px 20px; border-left: 2px solid #477e72; margin-bottom: 12px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 15px 0; overflow-wrap: anywhere; }
.setting-row:last-child { border-bottom: none; }
.storage-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { display: flex; align-items: center; background: #242d2f; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); padding: 10px 13px; }
.tab.active { border-color: #6caf9e; color: var(--text); background: #29413d; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.toolbar input[type=search] { max-width: 235px; margin-left: auto; }
.path { color: var(--muted); flex: 1; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .85rem; }
.operation-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(250px,100%),1fr)); gap: 12px; }
.operation-grid form { display: grid; gap: 10px; align-content: start; }
.file-list { padding: 0; }
.file-heading,.file-row { display: grid; grid-template-columns: minmax(140px,2fr) minmax(60px,.5fr) minmax(160px,1.3fr); gap: 10px; align-items: start; padding: 14px 18px; }
.file-heading { color: var(--muted); font-size: .8rem; }
.file-row { border-top: 1px solid var(--line); }
.file-name { display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; }
.file-glyph { font-size: 1.2rem; color: var(--accent); }
.inline-details { min-width: 0; }
.inline-details summary { cursor: pointer; color: var(--accent); font-size: .82rem; padding: 7px 5px; }
.small-form { background: #151d1e; padding: 12px; border: 1px solid var(--line); border-radius: 9px; margin: 8px 0; min-width: min(220px,100%); }
.empty { padding: 16px; }
.notes-workspace { display: grid; grid-template-columns: minmax(200px,260px) minmax(0,1fr); gap: 14px; align-items: start; }
.note-tree { padding: 15px; }
.note-tree > * { margin-bottom: 10px; }
.note-list { display: grid; gap: 3px; }
.note-item { display: flex; gap: 5px; align-items: start; flex-wrap: wrap; padding: 8px; border-radius: 8px; }
.note-item > a { flex: 1; color: #d4e1df; overflow-wrap: anywhere; }
.note-item.selected,.note-item:hover { background: #33423f; }
.editor { min-height: 540px; }
.editor-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: start; }
.editor-header h2 { overflow-wrap: anywhere; }
#note-editor { min-height: 440px; font-family: ui-monospace, "Cascadia Code", monospace; line-height: 1.65; font-size: .94rem; background: #171e20; }
.markdown { overflow-wrap: anywhere; line-height: 1.8; max-width: 800px; }
.markdown h1 { font-size: 2rem; }
.markdown pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #121b1d; padding: 15px; border-radius: 10px; }
.markdown code { font-family: ui-monospace,monospace; color: #b5e4d7; }
.markdown blockquote { border-left: 3px solid #6aa696; margin-left: 0; padding: 4px 15px; color: var(--muted); }
.empty-state { display: grid; min-height: 440px; align-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state > span { font-size: 3rem; color: #57877a; }
.note-share { max-width: 900px; margin: auto; }
.stat-row { margin: 13px 0; }
.stat-row > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .83rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th,td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.vault-list { margin-top: 15px; }
.vault-list .panel { margin: 0; }
.vault-list pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; }
@media (max-width: 920px) {
    .workspace .sidebar { position: static; width: auto; display: block; padding: 15px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar .brand { margin: 0 0 12px; }
    .sidebar .nav-label { display: none; }
    .side-nav { display: flex; flex-wrap: wrap; gap: 3px; }
    .side-nav a { padding: 6px 8px; font-size: .82rem; }
    .side-bottom { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 0; }
    .side-bottom .button { margin: 0; }
    .workspace .sidebar + .content { margin: 0; padding: 24px 15px 50px; }
    .notes-workspace { grid-template-columns: minmax(0,1fr); }
    .editor { min-height: 320px; }
    #note-editor { min-height: 350px; }
}
@media (max-width: 590px) {
    .public-header { padding: 16px; flex-wrap: wrap; gap: 12px; }
    .public-header nav { gap: 13px; }
    .public .content { padding: 10px 12px 40px; }
    .public-hero { padding: 40px 14px; border-radius: 20px; }
    .public-grid { grid-template-columns: 1fr; }
    .page-head,.setting-row { align-items: flex-start; flex-direction: column; }
    .panel { padding: 16px; }
    .file-heading { display: none; }
    .file-row { grid-template-columns: 1fr auto; padding: 12px; }
    .file-row > .row-actions { grid-column: 1/-1; }
    .toolbar input[type=search] { max-width: none; margin-left: 0; }
    .small-form { min-width: 0; }
}

.public-footer { display: flex; justify-content: space-between; gap: 16px; max-width: 960px; margin: 0 auto; padding: 18px 24px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
