/* ============================================
   Workshop — studio for documented work
   ============================================ */

.ws-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px var(--edge) 80px;
}

/* --- Hero --- */
.ws-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding: 36px 0 40px;
  border-bottom: 1px solid rgba(60,30,15,0.12);
  margin-bottom: 28px;
  align-items: end;
}
.ws-hero-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 10px;
}
.ws-hero-h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  font-weight: 400;
}
.ws-hero-h1 em { font-style: italic; color: oklch(62% 0.16 38); }
.ws-hero-sub {
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.7;
  max-width: 46ch;
  margin: 0;
}
.ws-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ws-hero-stats > div {
  padding: 14px 16px;
  border: 1px solid rgba(60,30,15,0.12);
  border-radius: 3px;
  background: oklch(96% 0.02 60);
}
.ws-hero-stats .v {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ws-hero-stats .l {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 6px;
}

/* --- Toolbar / tabs --- */
.ws-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ws-project-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ws-ptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(60,30,15,0.15);
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.ws-ptab:hover { border-color: rgba(60,30,15,0.4); }
.ws-ptab.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ws-ptab.add { border-style: dashed; opacity: 0.7; }
.ws-ptab-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, oklch(60% 0.14 40));
}
.ws-ptab-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  opacity: 0.55;
}
.ws-ptab.on .ws-ptab-count { opacity: 0.75; }
.ws-toolbar-r { display: flex; gap: 10px; align-items: center; }
.ws-viewtoggle {
  display: inline-flex;
  border: 1px solid rgba(60,30,15,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.ws-viewtoggle button {
  padding: 7px 12px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.ws-viewtoggle button.on { background: var(--ink); color: var(--paper); }

/* --- Grid view --- */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.ws-card {
  background: var(--paper);
  border: 1px solid rgba(60,30,15,0.12);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex; flex-direction: column;
}
.ws-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60,30,15,0.12);
  border-color: rgba(60,30,15,0.3);
}
.ws-card-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: oklch(94% 0.02 60);
}
.ws-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-card-nophoto {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 52px;
  font-family: 'Instrument Serif', Georgia, serif;
}
.ws-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.ws-card-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ws-card-caption {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.ws-card-reflection {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.7;
}
.ws-card-foot {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  padding-top: 4px;
}

/* --- Timeline view --- */
.ws-timeline { display: flex; flex-direction: column; gap: 18px; }
.ws-tl-row {
  display: grid;
  grid-template-columns: 64px 3px 1fr 220px;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(60,30,15,0.1);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  align-items: start;
}
.ws-tl-row:hover { border-color: rgba(60,30,15,0.3); transform: translateX(2px); }
.ws-tl-date { text-align: center; font-family: 'Instrument Serif', Georgia, serif; }
.ws-tl-date .d { font-size: 36px; line-height: 1; }
.ws-tl-date .m {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 4px;
}
.ws-tl-track { border-radius: 2px; align-self: stretch; min-height: 60px; }
.ws-tl-proj {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ws-tl-cap {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.ws-tl-refl {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.8;
  margin-bottom: 8px;
}
.ws-tl-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ws-tl-photo { border-radius: 3px; overflow: hidden; aspect-ratio: 4 / 3; background: oklch(94% 0.02 60); }
.ws-tl-photo img { width: 100%; height: 100%; object-fit: cover; }

/* --- Empty state --- */
.ws-empty {
  text-align: center;
  padding: 80px 20px;
  border: 1px dashed rgba(60,30,15,0.2);
  border-radius: 4px;
}
.ws-empty-glyph {
  font-size: 64px;
  font-family: 'Instrument Serif', Georgia, serif;
  opacity: 0.3;
  margin-bottom: 16px;
}
.ws-empty h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 400;
}
.ws-empty p { opacity: 0.65; margin: 0 0 20px; }

/* --- Mood pills --- */
.ws-mood {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.ws-mood-dot { width: 8px; height: 8px; border-radius: 50%; }
.ws-mood-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.ws-mood-btn {
  padding: 6px 10px;
  border: 1px solid rgba(60,30,15,0.15);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: all 0.15s;
}
.ws-mood-btn:hover { border-color: rgba(60,30,15,0.35); }
.ws-mood-btn.on {
  background: rgba(60,30,15,0.06);
  border-color: rgba(60,30,15,0.45);
}

/* --- Tags --- */
.ws-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(60,30,15,0.06);
  border-radius: 2px;
  color: rgba(60,30,15,0.75);
}
.ws-tag.sm { font-size: 10px; padding: 2px 6px; }

/* ============================================
   Modal (new entry / project / detail)
   ============================================ */
.ws-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 14, 26, 0.55);
  z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.ws-modal {
  background: var(--paper);
  border-radius: 4px;
  width: min(640px, 100%);
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.ws-modal.wide { width: min(920px, 100%); }
.ws-modal.small { width: min(460px, 100%); }
.ws-modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 26px 16px;
  border-bottom: 1px solid rgba(60,30,15,0.1);
}
.ws-modal-head h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 28px;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.ws-modal-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}
.ws-entry-meta { font-size: 13px; opacity: 0.65; margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.ws-x {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s;
}
.ws-x:hover { background: rgba(60,30,15,0.08); }
.ws-modal-body {
  padding: 20px 26px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 16px;
}
.ws-modal-body.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ws-detail-photo {
  background: oklch(96% 0.02 60);
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.ws-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.ws-detail-nophoto { opacity: 0.5; font-size: 13px; padding: 20px; text-align: center; }
.ws-detail-right { display: flex; flex-direction: column; gap: 14px; }
.ws-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 26px;
  border-top: 1px solid rgba(60,30,15,0.1);
}

.ws-field { display: flex; flex-direction: column; gap: 6px; }
.ws-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ws-field label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}
.ws-req { text-transform: none; font-size: 10px; opacity: 0.6; letter-spacing: 0.02em; font-style: italic; font-family: 'Instrument Serif', Georgia, serif; }
.ws-input, .ws-textarea, .ws-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(60,30,15,0.15);
  background: rgba(60,30,15,0.02);
  border-radius: 3px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.ws-input:focus, .ws-textarea:focus, .ws-field select:focus {
  border-color: rgba(60,30,15,0.5);
  background: var(--paper);
}
.ws-textarea { resize: vertical; line-height: 1.55; font-size: 15px; }
.ws-ai {
  background: transparent;
  border: 1px solid rgba(60,30,15,0.15);
  padding: 3px 9px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  color: oklch(45% 0.14 280);
  cursor: pointer;
  letter-spacing: 0.02em;
  text-transform: none;
}
.ws-ai:hover:not(:disabled) { background: oklch(96% 0.04 280); border-color: oklch(55% 0.14 280); }
.ws-ai:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Drop zone --- */
.ws-drop {
  position: relative;
  border: 2px dashed rgba(60,30,15,0.2);
  border-radius: 4px;
  min-height: 180px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(60,30,15,0.02);
  overflow: hidden;
}
.ws-drop:hover, .ws-drop.over {
  border-color: oklch(62% 0.16 38);
  background: oklch(96% 0.04 38);
}
.ws-drop.has { border-style: solid; padding: 0; min-height: 0; }
.ws-drop.has img { width: 100%; max-height: 340px; object-fit: contain; display: block; background: oklch(96% 0.02 60); }
.ws-drop-replace {
  position: absolute; top: 10px; right: 10px;
  background: rgba(10,14,26,0.8); color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ws-drop-empty { text-align: center; padding: 24px; }
.ws-drop-icon {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 36px;
  opacity: 0.4;
  margin-bottom: 10px;
}
.ws-drop-t { font-size: 15px; margin-bottom: 4px; }
.ws-drop-s { font-size: 12px; opacity: 0.6; }

/* --- Color picker --- */
.ws-color-row { display: flex; gap: 8px; }
.ws-color {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 0;
}
.ws-color:hover { transform: scale(1.1); }
.ws-color.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper) inset; }

/* ============================================
   Work Pad (lesson overlay)
   ============================================ */
.ws-fab {
  position: fixed;
  bottom: 24px; left: 24px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  z-index: 80;
  transition: transform 0.15s;
}
.ws-fab:hover { transform: translateY(-2px); }
.ws-fab > span:first-child {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px;
  color: oklch(72% 0.14 40);
}

.ws-pad-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,14,26,0.4);
  z-index: 90;
  display: flex; justify-content: flex-end;
  backdrop-filter: blur(4px);
}
.ws-pad {
  width: min(460px, 100%);
  height: 100%;
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.3);
  animation: ws-slide 0.22s ease-out;
}
@keyframes ws-slide { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ws-pad-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(60,30,15,0.1);
}
.ws-pad-head h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px;
  margin: 0;
  font-weight: 400;
}
.ws-pad-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 14px;
}
.ws-pad-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-pad-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  background: oklch(94% 0.02 60);
}
.ws-pad-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-pad-photo button {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(10,14,26,0.7); color: white; border: none;
  font-size: 11px;
  cursor: pointer;
  display: grid; place-items: center;
}
.ws-pad-add {
  aspect-ratio: 1;
  border: 2px dashed rgba(60,30,15,0.2);
  border-radius: 3px;
  background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  font-family: inherit;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.15s;
}
.ws-pad-add:hover { opacity: 1; border-color: oklch(62% 0.16 38); }
.ws-pad-add > span:first-child {
  font-size: 22px;
  font-family: 'Instrument Serif', Georgia, serif;
}
.ws-pad-foot {
  padding: 14px 22px;
  border-top: 1px solid rgba(60,30,15,0.1);
  display: flex; gap: 10px; justify-content: flex-end;
}
.ws-saved {
  flex: 1;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: oklch(52% 0.15 145);
  letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .ws-hero { grid-template-columns: 1fr; gap: 24px; }
  .ws-tl-row { grid-template-columns: 56px 3px 1fr; }
  .ws-tl-photo { grid-column: 3; margin-top: 10px; max-width: 240px; }
  .ws-modal-body.two-col { grid-template-columns: 1fr; }
  .ws-field-row { grid-template-columns: 1fr; }
  .ws-hero-stats { grid-template-columns: repeat(4, 1fr); }
  .ws-hero-stats .v { font-size: 24px; }
}
@media (max-width: 520px) {
  .ws-pad { width: 100%; }
  .ws-toolbar { flex-direction: column; align-items: stretch; }
  .ws-toolbar-r { justify-content: space-between; }
}
