:root {
  --orange: #3457ff;
  --orange-dark: #2444df;
  --ink: #111111;
  --muted: #666666;
  --canvas: #f7f7fd;
  --placeholder: #ebebf3;
  --surface: #ffffff;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  letter-spacing: 0.25px;
}

button,
a { font: inherit; letter-spacing: 0.25px; }

button { cursor: pointer; }

[hidden] { display: none !important; }

.workspace-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1720px, calc(100% - 128px));
  height: 120px;
  margin: 0 auto;
}

.brand {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.new-project-button,
.empty-project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 32px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.new-project-button:hover,
.empty-project-button:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.new-project-button.is-disabled {
  pointer-events: none;
  opacity: 0.38;
}

.workspace-main {
  width: min(1720px, calc(100% - 128px));
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 120px 0 100px;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 5vw, 80px);
  font-weight: 700;
  line-height: 1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 540px));
  gap: 52px;
  margin-top: 96px;
}

.project-card,
.empty-project-card {
  min-width: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: card-in 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.project-card:nth-child(2) { animation-delay: 70ms; }
.project-card:nth-child(3) { animation-delay: 140ms; }

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

.preview-shell {
  position: relative;
}

.card-preview {
  display: grid;
  gap: 16px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.preview-row {
  display: grid;
  overflow: hidden;
  background: var(--placeholder);
}

.preview-row--hero { aspect-ratio: 16 / 10; }

.preview-row--full { aspect-ratio: 16 / 7.75; }

.preview-row--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  aspect-ratio: 2.06 / 1;
  background: transparent;
}

.preview-cell {
  min-width: 0;
  overflow: hidden;
  background: var(--placeholder);
}

.preview-row img,
.preview-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-controls {
  position: absolute;
  z-index: 4;
  top: 28px;
  left: 28px;
  display: flex;
  align-items: flex-start;
  gap: 26px;
}

.project-menu-trigger {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  place-items: center;
  border: 5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(17, 17, 17, 0.16);
  transition: background 160ms ease, transform 180ms ease;
}

.project-menu-trigger::before,
.project-menu-trigger::after {
  position: absolute;
  width: 26px;
  height: 4px;
  border-radius: 4px;
  background: currentColor;
  content: "";
}

.project-menu-trigger::after { transform: rotate(90deg); }

.project-controls.is-open .project-menu-trigger { transform: rotate(45deg); }

.project-menu-trigger:hover { background: var(--orange-dark); }

.project-menu {
  width: 280px;
  padding: 20px 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px) scale(0.98);
  transform-origin: left center;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-controls.is-open .project-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.project-menu button {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  text-align: left;
}

.project-menu button:hover { background: #f7f7fa; }

.project-menu button:disabled { cursor: wait; opacity: 0.45; }

.menu-icon {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.menu-icon--copy::before,
.menu-icon--copy::after {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 3px solid var(--orange);
  border-radius: 2px;
  content: "";
}

.menu-icon--copy::before { top: 0; right: 0; }
.menu-icon--copy::after { bottom: 0; left: 0; background: #fff; }
.menu-icon img { display: block; width: 16px; height: 18px; }

.project-info { padding-top: 34px; }

.project-title {
  margin: 0;
  overflow: hidden;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.3;
}

.project-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.project-action-row a { display: inline-flex; min-height: 40px; padding: 0 15px; border: 1px solid #d7d7dd; border-radius: 999px; align-items: center; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.project-action-row a:first-child { border-color: var(--orange); background: var(--orange); color: #fff; }
.project-action-row a:hover { transform: translateY(-1px); }
.project-commercial-row { display: flex; gap: 30px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #dedee6; }
.project-commercial-row span { display: grid; gap: 4px; }
.project-commercial-row small { color: var(--muted); font-size: 12px; }
.project-commercial-row strong { font-size: 18px; }
.project-next-action { margin: 20px 0 0; font-weight: 600; }

.empty-project-card {
  position: relative;
  display: grid;
  min-height: 640px;
  place-items: center;
  background: var(--placeholder);
}

.workspace-state {
  margin-top: 96px;
  color: var(--muted);
  font-size: 20px;
}

.workspace-state h2 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 36px;
}

.workspace-state p { max-width: 620px; margin: 0; line-height: 1.55; }
.workspace-state a { color: var(--orange); }

.dashboard-toast {
  position: fixed;
  z-index: 50;
  bottom: 28px;
  left: 50%;
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  transform: translateX(-50%);
}

:focus-visible { outline: 3px solid rgba(0, 47, 255, 0.38); outline-offset: 3px; }

@media (max-width: 1180px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-title { font-size: 30px; }
  .project-meta { font-size: 20px; }
}

@media (max-width: 760px) {
  .header-inner,
  .workspace-main { width: min(100% - 40px, 1720px); }
  .header-inner { height: 96px; }
  .workspace-main { min-height: calc(100vh - 96px); padding: 72px 0; }
  h1 { font-size: clamp(48px, 15vw, 64px); }
  .project-grid { grid-template-columns: 1fr; gap: 56px; margin-top: 64px; }
  .new-project-button { height: 48px; padding: 0 20px; font-size: 17px; }
  .project-controls { top: 18px; left: 18px; gap: 14px; }
  .project-menu-trigger { width: 52px; height: 52px; }
  .project-menu { width: min(260px, calc(100vw - 122px)); }
  .project-menu button { min-height: 50px; padding: 0 20px; font-size: 18px; }
  .project-info { padding-top: 24px; }
  .project-title { font-size: 30px; }
  .project-meta { margin-top: 12px; font-size: 18px; }
  .empty-project-card { min-height: 520px; }
  .empty-project-button { height: 56px; padding: 0 24px; font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .project-card,
  .empty-project-card { opacity: 1; transform: none; animation: none; }
}
