/* ============================================================
   OffGrid — Command Center (Cockpit) styles. Extends site.css.
   ============================================================ */

.cc-main { max-width: 1180px; margin: 0 auto; padding: clamp(92px, 13vh, 140px) var(--gut) 90px; }

/* ---- logged-out gate ---- */
.cc-gate { max-width: 520px; margin: clamp(40px,10vh,120px) auto; text-align: center;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-l); padding: 44px 36px; }
.cc-gate .cc-glyph { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 18px; display: grid; place-items: center;
  background: var(--bg-3); color: var(--acc); }
.cc-gate .cc-glyph svg { width: 32px; height: 32px; }
.cc-gate h1 { font-size: clamp(26px,4vw,34px); font-weight: 700; letter-spacing: -.02em; }
.cc-gate p { color: var(--ink-2); margin: 14px 0 26px; font-size: 15.5px; text-wrap: pretty; }
.cc-gate .cc-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- header ---- */
.cc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.cc-hi .kk { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.cc-hi h1 { font-size: clamp(30px,5vw,46px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-top: 8px; }
.cc-head .cc-h-actions { display: flex; gap: 10px; }

/* ---- grid ---- */
.cc-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.cc-col { display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.card-h { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.card-h .ci { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-3); color: var(--acc); display: grid; place-items: center; flex: none; }
.card-h .ci svg { width: 18px; height: 18px; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h .ch-sub { font-size: 12px; color: var(--ink-3); }
.card-h .ch-right { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ---- rank hero card ---- */
.rankhero { background:
   radial-gradient(120% 100% at 80% 0%, color-mix(in srgb, var(--acc) 12%, transparent), transparent 60%), var(--bg-1);
  border: 1px solid var(--line-2); }
.rh-top { display: flex; align-items: center; gap: 18px; }
.rh-badge { width: 78px; height: 78px; flex: none; position: relative; display: grid; place-items: center; }
.rh-badge .dia { position: absolute; inset: 0; border: 2px solid var(--acc); border-radius: 16px; transform: rotate(45deg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 12%, transparent), inset 0 0 24px color-mix(in srgb, var(--acc) 22%, transparent); }
.rh-badge .rn { font-family: var(--font-mono); font-weight: 700; font-size: 22px; color: var(--acc); z-index: 1; }
.rh-meta .lvl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.rh-meta .nm { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.rh-meta .nm small { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.xpbar { margin-top: 22px; }
.xpbar .lab { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; font-family: var(--font-mono); }
.xpbar .lab b { color: var(--ink); }
.xptrack { height: 12px; border-radius: 100px; background: var(--bg-3); overflow: hidden; border: 1px solid var(--line); }
.xptrack i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 60%, #bfffd6)); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.rh-maxed { margin-top: 10px; font-size: 13px; color: var(--acc); font-family: var(--font-mono); }

/* ---- streaks ---- */
.streaks { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.streak { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px 14px; text-align: center; }
.streak.lit { border-color: color-mix(in srgb, var(--acc) 40%, transparent); }
.streak .fl { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--ink-3); }
.streak.lit .fl { color: var(--acc); }
.streak.rec.lit .fl { color: #6cc5ff; }
.streak .nfo { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.streak .num { font-size: 28px; font-weight: 700; line-height: 1; }
.streak .dy { font-size: 12px; color: var(--ink-3); }
.streak .lbl { font-size: 12px; color: var(--ink-2); margin-top: 5px; }

/* ---- mission ---- */
.missions { display: flex; flex-direction: column; gap: 10px; }
.mission { display: flex; align-items: center; gap: 14px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s; text-align: left; width: 100%; }
.mission:hover { border-color: var(--line-2); }
.mission .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-3); flex: none; display: grid; place-items: center; color: #04130a; transition: all .15s; }
.mission .box svg { width: 15px; height: 15px; opacity: 0; }
.mission.done { border-color: color-mix(in srgb, var(--acc) 35%, transparent); background: color-mix(in srgb, var(--acc) 7%, var(--bg-2)); }
.mission.done .box { background: var(--acc); border-color: var(--acc); }
.mission.done .box svg { opacity: 1; }
.mission .mtx { flex: 1; }
.mission .mtt { font-size: 14.5px; font-weight: 600; }
.mission.done .mtt { color: var(--ink-2); }
.mission .mts { font-size: 12px; color: var(--ink-3); }
.mission .mxp { font-family: var(--font-mono); font-size: 12.5px; color: var(--acc); font-weight: 600; flex: none; }
.mission.done .mxp { color: var(--ink-3); }
.mission-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-3); }
.mission-foot .all-done { color: var(--acc); font-weight: 600; }

/* ---- goals ---- */
.goal { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.goal + .goal { margin-top: 12px; }
.goal .gt { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.goal .gmeta { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.stages2 { display: flex; flex-direction: column; gap: 7px; }
.stage2 { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.stage2 .sb { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink-3); flex: none; display: grid; place-items: center; color: #04130a; }
.stage2 .sb svg { width: 11px; height: 11px; opacity: 0; }
.stage2.done .sb { background: var(--acc); border-color: var(--acc); }
.stage2.done .sb svg { opacity: 1; }
.stage2 .stt { color: var(--ink-2); }
.stage2.done .stt { color: var(--ink-3); text-decoration: line-through; }
.stage2 .sxp { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--acc); }
.stage2.done .sxp { color: var(--ink-3); }
.goal-add { margin-top: 14px; display: flex; gap: 8px; }
.goal-add input { flex: 1; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; color: var(--ink); font-family: inherit; font-size: 13.5px; }
.goal-add input:focus { outline: none; border-color: var(--acc); }

/* ---- quick coach ---- */
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qbtn { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 13px 14px; text-align: left; cursor: pointer; transition: border-color .15s, transform .1s; font-family: inherit; }
.qbtn:hover { border-color: var(--acc); transform: translateY(-1px); }
.qbtn .qi { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-3); color: var(--acc); display: grid; place-items: center; flex: none; }
.qbtn .qi svg { width: 16px; height: 16px; }
.qbtn .qt { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }

/* ---- activity feed ---- */
.feed { display: flex; flex-direction: column; gap: 0; }
.fitem { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fitem:last-child { border-bottom: none; }
.fitem .fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); flex: none; }
.fitem .ft { color: var(--ink-2); flex: 1; }
.fitem .fx { font-family: var(--font-mono); font-size: 12px; color: var(--acc); }
.fitem .fwhen { font-size: 11px; color: var(--ink-3); }
.feed-empty { color: var(--ink-3); font-size: 13px; padding: 8px 0; }

/* ---- share card ---- */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- toast / celebration ---- */
.cc-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 300; opacity: 0;
  background: var(--bg-1); border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); border-radius: 100px;
  padding: 12px 22px; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); transition: opacity .25s, transform .25s; pointer-events: none; }
.cc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.cc-toast .tx { color: var(--acc); font-family: var(--font-mono); }

.cc-rankup { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px;
  background: rgba(4,5,6,.8); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.cc-rankup.show { opacity: 1; }
.cc-rankup .ru-card { text-align: center; background: var(--bg-1); border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
  border-radius: var(--r-l); padding: 44px 40px; max-width: 380px; transform: scale(.9); transition: transform .3s; }
.cc-rankup.show .ru-card { transform: scale(1); }
.cc-rankup .ru-badge { width: 96px; height: 96px; margin: 0 auto 22px; position: relative; display: grid; place-items: center; }
.cc-rankup .ru-badge .dia { position: absolute; inset: 0; border: 2px solid var(--acc); border-radius: 20px; transform: rotate(45deg);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--acc) 14%, transparent), inset 0 0 30px color-mix(in srgb, var(--acc) 26%, transparent); }
.cc-rankup .ru-badge .rn { font-family: var(--font-mono); font-weight: 700; font-size: 30px; color: var(--acc); z-index: 1; }
.cc-rankup .ru-k { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); }
.cc-rankup h2 { font-size: 34px; font-weight: 700; margin: 8px 0 10px; }
.cc-rankup p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 24px; text-wrap: pretty; }

@media (max-width: 900px) {
  .cc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .qgrid { grid-template-columns: 1fr; }
  .rh-meta .nm { font-size: 24px; }
}
