/* Learning on the dashboard: the slim row (screens/learning-row.js) and the waiting banner. Hold color is --stage, border --rule. */ /* The row: under the spec picker while it needs the person (not set up, off, paused); after the last card group while on. */ .learn-row { position: relative; } .learn-row.is-top { margin: 0 0 22px; } .learn-row.is-bottom { margin: 4px 0 18px; } .learn-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: var(--fs-md); color: var(--ink); } /* Paused: amber tint, visible at a glance. */ .learn-row.is-paused .learn-line { background: var(--stage-soft); border: 1px solid var(--stage); border-radius: var(--radius-md); } .learn-label { font-weight: 600; } .learn-say { flex: 1 1 14em; min-width: 0; color: var(--ink-3); } .learn-row.is-paused .learn-say { color: var(--ink); } .learn-controls { margin-left: auto; display: flex; align-items: center; gap: 12px; } /* Pause for me: a sliding switch. Amber while paused. */ .learn-switch { display: inline-flex; align-items: center; gap: 8px; font: inherit; min-height: 24px; padding: 0; background: none; border: 0; color: var(--ink); cursor: pointer; } .learn-switch:disabled { opacity: 0.45; cursor: not-allowed; } .learn-track { position: relative; flex: none; width: 34px; height: 20px; box-sizing: border-box; border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--rule-2); } .learn-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); transition: transform var(--dur-1); } .learn-switch.is-on .learn-track { background: var(--stage); border-color: var(--stage); } .learn-switch.is-on .learn-track::after { transform: translateX(14px); background: var(--panel); } .learn-switch:hover:not(:disabled) .learn-track { border-color: var(--accent); } .learn-link { font: inherit; font-size: var(--fs-sm); min-height: 24px; padding: 0 4px; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; } .learn-link:hover { text-decoration-thickness: 2px; } .learn-switch:focus-visible, .learn-link:focus-visible, .learn-more-item:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); } /* More: at the bottom of the page, so it opens upward. */ .learn-more { position: absolute; right: 0; bottom: 100%; z-index: var(--z-sticky); min-width: 17em; margin: 0 0 4px; padding: 4px; list-style: none; text-align: left; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius-md); box-shadow: var(--shadow-2); font-size: var(--fs-md); color: var(--ink); } .learn-more[hidden] { display: none; } .learn-more-item { padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; } .learn-more-item:hover, .learn-more-item:focus { background: var(--accent-soft); } .learn-more-item.is-danger { color: var(--warn); border-top: 1px solid var(--rule); border-top-left-radius: 0; border-top-right-radius: 0; } .learn-more-item[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; } .learn-more-item[aria-disabled="true"]:hover { background: none; } /* Lessons waiting: the banner nearest the title, in the accent tint. */ .dash-nudge.learn-banner { border-left-width: 4px; } .learn-banner .btn { margin-left: auto; } /* Two lines in one banner (lessons waiting, lessons near their limit): each its own row. */ .learn-banner-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; flex: 1 1 100%; } /* Open the lessons: each file under its own name. */ .learn-lessons-file + .learn-lessons-file { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); } .learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-3); } /* Each file's own .md block would keep the page-wide 68ch cap; let it fill the dialog. A lesson's title is a long heading: balanced wrapping (tokens.css) halves it, so fill each line. */ .learn-lessons-file .md { max-width: none; } .learn-lessons-file .md-h { text-wrap: wrap; } /* One quiet line under a lesson's heading: how often it was followed. */ .learn-follow { margin: 2px 0 6px; font-size: var(--fs-sm); color: var(--ink-3); } /* The lessons card (cards.js buildLessons): one block per item, none chosen at first. */ .lessons-opening { margin: 14px 0 0; font-size: var(--fs-md); color: var(--ink-3); } .lessons-rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; } .lessons-row { padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--panel); } .lessons-row.is-chosen { border-color: var(--accent); } .lessons-row p { margin: 0 0 6px; } .lessons-heading { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); } .lessons-text { font-weight: 600; color: var(--ink); } .lessons-why, .lessons-found { font-size: var(--fs-md); color: var(--ink-2); } .lessons-origin, .lessons-note { font-size: var(--fs-sm); color: var(--ink-3); } .lessons-tag { font-size: var(--fs-sm); color: var(--ink-3); font-style: italic; } .lessons-checked { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--ink-3); } .lesson-checks { margin: 0 0 6px; } .lesson-checks p { margin: 0 0 4px; font-size: var(--fs-md); } .lesson-check-word { font-weight: 700; margin-right: 2px; } .lesson-check.fail { color: var(--warn); } .lesson-check.doubt { color: var(--stage); } .lesson-checks .lesson-check-pass { color: var(--ink-3); font-size: var(--fs-sm); } .lesson-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--ink-2); } .lessons-fix blockquote { margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--rule-2); font-family: var(--mono); font-size: var(--fs-sm); white-space: pre-wrap; overflow-wrap: anywhere; } .lessons-fix .lessons-after { border-left-color: var(--accent); } .lessons-become { margin: 0 0 6px; padding-left: 18px; font-size: var(--fs-md); } /* Flagged and refused: said in words, not only in color. */ .lessons-flag, .lessons-refused { padding: 5px 9px; font-size: var(--fs-sm); } .lessons-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } /* The agent's suggestion: a dashed accent ring, apart from focus's solid one; it stays once the person picks that word. */ .lessons-choices .btn.is-suggested { outline: 2px dashed var(--accent); outline-offset: 2px; } /* Keyboard focus still shows as the page's solid focus ring. */ .lessons-choices .btn.is-suggested:focus-visible { outline: 2px solid var(--focus); outline-offset: var(--focus-offset); } .lessons-edit { margin-top: 10px; display: grid; gap: 8px; } .lessons-field { margin: 0; } .lessons-input, .lessons-select { width: 100%; box-sizing: border-box; } .lessons-error { margin: 10px 0 0; } .lessons-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; } .lessons-summary { margin: 0; font-size: var(--fs-md); color: var(--ink-2); } .lessons-foot .btn { margin-left: auto; } .lessons-first-lesson { margin: 14px 0 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); } .lessons-first-lesson p { margin: 0 0 4px; } .lessons-first-about { margin: 12px 0 0; } .lessons-later { margin-top: 8px; } /* Review: the same card in a dialog, sized like the Notebook; max-width: none lifts the base .modal 440px cap. */ .modal.lessons-dialog { width: min(1200px, 90vw); max-width: none; } .lessons-dialog .card { margin: 0; box-shadow: none; border: 0; padding: 0; max-width: none; } /* Closable (corner x, Not now, Escape), locked while saving. The button bar is pinned to the dialog's bottom edge while the lessons scroll under it: the negative margins run it to the dialog's edges over its padding. */ .lessons-dialog .modal-actions { align-items: center; justify-content: flex-end; } .lessons-dialog > .modal-actions { position: sticky; /* Chrome sticks inside the dialog's 24px bottom padding; this reaches its edge. */ bottom: -24px; z-index: 1; margin: 20px -26px -24px; padding: 14px 26px 20px; background: var(--panel); border-top: 1px solid var(--rule); } /* After the card, in the scrolling body; the margin keeps a reply scrolled into view clear of the pinned buttons. The page-wide .md 68ch cap is lifted so the reply fills the box. */ .lessons-suggestions { margin: 16px 0 0; scroll-margin-bottom: 96px; } .lessons-suggestions h3 { margin: 0 0 6px; font-size: var(--fs-md); } .lessons-suggestions .md { max-width: none; max-height: 40vh; overflow: auto; font-size: var(--fs-md); } .lessons-asking { display: inline-flex; align-items: center; gap: 8px; margin: 0; } .lessons-asking .spinner { margin: 0; } .lessons-dialog .modal-actions { flex-wrap: wrap; } /* A span is inline, so the ring needs a box to show at its size in a button. */ .lessons-dialog .modal-actions .btn .spinner { display: inline-block; vertical-align: -2px; margin-right: 8px; } /* Asking: held, but at full strength so the spinning ring reads as working. */ .lessons-dialog #lessons-suggest.is-asking:disabled { opacity: 1; cursor: progress; } .modal-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; font-size: var(--fs-h2); line-height: 1; color: var(--ink-3); background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; } .modal-x:hover:not(:disabled), .modal-x:focus-visible { color: var(--ink); background: var(--panel-2); } .modal-x:disabled { opacity: 0.4; cursor: default; } .lessons-dialog.is-saving .card { opacity: 0.6; } .lessons-unsaved { flex: 1 1 100%; } .lessons-unsaved .modal-actions { flex-wrap: wrap; } .lessons-unsaved .btn { white-space: nowrap; } .lessons-unsaved-text { margin: 0 0 8px; font-size: var(--fs-md); color: var(--ink); } /* Shown the moment a Learning, Review or save button is pressed. */ .learn-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); } .learn-banner.is-busy .dash-nudge-text { display: inline-flex; align-items: center; gap: 8px; } .learn-row.is-busy .learn-pill { opacity: 0.6; }