@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Vazirmatn:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #2c3931;
  background: #f6f7f1;
  font-synthesis: none;
  --green: #385b46;
  --muted: #889180;
  --border: #dde2d5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fdfef9;
  color: inherit;
  padding: 8px 11px;
}
button:hover {
  background: #eaf0e1;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #578c68;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
header {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  background: #fcfdf9;
  border-bottom: 1px solid var(--border);
}
.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  font:
    600 25px "DM Sans",
    sans-serif;
  letter-spacing: -1px;
}
.brand > span {
  font-size: 36px;
  color: #5e7a64;
}
.brand small {
  font:
    9px "DM Sans",
    sans-serif;
  letter-spacing: 1.6px;
  margin-left: 18px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
  color: #929b89;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
}
.header-actions button {
  background: #35523f;
  color: white;
  border: 0;
}
.local-label {
  color: var(--muted);
}
main {
  display: flex;
  height: calc(100dvh - 66px);
  min-height: 500px;
}
aside {
  width: 246px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 27px 18px 15px;
  display: flex;
  flex-direction: column;
  background: #fcfdf9;
  min-height: 0;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 600;
  color: #84917a;
}
h1 {
  font:
    500 29px/1.15 "DM Sans",
    sans-serif;
  letter-spacing: -1px;
  margin: 19px 0 26px;
}
#search > label {
  display: block;
  font-size: 10px;
  margin-bottom: 9px;
  color: #6b7963;
}
.search-box {
  display: flex;
  border: 1px solid #d4dccb;
  border-radius: 7px;
  padding: 4px;
  background: white;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 7px;
  font-size: 11px;
  background: none;
}
.search-box button {
  background: #e7eddf;
  border: 0;
}
.library-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #86917b;
}
#movie-count {
  font-size: 10px;
}
#results {
  overflow: auto;
  flex: 1;
  font-size: 11px;
  color: #7f8c73;
}
.movie-row {
  display: flex;
  align-items: center;
  border-radius: 7px;
  margin-bottom: 4px;
}
.movie-row.selected {
  background: #e6eddd;
}
.movie-result {
  flex: 1;
  min-width: 0;
  display: block;
  text-align: left;
  border: 0;
  background: none;
  padding: 11px 8px;
}
.movie-result strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}
.movie-result span {
  font-size: 9px;
  color: #8b9680;
  display: block;
  margin-top: 4px;
}
.movie-result .prepared-tag {
  font-size: 8px;
  color: #47734e;
  letter-spacing: 1px;
}
.film-star {
  border: 0;
  background: none;
  font-size: 15px;
  color: #8c987d;
  padding: 6px;
}
.film-star[aria-pressed="true"] {
  color: #8c7736;
}
.sidebar-note {
  font-size: 10px;
  line-height: 1.8;
  color: #8d9882;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin: 12px 0 0;
}
.sidebar-note span {
  color: #a5ad9d;
}
.workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.film-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 28px 17px;
  gap: 10px;
  background: #f9faf4;
}
.film-heading h2 {
  font:
    500 27px "DM Sans",
    sans-serif;
  letter-spacing: -0.9px;
  margin: 9px 0 5px;
}
.film-heading p {
  font-size: 10px;
  color: #8b957f;
  margin: 0;
}
.film-heading > button {
  font-size: 10px;
  white-space: nowrap;
}
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  background: #fcfdf8;
  gap: 10px;
}
.tab-bar [role="tablist"] {
  display: flex;
  gap: 19px;
}
.tab-bar [role="tab"] {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 16px 0;
  background: none;
  color: #98a08f;
  font-size: 10px;
  white-space: nowrap;
}
.tab-bar [role="tab"] span {
  font-size: 11px;
  margin-left: 7px;
}
.tab-bar [role="tab"][aria-selected="true"] {
  border-color: #436a4e;
  color: #365b40;
}
.board-tools {
  display: flex;
  align-items: center;
  font-size: 9px;
  gap: 3px;
}
.board-tools button {
  border: 0;
  background: none;
  padding: 6px;
}
.board-tools span {
  min-width: 31px;
  text-align: center;
}
.source-note {
  padding: 9px 28px;
  font-size: 9px;
  line-height: 1.6;
  color: #7e8972;
  border-bottom: 1px solid #e3e7da;
  background: #eef2e5;
}
.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  overflow: hidden;
  --reader-width: 46%;
}
.board {
  touch-action: none;
  flex: 1;
  min-width: 0;
  overflow: auto;
  background-color: #f6f7f0;
  background-image: radial-gradient(#d8decd 0.8px, transparent 0.8px);
  background-size: 22px 22px;
  padding: 27px;
  position: relative;
  overscroll-behavior: contain;
}
.board > section {
  zoom: var(--board-zoom, 1);
}
.panel-intro {
  max-width: 650px;
  margin: 0 0 25px;
}
.panel-intro h3 {
  font:
    500 24px "DM Sans",
    sans-serif;
  letter-spacing: -0.6px;
  margin: 10px 0;
}
.panel-intro p {
  font-size: 11px;
  line-height: 1.8;
  color: #8a947d;
  margin: 0;
}
.beats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
  min-width: 240px;
  max-width: 1250px;
}
.beat-card {
  background: #fffef8;
  border: 1px solid #dee3d2;
  border-radius: 9px;
  padding: 19px;
  position: relative;
  box-shadow: 0 3px 0 #e2e6d846;
}
.beat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #9da68f;
}
.beat-num {
  font:
    500 22px "DM Sans",
    sans-serif;
  color: #aab59e;
}
.template-page {
  font-size: 9px;
  background: #f0f3e8;
  padding: 4px 6px;
  border-radius: 4px;
}
.beat-card h4 {
  font:
    500 17px "DM Sans",
    sans-serif;
  margin: 12px 0 6px;
}
.beat-definition {
  font-size: 10px;
  color: #95a087;
  line-height: 1.6;
  margin: 0 0 12px;
}
.reading {
  font-size: 11px;
  line-height: 1.8;
  color: #596a4f;
}
.source-excerpt {
  border-left: 2px solid #cbd6bc;
  padding: 6px 0 6px 10px;
  font:
    10px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: #6a785d;
  white-space: pre-wrap;
  margin: 12px 0;
}
.source-link {
  font-size: 10px;
  color: #477647;
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid #bacbb0;
  padding-bottom: 3px;
  line-height: 1.5;
}
.source-link:hover {
  color: #29482c;
  border-color: #29482c;
}
.unprepared {
  padding: 18px;
  border: 1px dashed #cad3bd;
  border-radius: 8px;
  background: #f8faf1;
  font-size: 12px;
  line-height: 1.8;
  color: #849276;
  max-width: 620px;
  margin-bottom: 20px;
}
.act-row {
  margin-bottom: 25px;
  min-width: max-content;
}
.act-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  left: 0;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
}
.act-heading span {
  font:
    500 24px "DM Sans",
    sans-serif;
  color: #a7b298;
}
.act-heading small {
  font-size: 9px;
  color: #8e9b80;
  font-weight: 400;
}
.act-cards {
  display: grid;
  grid-template-columns: repeat(10, 252px);
  gap: 13px;
}
.scene-card {
  padding: 17px;
  background: #f5edbe;
  box-shadow: 1px 4px 9px #4b543012;
  border: 1px solid #e8e0b1;
  border-radius: 2px 2px 7px 2px;
}
.act-row:nth-child(2) .scene-card {
  background: #e7edd5;
  border-color: #d8e2c6;
}
.act-row:nth-child(3) .scene-card {
  background: #e8e5ee;
  border-color: #ded9e6;
}
.act-row:nth-child(4) .scene-card {
  background: #eeded0;
  border-color: #e4d1c0;
}
.scene-card .card-meta {
  display: flex;
  justify-content: space-between;
  color: #8e916e;
  font-size: 9px;
}
.scene-card h4 {
  font:
    500 15px/1.4 "DM Sans",
    sans-serif;
  margin: 12px 0;
}
.setup {
  font:
    9px/1.6 ui-monospace,
    SFMono-Regular,
    monospace;
  color: #81886d;
}
.scene-card .source-excerpt {
  border-color: #a8b18a;
  font-size: 10px;
  color: #626a51;
}
.note-label {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8a9078;
  margin: 14px 0 5px;
}
.conflict {
  font-size: 11px;
  line-height: 1.7;
  color: #5c654d;
}
.conflict b {
  color: #a56642;
  padding: 0 4px;
}
.change {
  font-size: 10px;
  line-height: 1.7;
  color: #6b7259;
}
.change strong {
  display: block;
  color: #7d7151;
  font-size: 12px;
  margin-top: 4px;
}
.scene-card .source-link {
  margin-top: 14px;
}
.line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.line-toggle {
  padding: 6px 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fcfdf7;
}
.line-toggle i {
  width: 20px;
  height: 4px;
  border-radius: 2px;
}
.line-toggle[aria-pressed="false"] {
  opacity: 0.35;
}
.timeline-svg {
  overflow: visible;
  touch-action: pan-x pan-y;
}
.timeline-svg .station {
  cursor: pointer;
}
.timeline-svg .station:focus {
  outline: none;
}
.timeline-svg .station:focus circle {
  stroke: #111;
  stroke-width: 4;
}
.graph-label {
  font:
    10px "DM Sans",
    sans-serif;
  fill: #69735c;
}
.axis-label {
  font:
    10px "DM Sans",
    sans-serif;
  fill: #96a086;
}
.reader {
  background: #fffefa;
  border: 1px solid #d4ddc6;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  box-shadow: 0 10px 45px #2a3b2522;
  border-radius: 10px;
  overflow: hidden;
  position: absolute;
  z-index: 10;
  top: 22px;
  left: 8%;
  width: 84%;
  height: calc(100% - 44px);
  resize: both;
  min-height: 170px;
  max-width: 100%;
}
.reader-handle {
  padding: 13px 16px;
  background: #f7f9ef;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  cursor: move;
  touch-action: none;
}
.reader-name {
  min-width: 0;
}
.reader-name h3 {
  font:
    500 16px "DM Sans",
    sans-serif;
  margin: 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader-name > span {
  font-size: 9px;
  color: #8c977d;
}
.reader-controls {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 225px;
}
.reader-controls button {
  border: 0;
  background: none;
  font-size: 12px;
  padding: 7px;
}
.reader-controls span {
  font-size: 9px;
  min-width: 26px;
  color: #849374;
}
#pin-reader {
  font-size: 10px;
  background: #e8eedc;
}
#reader-content {
  overflow: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  padding: 15px 0 40px;
  scroll-behavior: auto;
}
.script-line {
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre;
  min-width: max-content;
  padding: 0 22px 0 8px;
  color: #424d3c;
  position: relative;
}
.line-number {
  display: inline-block;
  width: 48px;
  text-align: right;
  padding-right: 14px;
  color: #b1b9a5;
  font-size: 9px;
  user-select: none;
}
.script-line.target {
  background: #f8edba;
  box-shadow: inset 3px 0 #bf9c45;
}
.script-line.page-start {
  border-top: 1px dashed #d7dfcb;
  margin-top: 14px;
  padding-top: 12px;
}
.source-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-bottom: 1px solid #e8ecdf;
  flex-shrink: 0;
  font-size: 9px;
  color: #8a967c;
  flex-wrap: wrap;
}
.source-nav input {
  width: 65px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
  font-size: 10px;
  background: white;
}
.source-nav button {
  padding: 4px 8px;
  font-size: 10px;
}
#source-location {
  margin-left: auto;
}
#reader-footer {
  padding: 9px 12px;
  font-size: 8px;
  color: #93a083;
  border-top: 1px solid #e8ecdf;
  flex-shrink: 0;
}
.stage.split .reader {
  position: relative;
  left: auto !important;
  top: auto !important;
  width: var(--reader-width) !important;
  height: 100% !important;
  max-width: 75%;
  border-radius: 0;
  resize: none;
  flex-shrink: 0;
  box-shadow: none;
  border: 0;
}
.stage.split .reader-handle {
  cursor: default;
  flex-wrap: wrap;
  padding: 13px;
}
.stage.split .reader-controls {
  max-width: none;
}
.stage.split #splitter {
  width: 7px;
  background: #dce4d1;
  cursor: col-resize;
  flex-shrink: 0;
  touch-action: none;
}
.stage.split #splitter:hover {
  background: #aec29b;
}
.reader.minimized {
  height: auto !important;
  min-height: 0;
  resize: none;
  width: min(550px, 95%);
}
.reader.minimized #reader-content,
.reader.minimized #reader-footer,
.reader.minimized .source-nav {
  display: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #35533e;
  color: white;
  font-size: 11px;
  line-height: 1.6;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
.text-empty {
  color: #879278;
  font-size: 11px;
}
@media (min-width: 1600px) {
  aside {
    width: 270px;
  }
  .beats-grid {
    grid-template-columns: repeat(3, minmax(245px, 1fr));
  }
}
@media (max-width: 1000px) {
  aside {
    width: 205px;
    padding: 22px 13px;
  }
  .brand small {
    display: none;
  }
  .film-heading {
    padding: 18px;
  }
  .tab-bar {
    padding: 0 16px;
  }
  .tab-bar [role="tablist"] {
    gap: 12px;
  }
  .board-tools #board-reset {
    display: none;
  }
  .board {
    padding: 20px;
  }
  .source-note {
    padding: 8px 18px;
  }
  .stage.split .reader {
    max-width: 60%;
    min-width: 250px;
  }
  .stage.split .reader-handle {
    padding: 9px;
  }
  .reader-controls button {
    padding: 6px;
  }
}
@media (max-width: 680px) {
  header {
    padding: 0 14px;
    height: 58px;
  }
  .brand {
    font-size: 22px;
  }
  .local-label {
    display: none;
  }
  main {
    height: calc(100dvh - 58px);
    flex-direction: column;
    min-height: 650px;
  }
  aside {
    width: 100%;
    height: 147px;
    flex-shrink: 0;
    padding: 12px 15px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  aside > h1,
  aside > .eyebrow,
  aside > .sidebar-note,
  .library-caption,
  aside #search > label {
    display: none;
  }
  .search-box {
    padding: 2px;
  }
  #results {
    display: flex;
    height: 76px;
    gap: 8px;
    margin-top: 5px;
  }
  .movie-row {
    min-width: 190px;
    flex-shrink: 0;
    max-width: 210px;
  }
  .movie-result {
    padding: 7px;
  }
  .movie-result strong {
    font-size: 10px;
  }
  .movie-result span {
    font-size: 8px;
    margin-top: 3px;
  }
  .workspace {
    min-height: 0;
  }
  .film-heading {
    padding: 14px 16px;
  }
  .film-heading h2 {
    font-size: 22px;
    margin: 7px 0 4px;
  }
  .film-heading .eyebrow {
    font-size: 8px;
  }
  .film-heading p {
    font-size: 9px;
  }
  .film-heading > button {
    font-size: 9px;
    padding: 6px;
  }
  .tab-bar {
    padding: 0 12px;
    flex-wrap: wrap;
    gap: 0;
  }
  .tab-bar [role="tablist"] {
    gap: 13px;
  }
  .tab-bar [role="tab"] {
    padding: 13px 0;
    font-size: 8px;
  }
  .tab-bar [role="tab"] span {
    font-size: 10px;
    margin-left: 3px;
  }
  .board-tools {
    margin-left: auto;
  }
  .board-tools span {
    font-size: 8px;
  }
  .board-tools button {
    padding: 4px;
  }
  .source-note {
    font-size: 8px;
    max-height: 58px;
    overflow: auto;
  }
  .board {
    padding: 18px;
  }
  .panel-intro h3 {
    font-size: 20px;
  }
  .beats-grid {
    grid-template-columns: minmax(230px, 1fr);
  }
  .reader {
    left: 2%;
    width: 96%;
    top: 8px;
    height: calc(100% - 16px);
    min-width: 250px;
  }
  .reader-handle {
    padding: 10px;
    flex-wrap: wrap;
  }
  .reader-controls {
    max-width: none;
  }
  .stage.split {
    flex-direction: column;
  }
  .stage.split .reader {
    width: 100% !important;
    height: var(--reader-width) !important;
    max-width: 100%;
    min-width: 0;
    min-height: 110px;
    flex-shrink: 0;
  }
  .stage.split #splitter {
    width: 100%;
    height: 7px;
    cursor: row-resize;
  }
  .reader.minimized {
    width: 96%;
  }
  .source-nav {
    padding: 5px 9px;
  }
  .panel-intro p {
    font-size: 10px;
  }
  .script-line {
    padding-right: 12px;
  }
  .line-number {
    width: 38px;
    padding-right: 10px;
  }
}
.script-line {
  font-size: var(--script-font, 13px);
}
/* Keep the workspace focused on the film and its source material. */
aside h1 {
  font-size: 24px;
  margin: 0 0 22px;
}
.film-heading {
  padding-top: 20px;
}
.film-heading h2 {
  margin-top: 0;
}
.tab-bar [role="tab"] span {
  margin-left: 0;
}
.draft-notes {
  background: #f9faf4;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.draft-notes summary {
  cursor: pointer;
  padding: 9px 28px;
  font-size: 10px;
  color: #7e8972;
}
.draft-notes summary span {
  color: #a0a891;
}
.draft-notes .source-note {
  border: 0;
  padding-top: 0;
  background: none;
}
.draft-notes[open] .source-note {
  max-height: 100px;
  overflow: auto;
}
.act-heading {
  margin-bottom: 12px;
  font-size: 13px;
}
@media (max-width: 680px) {
  aside h1 {
    display: none;
  }
  .draft-notes summary {
    padding: 8px 16px;
  }
}
