/* ============================================================
   DOCKHAVEN LABS — Detail drawer
   Opens when a product card is clicked. Scrollable sheet
   styled like the real product (authentic preview).
   ============================================================ */

.product { cursor: pointer; }
.product .product-link { pointer-events: none; } /* whole card is the trigger */

/* ---------- backdrop ---------- */
.dt-scrim {
  position: fixed; inset: 0; z-index: 300;
  background: color-mix(in oklab, #04050a 78%, transparent);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.dt-scrim.open { opacity: 1; visibility: visible; }

/* ---------- sheet ---------- */
.dt {
  position: fixed; z-index: 301; left: 50%; top: 50%;
  width: min(1080px, 94vw); height: min(92vh, 1000px);
  transform: translate(-50%, -50%) scale(.97) translateY(14px);
  background: linear-gradient(180deg, var(--card), var(--bg));
  border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 60px 140px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden;
  transition: opacity .42s var(--ease), transform .42s var(--ease), visibility .42s;
}
.dt.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.dt.ds { --ac: var(--cobalt); --ac-soft: var(--cobalt-soft); --ac-line: var(--cobalt-line); }
.dt.ls { --ac: var(--amber); --ac-soft: var(--amber-soft); --ac-line: var(--amber-line); }

/* sheet header (sticky) */
.dt-hd {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  position: relative; z-index: 5;
}
.dt-hd-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dt-badge { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; color: var(--ac);
  border: 1px solid var(--ac-line); background: var(--ac-soft); }
.dt-hd .nm { font-family: var(--serif); font-size: 25px; line-height: 1; }
.dt-hd .nm .tld { font-family: var(--mono); font-size: 12px; color: var(--ink-4); letter-spacing: .08em; }
.dt-hd .tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 4px; }
.dt-hd-meta { min-width: 0; }
.dt-close { appearance: none; border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  color: var(--ink-2); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; flex: none;
  font-size: 15px; transition: .2s; display: grid; place-items: center; }
.dt-close:hover { background: rgba(255,255,255,.08); color: var(--ink); border-color: var(--line-3); }

/* progress + scroll body */
.dt-prog { flex: none; height: 2px; background: transparent; position: relative; z-index: 5; }
.dt-prog i { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--ac);
  box-shadow: 0 0 10px var(--ac-line); transition: width .1s linear; }

.dt-body { overflow-y: auto; overflow-x: hidden; flex: 1; scroll-behavior: smooth; position: relative;
  scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
.dt-body::-webkit-scrollbar { width: 9px; }
.dt-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.dt-body::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: padding-box; }

.dt-pad { padding: clamp(26px, 4vw, 46px); }
.dt-section { padding: clamp(26px, 4vw, 46px); border-top: 1px solid var(--line); }
.dt-section.tinted { background: var(--ac-soft); }

/* drawer hero */
.dt-hero { position: relative; overflow: hidden; }
.dt-hero .gl { position: absolute; width: 460px; height: 360px; top: -120px; right: -80px;
  border-radius: 50%; background: var(--ac-soft); filter: blur(70px); pointer-events: none; }
.dt-kick { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ac); display: flex; align-items: center; gap: 9px; }
.dt-kick::before { content: ""; width: 16px; height: 1px; background: var(--ac); opacity: .6; }
.dt-hero h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02; letter-spacing: -0.015em; margin: 18px 0 0; max-width: 16em; text-wrap: balance; }
.dt-hero p { color: var(--ink-2); font-size: 16px; max-width: 42em; margin: 18px 0 0; line-height: 1.6; }

/* stat row */
.dt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 30px;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dt-stat { padding: 20px 22px; border-right: 1px solid var(--line); }
.dt-stat:last-child { border-right: none; }
.dt-stat .v { font-family: var(--serif); font-size: 34px; line-height: 1; }
.dt-stat .v .u { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.dt-stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 9px; }

/* section heading */
.dt-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.dt-h .mk { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.dt-h h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 34px); margin: 0; line-height: 1.05; }
.dt-h p { color: var(--ink-3); font-size: 13.5px; margin: 0 0 0 auto; max-width: 24em; text-align: right; }

/* module grid (Docksense workspace) */
.mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mod { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--card);
  transition: border-color .3s, transform .3s, background .3s; position: relative; overflow: hidden; }
.mod:hover { border-color: var(--ac-line); transform: translateY(-3px); background: var(--card-h); }
.mod .mod-mk { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-4);
  display: flex; justify-content: space-between; align-items: center; }
.mod .mod-ic { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--ac-line);
  display: grid; place-items: center; color: var(--ac); margin-top: 14px; }
.mod h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 14px 0 0; line-height: 1.05; }
.mod p { color: var(--ink-2); font-size: 13px; margin: 8px 0 0; line-height: 1.5; }

/* mini dashboard mockup */
.mock { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.mock-bar .live { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.mock-bar .ttl { color: var(--ink); }
.mock-bar .r { margin-left: auto; color: var(--ink-4); }
.mock-kpis { display: grid; grid-template-columns: repeat(6, 1fr); }
.mk-cell { padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mk-cell:nth-child(6) { border-right: none; }
.mk-cell .l { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); display: flex; justify-content: space-between; }
.mk-cell .n { font-family: var(--serif); font-size: 27px; margin-top: 8px; line-height: 1; }
.mk-cell .n .u { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.mock-low { display: grid; grid-template-columns: 1.4fr 1fr; }
.mock-chart { padding: 18px; border-right: 1px solid var(--line); }
.mock-chart .cl { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; margin-top: 14px; }
.mock-bars .grp { flex: 1; display: flex; gap: 2px; align-items: flex-end; height: 100%; }
.mock-bars .grp i { flex: 1; border-radius: 3px 3px 0 0; }
.mock-bars .grp .rev { background: var(--cobalt); opacity: .85; }
.mock-bars .grp .cost { background: var(--red); opacity: .7; }
.mock-donut { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 92px; height: 92px; border-radius: 50%; flex: none; position: relative;
  display: grid; place-items: center; }
.donut::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--bg-2); }
.donut .dc { position: relative; z-index: 2; text-align: center; }
.donut .dc b { font-family: var(--serif); font-size: 20px; display: block; line-height: 1; }
.donut .dc span { font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: var(--ink-4); }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-family: var(--mono); font-size: 11px; }
.donut-legend .lg { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.donut-legend .lg .sw { width: 8px; height: 8px; border-radius: 2px; }
.donut-legend .lg .pc { margin-left: auto; color: var(--ink-3); }

/* feature list */
.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.feat { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.feat .fn { font-family: var(--mono); font-size: 11px; color: var(--ac); flex: none; padding-top: 3px; width: 26px; }
.feat .ft b { font-size: 14.5px; font-weight: 500; color: var(--ink); display: block; }
.feat .ft span { color: var(--ink-2); font-size: 13px; line-height: 1.5; }

/* exception list (docksense) */
.exc { display: flex; flex-direction: column; }
.exc-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.exc-row .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--red); flex: none; }
.exc-row .bar.high { background: var(--amber); }
.exc-row .id { font-family: var(--mono); font-size: 12px; color: var(--ink-3); width: 130px; flex: none; }
.exc-row .ty { font-size: 13.5px; color: var(--ink); }
.exc-row .sev { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; }
.exc-row .sev.critical { color: var(--red); border: 1px solid color-mix(in oklab, var(--red) 40%, transparent); }
.exc-row .sev.high { color: var(--amber); border: 1px solid var(--amber-line); }
.exc-row .lane { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); }
.exc-row .age { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

/* Ask Scope AI callout */
.ai-call { border: 1px solid var(--ac-line); border-radius: 16px; padding: 24px;
  background: linear-gradient(120deg, var(--ac-soft), transparent 70%); position: relative; overflow: hidden; }
.ai-call .ai-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ac); display: flex; align-items: center; gap: 8px; }
.ai-call .ai-q { font-family: var(--serif); font-size: 22px; margin: 14px 0 0; line-height: 1.2; }
.ai-call .ai-a { color: var(--ink-2); font-size: 14px; margin: 12px 0 0; line-height: 1.6; max-width: 48em; }
.ai-call .ai-a b { color: var(--ink); font-weight: 500; }

/* analyst cards (leadsense) */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.analyst { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--card); }
.analyst .av { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; color: var(--ac); border: 1px solid var(--ac-line); background: var(--ac-soft); }
.analyst .nm { font-size: 15px; font-weight: 500; margin-top: 14px; color: var(--ink); }
.analyst .ro { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; letter-spacing: .04em; }
.analyst .src { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 5px 9px; }
.analyst .src .sw { width: 7px; height: 7px; border-radius: 2px; background: var(--ac); }

/* source flow (leadsense) */
.srcflow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.srccard { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--card); position: relative; }
.srccard .sh { display: flex; align-items: center; gap: 10px; }
.srccard .si { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--ac-line); color: var(--ac); }
.srccard h4 { margin: 0; font-size: 16px; font-weight: 500; }
.srccard .sm { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.srccard p { color: var(--ink-2); font-size: 13px; margin: 14px 0 0; line-height: 1.55; }
.srccard .vol { margin-top: 16px; font-family: var(--mono); font-size: 11px; color: var(--ink-4); display: flex; justify-content: space-between; }
.srccard .vol b { color: var(--ac); font-weight: 500; }

/* lead pipeline mockup (leadsense) */
.pipe { display: flex; flex-direction: column; gap: 9px; }
.pipe-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 16px; transition: border-color .25s, transform .25s; }
.pipe-row:hover { border-color: var(--ac-line); transform: translateX(3px); }
.pipe-row .co { font-size: 14px; color: var(--ink); font-weight: 450; min-width: 0; flex: 1; }
.pipe-row .co small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); margin-top: 2px; letter-spacing: .03em; }
.pipe-row .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.pipe-row .src2 { font-family: var(--mono); font-size: 10px; color: var(--ink-4); border: 1px solid var(--line-2); padding: 3px 7px; border-radius: 5px; }
.pipe-row .sco { display: flex; align-items: center; gap: 9px; }
.pipe-row .sco .barX { width: 54px; height: 5px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.pipe-row .sco .barX i { display: block; height: 100%; background: var(--ac); }
.pipe-row .sco b { font-family: var(--mono); font-size: 13px; color: var(--ac); width: 24px; text-align: right; }

/* digest mockup */
.digest { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.digest .dg-hd { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.digest .dg-hd b { color: var(--ink); }
.digest .dg-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.digest .dg-line { display: flex; gap: 12px; align-items: flex-start; }
.digest .dg-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac); margin-top: 7px; flex: none; }
.digest .dg-line p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.digest .dg-line p b { color: var(--ink); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step { padding: 0 20px; border-left: 1px solid var(--line); position: relative; }
.step:first-child { border-left: none; padding-left: 0; }
.step .sn { font-family: var(--mono); font-size: 12px; color: var(--ac); }
.step h4 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 12px 0 0; }
.step p { color: var(--ink-2); font-size: 13px; margin: 8px 0 0; line-height: 1.5; }

/* PAYG pricing */
.payg { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; }
.payg-card { border: 1px solid var(--ac-line); border-radius: 16px; padding: 26px; background: var(--ac-soft); }
.payg-card .pp { font-family: var(--serif); font-size: 44px; line-height: 1; }
.payg-card .pp .u { font-family: var(--mono); font-size: 15px; color: var(--ink-3); }
.payg-card .pl { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 10px; }
.payg ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.payg ul li { display: flex; gap: 11px; font-size: 14px; color: var(--ink-2); }
.payg ul li .ck { color: var(--ac); flex: none; }

/* drawer CTA */
.dt-cta { text-align: center; }
.dt-cta h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 42px); margin: 0; line-height: 1.05; }
.dt-cta p { color: var(--ink-2); margin: 16px auto 26px; max-width: 32em; }
.dt-cta .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ac { background: var(--ac); color: #07080d; }
.btn-ac:hover { background: color-mix(in oklab, var(--ac) 88%, white); }

body.dt-locked { overflow: hidden; }

/* deep-link arrival highlight */
.dt-flash { animation: dtFlash 1.5s var(--ease); border-radius: 14px; }
@keyframes dtFlash {
  0% { box-shadow: 0 0 0 0 var(--ac-soft), inset 0 0 0 1px transparent; background-color: var(--ac-soft); }
  30% { box-shadow: 0 0 0 3px var(--ac-soft); background-color: var(--ac-soft); }
  100% { box-shadow: 0 0 0 0 transparent; background-color: transparent; }
}
.mod.dt-flash { border-color: var(--ac); }

@media (max-width: 820px) {
  .dt { width: 100vw; height: 100vh; border-radius: 0; }
  .dt-stats { grid-template-columns: repeat(2, 1fr); }
  .dt-stat:nth-child(2) { border-right: none; }
  .mods { grid-template-columns: 1fr; }
  .mock-kpis { grid-template-columns: repeat(3, 1fr); }
  .mk-cell:nth-child(3) { border-right: none; }
  .mock-low { grid-template-columns: 1fr; }
  .mock-chart { border-right: none; border-bottom: 1px solid var(--line); }
  .feats { grid-template-columns: 1fr; }
  .team, .srcflow, .payg { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .dt-h p { display: none; }
}
