/* Presentation layer for the ANOMIRAGE browser trial. */
:root {
  color-scheme: dark;
  --app: #151a1c;
  --work: #1b2224;
  --surface: #242d30;
  --secondary: #2b3538;
  --ink: #eaf0ee;
  --muted: #94a5a4;
  --border: #344043;
  --brand: #c0d8ae;
  --soft: #313f35;
  font-size: 13px;
}
:root[data-theme='light'] {
  color-scheme: light;
  --app: #e8ece9;
  --work: #f5f7f4;
  --surface: #fff;
  --secondary: #e5eae5;
  --ink: #1e3029;
  --muted: #66786e;
  --border: #d6ded7;
  --brand: #395c40;
  --soft: #e2ebde;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.primary {
  color: var(--app) !important;
  font-weight: 650;
  min-width: 100px;
}
.site-bar {
  height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 11px;
  color: var(--muted);
}
.site-bar a {
  padding: 8px 0;
}
.site-bar a:hover {
  color: var(--ink);
}
.site-bar a span {
  letter-spacing: 2px;
  margin-left: 8px;
  font-size: 10px;
  color: var(--ink);
}
.site-bar > div {
  color: var(--ink);
  font-weight: 500;
}
.trial-badge {
  margin-left: 10px;
  font-size: 10px;
  color: var(--brand);
  border: 1px solid var(--border);
  padding: 4px 7px;
  border-radius: 4px;
}
#app {
  height: calc(100dvh - 48px);
  grid-template-columns: 252px 1fr;
  padding: 0;
  gap: 0;
}
#sidebar {
  padding: 26px 18px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 15px;
  margin-bottom: 28px;
  gap: 10px;
}
.brand img {
  width: 34px;
  height: 34px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}
.brand button {
  padding: 7px;
  color: var(--muted);
}
#format {
  min-height: 35px;
}
.segment {
  background: var(--app);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
}
.segment button {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 4px;
}
.segment button.active {
  background: var(--secondary);
  box-shadow: none;
  color: var(--ink);
}
.section {
  padding: 0;
  margin: 20px 0 12px;
  font-size: 11px;
}
.library-section {
  flex: 1;
  min-height: 140px;
  overflow: auto;
  scrollbar-width: thin;
}
.library-section summary,
.stage-list summary {
  padding: 8px 0 14px;
  font-size: 10px;
  letter-spacing: 1px;
}
.stage-list {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 16px;
  max-height: 40%;
  overflow: auto;
}
#library button {
  padding: 12px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
}
#library button.selected {
  border-color: #bbd3ae33;
  background: var(--soft);
}
#library small {
  font-size: 10px;
  margin-top: 6px;
}
.edition {
  padding: 16px 0 0;
  font-size: 10px;
  line-height: 1.7;
}
main {
  border: 0;
  border-radius: 0;
  background: var(--work);
}
header {
  padding: 25px 30px;
  gap: 10px;
}
h1 {
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 550;
  margin-bottom: 8px;
}
#subtitle {
  font-size: 11px;
  letter-spacing: 0.4px;
}
#saved {
  font-size: 10px;
  margin-right: 8px;
}
#quickSave {
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 9px 13px;
}
#more,
#themeSwitch {
  font-size: 17px;
  color: var(--muted);
}
.workspace-label {
  display: flex;
  justify-content: space-between;
  padding: 20px 30px 5px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.2px;
}
.workspace-label span:last-child {
  font-size: 9px;
  letter-spacing: 2px;
  opacity: 0.6;
}
nav {
  padding: 12px 26px;
  gap: 7px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 11px;
}
nav button svg {
  width: 15px;
  height: 15px;
}
.tool-label {
  font-size: 10px;
}
#view {
  margin-left: 14px;
}
#pitchArea {
  padding: 12px 16px;
  position: relative;
  background: radial-gradient(ellipse at 50% 50%, #bbd3ae06, transparent 70%);
}
#pitch {
  border-radius: 9px;
  box-shadow: 0 20px 65px #00000020;
  border: 1px solid #dbeee317;
}
.pitch-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 30px 20px;
  color: var(--muted);
  font-size: 10px;
}
.pitch-caption > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pitch-caption i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.team-blue {
  background: #6c9ee0;
}
.team-orange {
  background: #e99b67;
  margin-left: 10px;
}
footer {
  padding: 17px 30px 19px;
  background: var(--app);
}
.timeline-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
#stageCount {
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  letter-spacing: 2px;
}
#track {
  position: relative;
  inset: auto;
  padding: 0;
  gap: 6px;
  justify-content: flex-start;
  overflow: auto;
  scrollbar-width: thin;
  background: transparent;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 16px;
}
#track:before {
  display: none;
}
#track button {
  width: auto;
  height: 54px;
  min-width: 96px;
  flex: 1;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--work);
  text-align: left;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#track button span {
  font-size: 10px;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
#track button small {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  white-space: nowrap;
}
#track button.active {
  color: var(--ink);
  border-color: var(--brand);
  background: var(--soft);
  font-weight: 400;
}
footer.collapsed #track,
footer.collapsed .timeline-heading {
  display: none;
}
.transport {
  gap: 7px;
  height: 36px;
}
#stageTitle {
  font-size: 11px;
  max-width: 180px;
}
.panel {
  top: 100px;
  right: 30px;
  width: 320px;
  border-radius: 10px;
  box-shadow: 0 16px 60px #00000040;
}
.dialog,
.lesson {
  border: 1px solid var(--border);
  border-radius: 12px;
}
.choices button {
  font-size: 12px;
}
.panel .segment {
  margin-bottom: 10px;
}
@media (max-width: 1100px) {
  #app {
    grid-template-columns: 220px 1fr;
  }
  .tool-label {
    display: none;
  }
  header {
    padding: 20px;
  }
  #saved {
    display: none;
  }
  .workspace-label {
    padding: 15px 20px 4px;
  }
  nav {
    padding: 12px 16px;
  }
  footer {
    padding: 15px 20px;
  }
  .pitch-caption {
    padding: 10px 20px 16px;
  }
  #stageTitle {
    display: none;
  }
}
@media (max-width: 760px) {
  .site-bar {
    padding: 0 16px;
  }
  .site-bar > div {
    font-size: 10px;
  }
  .site-bar > a:last-child {
    font-size: 10px;
  }
  #app {
    grid-template-columns: 1fr;
  }
  #sidebar {
    display: none;
  }
  #showSidebar {
    display: block;
  }
  #app.mobile-library #sidebar {
    display: flex;
    inset: 48px auto 0 0;
    border-radius: 0;
    width: 260px;
    background: var(--app);
    z-index: 12;
    box-shadow: 15px 0 80px #0006;
  }
  #app.sidebar-hidden.mobile-library #sidebar {
    display: flex;
  }
  header {
    padding: 16px;
    gap: 6px;
  }
  h1 {
    font-size: 17px;
    letter-spacing: -0.4px;
  }
  #quickSave {
    padding: 7px 9px;
    font-size: 10px;
  }
  #themeSwitch {
    display: none;
  }
  #subtitle {
    font-size: 10px;
  }
  .workspace-label {
    padding: 15px 16px 4px;
  }
  .workspace-label span:last-child {
    font-size: 8px;
  }
  nav {
    padding: 9px 12px;
    gap: 2px;
  }
  nav button {
    padding: 8px;
  }
  #view {
    margin-left: 4px;
  }
  #view button {
    padding: 6px 9px;
  }
  #pitchArea {
    padding: 8px 10px;
  }
  .pitch-caption {
    padding: 10px 16px 14px;
    font-size: 9px;
  }
  .pitch-caption > span:last-child {
    max-width: 190px;
    text-align: right;
    line-height: 1.6;
  }
  footer {
    padding: 13px 16px;
  }
  .transport {
    gap: 3px;
  }
  #pass button {
    font-size: 10px;
    padding: 6px 7px;
  }
  .primary {
    min-width: 74px;
    padding: 9px 11px !important;
  }
  .panel {
    right: 12px;
    top: 87px;
    width: min(320px, calc(100vw - 24px));
  }
  .edition {
    padding-top: 12px;
  }
}
@media (max-height: 650px) {
  header {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .workspace-label {
    display: none;
  }
  .pitch-caption {
    padding: 6px 20px 10px;
  }
  footer {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  #track button {
    height: 42px;
    gap: 3px;
  }
  .timeline-heading {
    margin-bottom: 8px;
  }
  #track {
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
/* Give the pitch the available space; timeline stays in the normal flow. */
header {
  padding-top: 18px;
  padding-bottom: 18px;
}
.workspace-label {
  display: none;
}
nav {
  padding-top: 10px;
  padding-bottom: 10px;
}
.pitch-caption {
  padding-top: 7px;
  padding-bottom: 10px;
}
footer {
  padding-top: 12px;
  padding-bottom: 12px;
}
#track {
  min-width: 0;
}
#track button {
  min-width: 90px;
  height: 46px;
  gap: 5px;
}
.timeline-heading {
  margin-bottom: 9px;
}
#track {
  margin-bottom: 12px;
}
footer,
.transport {
  min-width: 0;
}
#workspace {
  overflow: hidden;
}
#app.sidebar-hidden #sidebar {
  display: none;
}
.library-search {
  display: block;
  margin: 0 0 8px;
}
.library-search input {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 11px;
  outline-color: var(--brand);
}
.library-search input::placeholder {
  color: var(--muted);
}
