/* The Learning Center pages (/learn, /learn/handbook, /learn/operations).
   Colors come from the Crisp tokens in app.css. Layout follows the content
   width (.app-container is a size container), never the window. */

.learn-page, .guide-page { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; }
.learn-intro { font-size: 0.9375rem; color: var(--c-ink-2); }

/* the two books: handbook + Operations Guide */
.learn-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.learn-book { color: inherit; text-decoration: none; transition: border-color 0.15s ease; }
.learn-book:hover { border-color: var(--c-accent); color: inherit; }
.learn-book .card-body { display: flex; gap: 14px; align-items: flex-start; }
.learn-book h2 { font-size: 1rem; margin: 0 0 4px; }
.learn-book-icon { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: var(--c-accent-soft); color: var(--c-accent-dark); }
.learn-book-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; font-weight: 500; color: var(--c-accent-dark); }
.learn-book-link .icon { width: 14px; height: 14px; }

/* Find a walkthrough */
.learn-walkthroughs { display: flex; flex-direction: column; gap: 14px; }
.learn-find-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.learn-find { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; max-width: 460px; font-weight: 500; }
.learn-area { display: flex; flex-direction: column; gap: 8px; }
.learn-area-title { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); margin: 6px 0 0; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.learn-card .card-body { display: flex; flex-direction: column; gap: 6px; height: 100%; }
.learn-card h3 { font-size: 0.9375rem; margin: 2px 0 0; }
.learn-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.learn-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.learn-card.is-done { background: var(--c-panel); }

/* Operations Guide tabs are links (each tab is its own address); same look as .tabs-line buttons */
.ops-tabs a {
  font-size: 0.875rem; padding: 8px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--c-faint); text-decoration: none;
}
.ops-tabs a:hover { color: var(--c-ink); }
.ops-tabs a.active { color: var(--c-ink); font-weight: 500; border-bottom-color: var(--c-accent); }

/* the handbook and the Operations Guide */
.guide-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
@container (max-width: 760px) { .guide-cols { grid-template-columns: minmax(0, 1fr); } .guide-toc { position: static !important; } }
.guide-toc { position: sticky; top: calc(var(--hdr-h, 52px) + 20px); display: flex; flex-direction: column; gap: 2px; font-size: 0.8125rem; }
.guide-toc .toc-title { font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.75rem; margin-bottom: 4px; }
.guide-toc a { color: var(--c-ink-2); padding: 3px 8px; border-radius: 6px; text-decoration: none; }
.guide-toc a:hover { background: var(--c-row); }
.guide-doc { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 760px; }
.guide-doc section { scroll-margin-top: 72px; }
.guide-doc h2 { font-size: 1.125rem; margin: 0 0 8px; }
.guide-doc h3 { font-size: 0.9375rem; margin: 14px 0 6px; }
.guide-doc p, .guide-doc li { color: var(--c-ink-2); line-height: 1.55; }
.guide-doc p { margin: 0 0 8px; }
.guide-doc ul, .guide-doc ol { margin: 0 0 8px; padding-left: 20px; }
.guide-doc li { margin-bottom: 4px; }
.guide-doc .where { font-family: var(--tblr-font-monospace); font-size: 0.8125rem; color: var(--c-ink); background: var(--c-panel);
  border: 1px solid var(--c-line); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.guide-callout { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--c-line); background: var(--c-panel); }
.guide-callout.accent { background: var(--c-accent-soft); border-color: transparent; }
.guide-callout > :last-child { margin-bottom: 0; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin: 4px 0 10px; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--c-line); }
.guide-table th { color: var(--c-muted); font-weight: 600; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.guide-cards .card-body { display: flex; flex-direction: column; gap: 4px; }
.guide-cards h3 { margin: 0; font-size: 0.875rem; }
.guide-cards .btn { align-self: flex-start; margin-top: 6px; }

/* Policies & Procedures */
.policy { padding: 12px 14px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--tblr-bg-surface, #fff); color: var(--c-ink); }
.policy h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.policy > :last-child { margin-bottom: 0; }
/* "not written yet": Tabler's own .placeholder is a loading skeleton (background
   currentColor !important, opacity .2, wait cursor) -- undo all of it here */
.policy.placeholder:not(.btn):not([class*="bg-"]) { border-style: dashed; background-color: var(--tblr-bg-surface, #fff) !important; color: var(--c-ink); opacity: 1;
  cursor: auto; display: block; min-height: 0; vertical-align: baseline; animation: none; -webkit-mask-image: none; mask-image: none; }
.policy.placeholder::before { content: none; }
.policy-edit { display: flex; flex-direction: column; gap: 10px; }
.policy-edit .policy-row { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--c-line); border-radius: 8px; }
.policy-edit textarea { min-height: 120px; }
