/* ============================================================
   Orion editorial layouts: guides, comparisons, examples
   (sticky TOC, key takeaways, chips, prose blocks, reveal)
   ============================================================ */

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--forest, #2f6f57);
  margin: 0 0 .6rem;
}
.read-time { font-size: .82rem; color: var(--muted, #6b6b7b); margin: -.4rem 0 1.4rem; }

/* Two column article layout with sticky table of contents */
.guide-layout, .example-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding-block: 2.4rem 4rem;
}
.guide-aside { position: sticky; top: 88px; align-self: start; }
.toc { border: 1px solid var(--line, #e6e6ee); border-radius: 14px; padding: 1rem 1.1rem; background: #fff; }
.toc-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--muted, #6b6b7b); margin: 0 0 .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: .35rem 0 .35rem .2rem; font-size: .88rem; line-height: 1.35; color: var(--ink, #23232c); text-decoration: none; border-left: 2px solid transparent; padding-left: .7rem; transition: color .15s ease, border-color .15s ease; }
.toc a:hover { color: var(--forest, #2f6f57); }
.toc a.active { color: var(--forest, #2f6f57); border-left-color: var(--forest, #2f6f57); font-weight: 650; }

.guide-main, .example-main { max-width: 780px; }
/* Blog posts reuse the guide layout */
.guide-layout .post { padding-block: 0; max-width: none; }
.guide-layout .post h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: 0 0 .7rem; letter-spacing: -.02em; }
.guide-main h1, .example-main h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: 0 0 .7rem; letter-spacing: -.02em; }
.guide-main .lede, .example-main .lede { font-size: 1.14rem; color: var(--muted, #6b6b7b); line-height: 1.6; margin: 0 0 1.4rem; }
.guide-main section, .example-main section { margin: 0 0 1.9rem; scroll-margin-top: 90px; }
.guide-main h2, .example-main h2 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 .7rem; letter-spacing: -.02em; }
.guide-main h3, .example-main h3 { font-size: 1.12rem; margin: 1.1rem 0 .35rem; }
.guide-main p, .example-main p { line-height: 1.78; }

.takeaways { background: #f4f3fb; border: 1px solid #e5e2f7; border-radius: 14px; padding: 1.1rem 1.3rem; margin: 0 0 2rem; }
.takeaways strong { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--forest, #2f6f57); margin-bottom: .5rem; }
.takeaways ul { margin: 0; padding-left: 1.1rem; }
.takeaways li { line-height: 1.65; margin-bottom: .35rem; }

.prose-list, .prose-steps { padding-left: 1.3rem; line-height: 1.78; }
.prose-list li, .prose-steps li { margin-bottom: .5rem; }
.prose-callout { background: #fff; border: 1px solid var(--line, #e6e6ee); border-left: 4px solid #9e8cf1; border-radius: 0 12px 12px 0; padding: 1rem 1.2rem; font-weight: 600; }
.prose-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose-table th, .prose-table td { border: 1px solid var(--line, #e6e6ee); padding: .65rem .8rem; text-align: left; vertical-align: top; }
.prose-table thead th { background: #f6f5fc; font-weight: 700; }
.table-note { font-size: .82rem; color: var(--muted, #6b6b7b); margin: .6rem 0 0; }

/* Skill / keyword chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1.2rem; }
.chip { display: inline-block; font-size: .85rem; padding: .35rem .7rem; border-radius: 999px; background: #eef4f0; color: #245043; border: 1px solid #d5e6dc; }
.chip.alt { background: #eef0fb; color: #2e2f63; border-color: #dcdef5; }

/* Mistake / fix cards */
.prose-table-wrap { display: grid; gap: .8rem; }
.mistake { border: 1px solid var(--line, #e6e6ee); border-radius: 12px; padding: .9rem 1.1rem; background: #fff; }
.mistake-bad { margin: 0 0 .35rem; color: #a8433c; font-weight: 600; }
.mistake-bad::before { content: "✗ "; }
.mistake-fix { margin: 0; color: #2f6f57; }
.mistake-fix::before { content: "✓ "; }

/* Example CV block */
.example-cv { margin: 1.4rem 0 1.6rem; }
.example-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* Reading progress bar */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #6d5bd0, #2f6f57); z-index: 60; transition: width .1s linear; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, #eeeef4 25%, #f6f6fa 37%, #eeeef4 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 900px) {
  .guide-layout, .example-layout { grid-template-columns: 1fr; }
  .guide-aside { position: static; }
  .toc { display: none; }
}

/* ============================================================
   Galleries: resume examples + templates
   ============================================================ */
.gallery-toolbar, .tpl-toolbar { display: flex; flex-direction: column; gap: 1rem; margin: 1.4rem 0 2rem; }
.gallery-search { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gallery-search input { flex: 1; min-width: 240px; padding: .85rem 1.05rem; border: 1px solid var(--line, #e6e6ee); border-radius: 12px; font-size: 1rem; font-family: inherit; }
.gallery-search input:focus { outline: 2px solid var(--forest, #2f6f57); outline-offset: 1px; }
.gallery-count { font-size: .85rem; color: var(--muted, #6b6b7b); white-space: nowrap; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.gallery-card { display: block; text-decoration: none; border: 1px solid var(--line, #e6e6ee); border-radius: 16px; overflow: hidden; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.gallery-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(28, 28, 34, .12); }
.gallery-card[hidden] { display: none; }
.gallery-thumb { padding: 12px; background: linear-gradient(180deg, #f1f2f7, #e9eaf1); max-height: 268px; overflow: hidden; }
.gallery-thumb .cv-doc { box-shadow: none; }
.gallery-meta { padding: .8rem 1rem 1rem; }
.gallery-meta h3 { margin: 0 0 .15rem; font-size: 1rem; }
.gallery-meta p { margin: 0; font-size: .8rem; color: var(--muted, #6b6b7b); }
.gallery-empty { text-align: center; color: var(--muted, #6b6b7b); padding: 2rem; }
.tpl-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.tpl-actions a, .tpl-preview { font-size: .82rem; font-weight: 650; color: var(--forest, #2f6f57); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-family: inherit; }
.swatches { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted, #6b6b7b); }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; background: var(--sw); cursor: pointer; padding: 0; }
.swatch.active { border-color: var(--ink, #23232c); }

/* Full-screen preview modal */
.tpl-modal { position: fixed; inset: 0; background: rgba(20, 20, 28, .62); display: none; align-items: flex-start; justify-content: center; padding: 2.5rem 1rem; z-index: 90; overflow: auto; }
.tpl-modal.open { display: flex; }
.tpl-modal-inner { background: #fff; border-radius: 16px; max-width: 860px; width: 100%; padding: 1.4rem; position: relative; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.tpl-modal-close { position: absolute; top: .5rem; right: .8rem; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted, #6b6b7b); }
.tpl-modal-inner .cv-doc { max-width: 100%; box-shadow: none; }

/* Drag and drop state for tool panels */
[data-tab-content].dragging, .tool-panel.dragging { outline: 2px dashed var(--forest, #2f6f57); outline-offset: 6px; background: #f2f9f5; }

