/* The native workspace stays light; the graphite window frame carries the tour. */
:root {
  --dialog-backdrop: #25292ec9;
}
.prototype {
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: var(--window-shadow);
  position: relative;
  isolation: isolate;
}
.window-bar {
  height: 46px;
  background: var(--header);
  border-color: var(--header);
  color: var(--header-text);
}
.window-title,
.demo-play,
.demo-play[aria-pressed='true'] {
  color: var(--header-text);
}
.window-controls i {
  background: var(--header-muted);
  border-color: var(--header-muted);
}
.window-title > span {
  color: var(--header-muted);
}
.demo-play {
  padding: 4px 9px;
  border: 1px solid var(--header-muted);
  border-radius: 5px;
}
.demo-play:disabled {
  color: var(--header-muted);
}
.prototype-layout {
  min-height: 566px;
  height: 600px;
  grid-template-columns: 174px minmax(0, 1fr);
}
.demo-sidebar {
  padding-top: 24px;
}
.demo-tabs button {
  position: relative;
  min-height: 38px;
  font-size: 12px;
}
.demo-tabs button[aria-selected='true'] {
  background: var(--selected-bg);
  color: var(--link);
}
.demo-tabs button[aria-selected='true']:before {
  content: '';
  position: absolute;
  inset: 9px auto 9px -12px;
  width: 3px;
  background: var(--link);
  border-radius: 0 3px 3px 0;
}
.nav-glyph {
  display: inline-flex;
  justify-content: center;
  width: 18px;
  font-size: 17px;
}
.nav-glyph svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.demo-brand {
  margin-bottom: 25px;
}
.demo-file {
  font-size: 10px;
}
.demo-content {
  min-width: 0;
}
.scene {
  min-height: 566px;
  height: 600px;
  overflow: hidden;
}
.tour-progress {
  height: 2px;
  background: var(--border-muted);
  overflow: hidden;
}
.tour-progress span {
  display: block;
  height: 100%;
  background: var(--link);
  transform-origin: left;
  transform: scaleX(0);
}
.tour-progress-active {
  animation: tour-elapsed 8s linear forwards;
}
.prototype[data-tour='paused'] .tour-progress-active {
  animation-play-state: paused;
}
.prototype-bottom {
  height: 37px;
  padding: 0 18px;
}
.prototype-bottom > span:last-child {
  display: block;
  font-variant-numeric: tabular-nums;
}
@keyframes tour-elapsed {
  to {
    transform: scaleX(1);
  }
}
.product-home {
  padding: 22px 34px 28px;
  min-height: 566px;
  background: var(--surface);
}
.home-breadcrumb {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 10px;
}
.home-breadcrumb span + span:before {
  content: '/';
  margin-right: 10px;
  color: var(--border);
}
.home-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 23px;
  gap: 10px;
}
.home-greeting h3 {
  font-size: 27px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 0;
}
.home-greeting p {
  font-size: 11px;
  margin: 10px 0 0;
  color: var(--text-secondary);
}
.home-workspace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  background: var(--surface-subtle);
  border: 1px solid var(--border-muted);
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 9px;
}
.home-workspace i {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--success);
}
.home-quick-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}
.home-file-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px 11px 11px;
  gap: 6px;
  border: 1px solid var(--border-muted);
  border-radius: 7px;
  background: var(--surface);
  min-width: 0;
}
.home-file-card img {
  height: 33px;
  width: 33px;
  margin-bottom: 4px;
}
.home-file-card strong {
  font-family: Manrope, sans-serif;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.home-file-card > span {
  color: var(--text-secondary);
  font-size: 9px;
}
.home-actions {
  display: flex;
  gap: 9px;
  margin-top: 13px;
}
.home-actions button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-actions button:hover {
  border-color: var(--link);
  background: var(--selected-bg);
}
.home-actions button > span {
  font-size: 17px;
  line-height: 1;
  color: var(--link);
}
.recent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 12px;
}
.recent-heading h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.recent-heading > span {
  font-size: 9px;
  color: var(--text-secondary);
}
.recent-table {
  border-top: 1px solid var(--border-muted);
}
.recent-table > * {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 45px;
  gap: 12px;
  align-items: center;
  padding: 11px 8px;
  text-align: left;
}
.recent-header {
  color: var(--text-secondary);
  font-size: 9px;
  padding-block: 7px;
  background: var(--surface-subtle);
}
.recent-table button {
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 10px;
}
.recent-table button:hover {
  background: var(--selected-bg);
}
.recent-table button > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.recent-table button > span:not(:first-child) {
  color: var(--text-secondary);
  font-size: 9px;
}
.recent-table img,
.recent-draw {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}
.recent-draw {
  display: grid;
  place-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 19px;
  color: var(--link);
  font-style: normal;
}
.home-footnote {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 18px;
  font-size: 9px;
  color: var(--text-secondary);
}
.document-area {
  min-height: 492px;
}
.draw-menu {
  display: flex;
  gap: 19px;
  align-items: center;
  padding: 5px 14px;
  font-size: 9px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-muted);
}
.draw-menu > span:last-child {
  margin-left: auto;
  color: var(--text-secondary);
}
.drawing-toolbar {
  height: 35px;
  padding: 0 12px;
  gap: 8px;
  justify-content: flex-end;
  font-size: 9px;
  background: var(--surface-subtle);
}
.drawing-toolbar .small-control {
  padding: 3px 7px;
  font-size: 9px;
}
.draw-tool-icons {
  margin-right: auto;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.product-drawing {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  height: 503px;
  min-height: 0;
}
.drawing-chat {
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  font-size: 10px;
}
.drawing-chat-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 12px;
}
.drawing-chat-title img {
  width: 17px;
  height: 17px;
}
.chat-session {
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  color: var(--text-secondary);
  font-size: 9px;
}
.drawing-prompt {
  padding: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  line-height: 1.8;
}
.drawing-reply {
  padding-top: 19px;
  font-size: 10px;
  line-height: 1.8;
}
.drawing-reply > .status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
}
.drawing-reply p {
  font-size: 9px;
  color: var(--text-secondary);
}
.balance-check {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  padding-top: 9px;
  margin-top: 11px;
  border-top: 1px solid var(--border-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.balance-check > span {
  color: var(--text-secondary);
}
.balance-check > strong {
  font-weight: 500;
}
.draw-composer {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 8px 5px;
  color: var(--text-secondary);
  font-size: 9px;
}
.draw-composer > div {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
}
.draw-composer > div > span:last-child {
  background: var(--link);
  border-radius: 3px;
  color: var(--surface);
  width: 18px;
  height: 18px;
  text-align: center;
  font-size: 12px;
}
.product-drawing .drawing-area {
  height: 503px;
  min-height: 0;
  padding: 30px 15px 39px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--muted-surface);
  background-image: radial-gradient(var(--border) 0.65px, transparent 0.65px);
  background-size: 12px 12px;
}
.canvas-sheet {
  background: var(--surface);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  width: 100%;
  height: 100%;
}
.product-drawing .water-diagram {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  max-width: none;
  transform: none;
}
.canvas-status {
  position: absolute;
  inset: auto 0 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  height: 28px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
}
.canvas-status > span:last-child {
  margin-left: auto;
}
.flow-details {
  position: absolute;
  z-index: 2;
  right: 13px;
  top: 12px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--window-shadow);
  border-radius: 7px;
  padding: 14px;
}
.flow-details > strong {
  font-size: 11px;
  font-weight: 600;
}
.flow-details table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  margin: 12px 0 9px;
  font-variant-numeric: tabular-nums;
}
.flow-details th {
  background: var(--surface-subtle);
  font-weight: 500;
}
.flow-details td,
.flow-details th {
  text-align: right;
  padding: 5px 3px;
  border-bottom: 1px solid var(--border-muted);
}
.flow-details td:first-child,
.flow-details th:first-child {
  text-align: left;
}
.flow-details small {
  font-size: 8px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.hero-water-preview {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 15px;
  border: 1px solid var(--border-muted);
}
#drawing-dialog {
  width: min(1500px, calc(100% - 48px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--window-shadow);
}
#drawing-dialog::backdrop {
  background: var(--dialog-backdrop);
  backdrop-filter: blur(7px);
}
.drawing-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
}
.drawing-dialog-bar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.drawing-dialog-bar div > span {
  font-size: 10px;
  color: var(--text-secondary);
}
.drawing-dialog-bar > button {
  width: 34px;
  height: 34px;
  font-size: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.drawing-dialog-scroll {
  overflow: auto;
  max-height: calc(90vh - 90px);
  background: var(--surface-subtle);
  padding: 16px;
}
.drawing-dialog-scroll img {
  display: block;
  width: 100%;
  min-width: 1050px;
  height: auto;
  max-width: none;
  background: var(--surface);
}
@media (min-width: 901px) {
  .hero-window {
    transition:
      transform 0.5s,
      box-shadow 0.5s;
  }
  .hero-visual:hover .hero-window {
    transform: perspective(900px) rotateY(-5deg) rotateX(3deg) translateY(-6px);
    box-shadow: var(--window-shadow);
  }
}
@media (max-width: 1100px) {
  .prototype-layout {
    grid-template-columns: 145px minmax(0, 1fr);
  }
  .product-home {
    padding-inline: 23px;
  }
  .home-quick-cards {
    gap: 6px;
  }
  .home-file-card {
    padding: 10px 7px;
  }
  .home-file-card strong {
    font-size: 8px;
  }
  .product-drawing {
    grid-template-columns: 165px minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .prototype-layout {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .home-quick-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-file-card {
    display: grid;
    grid-template-columns: 29px 1fr;
    gap: 0 7px;
    padding: 10px;
  }
  .home-file-card img {
    grid-row: span 2;
    width: 27px;
    height: 27px;
    margin: 0;
  }
  .home-file-card strong {
    font-size: 9px;
  }
  .home-file-card > span {
    font-size: 8px;
  }
  .product-home {
    padding-inline: 20px;
  }
  .home-workspace {
    display: none;
  }
  .home-greeting {
    margin-top: 20px;
  }
  .home-greeting h3 {
    font-size: 23px;
  }
  .product-drawing {
    grid-template-columns: minmax(0, 1fr);
  }
  .drawing-chat {
    display: none;
  }
  .draw-tool-icons {
    font-size: 8px;
  }
  .scene {
    min-height: 566px;
  }
}
@media (max-width: 640px) {
  .prototype-layout {
    display: block;
    min-height: 0;
    height: auto;
  }
  .prototype {
    border-radius: 8px;
  }
  .window-bar {
    height: 37px;
  }
  .window-title {
    font-size: 8px;
  }
  .demo-play {
    font-size: 8px;
    padding: 3px 6px;
  }
  .demo-tabs button {
    width: 25%;
    min-height: 42px;
    padding: 7px 4px;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    white-space: nowrap;
  }
  .demo-tabs button[aria-selected='true']:before {
    inset: auto 12px 0;
    width: auto;
    height: 2px;
  }
  .nav-glyph {
    font-size: 14px;
    width: 15px;
  }
  .nav-glyph svg {
    width: 14px;
  }
  .product-home {
    padding: 16px 15px 18px;
    min-height: 450px;
  }
  .home-breadcrumb {
    font-size: 8px;
  }
  .home-greeting {
    margin: 22px 0 20px;
  }
  .home-greeting h3 {
    font-size: 24px;
  }
  .home-greeting p {
    font-size: 10px;
    margin-top: 8px;
  }
  .home-file-card {
    padding: 10px 7px;
    gap: 0 6px;
    grid-template-columns: 24px 1fr;
  }
  .home-file-card img {
    width: 24px;
    height: 24px;
  }
  .home-file-card strong {
    font-size: 8px;
  }
  .home-file-card > span {
    font-size: 7px;
  }
  .home-actions button {
    font-size: 9px;
    padding: 5px 8px;
  }
  .home-actions button > span {
    font-size: 14px;
  }
  .recent-heading {
    margin-top: 26px;
  }
  .recent-heading h4 {
    font-size: 11px;
  }
  .recent-table > * {
    grid-template-columns: minmax(0, 1fr) 30px;
    padding: 9px 4px;
    gap: 6px;
  }
  .recent-table > * > span:nth-child(2) {
    display: none;
  }
  .recent-table button {
    font-size: 9px;
  }
  .recent-table button > span:not(:first-child) {
    font-size: 8px;
  }
  .recent-table img,
  .recent-draw {
    width: 20px;
    height: 20px;
  }
  .home-footnote {
    font-size: 8px;
    margin-top: 14px;
  }
  .scene {
    min-height: 460px;
    height: auto;
    overflow: visible;
  }
  .document-area {
    min-height: 400px;
  }
  .product-drawing .drawing-area {
    min-height: 0;
    height: 365px;
    padding: 15px 8px 42px;
  }
  .product-drawing {
    min-height: 0;
    height: 365px;
  }
  .draw-menu {
    gap: 16px;
    font-size: 8px;
  }
  .drawing-toolbar {
    padding: 0 8px;
    gap: 7px;
  }
  .draw-tool-icons {
    letter-spacing: 0;
    font-size: 7px;
    white-space: nowrap;
  }
  .drawing-toolbar .small-control {
    font-size: 8px;
    padding: 3px 5px;
  }
  .prototype-bottom {
    min-height: 35px;
    height: auto;
    padding: 8px 11px;
    gap: 12px;
    font-size: 8px;
  }
  .prototype-bottom > span:last-child {
    white-space: nowrap;
    font-size: 7px;
  }
  .flow-details {
    width: 218px;
  }
  #drawing-dialog {
    width: calc(100% - 18px);
    border-radius: 6px;
  }
  .drawing-dialog-bar {
    padding: 10px 12px;
  }
  .drawing-dialog-bar h2 {
    font-size: 13px;
  }
  .drawing-dialog-bar div > span {
    font-size: 9px;
  }
  .drawing-dialog-scroll {
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tour-progress-active {
    animation: none;
  }
  .hero-visual:hover .hero-window {
    transform: none;
  }
}
.card-diagram {
  overflow: hidden;
  height: 130px;
  border: 1px solid var(--border-muted);
  border-radius: 5px;
  background: var(--surface);
  transform: perspective(700px) rotateY(-7deg) rotateX(5deg);
  transition:
    transform 0.45s,
    box-shadow 0.45s;
}
.card-diagram img {
  display: block;
  width: 100%;
  height: auto;
}
.capability-drawing:hover .card-diagram,
.capability-drawing:focus-within .card-diagram {
  transform: perspective(700px) rotateY(0) rotateX(0) translateY(-4px);
  box-shadow: var(--card-shadow);
}
@media (max-width: 640px) {
  .card-diagram {
    height: 106px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-diagram,
  .capability-drawing:hover .card-diagram,
  .capability-drawing:focus-within .card-diagram {
    transform: none;
  }
}
.mini-home-title {
  font-size: 15px;
  font-weight: 600;
  margin: 2px 0 13px;
}
.mini-home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.mini-home-cards > div {
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: 7px 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 7px;
}
.mini-home-cards img {
  height: 23px;
  width: 23px;
}
.mini-home-recent {
  font-size: 9px;
  font-weight: 500;
  margin: 15px 0 5px;
}
.mini-home-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-top: 1px solid var(--border-muted);
  font-size: 7px;
}
.mini-home-file img,
.mini-home-file > span {
  height: 14px;
  width: 14px;
}
@media (max-width: 900px) {
  .mini-home-title {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .mini-home-cards > div {
    font-size: 6px;
    padding: 5px;
    gap: 4px;
  }
  .mini-home-cards img {
    height: 19px;
    width: 19px;
  }
  .mini-home-recent {
    font-size: 7px;
    margin-top: 10px;
  }
  .mini-home-file {
    font-size: 6px;
    padding: 4px 2px;
  }
}
