/* Daily-use layout: commands first, explanations on demand. */
#main { padding-top: 30px; }
.page-heading { margin: 0 0 24px; }
.page-heading h1 { font-size: 2.2rem; margin: 0 0 10px; }
.page-heading p { max-width: 65ch; }
.topbar { height: 72px; }
.search-wrap { height: 42px; }
.platform-label { font-size: .75rem; }
.results-line { margin: 20px 0 12px; align-items: center; min-height: 24px; font-size: .875rem; }
.results-line .text-button { font-size: .875rem; }
.reference-toolbar { align-items: center; }
.reference-options label, .reference-options select { font-size: .875rem; }
.reference-legend { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0 17px; border-bottom: 1px solid var(--line); font-size: .875rem; color: #596e50; }
.reference-legend > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.notation-example > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mobile-tool-filter, .notation-trigger { display: none; }
.notation-guide p { font-size: 1rem; line-height: 1.8; margin: 20px 0; }
.notation-guide kbd, .notation-guide code { font-size: .9375rem; }
.reference-legend kbd { font-size: .875rem; }
.explanations-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; color: #3c5b30; font-size: .875rem; white-space: nowrap; }
.explanations-toggle .icon { width: 17px; height: 17px; }
.explanations-toggle[aria-pressed="true"] { font-weight: 650; }
.reference-group { margin: 23px 0 28px; }
.reference-group-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #607653; }
.reference-group-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; letter-spacing: -.015em; }
.reference-group-heading > span { font-size: .875rem; }
.reference-rows { background: white; border: 1px solid #dbe3d5; border-radius: 10px; overflow: hidden; }
.reference-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; border-bottom: 1px solid #e6ecdf; position: relative; }
.reference-row:last-child { border-bottom: 0; }
.reference-row:has(details[open]) { background: #f8fbf3; }
.reference-row:hover { background: #f7faf3; }
.ref-disclosure { min-width: 0; }
.ref-disclosure > summary { display: grid; grid-template-columns: minmax(200px, .95fr) minmax(150px, 1fr) 20px; align-items: center; gap: 20px; min-height: 86px; padding: 16px 12px 16px 20px; cursor: pointer; list-style: none; }
.ref-disclosure > summary::-webkit-details-marker { display: none; }
.ref-disclosure > summary:focus-visible { outline: 3px solid #537c3e; outline-offset: -4px; border-radius: 6px; }
.ref-task { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ref-task strong { font-size: 1rem; line-height: 1.4; font-weight: 550; }
.row-context { color: #67785b; font-size: .875rem; line-height: 1.45; }
.custom-context { color: #6a6834; }
.row-command { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; line-height: 1.7; }
.row-command code { font-size: 1rem; overflow-wrap: anywhere; color: #27411d; white-space: pre-wrap; }
.row-command kbd, .command-value kbd { display: inline-block; max-width: 100%; border: 1px solid #d6e1cb; border-bottom: 2px solid #bfceb1; border-radius: 5px; color: #334c25; background: #f1f6e9; padding: 2px 7px; font-size: .9375rem; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.key-separator { font-family: inherit; font-size: .8125rem; color: #718065; padding: 0 2px; }
.typed-keys { background: #f2f6ec; padding: 2px 6px; border-radius: 4px; }
.expand-cue { color: #8a9b7d; display: inline-flex; }
.expand-cue .icon { width: 15px; height: 15px; transition: transform .15s; }
.ref-disclosure[open] .expand-cue .icon { transform: rotate(90deg); }
.row-actions { display: flex; padding: 21px 10px 0 0; gap: 1px; }
.row-actions .icon-button { width: 40px; height: 40px; }
.ref-explanation { padding: 0 24px 20px 20px; max-width: 82ch; }
.ref-explanation p { font-size: 1rem; line-height: 1.75; color: #53654a; }
.ref-explanation .source-link { font-size: .875rem; margin-top: 9px; }
.prompt-row .ref-disclosure > summary { grid-template-columns: 1fr 20px; }
.prompt-row .row-command { grid-column: 1; grid-row: 2; }
.prompt-row .expand-cue { grid-column: 2; grid-row: 1; }
.command-value { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.command-value > code { display: block; }
.keys-block { background: #f8faf5; }
.command-context { font-size: .875rem; margin-bottom: 8px; }
.inline-status { color: #42642e; font-size: .875rem; margin-top: 14px; }
.inline-status:empty { display: none; }

/* A shorter home page connects the next task to the four layers. */
.workbench-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; align-items: center; margin: 0 0 30px; }
.workbench-intro h1 { font-size: clamp(2.2rem, 3.1vw, 3.2rem); margin: 12px 0 15px; line-height: 1.12; letter-spacing: -.045em; }
.workbench-intro h1 em { font-family: Georgia, serif; font-weight: 400; color: #536f44; }
.workbench-intro > div > p { font-size: 1rem; max-width: 37ch; }
.workbench-intro .hero-actions { margin-top: 20px; }
.inline-count { padding-left: 5px; font-size: .75rem; opacity: .8; }
.next-lesson { border: 1px solid #cfddc0; background: #edf3e4; padding: 23px; border-radius: 12px; }
.next-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.next-top > span:last-child { font-size: .8125rem; color: #6d815b; }
.next-lesson .tool-badge { background: #dde8d0; }
.next-lesson h2 { font-size: 1.3rem; line-height: 1.35; margin: 10px 0; max-width: 29ch; }
.next-lesson p { font-size: 1rem; line-height: 1.6; }
.next-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 19px; }
.next-bottom .duration { font-size: .875rem; }
.stack-section { padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.4rem; }
.section-caption { font-size: .875rem; }
.stack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stack-tool { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border: 1px solid #dae3d2; border-radius: 9px; padding: 17px; gap: 11px; }
.stack-tool:hover { border-color: #91ab78; }
.stack-tool.selected { border-color: #7c9c5e; background: #f1f7e9; box-shadow: inset 0 0 0 1px #7c9c5e; }
.stack-tool-top { display: flex; align-items: center; gap: 11px; }
.stack-tool-top strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.stack-tool-top small { font-size: .875rem; color: #6c7b60; }
.stack-tool .tool-symbol { width: 35px; height: 35px; margin: 0; border-radius: 7px; }
.stack-tool .tool-symbol .icon { width: 20px; height: 20px; }
.stack-role { font-size: .875rem; color: #617452; }
.stack-clue { font-family: var(--mono); font-size: .75rem; color: #647c50; margin-top: auto; }
.stack-explanation { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 18px 0 0; }
.stack-explanation p { font-size: 1rem; max-width: 72ch; }
.stack-explanation .button { flex-shrink: 0; }
.shelf-empty { border: 1px dashed #cbd9bf; border-radius: 8px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 1rem; color: #657953; }
.shelf-empty .text-button { flex-shrink: 0; }
.saved-shelf .reference-group { margin: 13px 0; }
.compact-workflows .workflow-card { display: flex; flex-direction: row; justify-content: space-between; gap: 18px; padding: 20px; }
.compact-workflows .workflow-card h3 { font-size: 1rem; line-height: 1.4; }
.compact-workflows .workflow-card p { font-size: 1rem; margin: 8px 0 0; line-height: 1.6; }
.compact-workflows .duration { margin: 2px 0 0; font-size: .8125rem; }
.learning-group { margin-top: 30px; }
.learning-group .section-heading { margin-bottom: 14px; }
.learning-group .lesson-grid { margin-top: 0; gap: 14px; }
.learning-group .lesson-card { padding: 20px; }
.learning-group .lesson-top { margin-bottom: 14px; }
.learning-group .lesson-card h3 { font-size: 1.15rem; line-height: 1.35; margin: 0 0 9px; }
.learning-group .lesson-card p { font-size: 1rem; margin: 0; line-height: 1.65; }
.learning-group .duration { font-size: .8125rem; }
.lesson-card.next-up { border-color: #91ab78; background: #f5f9ed; }
.notes-panel { margin-top: 26px; }
.notes-panel textarea { min-height: 170px; }
.backup-panel { margin-top: 26px; }
.section:first-child { margin-top: 0; }

@media(max-width: 1200px) {
  .workbench-intro { gap: 25px; }
  .stack-grid { gap: 9px; }
  .stack-tool { padding: 13px; }
  .stack-tool-top { gap: 8px; }
  .stack-tool-top strong { font-size: 1rem; }
  .stack-role { font-size: .8125rem; }
  .stack-explanation { align-items: flex-start; }
  .ref-disclosure > summary { gap: 12px; grid-template-columns: minmax(170px, 1fr) minmax(140px, 1fr) 16px; }
}
@media(max-width: 1000px) {
  .workbench-intro { grid-template-columns: 1fr; gap: 23px; }
  .workbench-intro h1 br { display: none; }
  .workbench-intro > div > p { max-width: 55ch; }
  .next-lesson h2 { max-width: none; }
  .next-lesson { padding: 20px; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .stack-tool { padding: 17px; }
  .stack-tool-top strong { font-size: 1.1rem; }
  .stack-role { font-size: .875rem; }
  .stack-explanation { flex-direction: column; gap: 14px; }
  .reference-legend { align-items: flex-start; }
  .reference-legend > span { max-width: 300px; }
  .ref-disclosure > summary { grid-template-columns: minmax(0,1fr) 16px; gap: 9px; padding: 15px 8px 15px 17px; }
  .row-command { grid-column: 1; grid-row: 2; }
  .expand-cue { grid-column: 2; grid-row: 1 / span 2; }
  .row-actions { padding-top: 15px; }
  .compact-workflows .workflow-card { flex-direction: column; gap: 12px; }
  .compact-workflows .duration { margin: auto 0 0; }
}
@media(max-width: 700px) {
  #main { padding-top: 23px; }
  .topbar { height: 64px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1 { font-size: 1.9rem; }
  .page-heading p { font-size: 1rem; }
  .tool-tabs { display: none; }
  .mobile-tool-filter { display: flex; flex-direction: column; gap: 5px; font-size: .875rem; color: #657953; max-width: 220px; min-width: 0; }
  .mobile-tool-filter select { min-width: 0; width: 100%; font-size: .875rem; height: 42px; }
  .reference-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .reference-options { display: contents; }
  .reference-options label { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; font-size: .875rem; }
  .reference-options select { min-width: 0; width: 100%; height: 42px; }
  .reference-legend { gap: 8px; flex-direction: row; justify-content: space-between; align-items: center; font-size: .8125rem; padding: 4px 0 12px; }
  .notation-example { display: none; }
  .notation-trigger { display: inline-flex; padding: 6px 0; font-size: .875rem; color: #4d693d; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c1d2b2; }
  .reference-legend > span { max-width: none; }
  .explanations-toggle { align-self: flex-start; font-size: .875rem; }
  .reference-options { gap: 10px; }
  .reference-options label, .reference-options select { font-size: .8125rem; }
  .results-line { margin-top: 16px; font-size: .875rem; }
  .reference-group { margin-top: 18px; }
  .reference-group-heading h2 { font-size: 1rem; }
  .reference-group-heading > span { font-size: .8125rem; }
  .ref-disclosure > summary { padding: 14px 6px 14px 14px; gap: 8px; }
  .ref-task strong { font-size: 1rem; }
  .row-context { font-size: .875rem; }
  .row-command code, .row-command kbd { font-size: .875rem; }
  .ref-explanation { padding: 0 14px 18px; }
  .ref-explanation p { font-size: 1rem; }
  .row-actions { padding: 14px 4px 0 0; flex-direction: column; }
  .row-actions .icon-button { width: 36px; height: 36px; }
  .workbench-intro h1 { font-size: 2.3rem; }
  .workbench-intro h1 br { display: block; }
  .next-top { margin-bottom: 13px; }
  .next-lesson h2 { font-size: 1.25rem; }
  .workbench-intro .hero-actions { flex-wrap: nowrap; gap: 8px; }
  .workbench-intro .hero-actions .button { font-size: .8125rem; padding: 11px; }
  .inline-count { font-size: .75rem; padding-left: 0; }
  .stack-section { padding-top: 20px; }
  .stack-tool { padding: 14px; gap: 9px; }
  .stack-tool-top { align-items: flex-start; flex-direction: column; gap: 9px; }
  .stack-role { font-size: .875rem; }
  .stack-clue { font-size: .75rem; }
  .stack-tool-top small { font-size: .8125rem; }
  .stack-explanation p { font-size: 1rem; }
  .shelf-empty { padding: 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .learning-group .lesson-card { padding: 20px; }
  .learning-group .lesson-top { flex-wrap: wrap; gap: 10px; }
  .notes-panel { padding: 20px; }
  .section-heading h2 { font-size: 1.3rem; }
  .nav-link { font-size: .75rem; white-space: normal; line-height: 1.2; text-align: center; min-width: 0; }
  .app-shell { padding-bottom: 92px; }
}
