/* 6KZ Chief of Staff. Monochrome, Helvetica, hairline rules, no colour. */

* {
  box-sizing: border-box;
}

html {
  background: #fff;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #000;
}

.masthead,
.nav,
main {
  max-width: 46rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Masthead */

.masthead {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.masthead h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.masthead-sub {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  font-weight: 400;
}

/* Nav */

.nav {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.nav a {
  text-decoration: none;
  font-weight: 400;
  padding-bottom: 2px;
}

.nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
}

.nav a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Main / views */

main {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.view-heading {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

/* State messages: empty, error, loading, parse error banners */

.state-message {
  border-top: 1px solid #000;
  padding-top: 1.25rem;
  max-width: 70ch;
}

.state-message p {
  margin: 0 0 0.75rem;
}

.state-message p:last-child {
  margin-bottom: 0;
}

.state-message code {
  font-family: "Courier New", Courier, monospace;
  border: 1px solid #000;
  padding: 0.05em 0.4em;
}

/* Lists shared by outbox and strategy */

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #000;
}

.item-row {
  border-bottom: 1px solid #000;
}

details {
  display: block;
}

summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.25rem;
  row-gap: 0.25rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  font-weight: 700;
  width: 1em;
  flex: 0 0 auto;
}

details[open] summary::before {
  content: "\2212"; /* minus sign */
}

/* Outbox row fields */

.draft-status {
  font-weight: 400;
  flex: 0 0 auto;
}

.draft-status.status-open {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.draft-status.status-closed {
  font-weight: 400;
  text-transform: none;
}

.draft-title {
  font-weight: 700;
  flex: 1 1 16rem;
}

.draft-meta {
  font-weight: 400;
  flex: 0 0 auto;
}

/* Strategy row fields */

.note-title {
  font-weight: 700;
  flex: 1 1 16rem;
}

.note-meta {
  font-weight: 400;
  flex: 0 0 auto;
}

/* Expanded body */

.draft-body,
.note-body-wrap {
  padding: 0 0 1.75rem 1.25em;
  max-width: 70ch;
  box-sizing: border-box;
}

.draft-text {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #000;
  padding: 1rem;
  margin: 0 0 1rem;
  box-sizing: border-box;
}

.draft-actions {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.copy-btn {
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:active {
  background: #000;
  color: #fff;
}

.copy-confirm {
  font-size: 0.9rem;
}

/* Rendered markdown prose for strategy notes */

.note-body {
  max-width: 70ch;
}

.note-body h3,
.note-body h4,
.note-body h5,
.note-body h6 {
  margin: 1.5rem 0 0.5rem;
  font-weight: 700;
}

.note-body h3 {
  font-size: 1.05rem;
}

.note-body h4,
.note-body h5,
.note-body h6 {
  font-size: 1rem;
}

.note-body p {
  margin: 0 0 1rem;
}

.note-body ul,
.note-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.note-body li {
  margin: 0 0 0.4rem;
}

.note-body :first-child {
  margin-top: 0;
}

/* Parse error rows */

.item-row.has-error .draft-status,
.item-row.has-error .draft-title {
  font-weight: 700;
}

/* Voice call page */

.voice-panel {
  border-top: 1px solid #000;
  padding-top: 1.25rem;
  max-width: 70ch;
}

.call-status {
  margin: 0 0 1.5rem;
}

.call-state {
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.call-detail {
  margin: 0;
  max-width: 70ch;
}

.call-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.85rem 2.5rem;
  cursor: pointer;
}

.call-btn:hover:not(:disabled),
.call-btn:active:not(:disabled) {
  background: #000;
  color: #fff;
}

.call-btn[aria-pressed="true"] {
  background: #000;
  color: #fff;
}

.call-btn[aria-pressed="true"]:hover,
.call-btn[aria-pressed="true"]:active {
  background: #fff;
  color: #000;
}

.call-btn:disabled {
  cursor: not-allowed;
}

.transcript-wrap {
  margin-top: 2rem;
  max-width: 70ch;
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid #000;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
}

.transcript-empty {
  margin: 0;
}

.transcript {
  list-style: none;
  margin: 0;
  padding: 0;
}

.transcript-line {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #000;
}

.transcript-line:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.transcript-role {
  display: block;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.transcript-text {
  display: block;
}

.transcript-line-assistant {
  padding-left: 1.5rem;
}

/* Phone width */

@media (max-width: 30rem) {
  .masthead,
  .nav,
  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .masthead {
    padding-top: 1.75rem;
  }

  .masthead h1 {
    font-size: 1.25rem;
  }

  summary {
    column-gap: 0.75rem;
  }

  .draft-title,
  .note-title {
    flex-basis: 100%;
  }

  .draft-body,
  .note-body-wrap {
    padding-left: 1em;
  }

  .call-btn {
    width: 100%;
    padding: 0.85rem 1rem;
  }

  .transcript-wrap {
    max-height: 16rem;
    padding: 0.75rem 1rem;
  }

  .transcript-line-assistant {
    padding-left: 1rem;
  }
}
