@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap');

:root { color-scheme: dark; --ink: #e8ebe5; --muted: #89938e; --line: #29332f; --panel: #101815; --panel-2: #131d19; --canvas: #0a100e; --accent: #b9d88a; --accent-dark: #26351d; --yellow: #e7c66f; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 700px; height: 100vh; overflow: hidden; color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; background: var(--canvas); }
button, input { font: inherit; } button { cursor: pointer; } 
.toolbar { height: 62px; display: flex; align-items: center; gap: 28px; padding: 0 20px 0 24px; background: #111a17; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-family: Newsreader, Georgia, serif; font-weight: 600; font-size: 23px; letter-spacing: -.7px; white-space: nowrap; }.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border: 1px solid #6a7c56; border-radius: 8px; color: var(--accent); font-family: 'DM Mono', monospace; font-size: 15px; }.brand sup { font-family: 'DM Sans', sans-serif; font-size: .46em; margin-left: 1px; }
.document-meta { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }.document-meta input { width: min(280px, 26vw); padding: 6px 8px; color: #e4e8e0; font-size: 14px; font-weight: 500; background: transparent; border: 1px solid transparent; border-radius: 6px; outline: none; }.document-meta input:hover, .document-meta input:focus { background: #18221d; border-color: #36433b; }.save-state { color: var(--muted); font-size: 12px; white-space: nowrap; }
.toolbar-actions { display: flex; align-items: center; gap: 3px; }.tool-button, .icon-button, .chip, .add-line, .graph-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #c8d0c8; border: 1px solid transparent; background: transparent; border-radius: 7px; transition: .16s ease; }.tool-button { height: 34px; padding: 0 9px; font-size: 12px; }.tool-button:hover, .icon-button:hover { color: white; background: #202b25; }.tool-button svg, .icon-button svg { width: 15px; height: 15px; }.icon-button { width: 34px; height: 34px; }.toolbar-rule { height: 22px; border-left: 1px solid #344039; margin: 0 6px; }
.app-shell { height: calc(100vh - 62px); display: grid; grid-template-columns: minmax(390px, 1.65fr) 8px minmax(300px, 1fr); }.workspace-pane, .graph-pane { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }.workspace-pane { background: radial-gradient(circle at 82% 2%, #17221d 0, transparent 34%), var(--panel); }.graph-pane { background: #0d1411; }.divider { position: relative; z-index: 2; cursor: col-resize; background: #1b2621; transition: background .15s; }.divider:hover, .divider.dragging { background: #91ad67; }.divider span { position: absolute; top: 50%; left: 2px; width: 5px; height: 32px; transform: translateY(-50%); border-radius: 4px; background: #455149; }.divider:hover span { background: #182016; }
.pane-heading { min-height: 88px; display: flex; align-items: center; justify-content: space-between; padding: 23px 25px 17px 30px; border-bottom: 1px solid rgba(61, 73, 67, .55); }.eyebrow { margin: 0 0 3px; color: #829872; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.25px; font-weight: 500; }.pane-heading h1, .pane-heading h2 { margin: 0; color: #eff1ed; font-family: Newsreader, Georgia, serif; font-size: 25px; line-height: 1; letter-spacing: -.55px; font-weight: 500; }.graph-heading { padding-left: 25px; }.graph-heading h2 { color: #dce3d9; }
.graph-button { padding: 8px 11px; color: #dcebc7; border-color: #455a35; background: #202d1c; font-size: 12px; font-weight: 600; }.graph-button:hover { background: #2e4026; border-color: #789358; }.graph-button svg { width: 15px; height: 15px; }.desmos-status { display: flex; align-items: center; gap: 7px; color: #9aa89e; font-size: 12px; }.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a8d377; box-shadow: 0 0 0 3px rgba(168, 211, 119, .1); }
.workspace-toolbar { display: flex; align-items: center; gap: 7px; padding: 12px 25px 11px 30px; border-bottom: 1px solid rgba(61, 73, 67, .45); }.chip { height: 29px; padding: 0 9px; color: #abb7ae; border-color: #35423b; background: #17211c; font-family: 'DM Mono', monospace; font-size: 11px; }.chip:hover, .chip.active { color: #dceabf; border-color: #5e7746; background: #25321f; }.chip svg { width: 13px; height: 13px; }.workspace-toolbar-spacer { flex: 1; }.add-line { padding: 6px 0 6px 8px; color: #a7bd8b; font-size: 12px; }.add-line:hover { color: #d5edb6; }.add-line svg { width: 14px; }
.editor-scroll { flex: 1; overflow-y: auto; padding: 26px 42px 24px 30px; }.math-editor { max-width: 720px; margin: 0 auto; }.equation-block { position: relative; display: flex; align-items: center; gap: 12px; min-height: 54px; margin-bottom: 8px; padding: 7px 7px 7px 0; border: 1px solid transparent; border-radius: 8px; transition: .14s ease; }.equation-block:hover, .equation-block.selected { background: rgba(188, 217, 139, .035); border-color: #303c34; }.equation-block.selected { border-color: #5c7448; box-shadow: 0 0 0 1px rgba(121, 154, 90, .09); }.line-number { width: 27px; color: #536056; font-family: 'DM Mono', monospace; font-size: 11px; text-align: center; user-select: none; }.equation-block math-field { flex: 1; min-width: 0; padding: 8px 10px; color: #edf2e9; background: #0d1411; border: 1px solid #2c3932; border-radius: 5px; font-size: 23px; --caret-color: #d4ebaf; --selection-background-color: #3c5130; --contains-highlight-background-color: #293c20; --placeholder-color: #68736c; }.equation-block math-field:focus-within { border-color: #769554; box-shadow: 0 0 0 3px rgba(137, 174, 100, .12); outline: 0; }.remove-line { opacity: 0; width: 25px; height: 25px; color: #77817a; }.equation-block:hover .remove-line, .equation-block.selected .remove-line { opacity: 1; }.remove-line:hover { color: #ffb4a2; background: #3a2522; }.remove-line svg { width: 14px; height: 14px; }.editor-hint { max-width: 720px; margin: 22px auto 0 39px; color: #728077; font-size: 12px; line-height: 1.65; }.editor-hint code { color: #b1c796; font-family: 'DM Mono', monospace; }.editor-hint kbd { color: #d4dfcd; }
.workspace-footer { height: 35px; display: flex; justify-content: space-between; align-items: center; padding: 0 28px; color: #768178; border-top: 1px solid rgba(61, 73, 67, .5); font-size: 11px; }.workspace-footer .status-dot { width: 5px; height: 5px; margin-right: 6px; }
.notebook-tabs { display: flex; align-items: end; gap: 4px; min-height: 36px; margin: -8px -12px 15px -14px; padding: 0 4px 0 0; border-bottom: 1px solid #d7e7f3; }.tab-list { display: flex; min-width: 0; flex: 1; gap: 3px; overflow-x: auto; }.workspace-tab { display: inline-flex; align-items: center; gap: 6px; max-width: 155px; height: 33px; padding: 0 7px 0 10px; color: #6988a2; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; font-size: 11px; white-space: nowrap; }.workspace-tab:hover { color: #27689e; background: #edf6fd; }.workspace-tab.active { color: #165c9f; border-color: #cfe1ef; background: #fff; font-weight: 600; }.workspace-tab-label { overflow: hidden; text-overflow: ellipsis; }.tab-close { display: grid; place-items: center; width: 17px; height: 17px; padding: 0; color: #7d9cb3; border: 0; border-radius: 3px; background: transparent; }.tab-close:hover { color: #b84f4f; background: #ffecec; }.tab-close svg { width: 12px; height: 12px; }.new-tab { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 3px; color: #4780ad; border: 0; border-radius: 5px; background: transparent; }.new-tab:hover { background: #e4f2fc; }.new-tab svg { width: 15px; height: 15px; }.note-editor { min-height: 260px; height: calc(100% - 53px); max-width: 880px; margin: 0 auto; padding: 4px 12px 50px 27px; color: #284e70; outline: 0; font-size: 16px; line-height: 1.75; caret-color: #176fc2; }.note-editor:empty::before { content: 'Start typing your work…'; color: #9cb3c5; pointer-events: none; }.note-editor p { margin: 0 0 10px; }.note-editor .inline-math { display: inline-flex; min-width: 18px; margin: 0 2px; vertical-align: middle; }.note-editor .inline-math math-field { width: auto; min-width: 24px; padding: 1px 3px; color: #173d61; border: 0; border-bottom: 1px solid #b9d5e9; border-radius: 3px; background: #f6fbff; font-size: 1.04em; --caret-color: #176fc2; --selection-background-color: #d9edfc; }.note-editor .inline-math math-field:focus-within { border-bottom-color: #398bd0; box-shadow: 0 2px 0 rgba(57, 139, 208, .15); }.note-editor .inline-math math-field::part(menu-toggle), .note-editor .inline-math math-field::part(virtual-keyboard-toggle) { display: none; }
.scientific-calculator { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 24px; overflow-y: auto; background: linear-gradient(135deg, #edf7ff, #f8fbff 48%, #edf6ff); }.calculator-screen { padding: 18px 19px 15px; border: 1px solid #c1d9ee; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(45, 118, 184, .08); }.screen-label { display: flex; justify-content: space-between; align-items: center; color: #7295b0; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1px; }.angle-mode { padding: 3px 6px; color: #2470b5; border: 1px solid #b8d7ed; border-radius: 4px; background: #f0f8ff; font: inherit; font-size: 10px; letter-spacing: .5px; }.angle-mode:hover { background: #deeffd; }.calculator-screen output { display: block; min-height: 44px; margin: 9px 0 3px; overflow: hidden; color: #163e67; font-family: 'DM Mono', monospace; font-size: clamp(25px, 3vw, 35px); line-height: 1.2; text-align: right; text-overflow: ellipsis; white-space: nowrap; }.calculator-screen input { width: 100%; padding: 8px 0 0; color: #527896; border: 0; border-top: 1px solid #e3edf5; outline: 0; background: transparent; font-family: 'DM Mono', monospace; font-size: 13px; text-align: right; }.calculator-screen input::placeholder { color: #a3b8c8; }.calculator-history { min-height: 24px; padding: 9px 2px 4px; color: #7898b2; font-family: 'DM Mono', monospace; font-size: 11px; text-align: right; }.history-item { margin-bottom: 4px; }.calculator-keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; }.key { min-height: 46px; color: #214d78; border: 1px solid #c9deed; border-radius: 8px; background: #fff; box-shadow: 0 1px 0 rgba(36, 97, 149, .04); font-family: 'DM Mono', monospace; font-size: 14px; transition: .12s ease; }.key:hover { border-color: #86bce3; background: #f0f8ff; transform: translateY(-1px); }.key:active { transform: translateY(0); background: #e1f1ff; }.key svg { width: 17px; height: 17px; }.key-function { color: #2973b5; background: #eaf5ff; }.key-operator { color: #1469b4; background: #dff0ff; font-size: 19px; }.key-utility { color: #547692; background: #f0f6fa; }.key-equals { color: #fff; border-color: #287bc9; background: #287bc9; font-size: 20px; }.key-equals:hover { border-color: #1769b6; background: #1769b6; }
.modal { width: min(600px, calc(100vw - 32px)); padding: 0; color: var(--ink); border: 1px solid #3c4b42; border-radius: 11px; background: #131c18; box-shadow: 0 24px 80px #000a; }.modal::backdrop { background: #030705aa; backdrop-filter: blur(2px); }.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 23px 24px 17px; border-bottom: 1px solid #2d3932; }.modal-header h2 { margin: 0; font-family: Newsreader, Georgia, serif; font-size: 25px; font-weight: 500; }.saved-list { min-height: 122px; max-height: 330px; overflow-y: auto; padding: 10px; }.saved-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 7px; }.saved-item:hover { background: #1d2922; }.saved-item i { color: #adc98a; }.saved-item-main { flex: 1; min-width: 0; }.saved-item strong, .saved-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.saved-item strong { font-size: 13px; font-weight: 500; }.saved-item small, .empty-library { margin-top: 3px; color: #849088; font-size: 11px; }.saved-item button { padding: 6px 9px; font-size: 11px; }.empty-library { padding: 30px 12px; text-align: center; }.modal-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; color: #7d8980; border-top: 1px solid #2d3932; font-size: 11px; }.secondary-button { padding: 7px 11px; color: #c9d6c0; border-color: #435148; background: #1c2721; font-size: 12px; }.secondary-button:hover { background: #27342c; }.compact-modal { max-width: 480px; }.shortcuts { margin: 0; padding: 10px 24px 20px; }.shortcuts div { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #27332c; }.shortcuts div:last-child { border: 0; }.shortcuts dt { color: #cbd3cb; font-size: 13px; }.shortcuts dd { margin: 0; color: #849188; font-size: 12px; } kbd { display: inline-block; margin-left: 3px; padding: 2px 5px; color: #bac7b9; border: 1px solid #405047; border-bottom-width: 2px; border-radius: 4px; background: #1d2822; font-family: 'DM Mono', monospace; font-size: 10px; }
.toast { position: fixed; z-index: 10; bottom: 25px; left: 50%; padding: 10px 14px; color: #e1edd7; border: 1px solid #526a40; border-radius: 7px; background: #1b2818; box-shadow: 0 8px 30px #0008; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .2s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1120px) { .tool-button span { display: none; } .toolbar { gap: 12px; }.document-meta { gap: 4px; }.workspace-toolbar .chip:nth-child(4), .workspace-toolbar .chip:nth-child(5) { display: none; } }

/* Snapped-window layout: designed for a second browser window alongside it. */
@media (max-width: 1100px) {
  .toolbar { height: 54px; gap: 9px; padding: 0 12px 0 15px; }.brand { font-size: 20px; }.brand-mark { width: 26px; height: 26px; margin-right: 5px; }.document-meta input { width: min(190px, 22vw); font-size: 13px; }.save-state { display: none; }.tool-button { height: 31px; padding: 0 7px; }.icon-button { width: 31px; height: 31px; }
  .app-shell { height: calc(100vh - 54px); grid-template-columns: minmax(355px, 1.45fr) 6px minmax(274px, .8fr); }.divider span { left: 1px; width: 4px; height: 27px; }
  .pane-heading { min-height: 72px; padding: 17px 15px 13px 19px; }.graph-heading { padding-left: 15px; }.pane-heading h1, .pane-heading h2 { font-size: 21px; }.eyebrow { font-size: 9px; }.graph-button { padding: 7px 8px; font-size: 11px; }.graph-button svg { width: 13px; }
  .workspace-toolbar { gap: 5px; padding: 8px 14px 8px 19px; }.chip { height: 27px; padding: 0 7px; font-size: 10px; }.add-line { padding-right: 0; font-size: 0; }.add-line svg { width: 16px; height: 16px; }
  .editor-scroll { padding: 17px 16px 16px 18px; }.equation-block { min-height: 48px; margin-bottom: 5px; gap: 7px; }.line-number { width: 22px; font-size: 10px; }.equation-block math-field { padding: 6px 8px; font-size: 20px; }.remove-line { display: none; }.editor-hint { margin: 15px 4px 0 29px; font-size: 11px; }.workspace-footer { height: 29px; padding: 0 17px; font-size: 10px; }.workspace-footer span:last-child { display: none; }
  .notebook-tabs { min-height: 32px; margin: -5px -6px 10px -7px; }.workspace-tab { height: 29px; max-width: 120px; padding-left: 7px; font-size: 10px; }.new-tab { width: 24px; height: 24px; }.note-editor { padding: 2px 7px 35px 14px; font-size: 14px; line-height: 1.65; }.note-editor .inline-math math-field { font-size: 1.03em; }
  .scientific-calculator { padding: 13px; }.calculator-screen { padding: 13px 14px 11px; border-radius: 9px; }.calculator-screen output { min-height: 37px; margin: 7px 0 2px; font-size: 26px; }.calculator-screen input { padding-top: 7px; font-size: 11px; }.calculator-history { min-height: 18px; padding: 6px 1px 3px; font-size: 10px; }.calculator-keypad { gap: 5px; }.key { min-height: 37px; border-radius: 6px; font-size: 12px; }.key-operator, .key-equals { font-size: 16px; }
}

@media (max-width: 790px) {
  .document-meta input { display: none; }.toolbar { justify-content: space-between; }.toolbar-actions { gap: 0; }.toolbar-rule { margin: 0 2px; }.app-shell { grid-template-columns: minmax(350px, 1.28fr) 5px minmax(248px, .8fr); }.pane-heading { min-height: 65px; padding-left: 13px; }.pane-heading h1, .pane-heading h2 { font-size: 19px; }.graph-button { font-size: 0; padding: 7px; }.graph-button svg { width: 15px; height: 15px; }.workspace-toolbar .chip:nth-child(3) { display: none; }.editor-hint { display: none; }.scientific-calculator { padding: 10px; }.key { min-height: 34px; font-size: 11px; }.key-operator, .key-equals { font-size: 15px; }
}

/* Bright blue theme */
:root { color-scheme: light; --ink: #17395d; --muted: #65809c; --line: #d4e4f2; --panel: #f8fbff; --panel-2: #eef6ff; --canvas: #eaf4ff; --accent: #2778cf; --accent-dark: #e0f0ff; --yellow: #2778cf; }
body { color: var(--ink); background: var(--canvas); }
.toolbar { background: #ffffff; border-color: var(--line); box-shadow: 0 1px 0 rgba(34, 105, 171, .03); }
.brand { color: #17477b; }.brand-mark { color: #1769bc; border-color: #9cc7ed; background: #edf7ff; }
.document-meta input { color: #234568; }.document-meta input:hover, .document-meta input:focus { background: #f2f8ff; border-color: #b8d7ef; }.save-state { color: #708aa3; }
.tool-button, .icon-button, .chip, .add-line, .graph-button, .secondary-button { color: #416887; }.tool-button:hover, .icon-button:hover { color: #155fa9; background: #ecf6ff; }.toolbar-rule { border-color: #d7e7f4; }
.app-shell { background: #edf6ff; }.workspace-pane { background: radial-gradient(circle at 82% 2%, #e8f5ff 0, transparent 37%), #f9fcff; }.graph-pane { background: #f8fbff; }.divider { background: #dcebf7; }.divider:hover, .divider.dragging { background: #4d9add; }.divider span { background: #94b8d6; }.divider:hover span { background: #fff; }
.pane-heading { border-color: #dbe9f5; }.eyebrow { color: #4384bd; }.pane-heading h1, .pane-heading h2 { color: #153e69; }.graph-heading h2 { color: #214f80; }
.graph-button { color: #fff; border-color: #2878c8; background: #287bd0; box-shadow: 0 2px 6px rgba(35, 113, 190, .18); }.graph-button:hover { background: #126ab9; border-color: #1263ad; }.desmos-status { color: #57809f; }.status-dot { background: #43a0ed; box-shadow: 0 0 0 3px rgba(67, 160, 237, .14); }
.workspace-toolbar { border-color: #dce9f4; }.chip { color: #52799a; border-color: #c6ddeb; background: #fff; }.chip:hover, .chip.active { color: #1969b4; border-color: #8fbfe7; background: #ebf6ff; }.add-line { color: #2875ba; }.add-line:hover { color: #115fa7; }
.equation-block:hover, .equation-block.selected { background: rgba(41, 130, 211, .035); border-color: #d5e5f1; }.equation-block.selected { border-color: #9bc7e9; box-shadow: 0 0 0 1px rgba(78, 153, 217, .10); }.line-number { color: #8da7bc; }.equation-block math-field { color: #183b5e; background: #fff; border-color: #cddfed; --caret-color: #1672c7; --selection-background-color: #ddecfa; --contains-highlight-background-color: #e7f4ff; --placeholder-color: #8ca5b9; }.equation-block math-field:focus-within { border-color: #70ade0; box-shadow: 0 0 0 3px rgba(74, 151, 217, .14); }.remove-line { color: #7896ac; }.remove-line:hover { color: #c3534b; background: #fff0ee; }.editor-hint { color: #6b89a3; }.editor-hint code { color: #2474bc; }.editor-hint kbd { color: #28577f; }.workspace-footer { color: #7893aa; border-color: #dce9f4; }.workspace-footer .status-dot { background: #43a0ed; }
.modal { color: #193e60; border-color: #c8ddec; background: #fff; box-shadow: 0 24px 80px rgba(20, 68, 112, .22); }.modal::backdrop { background: rgba(13, 55, 91, .28); }.modal-header, .modal-footer { border-color: #dce9f4; }.modal-header h2 { color: #163f68; }.saved-item:hover { background: #eef7ff; }.saved-item i { color: #3186d3; }.saved-item small, .empty-library, .modal-footer { color: #728da4; }.secondary-button { color: #27669c; border-color: #bbd6e9; background: #f1f8ff; }.secondary-button:hover { background: #e5f2fd; }.shortcuts div { border-color: #e2edf5; }.shortcuts dt { color: #315c7e; }.shortcuts dd { color: #6d89a0; }kbd { color: #336283; border-color: #bfd5e6; background: #f4f9fd; }
.toast { color: #fff; border-color: #2778c7; background: #176cb8; box-shadow: 0 8px 30px rgba(23, 91, 154, .25); }
.toast button { margin-left: 10px; padding: 2px 7px; color: #176cb8; border: 0; border-radius: 4px; background: #fff; font-size: 11px; font-weight: 700; pointer-events: auto; }.simplify-popover { position: fixed; z-index: 12; display: none; padding: 5px 8px; color: #1763a7; border: 1px solid #91bee2; border-radius: 5px; background: #f8fcff; box-shadow: 0 4px 14px rgba(31, 101, 160, .16); font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 700; pointer-events: none; }.simplify-popover.show { display: block; }.simplify-popover span { margin-left: 5px; color: #698ba7; font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 400; }
