/* Summer Freestyle Workshop: monochrome, research-paper layout. */

:root {
  --ink: #000;
  --paper: #fff;
  --rule: #000;
  --faint: #555;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Latin Modern Roman", "Computer Modern Serif", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

p,
dd,
.abstract p,
table.schedule .detail,
ul.materials li,
.lock-note,
.member .description {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 40px 80px;
}

/* --- top navigation, styled like a running head --- */
nav.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 44px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav.masthead .brand { font-weight: 700; }
nav.masthead a { color: var(--ink); text-decoration: none; }
nav.masthead .links a { margin-left: 26px; }
nav.masthead .links a:hover { text-decoration: underline; }
nav.masthead a.active { text-decoration: underline; text-underline-offset: 3px; }

/* --- paper title block --- */
header.titleblock { text-align: center; margin-bottom: 40px; }
header.titleblock p { text-align: center; }
header.titleblock h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.2;
}
header.titleblock .subtitle { font-size: 19px; margin: 0 0 10px; }
header.titleblock .meta {
  font-size: 14px;
  color: var(--ink);
  font-style: italic;
}

/* --- calendar of events --- */
.calendar-block { margin-bottom: 46px; }
.calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-start;
}
/* months and the events panel lay out as siblings in one flex row */
.cal-months { display: contents; }
.cal-events { flex: 1 1 300px; min-width: 200px; }
.cal-month .cal-title {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 34px));
  width: 100%;
}
.cal-month { flex: 0 1 240px; min-width: 150px; }
.cal-grid .dow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  text-align: center;
  padding-bottom: 5px;
}
.cal-day {
  position: relative;
  width: auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
}
.cal-day span { position: relative; z-index: 1; }
.cal-day.event { cursor: pointer; }
.cal-day.event::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.cal-day.selected::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
}
.cal-day.selected { color: var(--paper); }
.cal-day.today::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}
.cal-events h3 {
  margin: 0 0 8px;
  font-size: 15px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
.cal-event-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14.5px;
}
.cal-event-row:last-child { border-bottom: 0; }
.cal-event-row .t { font-weight: 700; white-space: nowrap; width: 46px; }
.cal-event-row .c { font-variant: small-caps; white-space: nowrap; width: 76px; }
.cal-event-row .who { color: var(--faint); }
.cal-empty { font-style: italic; color: var(--faint); font-size: 14.5px; margin: 0 0 8px; }

/* --- sections --- */
section { margin-bottom: 34px; }

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 17px; font-weight: 700; margin: 18px 0 6px; }

p { margin: 0 0 10px; }

.abstract {
  margin: 0 0 34px;
  font-size: 15.5px;
}

a { color: var(--ink); }

/* --- track list --- */
dl.tracks dt {
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}
dl.tracks dd { margin: 0 0 12px; }

/* --- schedule table --- */
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.schedule th {
  text-align: left;
  border-top: 0;
  border-bottom: 1px solid var(--rule);
  padding: 6px 10px 6px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.schedule td {
  vertical-align: top;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid #ccc;
}
table.schedule tbody tr:last-child td { border-bottom: 0; }
table.schedule tr.day td {
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
  padding-top: 16px;
}
table.schedule td.time { white-space: nowrap; width: 62px; }
table.schedule td.code { white-space: nowrap; width: 78px; font-variant: small-caps; }
table.schedule .instructor { font-weight: 400; }
table.schedule .topic { font-weight: 700; }
table.schedule .detail { color: var(--faint); font-size: 14px; }

/* --- materials --- */
ul.materials { list-style: none; padding: 0; margin: 0; }
ul.materials li {
  border-bottom: 1px solid #ccc;
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
ul.materials li .code { font-variant: small-caps; font-weight: 700; white-space: nowrap; }
ul.materials li .tba { color: var(--faint); font-style: italic; white-space: nowrap; }

/* --- team --- */
.lock-note {
  font-size: 13.5px;
  font-style: italic;
  color: var(--faint);
  margin-bottom: 24px;
}

.member {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid #ccc;
}
.member:last-child { border-bottom: none; }

.member .photo-wrap { position: relative; }
.member img.photo,
.member .photo-placeholder {
  width: 132px;
  height: 164px;
  object-fit: cover;
  border: 1px solid var(--rule);
  display: block;
  background: #f2f2f2;
}
.member .photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 8px;
}

.member h3.name {
  margin: 0 0 2px;
  font-size: 19px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.member .caption {
  font-style: italic;
  font-size: 15px;
  margin-bottom: 8px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.member .description { font-size: 15.5px; }
.member .description p { margin: 0 0 9px; }
/* keep the pencil on the same line as the end of the last paragraph */
.member .description p:last-of-type { display: inline; }

/* --- pencil edit buttons --- */
button.pencil {
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  color: var(--faint);
  font-family: inherit;
}
button.pencil::before { content: "["; }
button.pencil::after { content: "]"; }
button.pencil:hover { color: var(--ink); }
button.pencil:focus-visible {
  outline: 1px solid var(--rule);
  outline-offset: 2px;
}

.photo-wrap button.pencil {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
button.pencil[disabled] {
  cursor: wait;
  opacity: 0.55;
}

.save-status {
  color: var(--faint);
  font-size: 13px;
  font-style: italic;
  margin-left: 2px;
}

.editing input,
.editing textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 4px 6px;
}
.editing textarea { min-height: 170px; resize: vertical; }
.edit-hint {
  display: block;
  font-size: 12.5px;
  font-style: italic;
  color: var(--faint);
  margin-top: 3px;
}
.edit-actions { margin-top: 6px; display: flex; gap: 8px; }
.edit-actions button {
  font-family: inherit;
  font-size: 13px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 3px 12px;
  cursor: pointer;
}
.edit-actions button:hover { background: var(--ink); color: var(--paper); }

/* --- footer --- */
footer {
  margin-top: 70px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
  font-size: 13px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 560px) {
  .page { padding-left: 18px; padding-right: 18px; }
  nav.masthead { align-items: flex-start; gap: 12px; }
  nav.masthead .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
  }
  nav.masthead .links a { margin-left: 0; }
  .member { grid-template-columns: 1fr; }
  .abstract { margin-left: 0; margin-right: 0; }
}
