/* Copyright (c) 2026 DamPhi Enterprises. All rights reserved. Proprietary and confidential: licensed for use only; copying, modifying or distributing it without written permission is not allowed. */
/* =====================================================================
   SCREENS · shared app screens: sign-in, home, Ask Claude, demo menu
   ===================================================================== */

/* === SECTION: UTILITIES === */
.grow { flex: 1; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.icon-wrap { display: inline-flex; }
.icon-wrap svg, .btn .icon { width: 18px; height: 18px; }
.is-disabled { opacity: .35; pointer-events: none; }
.chip {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--on-shell);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.chip:hover:not([disabled]) { border-color: var(--accent); background: var(--circle); }
.chip[disabled] { opacity: .5; cursor: wait; }
/* === /SECTION: UTILITIES === */

/* === SECTION: SIGN-IN === */
.app-body.is-signed-out { display: block; padding-bottom: 0; }
.app-body.is-signed-out .app-main { max-width: none; padding: 0; }
.signin-brand { display: flex; align-items: center; min-height: 48px; }
.brand-logo-lg { height: 56px; width: auto; max-width: 280px; }
.brand-name-lg { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; color: var(--on-shell-strong); }
.brand-name-lg .damphi-mark-lg { width: 44px; height: 44px; margin-right: 12px; vertical-align: -8px; }
.btn-ms { justify-content: center; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; display: block; }
.ms-logo i:nth-child(1) { background: #f25022; }
.ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; }
.ms-logo i:nth-child(4) { background: #ffb900; }
.signin-demo {
  padding: var(--sp-4);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.signin-cloud {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.signin-cloud .btn-sm { align-self: flex-start; }
.start-problem {
  position: relative;
  z-index: 50;
  max-width: 640px;
  margin: var(--sp-4) auto;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.signin-foot { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.role-grid { display: grid; gap: var(--sp-2); }
@media (min-width: 520px) { .role-grid-modal { grid-template-columns: 1fr 1fr; } }
.role-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--on-shell);
  text-align: left;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.role-card:hover { border-color: var(--accent); background: var(--circle); }
.role-card-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.role-card-name { font-weight: 700; }
.role-card-role { font-size: var(--fs-xs); color: var(--accent-text); font-weight: 700; }
.role-card-desc { font-size: var(--fs-xs); color: var(--muted); }
.role-card-go { width: 18px; height: 18px; color: var(--muted); flex: none; }
.modal .role-card { background: var(--white); border-color: var(--surface-line); color: var(--ink); }
.modal .role-card:hover { background: rgba(var(--accent-rgb), .1); border-color: var(--accent); }
.modal .role-card.is-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.modal .role-card-role { color: var(--coral-deep); }
.modal .avatar { background: var(--card); color: var(--ink); }
.modal .avatar-accent { background: var(--accent); }
.modal .segmented { background: var(--surface-2); border-color: var(--surface-line); }
.modal .segmented button { color: var(--surface-sub); }
.modal .segmented button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.segmented-wide { display: flex; width: 100%; }
.segmented-wide button { flex: 1; white-space: normal; }

.auth-sim { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; padding: var(--sp-4) 0; }
.auth-sim-icon {
  width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  background: var(--ink); color: var(--cream);
}
.auth-sim-icon svg { width: 40px; height: 40px; }
.auth-sim.is-done .auth-sim-icon { background: var(--ok); }
.auth-sim-bar { width: 160px; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.auth-sim-bar span { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 4px; animation: auth-bar 1.1s var(--ease) infinite; }
.auth-sim.is-done .auth-sim-bar span { width: 100%; animation: none; background: var(--ok); }
@keyframes auth-bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
/* === /SECTION: SIGN-IN === */

/* === SECTION: HOME === */
.home-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.summary-card {
  padding: var(--sp-5);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--circle), var(--bg-alt));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.summary-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.summary-card .stat { background: rgba(var(--bg-rgb), .55); }
.agent-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 600px) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .agent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.agent-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon head" "does does" "foot foot";
  gap: var(--sp-3);
  align-content: start;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-radius: var(--radius);
  text-align: left;
  font: inherit;
  width: 100%;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.agent-tile.is-live {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-1);
}
.agent-tile.is-live:hover { transform: translateY(-2px); color: var(--ink); box-shadow: var(--shadow-2); }
.agent-tile.is-soon {
  background: var(--bg-alt);
  color: var(--on-shell);
  border: 1px solid var(--line);
}
.agent-tile.is-soon:hover { border-color: var(--muted); }
.agent-icon {
  grid-area: icon;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--circle);
  color: var(--accent-text);
}
.agent-icon svg { width: 22px; height: 22px; }
.agent-icon-sm { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--ink); }
.agent-icon-sm svg { width: 20px; height: 20px; }
.is-live .agent-icon { background: var(--ink); color: var(--accent); }
.agent-head { grid-area: head; display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.25; }
.agent-name { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.01em; }
.agent-sub { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.is-live .agent-sub { color: var(--sub); }
.agent-does { grid-area: does; font-size: var(--fs-sm); line-height: 1.45; color: var(--muted); }
.is-live .agent-does { color: var(--ink); }
.agent-foot { grid-area: foot; display: flex; align-items: center; justify-content: space-between; padding-top: var(--sp-2); border-top: 1px solid var(--line); }
.is-live .agent-foot { border-top-color: rgba(var(--bg-rgb), .15); }
.is-live .badge-ok { background: var(--ink); color: var(--ok-dark); }
.agent-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: var(--fs-sm); }
.agent-go svg { width: 18px; height: 18px; }
.is-soon .agent-go { color: var(--muted); }

.octopus-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.octopus { margin: 0 calc(var(--sp-3) * -1); }
.octopus-svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab; }
.octopus-svg:active { cursor: grabbing; }
/* The 3D map ("Orbit"): shades come from the brand colours only */
.oct-g-on0 { stop-color: color-mix(in srgb, var(--accent), var(--white) 30%); }
.oct-g-on1 { stop-color: var(--accent); }
.oct-g-on2 { stop-color: color-mix(in srgb, var(--accent), var(--ink) 22%); }
.oct-g-soft0 { stop-color: var(--white); }
.oct-g-soft1 { stop-color: var(--circle); }
.oct-g-off0 { stop-color: var(--bg); }
.oct-g-off1 { stop-color: color-mix(in srgb, var(--line), var(--ink) 4%); }
.oct-g-core0 { stop-color: var(--white); }
.oct-g-core1 { stop-color: var(--circle); }
.oct-g-core2 { stop-color: color-mix(in srgb, var(--circle), var(--ink) 9%); }
.oct-g-sh0 { stop-color: var(--ink); stop-opacity: .2; }
.oct-g-sh1 { stop-color: var(--ink); stop-opacity: 0; }
.oct-floor { fill: var(--circle); fill-opacity: .55; stroke: var(--line); stroke-width: 1.2; }
.oct-shadow { fill: url(#octShadow); }
.oct-spoke { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 4; }
.oct-spoke.is-live { stroke: var(--accent); stroke-opacity: .55; stroke-dasharray: none; }
.oct-flow { fill: none; stroke: color-mix(in srgb, var(--line), var(--on-shell) 30%); stroke-width: 1.8; stroke-linecap: round; }
.oct-flow.is-live { stroke: var(--accent); stroke-opacity: .75; }
.oct-dot { fill: var(--accent); stroke: var(--white); stroke-width: 1; }
.oct-core { fill: url(#octCore); stroke: var(--accent); stroke-width: 2; }
.oct-core-name { fill: var(--on-shell-strong); font-size: 11.5px; font-weight: 800; text-anchor: middle; font-family: var(--font); }
.oct-core-sub { fill: var(--muted); font-size: 8.5px; font-weight: 600; text-anchor: middle; font-family: var(--font); }
.oct-node { cursor: pointer; }
.oct-hit { fill: transparent; }
.oct-bubble { fill: url(#octSoft); stroke: var(--line); stroke-width: 1.5; }
.oct-node svg { color: var(--muted); }
.oct-node.is-live .oct-bubble { fill: url(#octOn); stroke: color-mix(in srgb, var(--accent), var(--ink) 22%); }
.oct-node.is-live svg { color: var(--accent-ink); }
.oct-label, .oct-label-off { fill: var(--on-shell); font-size: 10.5px; font-weight: 700; text-anchor: middle; font-family: var(--font); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.oct-label-off { fill: var(--muted); font-size: 8.5px; font-weight: 600; }
.oct-node.is-preview .oct-bubble { fill: url(#octSoft); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 3; }
.oct-node.is-preview svg { color: var(--accent-text); }
.oct-node.is-preview .oct-label { fill: var(--accent-text); }
/* Tools the company does not have yet: greyed out, dashed, tappable */
.oct-spoke.is-off { stroke-opacity: .7; stroke-dasharray: 2 5; }
.oct-flow.is-off { stroke: color-mix(in srgb, var(--line), var(--ink) 8%); stroke-width: 1.4; stroke-dasharray: 4 5; }
.oct-node.is-off { opacity: .7; }
.oct-node.is-off:hover { opacity: .95; }
.oct-node.is-off .oct-bubble { fill: url(#octOff); stroke: color-mix(in srgb, var(--line), var(--ink) 15%); stroke-dasharray: 3 3; }
.oct-node.is-off .oct-label { fill: var(--muted); }
/* Just installed: the line that was dashed draws itself in solid */
.oct-spoke.is-new, .oct-flow.is-new { stroke-dasharray: 1; stroke-dashoffset: 1; }
/* A tapped tool: its links stay bright, the rest fade */
.octopus-svg.is-focus .oct-node:not(.is-near), .octopus-svg.is-focus .oct-spoke:not(.is-near), .octopus-svg.is-focus .oct-link:not(.is-near) { opacity: .18; }
.oct-node, .oct-spoke, .oct-link { transition: opacity .2s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .oct-spoke.is-new, .oct-flow.is-new { stroke-dasharray: none; }
  .oct-dot { display: none; }
}
.oct-off { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--sp-3); }
.oct-off-list { display: flex; flex-wrap: wrap; gap: 6px; }
.oct-off-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; opacity: .85; }
.oct-off-chip svg { width: 16px; height: 16px; flex: none; }

.flow-list { display: flex; flex-direction: column; gap: 2px; }
.flow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.flow-data { font-weight: 700; color: var(--on-shell-strong); }
.flow-path { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.flow-from.is-live { color: var(--accent-text); font-weight: 700; }
.flow-arrow { width: 14px; height: 14px; }

.activity { display: flex; flex-direction: column; margin-top: var(--sp-3); }
.activity-item { display: flex; gap: var(--sp-3); padding: 10px 0; border-top: 1px solid var(--line); }
.activity-agent { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--circle); color: var(--accent-text); }
.activity-agent svg { width: 16px; height: 16px; }
.activity-body { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.activity-text { font-size: var(--fs-sm); }
.activity-meta { font-size: var(--fs-xs); color: var(--muted); }
.connect-list { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
/* === /SECTION: HOME === */

/* === SECTION: ASK CLAUDE === */
.chat-shell { max-width: 760px; display: flex; flex-direction: column; gap: var(--sp-4); }
.chat { display: flex; flex-direction: column; gap: var(--sp-3); }
.bubble {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: var(--fs-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: toast-in .25s var(--ease);
}
.bubble p + p { margin-top: 4px; }
.bubble-who { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; opacity: .8; }
.bubble-who svg { width: 14px; height: 14px; }
.bubble-you { align-self: flex-end; background: var(--accent); color: var(--ink); border-bottom-right-radius: 6px; }
.bubble-claude { align-self: flex-start; background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; }
.bubble-claude .bubble-who { color: var(--coral-deep); opacity: 1; }
.bubble-claude .badge { margin-left: 4px; }
.chat-list { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sub); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
/* === /SECTION: ASK CLAUDE === */
