/* The crew ledger: layout only. Colors, type and material come from tokens.css and fusion.css. */
* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100dvh; }

body {
  font-family: var(--ormus-font-sans);
  font-size: 16px;
  line-height: 1.55;
}

.crew {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5rem) 1.25rem 4rem;
}

.crew-head h1 {
  font-weight: 300;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
}

.lede {
  color: var(--ormus-ink-muted);
  margin: 0 0 2.5rem;
  max-width: 34rem;
}

.crew-door {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.crew-door p { margin: 0; }
.crew-door .fusion-btn { text-decoration: none; }
.crew-door-note { flex-basis: 100%; color: var(--ormus-gold); }
.crew-door-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.crew-who .crew-signout { margin-left: 0.75rem; color: inherit; }

.crew-note { color: var(--ormus-ink-muted); }

/* The filters: one row on a laptop, stacked on a phone. */
.crew-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0 0.75rem;
}
.crew-field { display: grid; gap: 0.35rem; min-width: 0; }
.crew-field--wide { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .crew-filters { grid-template-columns: 11rem 11rem 1fr; }
  .crew-field--wide { grid-column: auto; }
}
.crew-filters select,
.crew-filters input {
  font: inherit;
  font-size: 1rem; /* 16px or more: a phone does not zoom into the field */
  color: var(--ormus-fg);
  background: var(--ormus-bg-elevated);
  border: 1px solid var(--ormus-border);
  border-radius: var(--ormus-radius);
  padding: 0 0.7rem;
  height: 2.75rem; /* one height for the selects and the text field, so the row lines up */
  width: 100%;
  min-width: 0;
}
.crew-filters select:focus-visible,
.crew-filters input:focus-visible,
.crew a:focus-visible {
  outline: 2px solid var(--ormus-gold);
  outline-offset: 2px;
}

.crew-count { margin: 0 0 1.5rem; }

/* The weeks and their shares. */
.crew-week { margin: 0 0 2.25rem; }
.crew-week-title { margin: 0 0 0.75rem; font-size: inherit; font-weight: inherit; }
.crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }

.crew-entry { display: grid; gap: 0.6rem; min-width: 0; }
.crew-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
}
.crew-who { font-weight: 600; }
.crew-when { color: var(--ormus-ink-muted); font-size: 0.9rem; }
.crew-kind { margin-left: auto; }
.crew-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.crew-link,
.crew-file {
  display: flex;
  gap: 0.25rem 1rem;
  border: 1px solid var(--ormus-hairline);
  border-radius: var(--ormus-radius);
  padding: 0.7rem 0.85rem;
  min-width: 0;
}
.crew-link { flex-direction: column; color: inherit; text-decoration: none; }
a.crew-link:hover { border-color: var(--ormus-gold); }
.crew-link-title { font-weight: 500; overflow-wrap: anywhere; }
.crew-link-desc {
  color: var(--ormus-ink-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crew-file { flex-wrap: wrap; align-items: center; justify-content: space-between; }
.crew-file-about { display: grid; gap: 0.2rem; min-width: 0; }
.crew-file-name { font-weight: 500; overflow-wrap: anywhere; }
.crew-file-meta { color: var(--ormus-ink-muted); font-size: 0.9rem; }
.crew-file-open { text-decoration: none; }

.crew-quoted { color: var(--ormus-ink-muted); font-size: 0.9rem; }

.crew-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
}
.crew-act { padding: 0.3rem 0.8rem; font-size: 0.9rem; }
.crew-act:disabled { opacity: 0.5; cursor: progress; }
.crew-hidden-mark { color: var(--ormus-ink-muted); margin-right: auto; }
.crew-entry--hidden { border-style: dashed; }
.crew-entry--hidden > :not(.crew-actions) { opacity: 0.6; }

[hidden] { display: none !important; }
