/* ============================================================
   Chronex — page compositions
   ============================================================ */

/* ─────────────────────────────────────────────  HOME: hero  */

.hero{
  position:relative;
  isolation:isolate;
  padding:calc(var(--sec) * .8 + 90px) 0 calc(var(--sec) * 1.1);
  text-align:center;
}
.hero > .shell{ position:relative; z-index:1; }

/* the hero's own field — a deep radial glow behind the centered
   headline, drifting a little against the scroll. Masked at the
   bottom so it dissolves into the page ground with no seam. */
.hero__bg{
  position:absolute; inset:-10% -5% -14%;
  z-index:0;
  overflow:hidden;
  transform:translate3d(0, var(--y,0px), 0);
  will-change:transform;
  background:var(--lilac);
  -webkit-mask-image:linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
          mask-image:linear-gradient(180deg, #000 0%, #000 64%, transparent 100%);
}
.hero__glow{
  position:absolute; inset:0;
  background:
    radial-gradient(46% 60% at 50% 8%, rgba(255,255,255,.28) 0%, transparent 70%),
    radial-gradient(38% 46% at 88% 92%, rgba(34,184,201,.5) 0%, transparent 72%);
}

/* the deep field carries white type; controls invert with it */
.hero .d-1{ color:var(--white); text-shadow:0 2px 14px rgba(10,30,80,.24); }
.hero .grad-text{ background-image:linear-gradient(96deg,#BFEFF5 0%,#B9C9FF 100%); }
.hero__lede{ color:rgba(255,255,255,.88); }
.hero .btn--solid{
  background-image:none;
  background-color:var(--white);
  color:var(--ink);
  box-shadow:0 14px 32px -16px rgba(10,30,80,.55);
}
.hero .btn--solid:hover{ background-color:#fff; box-shadow:0 18px 36px -16px rgba(10,30,80,.6); }
.hero .btn--ghost{
  color:var(--white);
  border-color:rgba(255,255,255,.42);
  background-color:rgba(255,255,255,.12);
}
.hero .btn--ghost:hover{ background-color:rgba(255,255,255,.22); border-color:rgba(255,255,255,.6); }

.hero__in{ display:flex; flex-direction:column; align-items:center; }
.hero__eyebrow{ color:rgba(255,255,255,.72); margin-bottom:18px; }
.hero__title{ margin:0; max-width:20ch; }
.hero__lede{
  max-width:46ch;
  margin:26px auto 0;
  font-size:clamp(18px,1.5vw,24px);
  line-height:1.5;
}
.hero__acts{
  display:flex; flex-wrap:wrap; justify-content:center; gap:12px;
  margin-top:clamp(24px,2.4vw,36px);
}
.hero__acts .btn{ padding:17px 32px; font-size:17px; }

.hero__stats{
  display:flex; flex-wrap:wrap; justify-content:center; gap:clamp(28px,5vw,72px);
  margin-top:clamp(48px,6vw,84px);
  padding-top:clamp(24px,3vw,36px);
  border-top:1px solid rgba(255,255,255,.22);
  width:100%; max-width:720px;
}
.hero__stats div{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.hero__stats .num{ font-size:clamp(20px,2.4vw,28px); font-weight:600; color:var(--white); }
.hero__stats span:last-child{ font-size:12.5px; color:rgba(255,255,255,.7); }

/* ──────────────────────────────────────────────  HOME: gap  */

.gap{ padding:calc(var(--sec) * 1) 0 calc(var(--sec) * .7); }
.gap__in{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:clamp(24px,4vw,64px);
  align-items:start;
  max-width:1180px;
}
.gap__label{ padding-top:6px; }
.gap__body{ max-width:760px; }
.gap__statement{
  margin:0 0 24px;
  color:var(--white);
  text-shadow:0 2px 12px rgba(30,50,140,.16);
  text-wrap:pretty;
}
.gap__body .lede{ max-width:56ch; }

/* ─────────────────────────────────────────────  HOME: flow  */

.flow{ padding:calc(var(--sec) * .7) 0 calc(var(--sec) * .7); }
.flow__title{
  margin:0 0 clamp(28px,3vw,48px); max-width:20ch;
  color:var(--white);
  text-shadow:0 2px 12px rgba(30,50,140,.16);
}

.flow__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(16px,2vw,22px);
}
.flow__card{
  position:relative;
  padding:clamp(24px,2.4vw,32px);
  border-radius:var(--r-l);
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.1);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  opacity:clamp(.34, calc((var(--p,0)) * 1.6), 1);
  transform:translate3d(0, calc((1 - clamp(0, calc((var(--p,0)) * 1.6), 1)) * 16px), 0);
}
.flow__no{
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; margin-bottom:16px;
  border-radius:50%;
  background:var(--grad-deep);
  color:#fff; font-size:13px;
}
.flow__card h3{ margin:0 0 8px; color:var(--white); }
.flow__card p{
  margin:0; font-size:14.5px; line-height:1.6;
  color:rgba(255,255,255,.88); max-width:34ch;
}

/* ──────────────────────────────────────────────  HOME: def  */

.def{
  margin:calc(var(--sec) * .6) var(--gut);
  padding:clamp(34px,3.6vw,64px) clamp(26px,3vw,58px);
  border-radius:var(--r-xl);
  background:var(--pale);
  border:1px solid rgba(255,255,255,.8);
  box-shadow:var(--lift-2);
  overflow:hidden;
  text-align:center;
}
.def__in{
  display:flex; flex-direction:column; align-items:center;
  max-width:920px; margin-inline:auto;
}
.def__stmt{ margin:0 0 clamp(28px,3vw,40px); color:var(--ink); text-shadow:none; }

.def__tags{
  display:flex; flex-wrap:wrap; justify-content:center; gap:10px;
}
.def__tag{
  display:inline-flex; align-items:baseline; gap:7px;
  padding:10px 18px;
  border-radius:99px;
  background:#fff;
  border:1px solid rgba(255,255,255,.9);
  box-shadow:var(--lift);
  font-size:13.5px; color:var(--ink-soft);
  opacity:calc(.3 + var(--p,0) * .7);
  transform:translate3d(0, calc((1 - var(--p,0)) * 10px), 0);
}
.def__tag b{
  font-family:var(--f-display); font-weight:600; font-size:14px;
  letter-spacing:-.01em; color:var(--ink);
}

/* ────────────────────────────────────────────  HOME: close  */

.close{ padding:calc(var(--sec) * .6) 0 calc(var(--sec) * .8); }
.close__card{
  max-width:1040px; margin-inline:auto;
  padding:clamp(40px,5vw,72px);
  border-radius:var(--r-xl);
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.3);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:var(--lift-2);
  text-align:left;
}
.close__card h2{ max-width:none; }
.close__acts{ margin-top:clamp(20px,2.2vw,32px); }

/* ═══════════════════════════════════════════════════  DOCS  */

.page-hd{
  padding:calc(var(--sec) * .7 + 92px) 0 clamp(28px,3vw,46px);
}
.page-hd__in{ display:grid; gap:14px; max-width:1100px; }
.page-hd h1{ margin:0; }

.docs{ padding-bottom:calc(var(--sec) * .7); }
.docs__grid{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:clamp(32px,5vw,92px);
  align-items:start;
}
.toc{ position:sticky; top:96px; }
.toc__list{ list-style:none; margin:14px 0 0; padding:0; display:grid; gap:2px; }
.toc a{
  display:block;
  padding:7px 12px;
  margin-left:-12px;
  border-radius:9px;
  font-size:14px; color:var(--dim);
  transition:color var(--t-s) linear, background var(--t-s) linear;
}
.toc a:hover{ color:var(--ink); background:rgba(255,255,255,.5); }
.toc a.is-here{ color:var(--ink); background:#fff; box-shadow:var(--lift); }

.doc{ max-width:74ch; }
.doc > section{ padding-bottom:clamp(30px,3.4vw,54px); scroll-margin-top:110px; }
.doc h2{
  margin:0 0 20px;
  font-family:var(--f-display); font-weight:600;
  font-size:clamp(26px,2.6vw,38px);
  letter-spacing:-.028em; line-height:1.1;
  color:var(--ink);
}
.doc h3{
  margin:24px 0 10px;
  font-family:var(--f-display); font-weight:500;
  font-size:19px; letter-spacing:-.018em;
  color:var(--ink);
}
.doc p{ margin:0 0 18px; color:var(--ink-soft); line-height:1.72; font-size:16px; }
.doc p strong{ color:var(--ink); font-weight:500; }
.doc ul{ margin:0 0 18px; padding-left:20px; color:var(--ink-soft); line-height:1.72; }
.doc li{ margin-bottom:8px; }
.doc li::marker{ color:var(--violet); }
.doc li strong{ color:var(--ink); font-weight:500; }
.doc a:not(.btn){ color:var(--violet); text-decoration:underline; text-underline-offset:3px; }

.callout{
  padding:18px 22px;
  margin:0 0 20px;
  border-left:2px solid var(--violet);
  border-radius:0 var(--r-s) var(--r-s) 0;
  background:rgba(255,255,255,.74);
}
.callout p:last-child{ margin-bottom:0; }

.spec{
  margin:0 0 26px;
  padding:4px 22px;
  border-radius:var(--r-m);
  background:rgba(255,255,255,.74);
  border:1px solid rgba(255,255,255,.9);
}
.spec .krow span:last-child{ font-family:var(--f-mono); font-size:13px; }
.spec .krow span:last-child a{ color:var(--violet); }

/* ═════════════════════════════════════════════════  MARKET  */

.mkt{ padding-bottom:calc(var(--sec) * .7); }
.mkt__grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:clamp(24px,2.6vw,42px);
  align-items:stretch;
}
.mkt__side{ display:grid; gap:18px; align-content:start; }

/* the book stretches to the foot of the sidebar and scrolls inside.
   height:0 keeps its 100 rows out of the grid row's intrinsic sizing —
   the sidebar sets the height, min-height:100% fills it back. */
.card--book{
  display:flex; flex-direction:column;
  height:0; min-height:100%;
  overflow:hidden;
}
.card--book > [data-listings]{ display:flex; flex-direction:column; flex:1; min-height:0; }
.card--book .rows{ display:flex; flex-direction:column; flex:1; min-height:0; }

.card{
  border:1px solid rgba(255,255,255,.92);
  border-radius:var(--r-l);
  background:#F2FBFC;
  box-shadow:var(--lift);
  padding:clamp(20px,2vw,28px);
}
.card__hd{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; margin-bottom:16px;
}
.card__hd h2, .card__hd h3{
  margin:0;
  font-family:var(--f-display); font-weight:500;
  font-size:17px; letter-spacing:-.02em;
  color:var(--ink);
}

.empty{
  display:grid; gap:14px;
  place-items:start;
  padding:clamp(28px,3.4vw,48px) clamp(20px,2.4vw,34px);
  border:1px dashed rgba(20,26,66,.2);
  border-radius:var(--r-l);
  background:rgba(255,255,255,.6);
}
.empty h3{
  margin:0;
  font-family:var(--f-display); font-weight:500;
  font-size:clamp(19px,1.8vw,24px); letter-spacing:-.02em;
  color:var(--ink);
}
.empty p{ margin:0; color:var(--ink-soft); max-width:52ch; font-size:15px; line-height:1.66; }
.empty code{
  font-family:var(--f-mono); font-size:12.5px;
  padding:2px 7px; border-radius:6px;
  background:rgba(76,79,224,.12); color:var(--violet);
}

.card__hd-side{ display:flex; align-items:center; gap:10px; }

.search input{
  width:150px;
  padding:7px 13px;
  border-radius:99px;
  border:1px solid var(--line-strong);
  background:#fff;
  color:var(--ink);
  font-family:var(--f-mono); font-size:12.5px;
  letter-spacing:.04em; text-transform:uppercase;
  transition:width var(--t-s) var(--e-out), border-color var(--t-s) linear, background var(--t-s) linear;
}
.search input:focus{ outline:none; width:190px; border-color:var(--violet); background:#fff; }
.search input::placeholder{ color:var(--dimmer); text-transform:none; letter-spacing:0; }
.search input::-webkit-search-cancel-button{ filter:grayscale(1) opacity(.5); }

.chip{
  font-family:var(--f-mono); font-size:10px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase;
  padding:4px 9px; border-radius:99px;
  color:var(--violet);
  background:rgba(76,79,224,.12);
  border:1px solid rgba(76,79,224,.22);
}

/* listings table */
.rows{ display:grid; }
.row{
  display:grid;
  grid-template-columns:1.1fr .9fr 1.1fr 1fr auto;
  gap:18px; align-items:center;
  padding:15px 0;
  border-bottom:1px solid var(--line);
  font-size:14.5px;
  transition:opacity var(--t-s) linear;
}
.row:last-child{ border-bottom:0; }
.row.is-pending{ opacity:.55; }
.row--hd{ padding-top:0; padding-bottom:12px; }
.row--hd span{
  font-family:var(--f-mono); font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--dimmer);
}
.row__sym{ font-family:var(--f-display); font-weight:600; font-size:17px; color:var(--ink); }
.row__price{ font-weight:600; color:var(--ink); }
.row__sub{
  display:block; margin-top:2px;
  font-family:var(--f-mono); font-size:11.5px; font-weight:400;
  letter-spacing:0; color:var(--dimmer);
}

/* the book scrolls inside its card so the page stays short */
.rows{ margin-inline:-10px; }
.rows__body{
  flex:1 1 0;
  min-height:240px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(20,26,66,.22) transparent;
}
.rows__body::-webkit-scrollbar{ width:8px; }
.rows__body::-webkit-scrollbar-thumb{
  background:rgba(20,26,66,.2); border-radius:99px;
  border:2px solid transparent; background-clip:content-box;
}

.row--hd, .row[data-id]{ padding-inline:10px; }
.row[data-id]{
  cursor:pointer;
  border-radius:12px;
  transition:background var(--t-s) linear, opacity var(--t-s) linear;
}
.row[data-id]:hover{ background:rgba(76,79,224,.07); }

/* claim detail sheet: chart beside the terms */
.modal--claim .modal__card{ width:min(1060px,100%); padding:20px 22px 22px; }
.sheet{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);
  gap:20px;
}
.sheet__chart{
  height:min(56vh,430px);
  border-radius:var(--r-m);
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
}
.sheet__facts .note{ margin-top:12px; }
@media (max-width:820px){
  .sheet{ grid-template-columns:1fr; }
  .sheet__chart{ height:280px; }
}

/* form */
.field{ display:grid; gap:7px; margin-bottom:14px; }
.field label{ font-size:13px; color:var(--dim); }
.field input, .field select{
  width:100%;
  padding:11px 14px;
  border-radius:var(--r-s);
  border:1px solid var(--line-strong);
  background:#fff;
  color:var(--ink);
  font-family:var(--f-mono); font-size:14px;
  transition:border-color var(--t-s) linear, background var(--t-s) linear, box-shadow var(--t-s) linear;
}
.field input:focus{
  outline:none;
  border-color:var(--violet);
  background:#fff;
  box-shadow:0 0 0 3px rgba(76,79,224,.16);
}
.field input::placeholder{ color:rgba(20,26,66,.3); }
.field--pair{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.note{ margin:14px 0 0; font-size:13px; line-height:1.6; color:var(--dimmer); }

/* ══════════════════════════════════════════  RESPONSIVE  */

@media (max-width:1180px){
  .mkt__grid{ grid-template-columns:1fr; }
  .mkt__side{ grid-template-columns:repeat(2,minmax(0,1fr)); }

  /* single column: unwind the flex chain so the book sizes naturally */
  .card--book,
  .card--book > [data-listings],
  .card--book .rows{ display:block; height:auto; min-height:0; overflow:visible; }
  .rows__body{ max-height:min(58vh, 520px); min-height:0; }
}

@media (max-width:960px){
  .docs__grid{ grid-template-columns:1fr; }
  .toc{ position:static; }
  .toc__list{ display:flex; flex-wrap:wrap; gap:6px; }
  .toc a{ margin-left:0; border:1px solid var(--line); }
}

@media (max-width:760px){
  .gap__in{ grid-template-columns:1fr; gap:16px; }
}

@media (max-width:860px){
  .flow__grid{ grid-template-columns:1fr; }
  .close__card{ text-align:center; }
  .mkt__side{ grid-template-columns:1fr; }
  /* two columns: identity left, figures right, action on its own line */
  .row{ grid-template-columns:1fr auto; gap:6px 18px; padding:18px 0; }
  .row > :nth-child(2), .row > :nth-child(4){ text-align:right; }
  .row > [data-buy]{ grid-column:1 / -1; justify-self:start; margin-top:12px; }
  .row--hd{ display:none; }
}

@media (max-width:560px){
  .hero__acts .btn{ width:100%; justify-content:center; }
}
