/* Merit AC, shared across every emitted page.
   Direction: editorial composition (Cosmos), product staging (Motion Index /
   Raivcoo / 24fps), purposeful interaction (Aceternity UI / Design Spells).
   Original CSS; no copied assets, paid components, or new dependencies. */
:root {
  --merit-forest: #205b56;
  --merit-copper: #a65334;
  --merit-paper: #f8f5ef;
  --merit-ink: #202a27;
  --merit-ease: cubic-bezier(.22,1,.36,1);
  --merit-radius: 16px;
}
body[data-merit-surface] { -webkit-font-smoothing: antialiased; }
body[data-merit-surface] :is(h1,h2,h3) { text-wrap: balance; }
body[data-merit-surface] :is(p,li,dd) { text-wrap: pretty; }
body[data-merit-surface] :is(button,input,select,textarea) { font: inherit; }
body[data-merit-surface] :is(button,input:not([type="checkbox"]):not([type="radio"]),select) { min-height: 44px; }
body[data-merit-surface] :is(button,a,input,textarea,select,summary):focus-visible {
  outline: 2px solid var(--brand,var(--merit-forest)); outline-offset: 4px;
}
body[data-merit-surface] :is(button,.btn,.nav-cta,.gcard-price) {
  transition: background-color .2s, border-color .2s, box-shadow .25s, transform .25s var(--merit-ease);
}
body[data-merit-surface] :is(button,.btn,.nav-cta,.gcard-price):active { transform: translateY(1px); }
body[data-merit-surface] :is(img,video,svg) { max-width: 100%; }

/* Editorial foundation: a consistent hierarchy for product, article, lesson,
   reference, policy and account utility pages. */
body[data-merit-surface="editorial"] { background: var(--merit-paper); }
body[data-merit-surface="editorial"] .site-inner { max-width: 1480px; }
body[data-merit-surface="editorial"] header.site { background: #f8f5eff5; border-bottom: 1px solid #202a271a; }
body[data-merit-surface="editorial"] .nav-panel-inner { border-radius: 16px; box-shadow: 0 18px 48px #202a2714; }
body[data-merit-surface="editorial"] .nav-item { border-radius: 7px; transition: background .2s, padding .2s; }
body[data-merit-surface="editorial"] .nav-item:hover { background: #205b560a; padding-left: 10px; }
body[data-merit-surface="editorial"] .local-navigation { border-bottom: 1px solid var(--line); background: transparent; }
body[data-merit-surface="editorial"] .local-navigation a { min-height: 44px; align-content: center; }
body[data-merit-surface="editorial"] .page-trail { font-size: 11px; color: #62695f; padding-top: 28px; }
body[data-merit-surface="editorial"] main.content:not(.merit-home) { padding-top: clamp(36px,5vw,72px); }
body[data-merit-surface="editorial"] main.content > h1,
body[data-merit-surface="editorial"] :is(.hero-center,.hero-wash) h1 {
  font-family: var(--font-display); font-weight: 650; letter-spacing: -.055em;
  line-height: 1.06; font-size: clamp(38px,5.4vw,74px);
}
body[data-merit-surface="editorial"] main.content:not(.wide) > h1 { font-size: clamp(36px,4.4vw,60px); }
body[data-merit-surface="editorial"] .hero-center {
  text-align: left; padding: clamp(28px,4vw,56px); border-radius: 22px;
  border: 1px solid #205b561a; background: #e9eee5;
}
body[data-merit-surface="editorial"] .hero-center :is(h1,.lead) { margin-left: 0; margin-right: 0; }
body[data-merit-surface="editorial"] .hero-center .cta-row { justify-content: flex-start; }
body[data-merit-surface="editorial"] main.content .lead { font-size: clamp(17px,1.6vw,20px); line-height: 1.7; }
body[data-merit-surface="editorial"] .kicker { color: var(--merit-forest); }
body[data-merit-surface="editorial"] .section-head { padding-top: 28px; border-top: 1px solid var(--line); }
body[data-merit-surface="editorial"] .section-head h2 { max-width: 23ch; }
body[data-merit-surface="editorial"] :is(.card,.plan,.band,.build-sheet) { border-radius: var(--merit-radius); }
body[data-merit-surface="editorial"] :is(.plan,.card) { border: 1px solid var(--line); background: #fffdf8; }
body[data-merit-surface="editorial"] .plan.featured { border-color: #205b56; box-shadow: 0 8px 28px #205b560b; }
body[data-merit-surface="editorial"] .gallery { gap: 32px 24px; }
body[data-merit-surface="editorial"] .gcard { overflow: hidden; border: 1px solid #202a271a; border-radius: 16px; background: #fffdf8; }
body[data-merit-surface="editorial"] .gcard-body { padding: 22px; }
body[data-merit-surface="editorial"] .gthumb { border-radius: 0; overflow: hidden; }
body[data-merit-surface="editorial"] .gthumb img { transition: transform .65s var(--merit-ease); }
body[data-merit-surface="editorial"] .gcard:has(a:hover) .gthumb { transform: none; }
body[data-merit-surface="editorial"] .gcard:has(a:hover) .gthumb img { transform: scale(1.035); }
body[data-merit-surface="editorial"] .gcard-title { font-size: 22px; letter-spacing: -.035em; }
body[data-merit-surface="editorial"] .gcard-desc { line-height: 1.65; }
body[data-merit-surface="editorial"] .gcard-price { min-height: 44px; border-radius: 8px; font-size: 12px; }
body[data-merit-surface="editorial"] .product-story { border-radius: 20px; box-shadow: none; border: 1px solid #202a271a; }
body[data-merit-surface="editorial"] .product-story__photo { transition: transform .9s var(--merit-ease); }
body[data-merit-surface="editorial"] .product-story:hover .product-story__photo { transform: scale(1.015); }
body[data-merit-surface="editorial"] :is(.hero-shot,.hero-preview,.hero-terminal) { border-radius: 16px; overflow: hidden; }
body[data-merit-surface="editorial"] :is(.resource-index,.software-directory) { gap: 12px; border: 0; }
body[data-merit-surface="editorial"] :is(.resource-index,.software-directory) > a {
  border: 1px solid var(--line); border-radius: 12px; padding: 26px;
  background: #fffdf8; transition: background .2s, border-color .2s;
}
body[data-merit-surface="editorial"] :is(.resource-index,.software-directory) > a:hover { background: #eaf0e7; border-color: #205b5640; }
body[data-merit-surface="editorial"] .grid a.tile { min-height: 160px; transition: background .2s; }
body[data-merit-surface="editorial"] :is(.filter-row,.home-linkline) a { min-height: 44px; align-content: center; }
body[data-merit-surface="editorial"] :is(pre,.table-wrap,.table-scroll) { border-radius: 10px; }
body[data-merit-surface="editorial"] :is(pre,code) { tab-size: 2; }
body[data-merit-surface="editorial"] table { font-variant-numeric: tabular-nums; }
body[data-merit-surface="editorial"] summary { min-height: 44px; align-content: center; }
body[data-merit-surface="editorial"] :is(input,textarea,select) { border-radius: 8px; }
body[data-merit-surface="editorial"] footer.site { border-top: 1px solid var(--line); background: #e9ede4; }
body[data-merit-surface="editorial"] .footer-col a { display: inline-flex; min-height: 44px; align-items: center; }

/* Homepage: show the actual learning / business / measurement experience
   alongside the promise. Tabs are user controlled, with no autoplay. */
.home-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.08fr); gap: clamp(24px,4vw,64px); align-items: center; padding: 60px 0 64px; }
.home-in-use { margin: 24px 0 0; border-radius: 18px; overflow: hidden; background: #e9ede4; }
.home-in-use img { display: block; width: 100%; height: auto; }
.home-in-use figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-size: 12px; color: #46584e; }
.home-in-use figcaption > span { font-size: 11px; }
.home-intro .home-hero { padding: 0; text-align: left; }
body[data-merit-surface="editorial"] main.merit-home .home-intro h1 {
  font-size: clamp(56px,5.7vw,84px) !important; line-height: 1.03 !important;
  max-width: 10ch; margin: 24px 0 !important; letter-spacing: -.065em !important;
}
.home-intro .hero-spectrum { display: block; margin-left: 0; white-space: normal; }
.home-intro .hero-statement { font-size: 25px; margin: 0 0 16px; letter-spacing: -.035em; }
.home-intro .hero-description { font-size: 16px; margin: 0; max-width: 44ch; }
.home-intro .home-hero > .cta-row { justify-content: flex-start; gap: 14px; margin-top: 28px; }
.home-intro .hero-text-link { font-size: 14px; }
.home-intro .hero-eyebrow { font-size: 11px; color: var(--merit-forest); }
.home-intro .product-stage { position: relative; padding: 22px; margin: 0; border: 1px solid #205b5626; border-radius: 24px; background: #e5ebe1; min-width: 0; }
.home-intro .stage-controls { width: 100%; border: 0; background: transparent; margin: 0 0 18px; padding: 0; gap: 3px; }
.home-intro .stage-controls button { flex: 1; min-height: 44px; padding: 8px 10px; border-radius: 8px; font-size: 12px; white-space: normal; color: #46584e; }
.home-intro .stage-controls button[aria-selected="true"] { background: #205b56; color: #fffdf8; box-shadow: none; }
.home-intro .stage-surface { border-radius: 14px; border: 1px solid #205b561a; box-shadow: 0 12px 32px #2039340c; }
.home-intro .stage-panel { min-height: 500px; padding: 26px; }
.home-intro .stage-course-head { gap: 12px; padding-bottom: 22px; }
main.merit-home .home-intro .stage-course-head h2 { font-size: 38px; }
.home-intro .stage-course-number { font-size: 90px; color: #d7e2d3; }
.home-intro .stage-course-number > span { font-size: 11px; color: #566952; max-width: 90px; line-height: 1.5; }
.home-intro .stage-overline { font-size: 11px; color: #566952; }
.home-intro .stage-lessons > a { grid-template-columns: 36px minmax(0,1fr) 18px; gap: 12px; padding: 17px 0; border-color: #dce3d5; }
.home-intro .stage-lessons .stage-overline { font-size: 11px; }
.home-intro .stage-lessons h3 { font-size: 15px; line-height: 1.4; }
.home-intro .stage-caption { font-size: 11px; color: #566952; flex-wrap: wrap; gap: 8px; }
.home-intro .stage-caption a { min-height: 44px; }
.home-intro .stage-operator { grid-template-columns: 1fr; gap: 18px; }
main.merit-home .home-intro .stage-operator h2 { font-size: 34px; margin: 10px 0; }
.home-intro .stage-operator p { max-width: none; }
.home-intro .stage-terminal { padding: 20px; }
.home-intro .stage-terminal dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.home-intro .stage-terminal dl > div { min-width: 0; }
.home-intro .stage-terminal dd { font-size: 23px; }
.home-intro .stage-terminal dd small { display: block; margin: 5px 0 0; font-size: 11px; }
.home-intro .stage-terminal .stage-overline { color: #d5e1d0; }
.home-intro .stage-terminal .terminal-command { margin: 0; padding: 14px 0; }
.home-intro .stage-measure-head { align-items: flex-start; flex-direction: column; gap: 10px; }
main.merit-home .home-intro .stage-measure h2 { font-size: 34px; }
body[data-merit-surface="editorial"] .home-meta { justify-content: space-between; padding-inline: 40px; font-size: 11px; border-bottom: 1px solid var(--line); background: transparent; }
body[data-merit-surface="editorial"] .home-meta > span { display: block; font: 11px var(--font-mono); }
body[data-merit-surface="editorial"] .home-range { gap: 10px; border: 0; }
body[data-merit-surface="editorial"] .home-range > a { background: #eeeee6; border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px; transition: background .2s; }
body[data-merit-surface="editorial"] .home-range > a:hover { background: #e0e9dc; }
body[data-merit-surface="editorial"] .home-range small { font-size: 12px; }
body[data-merit-surface="editorial"] .home-proof { justify-content: flex-start; flex-wrap: wrap; gap: 12px 24px; font-size: 11px; color: #62695f; }
body[data-merit-surface="editorial"] .home-section-heading { grid-template-columns: 40px 1fr auto; border-top: 1px solid var(--line); padding-top: 24px; }
body[data-merit-surface="editorial"] .home-section-heading > span { display: block; align-self: start; font: 12px var(--font-mono); color: var(--merit-copper); padding-top: 8px; }
body[data-merit-surface="editorial"] main.merit-home .home-section-heading h2 { font-size: clamp(30px,3.6vw,48px); }
body[data-merit-surface="editorial"] .home-products { gap: 24px; }
body[data-merit-surface="editorial"] .home-closing { text-align: left; padding: clamp(32px,6vw,72px); background: #203934; border-radius: 20px; color: #fffdf8; }
body[data-merit-surface="editorial"] .home-closing :is(h2,p,.eyebrow) { color: #fffdf8; }
body[data-merit-surface="editorial"] .home-closing .cta-row { justify-content: flex-start; }
body[data-merit-surface="editorial"] .home-closing .btn-primary { background: #fffdf8; color: #203934; }
body[data-merit-surface="editorial"] .home-closing .btn-secondary { border-color: #aab9ad; color: #fffdf8; background: transparent; }

/* The entire signed-in application uses the same surfaces. Theme tokens and
   status colors remain controlled by the existing app. */
body[data-merit-surface="workspace"] { font-family: var(--font-display); }
body[data-merit-surface="workspace"] .workspace-navigation { min-height: 72px; padding-inline: 28px; }
body[data-merit-surface="workspace"] .workspace-main > .sidebar { top: 72px; height: calc(100vh - 72px); }
body[data-merit-surface="workspace"] .sb-item { min-height: 48px; border-radius: 9px; border: 1px solid transparent; }
body[data-merit-surface="workspace"] .sb-item.active { background: var(--brand-soft); border-color: var(--line-strong); font-weight: 600; }
body[data-merit-surface="workspace"] .topbar h1 { font-size: clamp(30px,3vw,42px); font-weight: 650; letter-spacing: -.055em; }
body[data-merit-surface="workspace"] .kpis { gap: 14px; }
body[data-merit-surface="workspace"] .kpi { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 22px; }
body[data-merit-surface="workspace"] .kpi + .kpi { border-left: 1px solid var(--line); }
body[data-merit-surface="workspace"] .kpi .val { font-size: clamp(26px,2.7vw,38px); font-weight: 600; font-variant-numeric: tabular-nums; }
body[data-merit-surface="workspace"] .kpi :is(.lab,.note) { font-size: 11px; line-height: 1.55; }
body[data-merit-surface="workspace"] .card { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 12px #00000003; }
body[data-merit-surface="workspace"] .card h2 { font-size: 19px; font-weight: 600; }
body[data-merit-surface="workspace"] table { font-variant-numeric: tabular-nums; }
body[data-merit-surface="workspace"] tbody tr { transition: background .16s; }
body[data-merit-surface="workspace"] tbody tr:hover { background: var(--panel-alt); }
body[data-merit-surface="workspace"] .auth-page { background: var(--bg); }
body[data-merit-surface="workspace"] .auth-page h1 { font-size: clamp(36px,4vw,58px); font-weight: 650; }
body[data-merit-surface="workspace"] :is(input,select,textarea) { border-radius: 8px; }

/* Standalone pages retain their working demos and page structures, with the
   same brand palette, type hierarchy, inputs and interactive affordances. */
body[data-merit-surface="standalone"] {
  --concrete: #f8f5ef; --slab: #e9ede4; --safety: #e2ad88; --signal: #205b56;
  --navy: #203934; --navy2: #294840;
  font-family: "Manrope","Geist",system-ui,sans-serif;
  background-image: none;
}
body[data-merit-surface="standalone"] :is(h1,h2,h3) { font-family: inherit; letter-spacing: -.04em; }
body[data-merit-surface="standalone"] :is(.buy,.ws-btn,.run-btn,.btn) { min-height: 44px; border-radius: 8px; }
body[data-merit-surface="standalone"] :is(.demo-brand,.strip a,.brand) { min-height: 44px; align-content: center; }
body[data-merit-surface="standalone"] .hero h1 { font-size: clamp(48px,8vw,100px); line-height: 1; letter-spacing: -.055em; font-variation-settings: normal; }
body[data-merit-surface="standalone"] .hero { border-bottom-width: 1px; }
body[data-merit-surface="standalone"] :is(.terminal,.demo-output) { border-radius: 12px; }

/* Short, once-only entrances. Content is visible before JS and when motion
   is reduced. No parallax, cursor capture, loading splash, or autoplay. */
@keyframes merit-resolve { from { opacity: .8; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.merit-enter { animation: merit-resolve .6s var(--merit-ease) both; }
body[data-merit-surface="workspace"] .view.active { animation: merit-resolve .3s var(--merit-ease) both; }
@media (hover: none) {
  body[data-merit-surface="editorial"] .gcard:has(a:hover) .gthumb img,
  body[data-merit-surface="editorial"] .product-story:hover .product-story__photo { transform: none; }
}
@media(max-width:1100px) {
  .home-intro { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  body[data-merit-surface="editorial"] main.merit-home .home-intro h1 { max-width: 13ch; font-size: clamp(54px,8vw,80px) !important; }
  .home-intro .product-stage { max-width: 760px; width: 100%; box-sizing: border-box; }
  .home-intro .stage-operator { grid-template-columns: 1fr 1fr; }
  .home-intro .stage-terminal dl { display: block; }
}
@media(max-width:700px) {
  .home-intro { padding: 32px 0; gap: 28px; }
  body[data-merit-surface="editorial"] main.merit-home .home-intro h1 { font-size: clamp(48px,11vw,68px) !important; margin-block: 18px !important; }
  .home-intro .hero-statement { font-size: 23px; }
  .home-intro .hero-description { font-size: 15px; }
  .home-intro .home-hero > .cta-row { align-items: flex-start; }
  .home-intro .product-stage { padding: 12px; border-radius: 18px; }
  .home-intro .stage-panel { padding: 20px 16px; min-height: 510px; }
  .home-intro .stage-controls button { font-size: 11px; padding: 8px 6px; }
  .home-intro .stage-course-number { font-size: 70px; }
  main.merit-home .home-intro .stage-course-head h2 { font-size: 32px; }
  .home-intro .stage-operator { grid-template-columns: 1fr; }
  .home-intro .stage-lessons h3 { font-size: 14px; }
  body[data-merit-surface="editorial"] .home-meta { margin-inline: -20px; padding-inline: 20px; justify-content: flex-start; }
  body[data-merit-surface="editorial"] .home-meta > span { display: none; }
  body[data-merit-surface="editorial"] .home-section-heading { grid-template-columns: 24px 1fr; gap: 12px; }
  body[data-merit-surface="editorial"] .home-section-heading a { grid-column: 2; justify-self: start; min-height: 44px; }
  body[data-merit-surface="editorial"] .home-range { gap: 8px; }
  body[data-merit-surface="editorial"] .home-range > a { padding: 20px 14px; }
  body[data-merit-surface="editorial"] .home-range strong { font-size: 17px; }
  body[data-merit-surface="editorial"] .gcard-body { padding: 20px; }
  body[data-merit-surface="editorial"] .hero-center { padding: 26px 20px; border-radius: 16px; }
  body[data-merit-surface="editorial"] .product-story { border-radius: 14px; }
  body[data-merit-surface="editorial"] .local-navigation > div > div { overflow-x: auto; flex-wrap: nowrap; }
  body[data-merit-surface="workspace"] .workspace-navigation { padding-inline: 16px; }
  body[data-merit-surface="workspace"] .workspace-main > .sidebar { position: static; height: auto; }
  body[data-merit-surface="workspace"] .kpis { gap: 10px; }
  body[data-merit-surface="workspace"] .kpi { padding: 18px 14px; }
  body[data-merit-surface="standalone"] .hero h1 { font-size: clamp(44px,12vw,68px); }
}
@media(prefers-reduced-motion:reduce) {
  body[data-merit-surface] *, body[data-merit-surface] *::before, body[data-merit-surface] *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  body[data-merit-surface] :is(.gthumb img,.product-story__photo,button,.btn,.nav-cta,.gcard-price) { transform: none !important; }
}
@media(max-width:800px) {
  body[data-merit-surface="workspace"] .workspace-main > .sidebar { position: static; height: auto; }
}
