/* App surfaces stay solid. Glass belongs to the controls above them. */
:root {
 --app-gutter:20px;
 --app-control:48px;
 --app-control-large:52px;
 --app-control-small:44px;
 --app-radius:28px;
 --app-control-radius:16px;
 --app-paper:color-mix(in srgb,var(--panel2) 96%,var(--bg));
 --app-inset:color-mix(in srgb,var(--text) 4%,var(--bg));
 --app-line:color-mix(in srgb,var(--text) 8%,transparent);
 --app-glass:color-mix(in srgb,var(--panel2) 76%,transparent);
 --app-ease:cubic-bezier(.2,.8,.2,1);
 --app-shadow:0 8px 32px #00000006,0 1px 2px #00000003;
 --font:-apple-system,BlinkMacSystemFont,'SF Pro Display','Segoe UI',Roboto,sans-serif;
}
html {scroll-padding-top:85px;scroll-padding-bottom:120px}
body {font-size:16px;line-height:1.55;letter-spacing:-.2px;overscroll-behavior-y:contain}
body:before {background:radial-gradient(ellipse at 85% 0%,color-mix(in srgb,var(--studio-glow) 7%,transparent),transparent 52%)}
button,input,select,textarea {font-family:var(--font)}
button,a {touch-action:manipulation}
button {user-select:none;-webkit-user-select:none}
.icon {stroke-width:1.85}
h1,.page-heading h1 {font-size:38px;line-height:1.12;font-weight:740;letter-spacing:-1.6px}
h2 {font-weight:680;letter-spacing:-.55px}
h3 {font-weight:630}
.page-heading {margin-bottom:27px}
.page-heading>.eyebrow,.page-heading>div>.eyebrow {display:none}
.page-heading p {font-size:15px;line-height:1.65;max-width:550px}
.eyebrow {font-size:11px;letter-spacing:1px}
.card,.topic-row,.stage-row,.metric,.course-card {background:var(--app-paper);border:1px solid var(--app-line);box-shadow:var(--app-shadow);backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:var(--app-radius)}
.card {padding:24px}
.card-header h2 {font-size:19px}
.card-header p,.settings-section>p {font-size:14px;line-height:1.65}
.button,.button.small,.lx-actions .button,.heading-actions .button {min-height:var(--app-control);padding:12px 18px;border-radius:var(--app-control-radius);font-size:14px;line-height:20px;font-weight:620;letter-spacing:-.15px;gap:8px;white-space:normal}
.button.primary {background:var(--accent);color:var(--bg);border-color:transparent;box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 13%,transparent)}
.button.ghost {background:var(--app-inset);border-color:transparent;color:var(--text);box-shadow:none}
.button.text-button,.text-button {background:none;border-color:transparent;color:var(--accent);box-shadow:none}
.button:hover {transform:none}
.button:active:not(:disabled),.app-round-button:active,.home-avatar:active {transform:scale(.97)}
.button.danger {color:var(--red)}
input,select,textarea,.field input,.field select,.field textarea,.lx-field input,.lx-field select,.lx-field textarea,.upgrade-field input,.upgrade-field select,.upgrade-field textarea {font-size:16px;min-height:49px;border:1px solid var(--app-line);background:var(--app-inset);border-radius:var(--app-control-radius);padding:12px 14px;color:var(--text);box-shadow:none}
.field>label,.lx-field,.upgrade-field {font-size:14px;line-height:1.5;color:var(--muted);font-weight:500}
.field>label {margin-bottom:8px}
.form-grid {gap:19px}
.form-actions {border-color:var(--app-line);gap:10px;padding-top:22px;margin-top:23px}
.form-actions>.button {border-radius:999px;min-height:48px}
.setting-row {padding:20px 0;border-color:var(--app-line)}
.setting-row h3 {font-size:16px}
.setting-row p,.quiet-note {font-size:13px;line-height:1.65}
input[type=checkbox]:not(.switch),input[type=radio] {width:20px;height:20px;min-height:20px;min-width:20px;padding:0;flex-shrink:0;accent-color:var(--accent)}
.checkbox-row {min-height:44px;gap:12px;align-items:center;font-size:14px}
.upgrade-days {gap:8px}
.upgrade-days label {min-height:48px;padding:12px;border-radius:12px;gap:10px}
.switch {width:49px;height:29px;min-height:29px;border-radius:99px;background:var(--panel3)}
.pill {border-radius:99px;padding:5px 10px;font-size:11px}
.app-round-button {display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;padding:0;border:1px solid var(--app-line);border-radius:50%;background:var(--app-glass);color:var(--text);box-shadow:inset 0 1px 0 #ffffff12;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.app-round-button .icon {width:19px;height:19px}
.icon-button {width:44px;height:44px;min-height:44px}
.topbar {height:72px;border:0;background:color-mix(in srgb,var(--bg) 78%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
.sidebar {background:color-mix(in srgb,var(--panel2) 45%,var(--bg));border-right:1px solid var(--app-line)}
.sidebar .brand-mark {background:var(--accent);color:var(--bg);border-radius:12px}
.nav-link {font-size:14px;min-height:44px;border-radius:13px}
.nav-link.active {background:var(--accent-bg);box-shadow:none}
.save-label {font-size:11px}
.course-picker {font-size:13px;min-height:40px;border-radius:99px;background:var(--app-paper)}
#main {max-width:1350px;margin:auto;padding:32px 38px 70px}

/* Home is a small collection of useful objects, with one clear next step. */
.app-home {display:flex;flex-direction:column;max-width:760px;padding:0 0 20px;gap:18px}
.app-home .home-greeting {margin:0 0 6px;gap:15px;flex-wrap:nowrap;align-items:center}
.home-date {display:block;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.1px;margin-bottom:8px}
.app-home .home-greeting h1 {font-size:43px;line-height:1.1;letter-spacing:-1.9px;font-weight:760}
.title-period {color:var(--accent)}
.app-home .home-greeting p {font-size:15px;line-height:1.4;margin-top:8px}
.home-header-actions {display:flex;align-items:center;gap:9px}
.home-header-actions>.app-round-button {display:grid}
.app-home .home-avatar {display:grid;place-items:center;width:47px;height:47px;border-radius:50%;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 20%,var(--app-paper)),var(--app-paper));color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 18%,transparent);font-size:20px;font-weight:650;box-shadow:inset 0 1px 0 #ffffff30,0 4px 14px #00000005}
.home-avatar>.icon {width:21px;height:21px}
.app-home .home-continue {position:relative;padding:26px;border-radius:29px;border:1px solid color-mix(in srgb,var(--accent) 12%,var(--app-line));background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 68%),var(--app-paper);box-shadow:var(--app-shadow);overflow:hidden}
.app-home .home-continue-top {margin-bottom:18px;gap:9px}
.home-kicker {font-size:10px;font-weight:650;letter-spacing:1.05px;color:var(--muted)}
.home-hero-content {display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:15px;align-items:center}
.app-home .home-continue h2 {font-size:30px;line-height:1.16;letter-spacing:-1.1px;font-weight:700;max-width:390px}
.home-hero-content p {font-size:14px;line-height:1.6;max-width:340px;margin-top:12px}
.home-book-art {height:132px;position:relative;isolation:isolate}
.has-course .home-book-art {height:104px}
.book-halo {position:absolute;inset:5px -14px;background:radial-gradient(ellipse,color-mix(in srgb,var(--accent) 20%,transparent),transparent 67%);border-radius:50%}
.book-sheet {position:absolute;width:77px;height:100px;border:1px solid color-mix(in srgb,var(--accent) 28%,transparent);border-radius:20px;box-shadow:inset 0 1px 0 #ffffff70,0 10px 26px color-mix(in srgb,var(--accent) 11%,transparent)}
.book-sheet-back {left:8px;top:10px;transform:rotate(-18deg);background:linear-gradient(150deg,color-mix(in srgb,var(--accent) 25%,var(--app-paper)),color-mix(in srgb,var(--accent) 10%,var(--app-paper)))}
.book-sheet-front {right:9px;top:22px;transform:rotate(11deg);background:linear-gradient(160deg,color-mix(in srgb,var(--app-paper) 87%,transparent),color-mix(in srgb,var(--accent) 9%,var(--app-paper)));display:flex;flex-direction:column;align-items:center;padding:21px 14px;gap:10px}
.book-sheet-front .icon {width:30px;height:30px;color:var(--accent);stroke-width:1.4}
.book-sheet-front i {display:block;height:3px;width:34px;border-radius:3px;background:color-mix(in srgb,var(--accent) 22%,transparent)}
.book-sheet-front i:last-child {width:23px;align-self:flex-start}
.book-spark {position:absolute;right:-3px;top:2px;color:var(--accent);transform:rotate(8deg)}
.book-spark .icon {width:22px;height:22px;stroke-width:1.3}
.app-home .home-continue-actions {margin-top:23px;display:flex}
.app-home .home-continue-actions>.button {width:100%;min-height:var(--app-control-large);justify-content:center;border-radius:999px;font-size:15px;gap:12px}
.home-course-pill {max-width:100%;font-size:12px;gap:6px}
.app-home .home-course-progress {margin-top:18px}
.home-course-progress>span {font-size:12px}
.app-home .upgrade-home-goal {display:block;padding:22px 24px;margin:0;background:var(--app-paper);border:1px solid var(--app-line);border-radius:27px;box-shadow:var(--app-shadow)}
.home-goal-header {display:flex;align-items:center;justify-content:space-between;gap:10px}
.app-home .upgrade-home-goal strong {margin-top:0}
.home-goal-header h2 {font-size:18px;font-weight:650;letter-spacing:-.5px}
.home-goal-header>.button {min-height:44px;padding:8px 0 8px 14px;background:none;color:var(--accent);font-size:13px}
.home-goal-body {display:flex;align-items:center;gap:23px;margin:16px 0 20px}
.home-goal-ring {width:88px;height:88px;border-radius:50%;flex-shrink:0;display:grid;place-items:center;background:conic-gradient(from -90deg,var(--accent) var(--goal-progress),color-mix(in srgb,var(--accent) 13%,var(--app-paper)) 0);position:relative;isolation:isolate}
.home-goal-ring:before {content:'';position:absolute;inset:7px;background:var(--app-paper);border-radius:50%;z-index:-1}
.home-goal-ring>span {font-size:26px;font-weight:700;letter-spacing:-1px;color:var(--text)}
.home-goal-ring small {font-size:13px;margin-left:1px;font-weight:500;color:var(--muted)}
.home-goal-value>strong {display:block;font-size:33px;line-height:1.1;letter-spacing:-1px;font-weight:700}
.home-goal-value>strong>small {font-size:14px;font-weight:500;letter-spacing:-.2px;color:var(--muted)}
.home-goal-value>p {font-size:12px;margin-top:7px}
.home-goal-value>a {display:inline-flex;align-items:center;gap:12px;color:var(--accent);font-size:12px;font-weight:600;min-height:35px;margin-top:1px}
.home-goal-value>a>span {font-size:22px;line-height:1}
.home-goal-footer {display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:16px;border-top:1px solid var(--app-line);font-size:12px;color:var(--muted)}
.home-goal-footer>span {display:flex;align-items:center;gap:5px}
.home-goal-footer strong {font-size:13px;font-weight:650;color:var(--text)}
.streak-dot {width:6px;height:6px;border-radius:50%;background:#ed9f55;margin-right:3px}
.app-home .upgrade-home-backup {order:5;margin:0;padding:15px 0;border:0;border-radius:0;display:flex;gap:11px;align-items:center;background:none;font-size:12px}
.backup-status-mark {display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;color:var(--muted);border-radius:11px;background:var(--app-inset)}
.backup-status-mark svg {width:18px;height:18px}
.upgrade-home-backup>[data-backup-status] {flex:1;min-width:0;line-height:1.4;font-size:12px}
.upgrade-home-backup [data-backup-status]>small {font-size:10px;margin-top:4px}
.app-home .upgrade-home-backup>.button {background:none;color:var(--accent);font-size:12px;padding:8px 0 8px 8px;min-height:44px}
.app-home .home-shortcuts {margin:0;gap:12px}
.app-home .home-shortcuts>a {padding:18px 16px;gap:11px;border:1px solid var(--app-line);border-radius:24px;background:var(--app-paper);min-height:87px;box-shadow:var(--app-shadow)}
.shortcut-icon {display:grid;place-items:center;width:37px;height:42px;border-radius:13px;flex-shrink:0}
.shortcut-icon .icon {width:22px;height:22px;stroke-width:1.7}
.notes-icon {color:#d99c37;background:#efbb5a18}
.worlds-icon {color:#6eae8b;background:#6eae8b18}
.home-shortcuts strong {display:block;font-size:14px;line-height:1.3;font-weight:650}
.home-shortcuts small {display:block;font-size:11px;color:var(--muted);margin-top:4px}
.app-home .home-shortcuts>a>.icon:last-child {margin-left:auto;width:12px;height:12px;opacity:.6}
.app-home .home-course-section {margin:2px 0 0;order:3}
.home-section-heading h2 {font-size:20px;font-weight:680}
.home-course-list {border:1px solid var(--app-line);background:var(--app-paper);border-radius:24px}
.home-course-row {padding:17px 20px;border-color:var(--app-line)}
.home-course-row strong {font-size:15px;font-weight:620}
.home-course-row small {font-size:12px}
.home-footer-links {order:6;display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--app-line);padding-top:14px}
.home-footer-links>a {display:flex;align-items:center;gap:9px;min-height:44px;color:var(--muted);font-size:12px}
.home-footer-links>a>.icon:last-child {width:10px}
.home-footer-links>.button {font-size:12px;padding:10px 0}
.app-home .home-how {order:7;border:0;margin:0;font-size:13px}
.home-how>summary {min-height:44px;font-size:12px}
.home-how>ol {font-size:13px}

/* Short sheets keep navigation and editing inside the app. */
dialog {border:1px solid var(--app-line);border-radius:30px;background:var(--app-paper);box-shadow:0 30px 100px #0004;overscroll-behavior:contain;animation:app-sheet-in .28s var(--app-ease)}
dialog::backdrop {background:#07112255;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.dialog-content {padding:27px}
.dialog-head {align-items:flex-start;gap:15px;margin-bottom:24px}
.dialog-head h2 {font-size:27px;line-height:1.14;font-weight:720;letter-spacing:-.9px}
.dialog-head p {font-size:14px;line-height:1.55;margin-top:9px}
.dialog-head>button:not(.app-round-button) {display:grid;place-items:center;width:44px;height:44px;min-height:44px;min-width:44px;flex-shrink:0;padding:0;border-radius:50%;background:var(--app-inset);color:var(--muted);font-size:21px}
.app-sheet-kicker {font-size:10px!important;letter-spacing:1.4px;font-weight:600;margin:0 0 10px!important;color:var(--muted)}
.app-menu .dialog-head {margin-bottom:25px}
.app-menu-profile {display:flex;align-items:center;gap:13px;width:100%;background:var(--app-inset);border:1px solid var(--app-line);border-radius:23px;padding:17px;color:var(--text);text-align:left;margin-bottom:20px}
.app-profile-symbol {display:grid;place-items:center;width:43px;height:43px;background:var(--accent-bg);color:var(--accent);border-radius:50%}
.app-menu-profile>span:nth-child(2) {flex:1;min-width:0}
.app-menu-profile strong {display:block;font-size:16px;font-weight:650;overflow-wrap:anywhere}
.app-menu-profile small {display:block;font-size:12px;color:var(--muted);margin-top:4px}
.app-menu-profile>.icon {color:var(--muted);width:14px}
.app-menu-shortcuts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.app-menu-link {display:flex;align-items:center;gap:11px;padding:14px 0;min-height:53px;color:var(--text);font-size:14px;font-weight:550}
.app-menu-link>span:nth-child(2) {flex:1;min-width:0}
.app-menu-link>.icon {width:12px;color:var(--muted);margin-left:auto}
.app-menu-icon {display:grid;place-items:center;flex-shrink:0;width:33px;height:33px;border-radius:11px;color:var(--accent);background:var(--accent-bg)}
.app-menu-icon>.icon {width:18px;height:18px}
.app-menu-shortcuts>.app-menu-link {display:flex;flex-direction:column;align-items:flex-start;gap:11px;background:var(--app-inset);border-radius:20px;padding:17px;font-size:14px;min-height:102px;position:relative}
.app-menu-shortcuts .app-menu-link>.icon {position:absolute;right:15px;top:19px}
.app-menu-groups {margin-top:22px}
.app-menu-groups>details {border-bottom:1px solid var(--app-line)}
.app-menu-groups summary {display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;padding:19px 2px;font-size:15px;font-weight:650}
.app-menu-groups summary::-webkit-details-marker {display:none}
.app-menu-groups summary>.icon {width:15px;color:var(--muted);transition:transform .2s}
.app-menu-groups details[open]>summary>.icon {transform:rotate(180deg)}
.app-menu-groups .app-menu-link {border-top:1px solid var(--app-line);font-size:14px}
.app-menu-footnote {text-align:center;margin:25px 0 0;font-size:12px;color:var(--muted)}
.toasts {bottom:112px}
.toast {border-radius:22px;background:var(--app-glass);border-color:var(--app-line);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);font-size:14px;box-shadow:0 8px 35px #0002}

/* Study stays deliberately small: one card, its explanation, and Done. */
.work-screen.focused-study {max-width:580px;padding:26px 0 30px}
.focused-study .focus-course {font-size:14px;font-weight:550;margin-bottom:23px}
.focus-position {display:inline-flex;min-height:29px;align-items:center;padding:5px 12px;background:var(--accent-bg);border-radius:99px;font-size:11px;letter-spacing:.5px;text-transform:none}
.work-screen.focused-study h1 {font-size:40px;line-height:1.09;letter-spacing:-1.7px;max-width:380px;margin:18px auto 27px;font-weight:730}
.focus-task {border-radius:28px;background:var(--app-paper);border:1px solid var(--app-line);box-shadow:var(--app-shadow);margin:0}
.focus-task>summary {padding:25px;gap:14px;min-height:133px}
.focus-task summary strong {font-size:23px;letter-spacing:-.55px;font-weight:680}
.focus-task summary small {font-size:10px;letter-spacing:1.15px;color:var(--muted)}
.focus-task-hint {font-size:13px}
.focus-task>summary>.icon {display:block;width:19px;height:19px;padding:0;color:var(--accent);transition:transform .25s}
.focus-explanation {border-color:var(--app-line);padding:24px 25px 26px}
.focus-explanation h2 {font-size:15px;font-weight:650;color:var(--text);margin-bottom:13px}
.focus-explanation p {color:var(--text)}
.task-quick-note {border-color:var(--app-line)}
.task-quick-note summary {font-size:13px;color:var(--muted)}
#work-completion {margin-top:20px}
.app-done-button {display:flex;align-items:center;justify-content:center;gap:12px;min-height:56px;max-width:none;width:100%;position:relative;border-radius:20px;border:1px solid color-mix(in srgb,var(--accent) 14%,transparent);background:var(--accent);color:var(--bg);box-shadow:0 6px 20px color-mix(in srgb,var(--accent) 15%,transparent);padding:12px 24px}
.app-done-button>.icon {width:22px;height:22px}
.focused-study .app-done-button {height:56px;min-height:56px;max-height:56px;aspect-ratio:auto;min-width:0;inset:auto;transform:none}
.focused-study .app-done-button:before,.focused-study .app-done-button:after {display:none}
.app-done-button>strong {font-size:18px;font-weight:670;letter-spacing:-.4px}
.app-done-button>small {display:none}
.app-done-button.is-complete {background:color-mix(in srgb,var(--accent) 75%,var(--app-paper));box-shadow:none}
.focused-study>.button {margin-top:13px;background:none;color:var(--muted);font-size:13px}
.focus-more {margin-top:23px}
.focus-more>summary {font-size:13px;min-height:44px}
.focus-progress {font-size:12px;line-height:1.6;margin-top:16px}
.focus-more .journey-nav {background:var(--app-paper)}

/* The same type, spacing and materials carry through creation and notes. */
.course-start {max-width:850px}
.start-page-heading h1 {font-size:36px;font-weight:730;line-height:1.12;letter-spacing:-1.4px}
.start-page-heading .eyebrow {font-size:10px;letter-spacing:1.1px;margin-bottom:14px}
.start-page-heading p {font-size:15px;line-height:1.65}
.course-start-card,.course-bring {background:var(--app-paper);border:1px solid var(--app-line);border-radius:27px;padding:25px}
.course-start-card h2 {font-size:23px}
.course-start-card p,.course-bring p {font-size:14px;line-height:1.6}
.course-bring {display:block;margin-top:14px}
.course-bring .start-course-icon {display:grid;width:53px;height:53px;border-radius:18px;color:var(--accent);background:var(--accent-bg);margin-bottom:21px}
.course-bring .start-course-icon>.icon {width:25px;height:25px}
.course-bring h2 {font-size:23px;font-weight:680}
.course-bring .button-row {display:flex;gap:10px;margin-top:25px}
.course-bring .button-row>.button {border-radius:99px;flex:1;justify-content:center}
.start-simple-note {font-size:12px;line-height:1.7;margin-top:23px;text-align:center}
.start-course-icon {border-radius:var(--app-control-radius);background:color-mix(in srgb,var(--course-tint,var(--accent)) 13%,var(--app-paper));color:var(--course-tint,var(--accent))}
.simple-course-builder .builder-editor,.builder-topics {border-radius:25px}
.builder-topics>button {font-size:14px;padding:15px;border-radius:13px}
.builder-topics>h2 {font-size:18px}
.builder-topics button.selected {background:var(--accent-bg);border-color:transparent}
.builder-topics .upgrade-topic-row {min-height:64px}
.builder-topics .upgrade-topic-row>[data-action] {min-height:64px;padding:12px;border-radius:16px;font-size:14px}
.builder-topics .upgrade-reorder {flex-direction:row;gap:0}
.builder-topics .upgrade-reorder .button {min-width:44px;width:44px;height:44px;min-height:44px;border-radius:12px}
.simple-course-builder .builder-editor textarea {min-height:160px;line-height:1.65}
.lx-builder-meta {border-radius:25px}
.notebook-shell {border-radius:27px;border-color:var(--app-line);background:var(--app-paper);box-shadow:var(--app-shadow)}
.notebook-sidebar {background:var(--app-inset);border-color:var(--app-line)}
.notebook-paper {background:var(--app-paper)}
.notebook-welcome h2 {font-size:34px;font-weight:710;letter-spacing:-1.1px;line-height:1.12}
.notebook-welcome p {font-size:14px;line-height:1.7}
.notebook-welcome>.button {border-radius:99px;min-height:49px}
.notebook-welcome .welcome-kicker {font-size:10px;letter-spacing:1px}
.notebook-welcome-features {font-size:11px}
.note-page-heading .note-title {font-size:32px;line-height:1.2;border:0;background:none;letter-spacing:-1px}
.note-toolbar {background:var(--app-paper);border-color:var(--app-line);gap:8px;flex-wrap:wrap;align-items:center}
.note-tools-menu {margin-left:auto}
.note-tools-menu>summary {width:44px;height:44px;min-height:44px;border-radius:14px}
.note-tools-popover {max-height:300px;overflow:auto;overscroll-behavior:contain;background:var(--app-paper);border-color:var(--app-line);border-radius:18px;box-shadow:0 10px 35px #0002}
.note-tools-popover>[data-upgrade-host=notebook] {display:grid;gap:4px;width:100%}
.note-tools-popover>[data-upgrade-host=notebook]>.button {width:100%;justify-content:flex-start}
.notebook-shell:has(.note-tools-menu[open]) {overflow:visible}
.note-toolbar .button {font-size:12px;min-height:44px;border-radius:14px;padding:10px 12px}
.note-toolbar [data-action=learn-attach-note] {width:44px;min-width:44px;height:44px;padding:0;justify-content:center}
.note-toolbar .ui-glyph {width:18px;height:18px}
.note-properties-panel summary,.note-editor-hint {font-size:12px}
.note-breadcrumb {font-size:12px}
.note-block>textarea {background:none;border:0}
.note-block {border-radius:13px}
.upgrade-settings {border-radius:25px;background:var(--app-paper);border-color:var(--app-line);box-shadow:var(--app-shadow)}
.upgrade-settings>h2 {font-size:21px}
.upgrade-settings>p {font-size:14px;line-height:1.65}
.lx-metrics>div {background:var(--app-paper);border:1px solid var(--app-line);border-radius:23px;padding:23px}
.lx-metrics strong {font-size:32px;letter-spacing:-1px}
.lx-metrics span {font-size:12px}
.lx-empty {font-size:14px;border-radius:23px;line-height:1.6}
.empty {border-radius:27px;background:var(--app-paper);border:1px solid var(--app-line);padding:35px 25px}
.empty>h3 {font-size:23px;letter-spacing:-.6px}
.empty>p {font-size:14px;line-height:1.7}
.empty .button {margin:7px 4px;border-radius:99px}
.welcome-content h1 {font-weight:730;letter-spacing:-1.8px;font-size:46px;line-height:1.08}
.welcome-content>p {font-size:16px;line-height:1.65}
.welcome-glyph {width:80px;height:80px;border-radius:27px;background:linear-gradient(145deg,var(--accent-bg),var(--app-paper));box-shadow:inset 0 1px 0 #ffffff33,0 12px 44px color-mix(in srgb,var(--accent) 9%,transparent);margin-bottom:35px;transform:rotate(-6deg)}
.welcome-glyph .icon {width:35px;height:35px;stroke-width:1.2}
.welcome-name-form label {font-size:14px}
.welcome-name-form input {font-size:18px;min-height:57px}
.welcome-name-form>.button {border-radius:99px;font-size:16px;min-height:54px}
.welcome-brand {font-size:13px}
.welcome-step {font-size:10px;letter-spacing:1.2px}
.welcome-content>.welcome-privacy,.welcome-restore {font-size:12px}

@keyframes app-sheet-in {from{opacity:0;translate:0 20px}to{opacity:1;translate:0 0}}
@keyframes app-screen-in {from{opacity:.5;translate:0 6px}to{opacity:1;translate:0 0}}
#main>.app-home,#main>.course-start,#main>.focused-study {animation:app-screen-in .3s var(--app-ease)}
@media(max-width:1000px) {
 .tabbar-main {height:68px;align-items:center}
 .tabbar-main .bottom-link {height:56px}
 html,dialog {scrollbar-width:none}
 html::-webkit-scrollbar,body::-webkit-scrollbar,dialog::-webkit-scrollbar {display:none}
 :root {--sidebar:0px}
 .sidebar,.menu-overlay {display:none!important}
 .workspace {margin-left:0;width:100%}
 .topbar {height:calc(64px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) var(--app-gutter) 0;gap:8px;position:sticky;top:0;z-index:25}
 .topbar .breadcrumb {display:flex;gap:0;max-width:50%;min-width:0}
 .topbar .mobile-menu,.topbar .studio-wordmark,.topbar .slash {display:none}
 .topbar .breadcrumb #route-title,body[data-page=work] .topbar #route-title {display:block;font-size:16px;font-weight:650;letter-spacing:-.4px;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .topbar .toolbar {gap:8px;margin-left:auto}
 .toolbar .course-picker {max-width:170px;width:auto;font-size:12px;min-height:44px;padding:10px 12px;border-radius:99px}
 .toolbar .course-picker:disabled {display:none}
 .toolbar .search-button {display:grid;place-items:center;width:44px;min-width:44px;min-height:44px;border-radius:50%;border:1px solid var(--app-line);background:var(--app-glass);padding:0}
 .toolbar .search-button .icon {width:18px;height:18px}
 .toolbar .search-button span,.toolbar .search-button kbd,.toolbar>.icon-button,.toolbar .save-label {display:none}
 #main {padding:24px var(--app-gutter) calc(120px + env(safe-area-inset-bottom,0px));max-width:850px}
 body[data-page=dashboard] .topbar {display:none}
 body[data-page=dashboard] #main {padding-top:calc(29px + env(safe-area-inset-top,0px))}
 .home-header-actions>.app-round-button {display:grid}
 .bottom-nav {display:flex;position:fixed;inset:auto 16px calc(16px + env(safe-area-inset-bottom,0px));max-width:540px;margin:auto;gap:8px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;z-index:40;align-items:center;justify-content:center}
 .tabbar-main {display:flex;flex:1;min-width:0;padding:5px;gap:2px;border:1px solid color-mix(in srgb,var(--text) 12%,transparent);border-radius:999px;background:var(--app-glass);box-shadow:inset 0 1px 0 #ffffff35,0 8px 30px #00000018;backdrop-filter:blur(26px) saturate(1.5);-webkit-backdrop-filter:blur(26px) saturate(1.5)}
 .bottom-nav .bottom-link {display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;gap:4px;padding:8px 3px 7px;min-width:0;min-height:56px;border:0;border-radius:999px;color:var(--muted);font-size:10px;line-height:1.1;letter-spacing:0;font-weight:550;transition:background .22s var(--app-ease),color .22s,transform .22s}
 .bottom-nav .bottom-link .icon {width:21px;height:21px;stroke-width:1.8}
 .bottom-nav .bottom-link.active {color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,var(--app-paper));box-shadow:inset 0 1px 0 #ffffff16;font-weight:650}
 .bottom-nav .bottom-link.active .icon {stroke-width:2}
 .bottom-nav .tabbar-more {width:68px;height:68px;min-height:68px;flex:0 0 68px;background:var(--app-glass);border:1px solid color-mix(in srgb,var(--text) 12%,transparent);box-shadow:inset 0 1px 0 #ffffff35,0 8px 30px #00000018;backdrop-filter:blur(26px) saturate(1.5);-webkit-backdrop-filter:blur(26px) saturate(1.5)}
 .bottom-nav .tabbar-more .icon {width:23px;height:23px;stroke-width:2}
 body:after {content:'';position:fixed;inset:auto 0 0;height:110px;background:linear-gradient(transparent,var(--bg));pointer-events:none;z-index:35}
 body[data-page=welcome]:after,body[data-page=forest]:after,body[data-study-fullscreen=true]:after {display:none}
 html[data-app-keyboard=true] .bottom-nav,html[data-app-keyboard=true] body:after {display:none}
 dialog,dialog.drawer {position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:680px;max-height:91dvh;height:auto;border-radius:32px 32px 0 0;border:0;padding:0;animation:app-sheet-in .32s var(--app-ease)}
 dialog.drawer {height:93dvh;max-height:93dvh}
 dialog:before {content:'';display:block;position:sticky;top:10px;width:34px;height:5px;border-radius:99px;background:color-mix(in srgb,var(--text) 18%,transparent);margin:10px auto 14px;z-index:5}
 .dialog-content {padding:10px 24px max(32px,env(safe-area-inset-bottom,0px));margin:0}
 .dialog-head h2 {font-size:26px}
 .dialog-head {margin-bottom:23px}
 .dialog-content .form-grid {grid-template-columns:1fr}
 .field.full {grid-column:auto}
 .navigation-sheet {max-height:88dvh}
 .page-heading {gap:18px}
 .page-heading h1 {font-size:34px;letter-spacing:-1.4px}
 .page-heading p {font-size:14px;line-height:1.65;margin-top:11px}
 .page-heading .heading-actions .button,.page-heading>.lx-actions>.button {font-size:13px;padding:10px 15px}
 .lx-actions {gap:8px}
 .card {padding:24px}
 .simple-course-builder .builder-editor {padding:24px}
 .builder-layout {gap:14px}
 .notebook-shell {border-radius:25px}
 .note-toolbar .button {font-size:12px}
 .settings-section>h2 {font-size:22px}
 .settings-stack {gap:16px}
 .settings-section>p,.setting-row p {font-size:13px}
 .welcome-screen {padding:28px 26px 22px}
 .welcome-content {padding:45px 0;max-width:420px}
 .welcome-content h1 {font-size:42px}
 .course-start-first {padding:30px 24px 45px}
 .course-start-first>.welcome-brand {margin-bottom:45px}
 .start-page-heading {gap:18px}
 .start-page-heading h1 {font-size:34px}
 .start-page-heading p {font-size:14px}
 .start-simple-note {font-size:12px}
 .empty {padding:38px 23px}
 .empty p {font-size:14px}
 .home-goal-footer {font-size:12px}
 .toasts {left:18px;right:18px;bottom:calc(100px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:430px) {
 #main {padding-left:var(--app-gutter);padding-right:var(--app-gutter)}
 .app-home {gap:16px}
 .app-home .home-greeting {margin-bottom:7px;align-items:flex-start}
 .app-home .home-greeting h1 {font-size:40px}
 .home-header-actions {gap:7px;margin-top:19px}
 .home-header-actions .app-round-button {width:44px;height:44px}
 .app-home .home-avatar {width:44px;height:44px;font-size:18px}
 .home-date {font-size:12px}
 .toolbar .course-picker {max-width:145px}
 .app-home .home-greeting p {font-size:14px}
 .app-home .home-continue {padding:24px;border-radius:28px}
 .home-kicker {font-size:10px;letter-spacing:.7px}
 .home-hero-content {grid-template-columns:minmax(0,1fr) 85px;gap:8px}
 .app-home .home-continue h2 {font-size:28px;line-height:1.13;letter-spacing:-.9px}
 .home-hero-content p {font-size:13px;line-height:1.6;margin-top:12px}
 .home-book-art {height:113px;transform:scale(.82);transform-origin:center right}
 .book-sheet-back {left:-16px}
 .book-sheet-front {right:0}
 .book-spark {right:-12px}
 .app-home .home-continue-actions {margin-top:20px}
 .app-home .home-continue-actions>.button {font-size:15px;min-height:52px}
 .app-home .upgrade-home-goal {padding:20px 24px;border-radius:28px}
 .home-goal-header h2 {font-size:18px}
 .home-goal-body {gap:19px;margin:12px 0 16px}
 .home-goal-ring {width:80px;height:80px}
 .home-goal-ring:before {inset:6px}
 .home-goal-ring>span {font-size:24px}
 .home-goal-value>strong {font-size:32px}
 .home-goal-value>strong>small {font-size:13px}
 .home-goal-value>p,.home-goal-value>a {font-size:11px}
 .home-goal-footer {font-size:12px;padding-top:16px;gap:8px}
 .home-goal-footer strong {font-size:12px}
 .app-home .home-shortcuts {gap:11px}
 .app-home .home-shortcuts>a {padding:16px;gap:8px;border-radius:24px;min-height:88px}
 .shortcut-icon {width:32px;height:40px;border-radius:12px}
 .shortcut-icon .icon {width:20px;height:20px}
 .home-shortcuts strong {font-size:14px}
 .home-shortcuts small {font-size:11px}
 .app-home .home-shortcuts>a>.icon:last-child {display:none}
 .home-footer-links {gap:8px}
 .app-home .home-how>summary {font-size:11px}
 .work-screen.focused-study {padding-top:19px}
 .work-screen.focused-study h1 {font-size:36px}
 .focus-task>summary {padding:23px;min-height:128px}
 .focus-task summary strong {font-size:22px}
 .focus-explanation {padding:23px}
 .focus-progress {font-size:11px}
 .home-course-row {padding:16px}
 .home-course-row strong {font-size:14px}
 .home-course-row small {font-size:11px}
 .course-bring .button-row {flex-direction:column}
 .course-bring .button-row>.button {width:100%}
}
@media(max-width:350px) {
 .tabbar-main {height:64px}
 .tabbar-main .bottom-link {height:52px}
 .note-toolbar .button {padding-inline:10px}
 #main {padding-left:16px;padding-right:16px}
 .app-home .home-continue {padding:20px}
 .home-hero-content {grid-template-columns:minmax(0,1fr)}
 .home-book-art {display:none}
 .toolbar .course-picker {max-width:130px}
 .app-home .home-continue h2 {font-size:25px}
 .home-header-actions>.app-round-button {display:grid}
 .bottom-nav {left:12px;right:12px;gap:7px}
 .bottom-nav .tabbar-more {width:64px;height:64px;flex-basis:64px;min-height:64px}
 .bottom-nav .bottom-link {font-size:10px;min-height:52px}
 .home-goal-body {gap:13px}
 .home-goal-header h2 {font-size:16px}
 .app-home .home-shortcuts>a {padding:14px 12px;gap:7px}
 .shortcut-icon {display:none}
}
@media(min-width:1001px) {
 .home-header-actions>.app-round-button {display:none}
 .bottom-nav {display:none}
 .app-home {max-width:770px}
 .app-home .home-greeting {padding:8px 0 12px}
 .app-home .home-continue {padding:30px}
 .home-hero-content {grid-template-columns:minmax(0,1fr) 140px}
 .app-home .home-continue-actions>.button {width:auto;min-width:250px}
}
@media(prefers-reduced-transparency:reduce) {
 .tabbar-main,.bottom-nav .tabbar-more,.topbar,dialog,.toast,.app-round-button {backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--app-paper)}
}
html[data-reading-contrast=high] .home-continue,html[data-reading-contrast=high] .tabbar-main,html[data-reading-contrast=high] .bottom-nav .tabbar-more,html[data-reading-contrast=high] .home-avatar {background:var(--panel2);border:1px solid var(--border);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-reading-contrast=high] .home-kicker,html[data-reading-contrast=high] .home-date,html[data-reading-contrast=high] .home-shortcuts small {color:var(--muted)}
html[data-performance=high] .tabbar-main,html[data-performance=high] .bottom-nav .tabbar-more,html[data-performance=high] .app-round-button {backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--app-paper)}

/* Keep the primary task action within reach while the explanation scrolls. */
@keyframes study-entry {from{opacity:.5}to{opacity:1}}
@media(max-width:1000px) {
 body[data-page=work] #main>.focused-study {animation-name:study-entry;padding-bottom:110px}
 body[data-page=work] #work-completion {position:fixed;width:auto;left:20px;right:84px;bottom:calc(94px + env(safe-area-inset-bottom,0px));z-index:39;margin:0}
 body[data-page=work] #work-completion .app-done-button {width:100%;margin:0;box-shadow:0 6px 24px color-mix(in srgb,var(--accent) 24%,transparent)}
 body[data-page=work][data-study-fullscreen=true] #work-completion {right:20px;bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 body[data-study-fullscreen=true] .capture-launch {display:none}
 html[data-app-keyboard=true] body[data-page=work] #work-completion {position:static;margin-top:20px}
}
@media(prefers-reduced-motion:reduce) {dialog,#main>.app-home,#main>.course-start,#main>.focused-study {animation:none}}

/* Phone controls stay inside their cards; records use vertical rows at narrow sizes. */
@media(max-width:600px) {
 .heatmap {grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}
 .heatmap .heat-cell {min-width:0;width:100%;min-height:44px;padding:0}
 .forest-overview .forest-landscape {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:12px;overflow:visible;align-items:end}
 .forest-overview .forest-plant {min-width:0;max-width:none;width:100%;overflow-wrap:anywhere}
 .mobile-records,.mobile-records tbody {display:block;width:100%;min-width:0}
 .mobile-records thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .mobile-records tr {display:grid;grid-template-columns:minmax(0,1fr);padding:12px 0;border-bottom:1px solid var(--border)}
 .mobile-records td {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;white-space:normal;min-width:0;padding:8px 0;border:0;overflow-wrap:anywhere}
 .mobile-records td::before {content:attr(data-label);color:var(--muted);font-size:12px;flex:0 0 42%}
 .mobile-records td:last-child {justify-content:flex-end}
 .mobile-records td:last-child::before {content:none}
 .mobile-records td button {max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
