/* ==========================================================================
   SELECTED WORK · three artworks, one grammar
   Friction is amber, flow is the project's own light. Packets of light, HUD telemetry,
   one verb key, current running left → right. Each stage is a different machine.
   ========================================================================== */

#work {
  --friction: #FB923C;
  --flow: #34D399;
  --ink-deep: #02070f;
}
.comp-amber { color: var(--friction) !important; }

/* the page's ambient light follows the project you are standing in */
body[data-zone="work"][data-case="padelyar"] { --zone-a: #06403F; --zone-b: rgba(16, 185, 129, 0.16); --zone-c: #0A2C3A; }
body[data-zone="work"][data-case="miandar"]  { --zone-a: #0A4A38; --zone-b: rgba(52, 211, 153, 0.2);  --zone-c: #0B2C2A; }
body[data-zone="work"][data-case="finance"]  { --zone-a: #3A2E0E; --zone-b: rgba(251, 191, 36, 0.16); --zone-c: #151A2C; }

/* ---------- shared artwork shell ---------- */
.artwork { margin-bottom: 32px; }
.artwork .hud-card-bar { gap: 14px; }
.artwork .bar-right { text-align: right; }
.work-hud {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  pointer-events: none;
  font-family: var(--font-m);
}
.work-read { display: grid; gap: 3px; font-size: .62rem; letter-spacing: .09em; }
.work-read i { font-style: normal; color: rgba(190, 214, 224, .78); }
.work-read b { font-weight: 600; font-size: .95rem; letter-spacing: .02em; color: var(--friction); transition: color .6s; font-variant-numeric: tabular-nums; }
.artwork[data-mode="os"] .work-read b { color: var(--flow); }

/* ---------- feature headings (shared by all three) ---------- */
.portfolio-feature-heading { scroll-margin-top: 100px; }

/* ==========================================================================
   01 · PADELYAR
   ========================================================================== */
.club { margin-bottom: 32px; }
.club-stage { position: relative; background: #04101a; overflow: hidden; touch-action: pan-y; }
.club-stage::after { display: none; }
.club-sky { display: none; }
.club-canvas { display: block; width: 100%; height: 520px; cursor: pointer; }
.club-hud { left: clamp(14px, 2.4vw, 30px); top: 14px; }
.club-toast {
  position: absolute; z-index: 4; width: min(230px, 60%); transform: translate(-50%, -50%) scale(.94);
  padding: 12px 14px 12px; opacity: 0; pointer-events: none;
  background: rgba(3, 12, 22, .93); border: 1px solid rgba(251, 191, 36, .55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 30px rgba(251, 191, 36, .12);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  font-family: var(--font-m); font-size: .62rem; letter-spacing: .05em; color: #e6eef2;
  transition: opacity .25s, transform .35s var(--ease);
}
.club-toast.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.club-toast b { display: block; color: var(--comp-gold); font-size: .66rem; margin-bottom: 8px; letter-spacing: .07em; }
.club-toast p { line-height: 1.5; color: #c4d2da; letter-spacing: .02em; }
.club-toast ol { list-style: none; display: grid; gap: 6px; }
.club-toast li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; opacity: 0; transform: translateX(-6px); animation: toastStep .35s var(--ease) forwards; animation-delay: calc(var(--i) * .42s + .1s); }
.club-toast li span { color: #8fb5bb; }
.club-toast li i { font-style: normal; color: #fff; }
.club-toast li em { font-style: normal; color: var(--flow); }
@keyframes toastStep { to { opacity: 1; transform: none; } }

.club-courts { display: grid; grid-template-columns: repeat(4, 1fr); }
.court-btn.is-conflict .court-btn-state { color: var(--crimson); }
.court-btn.is-conflict { background: #1a1020; }

.club-tl-head { align-items: flex-start; flex-wrap: wrap; gap: 14px 22px; }
.club-verbs { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.club-tl-hint { margin: 14px 0 0; }
.club-ribbon-wrap { display: flex; gap: 10px; margin-top: 16px; align-items: stretch; }
.club-ribbon-labels { display: grid; grid-template-rows: repeat(4, 1fr); width: 22px; font-size: .56rem; color: #86a5ad; letter-spacing: .04em; padding: 1.5px 0; }
.club-ribbon-labels span { display: flex; align-items: center; }
.club-ribbon-wrap .club-ribbon { flex: 1; height: 96px; margin-top: 0; cursor: crosshair; touch-action: pan-y; }
.club-ribbon-wrap .club-ribbon-rows { inset: 0; gap: 0; grid-template-rows: repeat(4, 1fr); }
.club-ribbon-wrap .ribbon-row { margin: 1.5px 0; }
.club-ribbon-sky { position: absolute; inset: 0; }
.club .ribbon-booking { background: var(--friction); opacity: .8; border-radius: 2px; transition: background .8s, opacity .5s; }
.club[data-mode="os"] .ribbon-booking { background: #38d9ab; }
.club .ribbon-booking.is-ghost {
  opacity: 0; background: repeating-linear-gradient(-45deg, rgba(244, 63, 94, .95) 0 4px, rgba(244, 63, 94, .35) 4px 8px);
  border: 1px solid #f43f5e; top: 2px; bottom: 2px; pointer-events: none;
}
.club[data-mode="chaos"] .ribbon-booking.is-ghost { opacity: .95; }
.club .ribbon-booking.is-new { animation: slotLand 1.2s var(--ease) both; }
@keyframes slotLand { 0% { filter: brightness(3); box-shadow: 0 0 22px #6ef0ac; transform: scaleY(1.7); } 100% { filter: none; box-shadow: none; transform: none; } }
.club-price-curve { position: absolute; inset: 0; pointer-events: none; }
.club-price-curve svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.club-price-curve path { fill: none; stroke: var(--comp-gold); stroke-width: 1.8; filter: drop-shadow(0 0 4px rgba(251, 191, 36, .6)); }
.club-price-curve.is-flat path { stroke: var(--friction); stroke-dasharray: 5 5; opacity: .55; filter: none; }
.club-price-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--comp-gold); transform: translate(-50%, -50%); box-shadow: 0 0 12px var(--comp-gold); transition: top .3s; }
.club-ghost { position: absolute; display: none; pointer-events: none; border: 1px dashed #6ef0ac; background: rgba(110, 240, 172, .2); border-radius: 2px; z-index: 2; }
.club-ghost.is-on { display: block; }
.club-ghost.is-blocked { border-color: #f43f5e; background: rgba(244, 63, 94, .2); }
.club-playhead { z-index: 3; }

@media (max-width: 760px) {
  .club-hud { gap: 6px 14px; top: 10px; left: 12px; }
  .work-read b { font-size: .8rem; }
  .club-canvas { height: 640px; }
  .club-verbs { flex: 1 1 100%; }
  .club-verbs .verb-key { flex: 1 1 auto; justify-content: center; }
  .club-price { margin-left: auto; }
}
@media (max-width: 600px) {
  .club-courts { grid-template-columns: repeat(2, 1fr); }
  .club-ribbon-wrap .club-ribbon { height: 84px; }
  .club-toast { width: min(210px, 70%); }
}

/* ==========================================================================
   02 · MIANDAR · the class loop (see miandar.css)
   One coach decision settles the class. The artwork's own styles live in miandar.css.
   ========================================================================== */
.portfolio-feature-heading--miandar { --pc: #6ee7b7; }
.portfolio-feature-heading--finance { --pc: #edca80; }
.portfolio-feature-heading--miandar .portfolio-feature-number,
.portfolio-feature-heading--finance .portfolio-feature-number { color: var(--pc); }

/* case brief: one thesis, three plain points */
.case-brief { --pc: #6ee7b7; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); margin: 0 0 24px; padding: clamp(22px, 3vw, 34px) 2px 8px; border-top: 1px solid color-mix(in srgb, var(--pc) 22%, transparent); }
.case-brief--finance { --pc: #edca80; }
.case-brief-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.case-brief-thesis { font-size: 1.15rem; font-weight: 600; line-height: 1.4; color: #eef7f7; margin: 14px 0 12px; max-width: 34ch; }
.case-brief-copy > p:not(.case-brief-thesis):not(.portfolio-coming) { font-size: .97rem; line-height: 1.7; color: #b7c6d2; max-width: 50ch; margin: 0 0 18px; }
.case-brief .portfolio-kicker { font-size: .67rem; letter-spacing: .09em; color: var(--pc); display: flex; gap: 8px; align-items: center; }
.case-brief .portfolio-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 12px var(--pc); flex: none; }
.case-brief .portfolio-meta span { color: var(--pc); border-color: color-mix(in srgb, var(--pc) 25%, transparent); background: color-mix(in srgb, var(--pc) 5%, transparent); }
.case-brief .portfolio-coming span { color: var(--pc); }
.case-brief-points { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; border-top: 1px solid rgba(172, 203, 207, .16); }
.case-brief-points li { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.5fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(172, 203, 207, .16); font-size: .84rem; line-height: 1.55; }
.case-brief-points strong { font-weight: 600; color: #eef4f4; }
.case-brief-points span { color: #a9bdc6; }

@media (max-width: 960px) {
  .case-brief { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .case-brief-points li { grid-template-columns: 1fr; gap: 4px; }
}

/* ==========================================================================
   03 · FINANCIAL INTELLIGENCE · the decision pipeline
   Calculation before narrative. The DOM is the layout; one canvas of light follows it.
   ========================================================================== */
.fin { --gold: #fbbf24; --pale: #fde68a; --o-lanes: 1; --o-gate: 1; --o-eng: 1; --o-out: 1; --o-tray: 1; margin-bottom: 32px; }
.fin .hud-card-bar b { color: var(--pale); }
.fin .card-chamfer-edge { border-color: #edca80; }
.fin[data-focus="1"] { --o-gate: .3; --o-eng: .22; --o-out: .2; --o-tray: .25; }
.fin[data-focus="2"] { --o-lanes: .5; --o-eng: .25; --o-out: .2; }
.fin[data-focus="3"] { --o-lanes: .3; --o-gate: .3; --o-out: .7; --o-tray: .25; }
.fin[data-focus="4"] { --o-lanes: .22; --o-gate: .22; --o-eng: .5; --o-tray: .2; }

.fin-stage {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 46px clamp(16px, 3vw, 38px) 28px;
  background: radial-gradient(100% 80% at 70% 20%, #1c1a12 0%, #0b1220 52%, #050914 100%);
}
.fin-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .13; filter: saturate(.5) contrast(1.1); mix-blend-mode: luminosity;
  -webkit-mask-image: radial-gradient(80% 90% at 75% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(80% 90% at 75% 30%, #000 10%, transparent 75%);
}
.fin-stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background: repeating-linear-gradient(0deg, rgba(237, 202, 128, .04) 0 1px, transparent 1px 32px), repeating-linear-gradient(90deg, rgba(237, 202, 128, .04) 0 1px, transparent 1px 32px);
  -webkit-mask-image: radial-gradient(90% 90% at 50% 40%, #000, transparent); mask-image: radial-gradient(90% 90% at 50% 40%, #000, transparent);
}
.fin[data-state="withheld"] .fin-stage::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 70px rgba(251, 146, 60, .16); animation: finWarn 2.4s ease-in-out infinite; }
@keyframes finWarn { 50% { box-shadow: inset 0 0 90px rgba(251, 146, 60, .26); } }
.fin-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: block; }

.fin-grid {
  position: relative; z-index: 1; display: grid; gap: 14px 22px;
  grid-template-columns: minmax(150px, 1.05fr) 56px minmax(168px, .95fr) minmax(0, 2.7fr);
  grid-template-areas: "lanes gate engine out" "tray tray tray views";
}
.fin-lanes { grid-area: lanes; list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(4, minmax(60px, 1fr)); gap: 10px; opacity: var(--o-lanes); transition: opacity .5s; }
.fin-lane:nth-child(1) { --lc: #FBBF24; } .fin-lane:nth-child(2) { --lc: #2DD4BF; } .fin-lane:nth-child(3) { --lc: #60A5FA; } .fin-lane:nth-child(4) { --lc: #C4B5FD; }
.fin-lane {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 10px; row-gap: 2px; padding: 8px 12px;
  background: rgba(5, 12, 24, .78); border: 1px solid color-mix(in srgb, var(--lc) 30%, transparent); border-left: 3px solid var(--lc);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); transition: background .3s, border-color .3s, box-shadow .3s;
}
.fin-lane svg { grid-row: 1 / 3; align-self: center; width: 24px; height: 24px; fill: none; stroke: var(--lc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fin-lane b { font: 600 .88rem/1.2 var(--font-d); letter-spacing: -.01em; color: #f2f6fa; }
.fin-lane i { font-style: normal; font-size: .54rem; letter-spacing: .08em; color: #8da4bd; }
.fin-lane.is-traced { background: color-mix(in srgb, var(--lc) 14%, rgba(5, 12, 24, .85)); border-color: var(--lc); box-shadow: 0 0 22px color-mix(in srgb, var(--lc) 28%, transparent); }

.fin-gate { grid-area: gate; position: relative; opacity: var(--o-gate); transition: opacity .5s; }
.fin-gate span { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .54rem; letter-spacing: .22em; color: var(--pale); transition: color .3s; }
.fin[data-trust="off"] .fin-gate span { color: var(--friction); }

.fin-engine {
  grid-area: engine; position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; text-align: center; padding: 14px 10px 14px;
  background: radial-gradient(70% 60% at 50% 45%, rgba(251, 191, 36, .08), rgba(5, 12, 24, .7)); border: 1px solid rgba(251, 191, 36, .22);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); opacity: var(--o-eng); transition: opacity .5s, border-color .4s;
}
.fin-engine.is-bad { border-color: rgba(251, 146, 60, .55); }
.fin-engine-lbl { font-size: .54rem; letter-spacing: .14em; color: #c9b27a; }
.fin-engine-core {
  align-self: center; position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #3b3012, #130f06 70%); border: 1.5px solid rgba(253, 230, 138, .6); box-shadow: inset 0 0 14px rgba(251, 191, 36, .25);
}
.fin-engine-core::after { content: 'Σ'; font: 600 1.5rem/1 var(--font-b); color: var(--pale); text-shadow: 0 0 12px rgba(251, 191, 36, .7); }
.fin-engine.is-bad .fin-engine-core { border-color: rgba(251, 146, 60, .75); }
.fin-engine.is-bad .fin-engine-core::after { color: var(--friction); text-shadow: 0 0 12px rgba(251, 146, 60, .7); }
.fin-engine b { font-size: .7rem; letter-spacing: .12em; color: #8da4bd; transition: color .3s; }
.fin-engine.is-ok b { color: var(--pale); } .fin-engine.is-calc b { color: var(--gold); } .fin-engine.is-bad b { color: var(--friction); }
.fin-engine small { font-size: .54rem; letter-spacing: .06em; color: #8da4bd; margin-top: 3px; }

.fin-out { grid-area: out; display: grid; grid-template-columns: minmax(150px, .78fr) minmax(0, 1.7fr); gap: 18px; opacity: var(--o-out); transition: opacity .5s; }
.fin-figs { display: grid; grid-template-rows: repeat(5, minmax(46px, 1fr)); gap: 8px; }
.fin-fig {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 7px 12px; text-align: left; position: relative;
  background: rgba(5, 12, 24, .78); border: 1px solid rgba(237, 202, 128, .16); border-left: 3px solid rgba(237, 202, 128, .25);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); transition: background .3s, border-color .3s, box-shadow .3s;
}
.fin-fig span { font-size: .54rem; letter-spacing: .08em; color: #c9b27a; }
.fin-fig em { font-style: normal; font-size: .72rem; line-height: 1.2; color: #c6d3e0; }
.fin-fig b { font-size: .86rem; font-weight: 700; color: #f3f6fa; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-fig.is-raw b { color: #5d7390; } .fin-fig.is-raw em { color: #7a8ea6; }
.fin-fig.is-scramble { border-left-color: var(--pale); } .fin-fig.is-scramble b { color: var(--pale); }
.fin-fig.is-locked { border-left-color: var(--gold); background: rgba(34, 28, 10, .6); }
.fin-fig.is-locked b { color: var(--pale); }
.fin-fig.is-bad { border-left-color: var(--friction); background: rgba(40, 18, 8, .55); } .fin-fig.is-bad b { color: var(--friction); } .fin-fig.is-bad b::before { content: '≠ '; opacity: .8; }
.fin-fig.is-traced, .fin-fig:hover:not(.is-raw) { border-color: rgba(253, 230, 138, .75); box-shadow: 0 0 22px rgba(251, 191, 36, .22); }
.fin-fig[aria-pressed="true"] { background: rgba(60, 48, 14, .75); }

.fin-brief {
  position: relative; display: flex; flex-direction: column; padding: 14px 16px 12px; background: rgba(4, 10, 20, .84); border: 1px solid rgba(237, 202, 128, .22);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); transition: border-color .4s;
}
.fin-brief header { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .56rem; letter-spacing: .13em; color: #c9b27a; padding-bottom: 8px; border-bottom: 1px solid rgba(237, 202, 128, .14); margin-bottom: 10px; }
.fin-brief header em { font-style: normal; padding: 2px 8px; border: 1px solid currentColor; border-radius: 99px; color: #8da4bd; letter-spacing: .1em; transition: color .3s; }
.fin-brief.is-drafting header em { color: var(--gold); } .fin-brief.is-locked header em { color: var(--pale); } .fin-brief.is-withheld header em { color: var(--friction); }
.fin-brief.is-withheld { border-color: rgba(251, 146, 60, .5); }
.fin-brief-text { flex: 1; margin: 0; font: 400 .88rem/1.7 var(--font-b); color: #dbe7ee; }
.fin-ref { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; margin: 0 1px; font: 600 .74rem/1.6 var(--font-m); color: var(--pale); background: rgba(251, 191, 36, .11); border: 1px solid rgba(251, 191, 36, .5); border-radius: 3px; vertical-align: baseline; cursor: default; }
.fin-ref svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fin-ref.is-new { animation: finRef .7s var(--ease); }
@keyframes finRef { 0% { background: rgba(253, 230, 138, .7); box-shadow: 0 0 20px rgba(251, 191, 36, .8); } 100% { box-shadow: none; } }
.fin-caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: finCaret 1s steps(2) infinite; }
@keyframes finCaret { 50% { opacity: 0; } }
.fin-withheld { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--friction); font: 500 .74rem/1.65 var(--font-m); letter-spacing: .02em; color: #ffc9a1; }
.fin-brief footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(237, 202, 128, .12); font-size: .52rem; letter-spacing: .09em; color: #8da4bd; }
.fin-lock svg { width: 12px; height: 12px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

.fin-tray { grid-area: tray; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 22px; opacity: var(--o-tray); transition: opacity .5s; }
.fin-tray-lbl { position: absolute; top: 0; left: 0; font-size: .54rem; letter-spacing: .14em; color: var(--friction); }
.fin-find { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 2px; padding: 9px 12px 8px; background: rgba(24, 12, 6, .62); border: 1px solid rgba(251, 146, 60, .28); border-top: 2px solid rgba(251, 146, 60, .55); transition: background .3s; }
.fin-find i { font-style: normal; font-size: .52rem; letter-spacing: .07em; color: #e6b08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-find b { font-size: 1.3rem; line-height: 1.1; font-weight: 700; color: var(--friction); font-variant-numeric: tabular-nums; }
.fin-find.is-hit { animation: finHit .6s var(--ease); }
@keyframes finHit { 0% { background: rgba(251, 146, 60, .4); } 100% { background: rgba(24, 12, 6, .62); } }

.fin-views { grid-area: views; position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; align-content: end; padding-top: 22px; opacity: var(--o-out); transition: opacity .5s; }
.fin-views-lbl { position: absolute; top: 0; left: 0; font-size: .54rem; letter-spacing: .14em; color: #c9b27a; }
.fin-views i { display: block; height: 26px; border: 1px solid rgba(237, 202, 128, .2); background: transparent; position: relative; transition: background .35s, border-color .35s, box-shadow .35s; }
.fin-views i::after { content: ''; position: absolute; left: 4px; right: 4px; top: 6px; height: 2px; background: rgba(237, 202, 128, .25); box-shadow: 0 5px 0 rgba(237, 202, 128, .15), 0 10px 0 rgba(237, 202, 128, .1); transition: background .35s; }
.fin-views i.is-on { background: rgba(251, 191, 36, .16); border-color: rgba(253, 230, 138, .7); box-shadow: 0 0 14px rgba(251, 191, 36, .25); }
.fin-views i.is-on::after { background: rgba(253, 230, 138, .75); }

.fin-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; padding: 20px clamp(16px, 3vw, 38px) 26px; background: rgba(3, 8, 18, .86); border-top: 1px solid rgba(237, 202, 128, .16); }
.fin-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fin-steps button { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 10px 12px; text-align: left; border: 1px solid #4b4a42; background: #121d2a; color: #d0c9b7; transition: border-color .2s, background .2s, color .2s; }
.fin-steps button span { font: 500 .65rem var(--font-m); color: #d0ac66; }
.fin-steps button strong { font: 600 .64rem var(--font-m); letter-spacing: .05em; flex: 1; }
.fin-steps button:hover:not([aria-pressed="true"]) { border-color: #e5c47b; background: #202838; color: #fff1ce; }
.fin-steps button[aria-pressed="true"] { border-color: #e5c47b; background: #3b3324; color: #fff1ce; box-shadow: 0 0 20px rgba(251, 191, 36, .18); }
.fin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: flex-end; }
.fin-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; font-size: .64rem; letter-spacing: .09em; color: #d7e3ec; }
.fin-switch-track { position: relative; width: 42px; height: 24px; border-radius: 99px; background: rgba(251, 191, 36, .22); border: 1px solid var(--gold); transition: background .3s, border-color .3s; }
.fin-switch-track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--pale); transform: translateX(18px); transition: transform .3s var(--ease), background .3s; box-shadow: 0 0 10px rgba(251, 191, 36, .8); }
.fin-switch[aria-checked="false"] { color: var(--friction); }
.fin-switch[aria-checked="false"] .fin-switch-track { background: rgba(251, 146, 60, .15); border-color: var(--friction); }
.fin-switch[aria-checked="false"] .fin-switch-track i { transform: none; background: var(--friction); box-shadow: 0 0 10px rgba(251, 146, 60, .8); }
.fin-insight { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(238, 202, 133, .2); min-height: 118px; }
.fin-insight .finance-insight-kicker { display: block; font-size: .62rem; letter-spacing: .12em; color: #e3bf7d; }
.fin-insight h4 { font: 700 1.32rem/1.2 var(--font-d); letter-spacing: -.02em; color: #f4f1e6; margin: 10px 0 8px; }
.fin-insight p { font-size: .86rem; line-height: 1.6; color: #c5cbd0; margin: 0; max-width: 62ch; }

/* a vertical pipeline on narrow screens: the gate becomes a strip and the current runs top → bottom */
@media (max-width: 900px) {
  .fin-stage { padding: 40px 14px 22px; }
  .fin-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; grid-template-areas: "lanes" "gate" "tray" "engine" "out" "views"; }
  .fin-lanes { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; gap: 8px; }
  .fin-lane { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; min-height: 92px; padding: 10px 9px; border-left-width: 1px; border-top: 3px solid var(--lc); }
  .fin-lane svg { grid-row: auto; }
  .fin-lane b { font-size: .74rem; } .fin-lane i { font-size: .46rem; letter-spacing: .04em; }
  .fin-gate { height: 44px; }
  .fin-gate span { top: 50%; left: auto; right: 0; transform: translateY(-50%); background: rgba(5, 9, 20, .8); padding: 2px 6px; }
  .fin-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-engine { min-height: 236px; }
  .fin-out { grid-template-columns: 1fr; gap: 14px; }
  .fin-figs { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: none; gap: 6px; }
  .fin-fig { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; align-content: start; gap: 3px; padding: 8px 7px; border-left-width: 1px; border-top: 3px solid rgba(237, 202, 128, .25); }
  .fin-fig.is-locked { border-top-color: var(--gold); } .fin-fig.is-bad { border-top-color: var(--friction); } .fin-fig.is-scramble { border-top-color: var(--pale); }
  .fin-fig em { font-size: .56rem; } .fin-fig b { font-size: .7rem; order: 2; } .fin-fig em { order: 3; }
  .fin-controls { grid-template-columns: 1fr; }
  .fin-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-actions { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .fin-lane b { font-size: .68rem; }
  .fin-fig { padding: 8px 5px; } .fin-fig b { font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fin-ref.is-new, .fin-caret, .fin-find.is-hit, .fin[data-state="withheld"] .fin-stage::after { animation: none; }
}

/* heading details that used to live in the old card styles */
.portfolio-local { display: inline-block; font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; letter-spacing: 0; font-size: .4em; color: var(--pc); font-weight: 500; vertical-align: middle; margin-inline-start: 6px; }
.portfolio-title-dot { color: var(--pc); }
.portfolio-feature-heading { --pc: #6ee7b7; }

/* ---------- the project index: one accent per project, and it knows where you are ---------- */
.portfolio-index a { position: relative; }
.portfolio-index a:nth-child(1) { --pc: #38d9ab; }
.portfolio-index a:nth-child(2) { --pc: #6ee7b7; }
.portfolio-index a:nth-child(3) { --pc: #edca80; }
.portfolio-index a > span, .portfolio-index a > b { color: var(--pc); }
.portfolio-index a::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--pc); box-shadow: 0 0 14px var(--pc); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.portfolio-index a[aria-current="true"]::before { transform: scaleX(1); }
.portfolio-index a[aria-current="true"] { background: #0d2434; }
.portfolio-index a[aria-current="true"] strong { color: #fff; }
.portfolio-index a:focus-visible { outline: 2px solid var(--pc); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .portfolio-index a::before { transition: none; } }
