:root {
  --ink: #102a43;
  --paper: #f5f7fa;
  --paper-2: #e8eef3;
  --tomato: #d64545;
  --teal: #56a3a6;
  --line: rgba(16, 42, 67, 0.16);
  --muted: rgba(16, 42, 67, 0.62);
  --shadow: 0 24px 70px rgba(16, 42, 67, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(86, 163, 166, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(16, 42, 67, 0.07) 0 1px, transparent 1px 100%),
    var(--paper);
  background-size: 42px 42px;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(245, 247, 250, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
}

.brand img {
  width: 42px;
  height: 42px;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.18);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav__item,
.stage-tabs button,
.sheet-action {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav__item {
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav__item:hover,
.nav__item.is-active {
  border-color: var(--line);
  background: #fff;
  transform: translateX(2px);
}

.drawer {
  margin-top: auto;
  padding: 14px;
  border-top: 6px solid var(--teal);
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--line), var(--shadow);
}

.drawer__label,
.kicker,
.sheet-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.drawer strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 24px;
  align-items: end;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 6px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 0.95;
  letter-spacing: 0;
}

.search {
  display: grid;
  gap: 7px;
}

.search label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(86, 163, 166, 0.18);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 26px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.metrics article {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.timeline,
.detail-sheet {
  min-width: 0;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.timeline {
  padding: 18px;
}

.lane-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.lane-head h2 {
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}

.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.stage-tabs button {
  padding: 0 12px;
  border-color: var(--line);
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stage-tabs button:hover,
.stage-tabs button.is-active {
  background: var(--ink);
  color: #fff;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
}

.tile {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 10px;
  background: var(--teal);
}

.tile--collection::before {
  background: var(--tomato);
}

.tile--sorting::before {
  background: #f2b84b;
}

.tile--effect::before {
  background: var(--ink);
}

.tile:hover,
.tile.is-selected {
  border-color: rgba(16, 42, 67, 0.36);
  box-shadow: 0 18px 46px rgba(16, 42, 67, 0.15);
  transform: translateY(-3px);
}

.tile strong {
  max-width: 18rem;
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1;
}

.tile__meta,
.tile__foot {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.tile__line {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: var(--paper-2);
}

.tile__line span {
  display: block;
  height: 100%;
  background: var(--teal);
  transition: width 260ms ease;
}

.badge {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(86, 163, 166, 0.14);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-sheet {
  position: sticky;
  top: 28px;
  padding: 22px;
  border-left: 8px solid var(--tomato);
}

.detail-sheet h2 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.detail-sheet p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.sheet-list {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
}

.sheet-list div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.sheet-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.effect-note {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sheet-action {
  width: 100%;
  margin-top: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.activity-list,
.workflow-grid,
.team-list {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.activity,
.workflow-step,
.person {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 5px solid var(--teal);
  background: #fff;
}

.activity time,
.activity span,
.workflow-step span,
.workflow-step small,
.person small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity strong,
.workflow-step strong {
  font-size: 20px;
}

.activity p,
.workflow-step p {
  color: var(--muted);
  line-height: 1.55;
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-step {
  min-height: 170px;
  border-left-color: var(--tomato);
}

.team-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  border-left-color: var(--ink);
}

.person > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.person p {
  margin-top: 3px;
  color: var(--muted);
}

.person small {
  grid-column: 2;
  line-height: 1.35;
}

.empty {
  padding: 34px;
  border: 1px dashed var(--line);
  background: #fff;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1040px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
  }

  .drawer {
    margin: 0 0 0 auto;
    min-width: 190px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .detail-sheet {
    position: static;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .metrics,
  .mosaic,
  .workflow-grid,
  .team-list {
    grid-template-columns: 1fr;
  }

  .lane-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stage-tabs {
    justify-content: flex-start;
  }

  .rail {
    padding: 16px;
  }

  .drawer {
    width: 100%;
  }

  .sheet-list div {
    grid-template-columns: 1fr;
  }
}

