/* =========================================================
   stratify.mcp — terminal session, trace waterfall, printed report.
   Ledger green over graph paper.
   ========================================================= */
.work--stratify {
  --green: #3f5b33;
  --green-hi: #6f9459;
  --green-pale: #cfe2bf;
  --term: #141b16;
  --term-2: #1b241d;
  --red: #b4483b;
  --receipt: #fffdf5;
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(63, 91, 51, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 91, 51, .06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.work--stratify .pill--dark { background: var(--green); }
.st-label { font-size: 12px; color: var(--green); letter-spacing: .04em; margin-bottom: 1.2rem; }

/* ---------- HERO ---------- */
.st-hero {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  padding: calc(var(--header-h) + 4.5rem) var(--edge) 5rem;
  max-width: 1500px; margin-inline: auto;
}
.st-kicker { display: inline-flex; gap: .6rem; font-size: 12.5px; color: var(--ink-soft); padding: .45rem .8rem; border-radius: 8px; background: rgba(63, 91, 51, .08); }
.st-kicker span { color: var(--green); }
.st-kicker b { color: var(--green); font-weight: 500; }
.st-title {
  font-family: var(--font-serif); font-weight: 450;
  font-size: clamp(4.2rem, 11vw, 11rem); line-height: .86; letter-spacing: -.04em;
  margin: 1.4rem 0 1.4rem; color: var(--ink-deep);
}
.st-title em { font-style: italic; color: var(--green); }
.st-hero__lede { font-family: var(--font-serif); font-size: clamp(1.45rem, 2.3vw, 2rem); line-height: 1.2; max-width: 22ch; }
.st-ul { position: relative; font-style: italic; color: var(--green); white-space: nowrap; }
.st-ul::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: .02em; height: .32em; z-index: -1;
  background: var(--green-pale); border-radius: 3px; transform-origin: left;
  animation: st-ul 1.2s .9s var(--ease-out-expo) both;
}
@keyframes st-ul { from { transform: scaleX(0); } }
.st-hero__sub { margin-top: 1.2rem; max-width: 46ch; font-size: 13px; line-height: 1.75; color: var(--ink-soft); }
.st-hero__cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
ul.st-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.2rem; }
.st-badges li { font-size: 11.5px; padding: .45rem .8rem; border-radius: 6px; border: 1px solid rgba(63, 91, 51, .3); color: var(--ink-soft); background: var(--cream); }
.st-badges b { color: var(--green); font-weight: 500; }

.st-term {
  position: relative;
  background: var(--term);
  border-radius: 16px;
  box-shadow: 0 50px 100px -40px rgba(20, 27, 22, .7), 0 0 0 1px rgba(255,255,255,.04) inset;
  overflow: hidden;
  transform: perspective(1800px) rotateY(-4deg) rotateX(1.5deg) scale(.97);
  transform-origin: 0 50%;
}
.st-term__bar { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; background: var(--term-2); border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: rgba(254, 249, 237, .55); }
.st-term__title { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-term__live { color: var(--green-hi); }
.st-term__body {
  height: clamp(340px, 46vh, 450px);
  padding: 1.4rem 1.5rem 1.6rem;
  font-size: 13px; line-height: 1.75; color: #e9e3d4;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.st-term__body p, .st-term__body pre { margin: 0 0 .35rem; white-space: pre-wrap; }
.st-term__body pre { font: inherit; color: #c9b98f; background: rgba(255,255,255,.035); border-left: 2px solid rgba(201, 185, 143, .5); padding: .6rem .8rem; border-radius: 0 8px 8px 0; margin: .3rem 0 .6rem; font-size: 12px; }
.st-term__boot { padding: 1.1rem 1.5rem .2rem; font-size: 12px; line-height: 1.8; color: rgba(254, 249, 237, .42); border-bottom: 1px dashed rgba(255,255,255,.07); }
.st-term__boot b { color: var(--green-hi); font-weight: 500; }
.t-p { color: var(--green-hi); margin-right: .4rem; }
.t-you { color: #fef9ed; }
.t-you .t-p { color: var(--hero-3); }
.t-call { color: #cfe2bf; }
.t-ok { color: #a7c79a; }
.t-dim { color: rgba(254, 249, 237, .45); }
.t-end { color: #fef9ed; margin-top: .5rem !important; }
.t-caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--green-hi); animation: st-blink 1s steps(2) infinite; }
@keyframes st-blink { 50% { opacity: 0; } }

/* ---------- TICKER ---------- */
.st-ticker { background: var(--green); color: var(--cream); overflow: hidden; border-block: 1px solid rgba(0,0,0,.15); }
.st-ticker__track { display: flex; width: max-content; animation: st-tick 38s linear infinite; }
.st-ticker span { padding: 1rem 2rem; font-size: 13px; white-space: nowrap; position: relative; }
.st-ticker span::after { content: '▲'; position: absolute; right: -.4rem; color: var(--green-pale); font-size: 9px; top: 50%; transform: translateY(-50%); }
.st-ticker b { font-weight: 500; color: var(--green-pale); margin-right: .4rem; }
@keyframes st-tick { to { transform: translateX(-50%); } }

/* ---------- LIES ---------- */
.st-lies { padding: clamp(6rem, 12vw, 11rem) 0; }
.st-lies__h { max-width: 14ch; margin-bottom: clamp(3rem, 6vw, 5rem); }
.st-lies__list { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.lie {
  display: grid; grid-template-columns: 4rem 1.2fr 1fr; gap: 1.5rem; align-items: center;
  padding: clamp(1.6rem, 3vw, 2.6rem) 0;
  border-bottom: 1px solid var(--line-strong);
}
.lie__no { font-size: 12px; color: var(--ink-soft); }
.lie__bad { font-family: var(--font-serif); font-size: clamp(1.6rem, 3.2vw, 2.9rem); line-height: 1.08; color: var(--ink-deep); }
.lie__bad span {
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: var(--strike, 0%) 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: color .6s;
}
.lie.is-struck .lie__bad span { color: rgba(43, 36, 32, .45); }
.lie__fix { font-size: 13.5px; line-height: 1.7; color: var(--green); padding-left: 1.2rem; border-left: 2px solid var(--green); opacity: var(--fix, 0); transform: translateX(calc((1 - var(--fix, 0)) * 20px)); }

/* ---------- TRACE ---------- */
.st-trace { padding: clamp(5rem, 10vw, 9rem) 0; background: var(--term); color: var(--cream); }
.st-trace .st-label { color: var(--green-hi); }
.st-trace__head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 1rem 3rem; margin-bottom: 3rem; }
.st-trace__head .st-label { grid-column: 1 / -1; margin: 0; }
.st-trace__note { font-size: 13px; line-height: 1.75; color: rgba(254, 249, 237, .65); max-width: 46ch; }
.trace { border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 1.4rem; background: rgba(255,255,255,.02); }
.trace__axis { display: grid; grid-template-columns: 11rem 1fr auto 1fr; gap: 1rem; font-size: 11px; color: rgba(254, 249, 237, .4); padding-bottom: .9rem; border-bottom: 1px dashed rgba(255,255,255,.1); margin-bottom: .6rem; }
.trace__axis span:first-child { grid-column: 2; }
.trace__axis span:last-child { text-align: right; }
.trace__rows { display: grid; gap: .35rem; }
.span { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: center; min-height: 2.6rem; }
.span__name { font-size: 12px; color: rgba(254, 249, 237, .75); }
.span__bar { position: relative; height: 2.2rem; background: repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 10%); border-radius: 6px; }
.span__bar i {
  position: absolute; top: 4px; bottom: 4px;
  left: calc(var(--s) * 1%);
  width: calc(var(--w) * 1%);
  border-radius: 5px;
  background: linear-gradient(90deg, var(--green-hi), #8fb27a);
  transform-origin: left; transform: scaleX(var(--grow, 1));
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.span--auth .span__bar i { background: linear-gradient(90deg, #c9a45c, #e3c27f); }
.span--gate .span__bar i, .span--db .span__bar i { background: linear-gradient(90deg, var(--hero-4), var(--hero-3)); }
.span--honest .span__bar i { background: var(--cream); }
.span__bar em {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: calc((var(--s) + var(--w)) * 1% + .7rem);
  font-style: normal; font-size: 11.5px; white-space: nowrap; color: rgba(254, 249, 237, .8);
  opacity: var(--lbl, 1);
}
.span--in .span__bar em { left: calc(var(--s) * 1% + .8rem); color: var(--term); font-weight: 500; }
.span--left .span__bar em { left: auto; right: calc((100 - var(--s)) * 1% + .7rem); }
.trace__foot { margin-top: 1rem; font-size: 11px; color: rgba(254, 249, 237, .4); }

/* ---------- PRINTED REPORT ---------- */
.st-print { padding: clamp(6rem, 11vw, 10rem) 0; overflow: hidden; }
.st-print__grid { display: grid; grid-template-columns: 1fr minmax(0, 470px); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.st-print__copy { position: sticky; top: 9rem; }
.st-print__copy .h2 { margin-bottom: 1.6rem; max-width: 13ch; }
.st-print__p { margin-top: 1.2rem; font-size: 13px; line-height: 1.75; color: var(--ink-soft); max-width: 48ch; }
.st-quote { margin: 2.4rem 0 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.2; color: var(--green); padding-left: 1.2rem; border-left: 3px solid var(--green); max-width: 22ch; }

.printer { position: relative; }
.printer__head {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: .8rem;
  height: 4.4rem; padding: 0 1.4rem;
  background: linear-gradient(180deg, #3b3532, #26211e);
  border-radius: 18px 18px 10px 10px;
  color: rgba(254, 249, 237, .6); font-size: 11px; letter-spacing: .12em;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
}
.printer__led { width: 8px; height: 8px; border-radius: 50%; background: var(--green-hi); box-shadow: 0 0 10px var(--green-hi); }
.printer__slot { position: absolute; left: 1.2rem; right: 1.2rem; bottom: .6rem; height: 6px; border-radius: 4px; background: #0e0c0b; }
.printer__paper-wrap { position: relative; margin: -0.9rem 1.8rem 0; overflow: hidden; padding-bottom: 30px; }
.receipt {
  position: relative;
  background: var(--receipt);
  color: #2b2420;
  padding: 2rem 1.6rem 2.6rem;
  font-size: 12.5px; line-height: 1.65;
  box-shadow: 0 30px 50px -30px rgba(43, 36, 32, .45);
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 7px) no-repeat, radial-gradient(circle 7px at 9px 100%, transparent 6.5px, #000 7px) bottom / 18px 7px repeat-x;
          mask: linear-gradient(#000, #000) top / 100% calc(100% - 7px) no-repeat, radial-gradient(circle 7px at 9px 100%, transparent 6.5px, #000 7px) bottom / 18px 7px repeat-x;
}
.receipt::before { /* faint thermal paper texture */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(43,36,32,.018) 0 2px, transparent 2px 4px);
}
.receipt__h { text-align: center; }
.receipt__brand { font-family: var(--font-serif); font-size: 1.9rem; letter-spacing: .12em; line-height: 1.1; }
.receipt__rule { color: rgba(43, 36, 32, .45); letter-spacing: -.02em; overflow: hidden; white-space: nowrap; text-align: center; margin: .6rem 0; }
.receipt__kv div { display: flex; justify-content: space-between; gap: 1rem; }
.receipt__kv dt { color: rgba(43, 36, 32, .6); }
.receipt__kv dd { margin: 0; text-align: right; }
.receipt__sec { font-weight: 500; letter-spacing: .1em; margin: .4rem 0 .5rem; }
.receipt__lines li { display: flex; align-items: baseline; gap: .5rem; }
.receipt__lines i { flex: 1; border-bottom: 1px dotted rgba(43, 36, 32, .4); transform: translateY(-4px); }
.receipt__lines b { font-weight: 500; color: var(--green); }
.receipt__total { margin-top: .4rem; padding-top: .4rem; border-top: 1px solid rgba(43,36,32,.3); font-weight: 500; }
.honesty { position: relative; }
.honesty ul { display: grid; gap: .25rem; }
.honesty li { display: flex; align-items: center; gap: .6rem; }
.box { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; border: 1px solid #2b2420; font-size: 11px; line-height: 1; color: var(--green); }
.stamp {
  position: absolute; right: -.2rem; top: 1.2rem;
  display: grid; justify-items: center;
  padding: .5rem .8rem .4rem;
  border: 3px double var(--red); border-radius: 8px;
  color: var(--red);
  font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: .08em; line-height: 1;
  transform: rotate(-12deg);
  opacity: .85;
  mix-blend-mode: multiply;
}
.stamp small { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; margin-top: .3rem; text-transform: uppercase; }
.receipt__foot { text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; line-height: 1.3; margin-top: 1rem; }
.receipt__barcode {
  height: 46px; margin: 1.4rem auto 0; width: 80%;
  background: repeating-linear-gradient(90deg, #2b2420 0 2px, transparent 2px 4px, #2b2420 4px 5px, transparent 5px 8px, #2b2420 8px 11px, transparent 11px 12px);
  opacity: .85;
}

/* ---------- NUMBERS ---------- */
.st-nums { padding: clamp(5rem, 10vw, 9rem) 0; background: var(--green); color: var(--cream); }
.st-nums .st-label { color: var(--green-pale); }
.st-big { display: grid; gap: 1rem; margin-bottom: 3.5rem; }
.st-big__n { font-family: var(--font-serif); font-weight: 450; font-size: clamp(3.4rem, 12.5vw, 13rem); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.st-big__k { font-size: 14px; color: var(--green-pale); max-width: 52ch; }
.st-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(254, 249, 237, .25); }
.cell { padding: 1.6rem 1.4rem 1.8rem 0; border-bottom: 1px solid rgba(254, 249, 237, .25); display: grid; gap: .5rem; }
.cell:not(:nth-child(3n+1)) { padding-left: 1.4rem; border-left: 1px solid rgba(254, 249, 237, .25); }
.cell b { font-family: var(--font-serif); font-weight: 450; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; }
.cell span { font-size: 12.5px; line-height: 1.6; color: rgba(254, 249, 237, .8); max-width: 30ch; }

/* ---------- GALLERY ---------- */
.st-gallery { padding: clamp(6rem, 11vw, 10rem) 0; }
.st-gallery .h2 { margin-bottom: 3rem; }
.st-wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 90px; gap: 1rem; }
.st-wall figure { margin: 0; }
.st-wall img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; box-shadow: 0 20px 40px -24px rgba(20, 27, 22, .6); }
.st-wall__reel { grid-column: 1 / 9; grid-row: 1 / 6; }
.st-wall__a { grid-column: 9 / 13; grid-row: 1 / 3; }
.st-wall__b { grid-column: 9 / 13; grid-row: 3 / 6; }
.st-wall__c { grid-column: 2 / 6; grid-row: 6 / 9; }
.st-wall__d { grid-column: 6 / 12; grid-row: 6 / 9; }
.st-chartwin { height: calc(100% - 2rem); display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--term); box-shadow: 0 40px 80px -40px rgba(20, 27, 22, .7); }
.st-chartwin__bar { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; font-size: 11.5px; color: rgba(254, 249, 237, .6); background: var(--term-2); }
.st-chartwin video { flex: 1; width: 100%; min-height: 0; object-fit: cover; }
.st-wall__reel figcaption { margin-top: .7rem; font-size: 11.5px; color: var(--ink-soft); }

/* ---------- STACK ---------- */
.st-stack { padding: 2rem 0 clamp(4rem, 8vw, 6rem); }
.st-stack__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: start; }
.st-req { grid-row: span 2; margin: 0; padding: 1.6rem 1.8rem; background: var(--term); color: #e9e3d4; border-radius: 14px; font: 13.5px/1.9 var(--font-mono); overflow-x: auto; }
.st-req .c { color: var(--green-hi); }
.st-links { display: grid; gap: .6rem; }
.st-links a { display: flex; align-items: baseline; gap: .8rem; font-family: var(--font-serif); font-size: clamp(1.2rem, 2vw, 1.6rem); padding: 1rem 0; border-bottom: 1px solid var(--line-strong); transition: color .3s, padding .4s var(--ease-out-expo); overflow-wrap: anywhere; }
.st-links a span { font-family: var(--font-mono); font-size: 12px; color: var(--green); }
.st-links a i { margin-left: auto; font-style: normal; color: var(--green); }
.st-links a:hover { color: var(--green); padding-left: .6rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .st-hero { grid-template-columns: minmax(0, 1fr); }
  .st-term { transform: none; }
  .st-print__grid, .st-stack__grid, .st-trace__head { grid-template-columns: 1fr; }
  .st-print__copy { position: static; }
  .st-cells { grid-template-columns: 1fr 1fr; }
  .cell:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .cell:nth-child(even) { padding-left: 1.4rem; border-left: 1px solid rgba(254, 249, 237, .25); }
  .lie { grid-template-columns: 2.6rem 1fr; }
  .lie__fix { grid-column: 2; }
}
@media (max-width: 640px) {
  .st-title { font-size: 21vw; }
  .st-term__body { height: 420px; font-size: 12px; padding: 1.1rem; }
  .st-term__boot { padding-inline: 1.1rem; font-size: 11px; }
  .span { grid-template-columns: 1fr; gap: .2rem; }
  .trace__axis { grid-template-columns: 1fr auto 1fr; }
  .trace__axis span:first-child { grid-column: 1; }
  .span__bar em { position: static; transform: none; display: block; margin-top: .3rem; white-space: normal; color: rgba(254, 249, 237, .65) !important; font-weight: 400 !important; }
  .span__bar { height: auto; padding-top: 1.6rem; background: none; }
  .span__bar i { top: 0; bottom: auto; height: 1.2rem; }
  .st-wall { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .st-wall__reel { grid-column: 1 / -1; grid-row: auto; }
  .st-wall__reel .st-chartwin { height: auto; }
  .st-wall__reel video { aspect-ratio: 16 / 10; }
  .st-wall__a, .st-wall__b, .st-wall__c, .st-wall__d { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
  .st-cells { grid-template-columns: 1fr; }
  .cell:nth-child(even) { padding-left: 0; border-left: 0; }
  .printer__paper-wrap { margin-inline: 1rem; }
  .receipt { padding-inline: 1.1rem; }
  .stamp { position: relative; right: auto; top: auto; margin: 1rem auto .2rem; width: max-content; font-size: 1.05rem; }
  .st-req { font-size: 11.5px; padding: 1.2rem; }
}
