/* ==================================================================
   PM-OS — project page
   Built on styles.css + project.css. The accent trio moves to violet
   for the curated core and teal for what feeds it; the zone colours
   below are read by both the page and js/graph.js's legend.
   Everything else here is specific to this project: the graph view,
   the zone cards, the routine list.
   ================================================================== */

.page--pmos {
  --accent: #8b7cf6;     /* the curated core */
  --accent-2: #4fe0c8;   /* what feeds it */
  --accent-3: #c0b4ff;   /* accent text on a dark ground */
  --z-curated: #8b7cf6;
  --z-meetings: #4fe0c8;
  --z-work: #6ea8fe;
  --z-raw: #6c7284;
}

/* the title runs longer here than the shared default */
.proj__title { font-size: clamp(38px, 7vw, 88px); }
.notes { margin-top: 30px; }

/* ---------- The graph view ---------- */
.vault { margin: 0 0 26px; }
.vault__frame {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(72% 62% at 50% 46%, rgba(139, 124, 246, 0.07), transparent 70%),
    var(--bg-2);
  aspect-ratio: 16 / 8;
  min-height: 300px;
  overflow: hidden;
}
.vault__frame::before,
.vault__frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 20px; height: 20px;
  border: 1px solid var(--accent);
}
.vault__frame::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.vault__frame::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
#vault { display: block; width: 100%; height: 100%; }

.vault__key {
  position: absolute;
  left: 26px; bottom: 22px;
  z-index: 3;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.vault__key li { display: flex; align-items: center; gap: 9px; }
.vault__key i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: 0 0 auto;
}
.vault__key i[data-zone="curated"] { background: var(--z-curated); }
.vault__key i[data-zone="meetings"] { background: var(--z-meetings); }
.vault__key i[data-zone="work"] { background: var(--z-work); }
.vault__key i[data-zone="raw"] { background: var(--z-raw); }

.vault figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  max-width: 760px;
}
.vault figcaption b { color: var(--ink-dim); font-weight: 500; }


/* ---------- Zones ---------- */
.zones {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 34px;
}
.zone {
  position: relative;
  background: var(--bg);
  padding: 26px 24px 28px;
  transition: background 0.4s var(--ease);
}
.zone::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--zc, var(--ink-faint));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.zone:hover { background: var(--bg-2); }
.zone:hover::before { transform: none; }
.zone[data-zone="curated"] { --zc: var(--z-curated); }
.zone[data-zone="meetings"] { --zc: var(--z-meetings); }
.zone[data-zone="work"] { --zc: var(--z-work); }
.zone[data-zone="raw"] { --zc: var(--z-raw); }
.zone__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--zc);
  margin-bottom: 16px;
}
.zone__tag::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--zc);
}
.zone h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.zone p { font-size: 14px; color: var(--ink-dim); }

.rule-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 26px 24px;
  background: rgba(139, 124, 246, 0.05);
}
.rule-row__k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding-top: 3px;
}
.rule-row p { font-size: 15.5px; color: var(--ink-dim); }
.rule-row em { color: var(--ink); font-style: normal; font-weight: 500; }

/* ---------- Routines ---------- */
.routines {
  list-style: none;
  margin-top: 34px;
  border: 1px solid var(--line);
}
.routine {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 28px;
  padding: 28px 26px;
  border-top: 1px solid var(--line);
  transition: background 0.4s var(--ease);
}
.routine:first-child { border-top: 0; }
.routine:hover { background: var(--bg-2); }
.routine__when {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding-top: 4px;
  position: sticky;
  top: 104px;
  align-self: start;
}
.routine__body h3 {
  font-family: var(--display);
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.routine__body p { font-size: 15px; color: var(--ink-dim); margin-bottom: 12px; }
.routine__body em { color: var(--ink); font-style: normal; }
.routine__writes {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint) !important;
  border: 1px solid var(--line);
  padding: 6px 11px;
  margin-bottom: 0 !important;
}
.routine__writes b { color: var(--accent-3); font-weight: 400; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .zones { grid-template-columns: 1fr; }
  .rule-row { grid-template-columns: 1fr; gap: 14px; }
  .routine { grid-template-columns: 1fr; gap: 12px; }
  .routine__when { position: static; }
  .vault__frame { aspect-ratio: 1 / 1; min-height: 0; }
  .vault__key { left: 18px; bottom: 16px; font-size: 10px; }
}
