:root {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #24313b;
    background: var(--brand-background);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --bg: #f5f7f8;
    --panel: #fff;
    --panel-soft: #f8fafb;
    --line: #e8edef;
    --text: #24313b;
    --muted: #829099;
    --teal: #168f86;
    --teal-dark: #11776f;
    --teal-pale: #e9f6f4;
    --shadow: 0 10px 35px rgba(34, 52, 61, .05);
    --brand-background: linear-gradient(135deg, #0f625c 0%, #168f86 56%, #48aa99 100%);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #11191e;
    --panel: #192329;
    --panel-soft: #202c32;
    --line: #2b393f;
    --text: #e4ecee;
    --muted: #95a5aa;
    --teal: #4dc3b6;
    --teal-dark: #69d1c6;
    --teal-pale: #173936;
    --shadow: 0 10px 35px rgba(0, 0, 0, .18);
    --brand-background: linear-gradient(135deg, #102f30 0%, #124b47 56%, #17655b 100%);
}

* { box-sizing: border-box; }
body { min-width: 360px; min-height: 100vh; margin: 0; color: var(--text); background: var(--brand-background); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); background: var(--brand-background); }
.sidebar { position: sticky; top: 0; width: auto; height: 100vh; display: flex; flex-direction: column; padding: 29px 18px 18px; background: transparent; border-right: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); padding: 0 8px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #37b9aa, #14796f); font: 800 21px Manrope, sans-serif; letter-spacing: -2px; box-shadow: 0 5px 13px rgba(22, 143, 134, .2); }
.brand strong, .brand small { display: block; }
.brand strong { font: 800 15px Manrope, sans-serif; letter-spacing: -.35px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar > .brand, .sidebar > .brand strong { color: #fff; }
.sidebar > .brand small { color: rgba(255, 255, 255, .78); }
.primary-nav { display: grid; gap: 5px; margin: 38px 0 31px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; color: rgba(255, 255, 255, .82); background: transparent; text-align: left; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s ease; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-item.is-active { color: #fff; background: rgba(255, 255, 255, .2); }
.nav-icon { width: 18px; color: inherit; font-size: 17px; text-align: center; }
.nav-item:nth-child(3) .nav-icon { font-size: 12px; font-weight: 700; }
.sidebar-section { flex: 1; min-height: 100px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: rgba(255, 255, 255, .7); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.icon-button { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 19px; }
.sidebar .icon-button { color: rgba(255, 255, 255, .78); }
.sidebar .icon-button:hover { color: #fff; background: rgba(255, 255, 255, .15); }
.icon-button:hover { color: var(--teal-dark); background: var(--teal-pale); }
.collection-list { display: grid; gap: 3px; margin-top: 12px; }
.collection-button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; color: rgba(255, 255, 255, .82); background: transparent; text-align: left; cursor: pointer; font-size: 12px; }
.collection-button:hover, .collection-button.is-active { color: #fff; background: rgba(255, 255, 255, .15); }
.collection-color { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px; background: var(--teal); }
.collection-count { margin-left: auto; color: var(--muted); font-size: 10px; }
.text-button { margin: 9px 8px; padding: 4px 0; border: 0; color: rgba(255, 255, 255, .75); background: transparent; cursor: pointer; font-size: 11px; }
.text-button:hover { color: #fff; }
.sidebar-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 14px; }
.access-card { display: grid; gap: 5px; margin: 0 0 13px; padding: 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 9px; color: #fff; background: rgba(255, 255, 255, .11); text-decoration: none; transition: .15s ease; }
.access-card:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .17); }
.access-card > strong { font-size: 11px; }
.access-card > span { color: rgba(255, 255, 255, .78); font-size: 10px; }
.access-card .access-card-link { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; color: #fff; font-size: 10px; font-weight: 700; }
.privacy-note { display: flex; align-items: center; gap: 8px; padding: 4px 8px 17px; color: rgba(255, 255, 255, .76); font-size: 10px; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #41b78d; box-shadow: 0 0 0 3px rgba(65, 183, 141, .12); }
.account-row { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: rgba(255, 255, 255, .17); font-size: 12px; font-weight: 700; }
.account-name { flex: 1; overflow: hidden; color: #fff; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-row .icon-button { width: 28px; }
.main-area { min-width: 0; background: transparent; }
.topbar { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(22px, 3vw, 42px); color: #fff; background: transparent; }
.topbar .breadcrumbs, .topbar .breadcrumbs strong { color: #fff; }
.topbar .crumb-divider { color: rgba(255, 255, 255, .6); }
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--text); font-weight: 600; }
.crumb-divider { margin: 0 9px; color: #c2cbcf; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.search-box { width: min(310px, 27vw); height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 9px; background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); }
.search-box > span { font-size: 19px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: #fff; background: transparent; font-size: 11px; }
.search-box input::placeholder { color: rgba(255, 255, 255, .7); }
kbd { flex: 0 0 auto; padding: 3px 5px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 4px; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .1); font-size: 9px; }
.button { min-height: 37px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 600; transition: .15s ease; white-space: nowrap; }
.button-primary { color: #fff; background: linear-gradient(125deg, #168f86, #24a99d); box-shadow: 0 4px 11px rgba(8, 70, 65, .2); }
.button-primary:hover { background: #11776f; }
.button-secondary { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); }
.button-secondary:hover { border-color: rgba(255, 255, 255, .55); color: #fff; background: rgba(255, 255, 255, .2); }
.button-wide { width: 100%; min-height: 45px; font-size: 13px; }
.workspace { min-height: calc(100vh - 124px); display: flex; margin: 0 24px 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .5); border-radius: 13px; background: var(--panel); box-shadow: 0 12px 32px rgba(8, 51, 49, .14); }
.library-pane { width: 320px; flex: 0 0 320px; position: relative; padding: 28px 18px; border-right: 1px solid var(--line); background: var(--panel); }
.library-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 20px; }
.eyebrow { margin: 0 0 7px; color: var(--teal-dark); font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.library-heading h1 { margin: 0; font: 700 20px Manrope, sans-serif; letter-spacing: -.6px; }
.filter-row { margin: -6px 0 13px; }
.filter-row select { width: 100%; padding: 8px 10px; }
select, .editor-field input, .editor-field select, .tag-input, .form-control { min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--text); background: var(--panel); font-size: 11px; }
select:focus, input:focus, textarea:focus { border-color: #78bdb6; box-shadow: 0 0 0 3px rgba(22, 143, 134, .09); }
.item-list { display: grid; gap: 7px; }
.item-card { padding: 13px 13px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; transition: .16s ease; }
.item-card:hover { border-color: #c4dedb; box-shadow: var(--shadow); transform: translateY(-1px); }
.item-card.is-selected { border-color: #77bdb5; background: var(--panel); box-shadow: 0 0 0 2px rgba(22, 143, 134, .08); }
.item-card-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.item-card-actions { display: flex; align-items: center; gap: 8px; }
.item-delete-button { padding: 2px 0 2px 5px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }
.item-delete-button:hover, .item-delete-button:focus-visible { color: #b34141; text-decoration: underline; text-underline-offset: 2px; }
.item-type { color: var(--teal-dark); font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
.item-card h3 { overflow: hidden; margin: 0 0 5px; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.item-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.tag-pill { padding: 3px 7px; border-radius: 12px; color: var(--teal-dark); background: var(--teal-pale); font-size: 9px; }
.empty-library { position: absolute; inset: 40% 20px auto; display: grid; justify-items: center; gap: 8px; color: var(--muted); text-align: center; font-size: 11px; }
.empty-library strong { color: var(--text); font-size: 13px; }
.empty-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 5px; border-radius: 13px; color: var(--teal-dark); background: var(--teal-pale); font-size: 19px; }
.editor-pane { min-width: 0; flex: 1; padding: 33px clamp(20px, 4vw, 58px); background: var(--panel); }
.editor-content { width: min(100%, 980px); margin: 0 auto; }
.welcome { min-height: 63vh; display: grid; align-content: center; justify-items: center; color: var(--muted); text-align: center; }
.welcome-mark { width: 66px; height: 66px; display: grid; place-items: center; margin-bottom: 19px; border: 1px solid var(--line); border-radius: 22px; color: var(--teal-dark); background: var(--panel); box-shadow: var(--shadow); font: 700 23px Manrope, sans-serif; }
.welcome h2 { margin: 0 0 8px; color: var(--text); font: 700 23px Manrope, sans-serif; letter-spacing: -.7px; }
.welcome p { max-width: 380px; margin: 0; font-size: 12px; line-height: 1.7; }
.welcome-actions { display: flex; gap: 9px; margin-top: 22px; }
.editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.editor-title { width: 100%; padding: 2px 0 8px; border: 0; border-bottom: 1px solid var(--line); outline: none; color: var(--text); background: transparent; font: 700 25px Manrope, sans-serif; letter-spacing: -.7px; }
.editor-title::placeholder { color: #aab5b8; }
.editor-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.editor-actions .button { min-height: 33px; }
.editor-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.editor-field { display: grid; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .45px; }
.editor-field input, .editor-field select { width: 100%; color: var(--text); font-weight: 400; letter-spacing: 0; }
.tag-field { margin-bottom: 17px; }
.tag-field input { width: 100%; }
.editor-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.segmented button { padding: 6px 9px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; }
.segmented button.is-active { color: var(--teal-dark); background: var(--teal-pale); font-weight: 700; }
.editor-hint { color: var(--muted); font-size: 9px; }
.markdown-workspace { min-height: 420px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.markdown-workspace[data-mode="edit"] { grid-template-columns: 1fr; }
.markdown-workspace[data-mode="edit"] .markdown-preview, .markdown-workspace[data-mode="preview"] .markdown-source { display: none; }
.markdown-workspace[data-mode="preview"] { grid-template-columns: 1fr; }
.markdown-workspace[data-mode="edit"] .markdown-source { border-right: 0; }
.markdown-source { width: 100%; min-height: 420px; resize: vertical; padding: 16px; border: 0; border-right: 1px solid var(--line); outline: none; color: var(--text); background: var(--panel); font: 12px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; }
.markdown-preview { min-width: 0; overflow: auto; padding: 12px 18px; color: var(--text); font-size: 12px; line-height: 1.8; }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4 { margin: 18px 0 8px; font-family: Manrope, sans-serif; line-height: 1.3; }
.markdown-preview h1 { font-size: 22px; }.markdown-preview h2 { font-size: 18px; }.markdown-preview h3 { font-size: 15px; }
.markdown-preview p { margin: 8px 0; }.markdown-preview blockquote { margin: 10px 0; padding: 2px 12px; border-left: 3px solid var(--teal); color: var(--muted); }
.markdown-preview code:not([class]) { padding: 2px 5px; border-radius: 4px; color: var(--teal-dark); background: var(--teal-pale); font: 11px ui-monospace, monospace; }
.markdown-preview pre { overflow: auto; padding: 12px; border-radius: 7px; background: #202b32; }
.markdown-preview pre code { color: #dce7e9; font-size: 11px; }
.markdown-preview a { color: var(--teal-dark); }.markdown-preview ul, .markdown-preview ol { padding-left: 22px; }
.markdown-preview input[type="checkbox"] { accent-color: var(--teal); }
.snippet-editor { display: grid; gap: 12px; }
.snippet-description { width: 100%; min-height: 63px; resize: vertical; }
.code-editor { width: 100%; min-height: 300px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: #202b32; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; }
.code-preview { min-height: 100px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #202b32; }
.code-preview code { font-size: 11px; }
.copy-code { margin-left: auto; }
.today-card { padding: 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.today-date { margin: 0 0 6px; color: var(--teal-dark); font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.today-title { margin: 0 0 7px; font: 700 24px Manrope, sans-serif; letter-spacing: -.7px; }
.today-lede { margin: 0 0 20px; color: var(--muted); font-size: 11px; }
.quick-note { width: 100%; min-height: 390px; padding: 15px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: var(--panel-soft); font: 12px/1.9 ui-monospace, monospace; }
.save-status { min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 10px; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 5; max-width: min(420px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--panel); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; font-size: 11px; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { border-color: #e3b4b4; color: #bd4d4d; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 12% 98%, rgba(72, 170, 153, .38), transparent 45%), var(--brand-background); }
.login-card { width: min(100%, 410px); padding: 36px; border: 1px solid #e8edef; border-radius: 10px; color: #24313b; background: #fff; box-shadow: 0 20px 70px rgba(8, 51, 49, .2); }
.brand-login { padding: 0; margin-bottom: 37px; }.login-card .eyebrow { margin-bottom: 9px; }
.login-card h1 { margin: 0; color: #24313b; font: 800 25px/1.25 Manrope, sans-serif; letter-spacing: -.8px; }
.login-card .muted { color: #829099; font-size: 12px; line-height: 1.6; }
#login-form { display: grid; gap: 8px; margin-top: 24px; }
#login-form label { margin-top: 5px; color: #24313b; font-size: 11px; font-weight: 600; }
#login-form input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #e8edef; border-radius: 7px; outline: none; color: #24313b; background: #f8fafb; font-size: 12px; }
#login-form .button { margin-top: 10px; }
.form-error { min-height: 14px; margin: 3px 0 0; color: #cf5c5c; font-size: 10px; }
.login-footnote { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 10px; line-height: 1.6; }
.login-offer { display: grid; gap: 5px; margin-top: 19px; padding: 13px; border: 1px solid rgba(22, 143, 134, .17); border-radius: 8px; background: var(--teal-pale); }
.login-offer strong { color: var(--teal-dark); font-size: 11px; }
.login-offer > span { color: var(--muted); font-size: 10px; }
.login-offer a, .login-footnote a { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.login-offer a { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10px; }
.login-offer a:hover, .login-footnote a:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-page { min-height: 100vh; padding: 32px 22px; background: radial-gradient(ellipse at 10% 100%, rgba(72, 170, 153, .26), transparent 40%), var(--brand-background); }
.account-shell { width: min(1120px, 100%); margin: 0 auto; }
.account-brand { color: #fff; }
.account-brand strong { color: #fff; }
.account-brand small { color: rgba(255, 255, 255, .78); }
.account-register-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .8fr); gap: clamp(28px, 7vw, 90px); align-items: center; min-height: calc(100vh - 150px); padding: 42px 0; }
.account-story { max-width: 520px; color: #fff; }
.account-story .eyebrow, .account-intro .eyebrow { color: #b2eee4; }
.account-story h1 { margin: 0; font: 700 clamp(32px, 4.5vw, 52px)/1.13 Manrope, sans-serif; letter-spacing: -1.6px; }
.account-story > p:not(.eyebrow) { max-width: 440px; margin: 18px 0 0; color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.8; }
.account-story ul { display: grid; gap: 15px; margin: 31px 0 0; padding: 0; list-style: none; color: rgba(255, 255, 255, .93); font-size: 12px; }
.account-story li { display: flex; align-items: center; gap: 12px; }
.account-story li span { color: #b2eee4; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.account-card { padding: 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 18px 48px rgba(7, 47, 44, .2); }
.account-card h2 { margin: 0; font: 700 24px Manrope, sans-serif; letter-spacing: -.6px; }
.account-card > .muted { margin: 7px 0 0; }
.account-form { display: grid; gap: 13px; margin-top: 22px; }
.account-form label { display: grid; gap: 6px; color: var(--text); font-size: 11px; font-weight: 600; }
.account-form input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--text); background: var(--panel-soft); font-size: 12px; }
.account-form input:focus { border-color: #78bdb6; box-shadow: 0 0 0 3px rgba(22, 143, 134, .09); }
.account-form small { color: var(--muted); font-size: 9px; font-weight: 400; }
.account-form .button { margin-top: 4px; }
.account-switch, .account-footnote { color: var(--muted); text-align: center; font-size: 10px; line-height: 1.6; }
.account-switch { margin: 17px 0 0; }
.account-switch a { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.account-footnote { margin: 13px 0 0; }
.account-selected-plan { margin: 15px 0 0; padding: 9px 11px; border-radius: 7px; color: var(--teal-dark); background: var(--teal-pale); font-size: 10px; font-weight: 700; }
.account-intro { max-width: 670px; margin: 72px auto 27px; color: #fff; text-align: center; }
.account-intro h1 { margin: 0; font: 700 clamp(30px, 4vw, 42px)/1.18 Manrope, sans-serif; letter-spacing: -1.2px; }
.account-intro > p:last-child { max-width: 570px; margin: 12px auto 0; color: rgba(255, 255, 255, .81); font-size: 12px; line-height: 1.7; }
.account-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.account-plan { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 20px 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: 0 12px 30px rgba(7, 47, 44, .13); }
.plan-duration { color: var(--teal-dark); font-size: 9px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.account-plan h2 { margin: 9px 0 0; font: 700 15px Manrope, sans-serif; }
.plan-price { margin: 17px 0 0; font: 800 24px Manrope, sans-serif; letter-spacing: -.8px; }
.plan-caption { min-height: 30px; margin: 5px 0 18px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.account-plan form, .account-plan > a { width: 100%; margin-top: auto; text-decoration: none; }
.account-plan .button { padding: 0 8px; font-size: 10px; }
.account-trial-offer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 18px 0 0; padding: 18px 22px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 9px; color: #fff; background: rgba(255, 255, 255, .1); }
.account-trial-offer strong { font: 700 15px Manrope, sans-serif; }
.account-trial-offer p { margin: 5px 0 0; color: rgba(255, 255, 255, .8); font-size: 11px; }
.account-trial-offer .button { flex: 0 0 auto; text-decoration: none; }
.account-alert { margin: 14px auto; padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 7px; color: #fff; background: rgba(255, 255, 255, .13); font-size: 11px; line-height: 1.5; }
.account-alert-error { border-color: #f0b9b5; color: #913b34; background: #fff0ed; }
.account-alert-success { border-color: #a2d7c4; color: #176a50; background: #eaf8f1; }
.account-shell > .account-footnote { color: rgba(255, 255, 255, .78); }
.account-footer { display: flex; justify-content: center; gap: 9px; padding: 22px 0 0; color: rgba(255, 255, 255, .7); font-size: 10px; }
.account-footer a { color: #fff; text-decoration: none; }
.account-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mobile-only { display: none; }

@media (max-width: 1120px) {
    .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
    .sidebar { width: auto; flex-basis: auto; padding-right: 13px; padding-left: 13px; }
    .library-pane { width: 285px; flex-basis: 285px; }
    .topbar { padding-right: 22px; padding-left: 22px; }
    .editor-pane { padding-right: 24px; padding-left: 24px; }
    .account-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .app-shell { display: block; }
    .sidebar { position: relative; top: auto; width: 100%; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand account" "nav nav"; align-items: center; gap: 0 10px; padding: 12px 18px 0; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
    .sidebar > .brand { grid-area: brand; width: fit-content; padding: 0; }
    .primary-nav { grid-area: nav; width: 100%; display: flex; gap: 3px; overflow-x: auto; margin: 10px 0 0; scrollbar-width: none; }
    .primary-nav::-webkit-scrollbar { display: none; }
    .nav-item { min-height: 40px; width: auto; flex: 0 0 auto; gap: 7px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
    .nav-icon { width: 17px; font-size: 16px; }
    .sidebar-section { display: none; }
    .sidebar-bottom { grid-area: account; display: flex; align-items: center; gap: 8px; border: 0; padding: 0; }
    .privacy-note { display: none; }
    .account-row { gap: 6px; }
    .account-name { max-width: 100px; font-size: 10px; }
    #theme-toggle { display: grid; }
    .main-area { min-height: calc(100vh - 102px); }
    .topbar { min-height: 82px; }
    .library-pane { width: 255px; flex-basis: 255px; padding-right: 13px; padding-left: 13px; }
    .topbar { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
    .topbar-actions { width: 100%; }
    .search-box { width: auto; flex: 1; }
    .topbar-actions > .button { font-size: 0; }.topbar-actions > .button span { font-size: 15px; }
    .account-register-layout { grid-template-columns: 1fr minmax(340px, .9fr); gap: 24px; }
    .account-story h1 { font-size: 36px; }
}
@media (max-width: 620px) {
    body { min-width: 320px; }
    .sidebar { padding: 10px 10px 0; }
    .brand-mark { width: 34px; height: 34px; }
    .brand strong { font-size: 13px; }
    .brand small { font-size: 9px; }
    .primary-nav { margin-top: 8px; }
    .nav-item { padding: 0 8px; }
    .account-name, #theme-toggle { display: none; }
    .account-row { gap: 2px; }.account-row .icon-button { width: 25px; }
    .main-area { min-height: calc(100vh - 95px); }
    .workspace { min-height: calc(100vh - 185px); flex-direction: column; margin: 0 10px 10px; border-radius: 10px; }
    .topbar { min-height: 74px; padding: 8px 12px; }
    .topbar-actions { gap: 6px; }
    .search-box { height: 35px; }.search-box kbd { display: none; }
    .topbar-actions > #new-note { display: none; }
    .topbar-actions > #new-snippet { min-width: 37px; padding: 0 9px; }
    .library-pane { width: 100%; flex: 0 0 auto; padding: 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
    .library-heading { margin-bottom: 12px; }.library-heading h1 { font-size: 17px; }
    .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .item-card { padding: 10px; }.item-card p { -webkit-line-clamp: 1; }
    .empty-library { position: static; padding: 18px 0 8px; }
    .editor-pane { padding: 22px 13px 35px; }
    .editor-header { gap: 8px; }.editor-title { font-size: 20px; }
    .editor-actions .button { padding: 0 8px; font-size: 10px; }
    .editor-meta { grid-template-columns: 1fr 1fr; gap: 7px; }
    .markdown-workspace { min-height: 0; display: flex; flex-direction: column; }
    .markdown-source { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
    .markdown-preview { min-height: 230px; }
    .mobile-only { display: block; }
    .welcome { min-height: 35vh; }.welcome h2 { font-size: 20px; }
    .today-card { padding: 17px; }.quick-note { min-height: 300px; }
    .account-page { padding: 18px 14px; }
    .account-brand { padding: 0 2px; }
    .account-register-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 28px 0 12px; }
    .account-story h1 { font-size: 30px; }
    .account-story > p:not(.eyebrow) { font-size: 12px; }
    .account-story ul { gap: 9px; margin-top: 17px; font-size: 10px; }
    .account-card { padding: 22px 18px; }
    .account-intro { margin: 43px auto 21px; }
    .account-intro h1 { font-size: 30px; }
    .account-plans { gap: 9px; }
    .account-trial-offer { flex-direction: column; align-items: stretch; gap: 13px; padding: 16px; }
    .account-trial-offer strong { font-size: 13px; }
    .account-plan { padding: 15px 12px; }
    .account-plan h2 { font-size: 13px; }
    .plan-price { font-size: 20px; }
    .account-plan .button { min-height: 39px; font-size: 9px; }
}
