/* Graphite / Jade product experience v0.2
   Preview-only working identity. No production branding decision is implied.
   Adds the approved dashboard intelligence rail and premium study-asset treatment. */

:root{
  --graphite-ink:#232a33;
  --graphite-panel:#2f3640;
  --jade-accent:#4f8a7a;
  --jade-dark:#3e6e61;
  --jade-wash:#eef6f2;
  --onyx-depth:#171a1f;
  --ivory-canvas:#f7f4ee;
  --champagne-line:#cbb98f;
}

/* Working product identity */
.graphite-wordmark{letter-spacing:-.035em}
.sidebar-brand .brand-title{font-size:27px;line-height:1}
.sidebar-brand .eyebrow{font-size:9.5px;letter-spacing:.19em}

/* Desktop Coach becomes the approved study dashboard composition:
   conversation in the center + evidence intelligence on the right. */
.graphite-coach-body{
  flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 318px;
  overflow:hidden;
}
.graphite-coach-body>.chat-scroll{min-width:0;height:100%}
.graphite-intel-rail{
  height:100%;overflow:auto;padding:28px 22px 34px 18px;
  border-left:1px solid rgba(216,209,196,.8);
  background:linear-gradient(180deg,rgba(251,249,244,.8),rgba(238,246,242,.52));
}
.graphite-intel-head{margin-bottom:17px}
.graphite-intel-head .eyebrow{margin-bottom:5px}
.graphite-intel-head h3{font-size:23px;margin:0;letter-spacing:-.025em}
.graphite-intel-head p{font-size:12px;line-height:1.5;color:var(--graphite-muted);margin:6px 0 0}
.graphite-intel-stack{display:grid;gap:11px}
.graphite-intel-card{
  position:relative;overflow:hidden;background:rgba(255,255,255,.9);
  border:1px solid var(--line-soft);border-radius:18px;padding:16px;
  box-shadow:0 7px 20px rgba(23,26,31,.035)
}
.graphite-intel-card.focus{background:linear-gradient(145deg,#fff,var(--jade-pale));border-color:rgba(79,138,122,.25)}
.graphite-intel-card.focus::after{content:"";position:absolute;right:-30px;top:-32px;width:92px;height:92px;border-radius:50%;border:1px solid rgba(79,138,122,.16)}
.graphite-intel-card>*{position:relative;z-index:1}
.graphite-intel-label{text-transform:uppercase;letter-spacing:.13em;font-size:9.5px;font-weight:850;color:var(--jade-deep)}
.graphite-intel-value{font-family:Georgia,"Times New Roman",serif;font-size:20px;line-height:1.2;color:var(--graphite-deep);margin-top:6px}
.graphite-intel-copy{font-size:11.5px;color:var(--graphite-muted);line-height:1.45;margin-top:6px}
.graphite-intel-metrics{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}
.graphite-mini-metric{background:#fffefa;border:1px solid #eee7dc;border-radius:13px;padding:10px}
.graphite-mini-metric strong{display:block;font-size:17px;color:var(--graphite-deep)}
.graphite-mini-metric span{display:block;font-size:9.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--graphite-muted);margin-top:2px}
.graphite-intel-actions{display:grid;gap:8px;margin-top:12px}
.graphite-intel-actions button{width:100%;text-align:left;white-space:normal;border-radius:13px;padding:10px 11px;font-size:11.5px}
.graphite-intel-actions .primary-button{display:flex;justify-content:space-between;align-items:center}
.graphite-intel-actions .primary-button::after{content:"→"}
.graphite-evidence-bar{height:6px;background:#e8e1d5;border-radius:999px;overflow:hidden;margin-top:10px}
.graphite-evidence-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--jade-deep),var(--jade));border-radius:inherit}
.graphite-live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--jade);margin-right:6px}

/* The welcome module now reads as the main dashboard hero rather than only a chat greeting. */
.welcome-card{max-width:none}
.welcome-card .eyebrow{font-size:10px}
.welcome-card h3{font-size:29px!important;max-width:680px}

/* Recall Cards become a deliberate premium learning library. */
.recall-card{position:relative;overflow:hidden;padding-top:22px!important}
.recall-card::before{
  content:"JADE RECALL";display:inline-flex;align-items:center;
  font-size:9px;font-weight:900;letter-spacing:.16em;color:var(--jade-deep);
  margin-bottom:9px
}
.recall-card::after{
  content:"";position:absolute;right:-34px;top:-42px;width:110px;height:110px;border-radius:50%;
  border:1px solid rgba(79,138,122,.12);pointer-events:none
}
.recall-card[data-graphite-type="trap"]{box-shadow:inset 3px 0 0 rgba(154,95,74,.7),0 8px 20px rgba(23,26,31,.04)!important}
.recall-card[data-graphite-type="scenario"]{box-shadow:inset 3px 0 0 rgba(203,185,143,.85),0 8px 20px rgba(23,26,31,.04)!important}
.graphite-card-ribbon{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:-4px 0 12px}
.graphite-card-ribbon span{font-size:10px;color:var(--graphite-muted)}
.graphite-card-ribbon b{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:var(--jade-deep)}

/* Premium visual lesson / Study Deck system. */
.deck-modal{background:
  radial-gradient(circle at 87% 12%,rgba(79,138,122,.09) 0 88px,transparent 89px),
  radial-gradient(circle at 91% 15%,transparent 0 132px,rgba(203,185,143,.28) 133px 134px,transparent 135px),
  linear-gradient(145deg,#f8f5ee,#efe9de)!important;
}
.deck-toolbar{
  position:sticky;top:0;z-index:4;padding:18px clamp(20px,4vw,54px)!important;
  background:rgba(247,244,238,.9)!important;border-bottom:1px solid rgba(216,209,196,.85)!important;
  backdrop-filter:blur(18px)
}
.deck-toolbar::before{
  content:"GRAPHITE · CIA CHALLENGE";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  font-size:9px;font-weight:900;letter-spacing:.2em;color:var(--jade-deep)
}
.deck-shell{max-width:1080px!important;margin:0 auto!important;padding:30px 24px 42px!important}
.deck-kicker{font-size:9.5px!important;letter-spacing:.17em!important;color:#8a6725!important;text-align:left!important;margin:0 0 15px 8px!important}
.deck-stage{perspective:1200px}
.deck-slide{
  min-height:min(62vh,570px)!important;border-radius:28px!important;border:1px solid rgba(203,185,143,.7)!important;
  box-shadow:0 28px 65px rgba(23,26,31,.11)!important;background:#fffdf8!important;
  position:relative;overflow:hidden
}
.deck-slide::after{content:"";position:absolute;right:-54px;bottom:-62px;width:180px;height:180px;border-radius:50%;border:1px solid rgba(79,138,122,.12);pointer-events:none}
.deck-slide-top{position:relative;z-index:2}
.deck-slide h3{font-size:clamp(32px,4.2vw,58px)!important;line-height:1.04!important;letter-spacing:-.045em!important;color:#152b49!important;max-width:790px}
.slide-type{background:var(--jade-pale)!important;border:1px solid rgba(79,138,122,.2)!important;color:var(--jade-deep)!important;text-transform:uppercase;letter-spacing:.11em;font-size:9px!important}
.deck-cover{background:linear-gradient(145deg,#fffdf8,#f5f3ec)!important}
.deck-concept{background:linear-gradient(145deg,#fffdf8,#eef6f2)!important}
.deck-expansion{background:linear-gradient(145deg,#fffdf8,#f8f0df)!important}
.deck-language{background:linear-gradient(145deg,#fffdf8,#edf3f1)!important}
.deck-rules{background:linear-gradient(145deg,#fffdf8,#f0eee8)!important}
.deck-traps{background:linear-gradient(145deg,#fffdf8,#f5ece7)!important}
.deck-scenario{background:linear-gradient(145deg,#fffdf8,#edf4f1)!important}
.deck-cover .cover-anchor{color:rgba(203,185,143,.39)!important;font-size:clamp(110px,18vw,230px)!important}
.deck-nav{padding-top:20px!important}
.deck-dots{gap:8px!important}.deck-dots button,.deck-dots span{width:9px!important;height:9px!important}
.deck-dots .active{background:var(--jade-deep)!important}

/* Progress page is a dashboard, not a report dump. */
#progressView .panel-content>.section-heading{padding:4px 2px 8px}
#progressView .coverage-hero{background:linear-gradient(145deg,#fff,var(--jade-pale));border:1px solid rgba(79,138,122,.22);box-shadow:var(--shadow-soft);border-radius:24px;padding:24px;margin-bottom:18px}
#progressView .coverage-value{font-family:Georgia,"Times New Roman",serif;color:var(--graphite-deep)}

@media(max-width:1180px){
  .graphite-coach-body{grid-template-columns:minmax(0,1fr) 278px}
  .graphite-intel-rail{padding-left:14px;padding-right:14px}
  .deck-toolbar::before{display:none}
}
@media(max-width:940px){
  .graphite-coach-body{display:block;overflow:auto}
  .graphite-coach-body>.chat-scroll{height:auto;overflow:visible}
  .graphite-intel-rail{height:auto;overflow:visible;border-left:0;border-top:1px solid var(--line-soft);padding:20px 18px 100px}
  .graphite-intel-stack{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  /* Mobile Jade uses one deliberate scroll surface. The desktop intelligence rail
     is intentionally absent here because Home already carries that information. */
  #coachView{min-height:0;overflow:hidden}
  #coachView>.chat-scroll{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
  #coachView>.composer-wrap{flex:0 0 auto;position:relative;z-index:4}
  .graphite-coach-body{overflow:hidden}
  .graphite-intel-rail{display:none!important}
  .graphite-intel-stack{grid-template-columns:1fr 1fr}
  .graphite-intel-card.focus{grid-column:1/-1}
  .graphite-intel-head h3{font-size:21px}
  .welcome-card h3{font-size:27px!important}
  .deck-shell{padding:18px 12px 94px!important}
  .deck-slide{min-height:64vh!important;border-radius:22px!important}
  .deck-slide h3{font-size:clamp(31px,10vw,46px)!important}
  .deck-toolbar{padding:13px 14px!important}
}
@media(max-width:520px){
  .graphite-intel-stack{grid-template-columns:1fr}
  .graphite-intel-card.focus{grid-column:auto}
  .graphite-intel-metrics{grid-template-columns:1fr 1fr}
}
