/* ─────────────────────────────────────────────────────────────
   Stein — homepage (index.html). The previous one is home-classic.html.
   Loaded after styles.css + ruled.css (nav, footer, the ruled column:
   two vertical hairlines at the column's edges, a full-bleed rule on top
   of every section, cells divided by hairlines) and home-app.css (the
   app's own styles for the screens in the tour, scoped to .appx).
   ───────────────────────────────────────────────────────────── */

:root {
  --ink: var(--text-primary);
  --ink-2: var(--text-secondary);
  --ink-3: #9c9b92;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── The ruled column ──
   Every block is exactly the column, with a rule along its top edge that
   runs edge to edge across the viewport (same border-image trick as
   ruled.css). Content sits inside with the site's cell padding. */
.v2-hero, .v2-tour-cell, .v2-proof, .v2-section, .v2-interquote, .v2-closing {
  width: var(--col);
  margin: 0 auto;
  box-sizing: border-box;
}
.v2-tour-cell, .v2-proof, .v2-section, .v2-interquote, .v2-closing {
  border-top: 1px solid var(--line);
  border-image: linear-gradient(var(--line), var(--line)) 1 / 1px 0 0 0 / 0 100vw;
}
.v2-wrap { padding: 0 20px; }
@media (min-width: 720px) { .v2-wrap { padding: 0 var(--cell-pad); } }
html { scroll-behavior: smooth; }
main { display: block; }

/* ── Type ── */
.v2-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.375rem, 5.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.v2-display--sm { font-size: clamp(2rem, 4.4vw, 3rem); }
/* The hero headline is a full sentence, so it runs smaller and wider. */
.v2-display--hero { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.08; max-width: 20ch; margin: 0 auto; }
.v2-lede strong { color: var(--ink); font-weight: 600; }
/* Rating pill, same recipe as go/pm-arsenal's .arsenal-rating. */
.v2-rating {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 24px; padding: 7px 16px 7px 12px; white-space: nowrap;
  border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary); letter-spacing: -0.003em;
}
.v2-rating strong { font-weight: 700; color: var(--text-primary); }
.v2-rating-stars { display: inline-flex; gap: 2px; color: #f5a623; }
.v2-rating-stars .icon { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 480px) { .v2-rating { font-size: 13px; gap: 8px; } .v2-rating-stars .icon { width: 14px; height: 14px; } }
.v2-accent { color: var(--accent); }
.v2-lede { font-size: clamp(1rem, 1.4vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); max-width: 38em; margin: 20px auto 0; text-wrap: pretty; }
.v2-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 0.8125rem; color: var(--ink-2); }
.v2-dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(26,158,64,0.45); } 70%,100% { box-shadow: 0 0 0 7px rgba(26,158,64,0); } }
.v2-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; }
.v2-cta .hero-cta-note { margin: 0; }
.v2-kicker { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.v2-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.028em; margin: 0; max-width: 20ch; color: var(--ink); text-wrap: balance; }
.v2-sub { color: var(--ink-2); font-size: 1.0625rem; max-width: 38em; margin: 16px 0 0; text-wrap: pretty; }
.v2-center { text-align: center; }
.v2-center .v2-h2 { margin-left: auto; margin-right: auto; max-width: none; }

/* ── Hero ── */
.v2-hero { padding: 72px 0 64px; text-align: center; }
@media (min-width: 720px) { .v2-hero { padding: 104px 0 88px; } }

/* ── Tour cell: the app window on the site's dashed floor grid ── */
.v2-tour-cell {
  padding: 40px 0 32px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='69.28' height='40'%3E%3Cpath d='M0 0L69.28 40M69.28 0L0 40' stroke='%232E2C27' stroke-opacity='0.09' stroke-dasharray='2 4' fill='none'/%3E%3C/svg%3E") center / 69.28px 40px;
}
@media (min-width: 720px) { .v2-tour-cell { padding: 48px 0 40px; } }
.tour { position: relative; }
.tour-window {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: -14px 14px 0 -1.5px #e6e4df, -14px 14px 0 0 var(--ink);
  overflow: hidden;
}
@media (max-width: 720px) { .tour-window { box-shadow: -8px 8px 0 -1.5px #e6e4df, -8px 8px 0 0 var(--ink); } }
.tour-chrome { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 14px; background: #fbfbfa; border-bottom: 1px solid var(--line); }
.tour-lights { display: flex; gap: 6px; }
.tour-lights i { width: 9px; height: 9px; border-radius: 50%; border: 1.2px solid var(--ink); }
.tour-lights i:first-child { background: var(--ink); }
.tour-url { margin: 0 auto; transform: translateX(-24px); font-size: 11.5px; color: var(--ink-3); }
.tour-viewport { position: relative; overflow: hidden; height: var(--vh, 520px); background: #f5f4f2; }
/* The app at its own 1280×800 desktop size, scaled to the window. */
.tour-scale { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tour-scale > .appx { width: 1280px; height: 800px; }
.tour-cursor { position: absolute; left: 0; top: 0; z-index: 20; width: 22px; height: 22px; opacity: 0; pointer-events: none; transition: transform 900ms var(--ease), opacity 250ms ease; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25)); }
.tour-cursor svg { width: 100%; height: 100%; fill: var(--ink); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; transition: transform 90ms ease-out; transform-origin: 20% 15%; }
.tour-cursor.is-on { opacity: 1; }
.tour-cursor.is-press svg { transform: scale(0.82); }

/* ── App frame (.appx): the real app's root, made self-contained ──
   contain: layout paint makes it the containing block for the app's
   position: fixed pieces (Ask panel, dock), so they stay inside. */
.appx { position: relative; overflow: hidden; contain: layout paint; --appx-vh: 800px; text-align: left; user-select: none; }
.appx .app-shell { height: 800px; }
.appx a { pointer-events: none; }
.appx .appx-chart { display: block; }
/* Tour animation states, applied to the app's own elements by home.js. */
.appx .lp-up { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .6s var(--ease); }
.appx .lp-wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.5s cubic-bezier(.3,.7,.4,1); }
.appx .lp-rise { clip-path: inset(100% 0 0 0); transition: clip-path 1s cubic-bezier(.3,.7,.4,1); }
.appx .lp-in { opacity: 1 !important; transform: none !important; clip-path: inset(0 0 0 0) !important; }
.appx .lp-collapse { max-height: 0 !important; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .4s ease .1s; }
.appx .lp-collapse.lp-in { max-height: 80px !important; opacity: 1; }
.appx .lp-pop { transform: scale(0) !important; transition: transform .38s cubic-bezier(.34,1.56,.64,1); }
.appx .lp-pop.lp-in { transform: scale(1) !important; }
.appx .lp-panel-hide { transform: translateX(calc(100% + 24px)) !important; transition: transform .55s var(--ease) !important; }
.appx .lp-press { transform: scale(.96); transition: transform 90ms ease-out; }
.appx .lp-caret::after { content: ""; display: inline-block; width: .06em; height: .9em; margin-left: .04em; vertical-align: -.08em; background: currentColor; animation: lpc 1s steps(1) infinite; }
@keyframes lpc { 50% { opacity: 0; } }

/* Tour chapter tabs — segmented pill above the window */
.tour-steps {
  display: flex; width: max-content; max-width: 100%; margin: 0 auto 20px;
  padding: 4px; gap: 2px; border-radius: 12px;
  background: rgba(0,0,0,0.045);
  overflow-x: auto; scrollbar-width: none;
}
.tour-steps::-webkit-scrollbar { display: none; }
.tour-step {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px 0 10px; border-radius: 9px; border: 0;
  background: transparent; cursor: pointer; overflow: hidden;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2);
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.tour-step:hover { color: var(--ink); }
.tour-step:active { transform: scale(0.96); }
.tour-step[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.06); }
.tour-step-n {
  flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,0.07); color: var(--ink-2);
  transition: background-color 200ms ease, color 200ms ease;
}
.tour-step[aria-selected="true"] .tour-step-n { background: var(--ink); color: #fff; }
.tour-step-bar { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px; overflow: hidden; opacity: 0; }
.tour-step[aria-selected="true"] .tour-step-bar { opacity: 1; }
.tour-step-bar::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: 0.35; transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (max-width: 520px) { .tour-step { padding: 0 10px 0 8px; } .tour-step-t { font-size: 0.8125rem; } }

.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.tour-caption { margin: 0; font-size: 0.875rem; color: var(--ink-2); min-height: 1.5em; }
.tour-pause {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 0; background: transparent; color: var(--ink-2); font-size: 0.8125rem; font-weight: 500; cursor: pointer;
  transition: transform 120ms ease-out;
}
.tour-pause:active { transform: scale(0.96); }
.tour-pause svg { width: 12px; height: 12px; fill: currentColor; }
.tour-pause .i-play { display: none; }
.tour-pause[aria-pressed="true"] .i-play { display: block; }
.tour-pause[aria-pressed="true"] .i-pause { display: none; }


/* ─────────────────────────────────────────────────────────────
   ENGINE (sources → checks → outputs)
   ───────────────────────────────────────────────────────────── */
.engine { margin-top: 48px; display: grid; gap: 16px; align-items: center; }
@media (min-width: 980px) {
  .engine { grid-template-columns: 1fr 120px 1.25fr 120px 1fr; gap: 0; margin-top: 64px; }
}
.engine-col { display: grid; gap: 12px; }
.engine-sources { grid-template-columns: repeat(3, 1fr); }
.engine-outs { grid-template-columns: 1fr 1fr; }
@media (min-width: 980px) {
  .engine-sources { grid-template-columns: 1fr; gap: 16px; }
  .engine-outs { grid-template-columns: 1fr; gap: 12px; }
}
.engine-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm);
  padding: 12px; min-width: 0;
}
.engine-card b { display: block; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em; }
.engine-card small { display: block; font-size: 0.75rem; color: var(--ink-3); line-height: 1.35; }
.engine-src { min-height: 64px; flex-direction: column; align-items: flex-start; }
@media (min-width: 560px) { .engine-src { flex-direction: row; align-items: center; } }
.engine-out { flex-direction: column; align-items: flex-start; gap: 0; min-height: 48px; padding: 10px 14px; }
.logo-chip { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.logo-linear { background: linear-gradient(135deg, #5e6ad2, #4a54b8); }
.logo-jira { background: linear-gradient(135deg, #2684ff, #0052cc); }
.logo-slack { background: #4a154b; }

.engine-wire { display: none; width: 120px; height: 240px; overflow: visible; }
@media (min-width: 980px) { .engine-wire { display: block; } }
.engine-wire path { fill: none; stroke: rgba(46,44,39,0.18); stroke-width: 1.5; stroke-dasharray: 3 4; }
.engine-wire circle { fill: var(--accent); }
.engine-wire circle.dot-rev { fill: #4a154b; }

.engine-core {
  position: relative; background: var(--surface); border-radius: 16px; border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-md); padding: 16px; z-index: 1;
}
.engine-core-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.engine-core-head img { width: 22px; height: 22px; }
.engine-run { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.engine-run i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: live 1.6s infinite; }
.engine-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: c; }
.engine-checks li {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px;
  font-size: 0.8125rem; color: var(--ink-3);
  transition: background-color 250ms ease, color 250ms ease;
}
.engine-checks li::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.15);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.engine-checks li em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: var(--ink-3); opacity: 0; transform: translateX(-4px); transition: opacity 300ms ease, transform 400ms var(--ease); white-space: nowrap; }
.engine-checks li.is-running { background: rgba(0,0,0,0.035); color: var(--ink); }
.engine-checks li.is-running::before { border-color: var(--ink-2); border-right-color: transparent; animation: spin 0.7s linear infinite; }
.engine-checks li.is-done { color: var(--ink); }
.engine-checks li.is-done::before { border-color: var(--ink); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.engine-checks li.is-done em { opacity: 1; transform: none; }
.engine-checks li.is-done em.warn { color: var(--orange); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ── FAQ ── */
.v2-faq { display: grid; gap: 24px; }
@media (min-width: 900px) { .v2-faq { grid-template-columns: 1fr 2fr; gap: 48px; } }
.v2-faq-list { display: grid; }
.v2-faq-list details { border-bottom: 1px solid var(--border); }
.v2-faq-list summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; font-weight: 500; font-size: 0.9375rem; letter-spacing: -0.008em;
}
.v2-faq-list summary::-webkit-details-marker { display: none; }
.v2-faq-list summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform 300ms var(--ease);
}
.v2-faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.v2-faq-list details p { margin: 0 0 18px; color: var(--ink-2); max-width: 40em; }


/* ── Proof: avatars, a big quote, three numbers as ruled cells ── */
.v2-proof { padding: 72px 0 0; text-align: center; }
.v2-avatars { display: inline-flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ink-2); }
.v2-avatars b { color: var(--ink); }
.v2-avatar-stack { display: inline-flex; }
.v2-avatar-stack img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -8px; }
.v2-avatar-stack img:first-child { margin-left: 0; }
.v2-bigquote { margin: 48px auto 0; max-width: 34em; text-align: center; }
.v2-bigquote blockquote { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.28; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.v2-bigquote figcaption { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 0.8125rem; color: var(--ink-3); }
.v2-bigquote figcaption img { border-radius: 50%; }
.v2-statcard { display: grid; grid-template-columns: 1fr; margin-top: 64px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .v2-statcard { grid-template-columns: repeat(3, 1fr); } }
.v2-statcard > div { padding: 32px 24px; display: grid; gap: 4px; }
.v2-statcard > div + div { border-top: 1px solid var(--line); }
@media (min-width: 640px) { .v2-statcard > div + div { border-top: 0; border-left: 1px solid var(--line); } }
.v2-statcard b { font-family: var(--font-display); font-weight: 600; font-size: 2.25rem; letter-spacing: -0.035em; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.v2-statcard span { font-size: 0.875rem; color: var(--ink-2); }

/* ── Sections ── */
.v2-section { padding: 88px 0 0; }
@media (min-width: 720px) { .v2-section { padding: 112px 0 0; } }
.v2-section > .v2-wrap > :last-child { margin-bottom: 0; }
#inside, #faq { padding-bottom: 88px; }
@media (min-width: 720px) { #inside, #faq { padding-bottom: 112px; } }
.v2-dark .v2-h2, .v2-dark .v2-sub, .v2-dark .v2-kicker { text-align: center; margin-left: auto; margin-right: auto; }

/* ── Bento: ruled cells, each framing one block of the app ── */
/* Cells are divided by the grid's own 1px gaps showing the line color
   through; the outer edges are the column's rules, so no double lines. */
.bento { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); margin: 56px -20px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .bento { margin: 64px calc(-1 * var(--cell-pad)) 0; } }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(3, 1fr); } .bento-card--wide { grid-column: span 2; } }
.bento-card { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.bento-text { padding: 28px 24px 20px; }
@media (min-width: 720px) { .bento-text { padding: 32px var(--cell-pad) 20px; } }
.bento-card h3 { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--ink); }
.bento-card p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.crop { position: relative; flex: 1; min-height: 140px; padding: 8px 24px 32px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
@media (min-width: 720px) { .crop { padding: 8px var(--cell-pad) 40px; } }
.crop-box { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.crop-box > .appx { position: absolute; left: 0; top: 0; width: 1280px; transform-origin: 0 0; }
.crop-box > .appx .app-shell, .crop-box > .appx .main-area { height: auto; overflow: visible; }

/* ── Interstitial quote ── */
.v2-interquote { padding: 88px 0; }

/* ── Engine panel ── */
.engine-card { background: transparent; border: 1px solid var(--line); border-radius: 10px; box-shadow: none; }
.engine-core { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: -10px 10px 0 -1.5px #e6e4df, -10px 10px 0 0 var(--ink); }
.engine-wire path { stroke: rgba(46,44,39,0.22); }
.engine-wire circle { fill: var(--ink); }
.engine-wire circle.dot-rev { fill: var(--accent); }

/* ── Closing ── */
.v2-closing { padding: 96px 0 104px; text-align: center; }

/* ── Scroll reveal ── */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 800ms var(--ease); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ── Accessibility preferences ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .tour-cursor { transform: none !important; transition: opacity 200ms ease !important; }
  .engine-wire circle { display: none; }
  .v2-dot-live { animation: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-3: #5f5f63; }
}
