/* Legio Sounds — Obsidian Publish theme. */

:root,
.theme-dark {
  --background-primary: #03090c;
  --background-primary-alt: #071116;
  --background-secondary: #061016;
  --background-secondary-alt: #0a1820;
  --text-normal: #eef3f3;
  --text-muted: #9aa9ad;
  --text-faint: #63747a;
  --text-accent: #25b5aa;
  --text-accent-hover: #64d5ca;
  --interactive-accent: #159f98;
  --interactive-accent-hover: #31bdb3;
  --link-color: #25b5aa;
  --link-color-hover: #64d5ca;
  --h1-color: #1ca89f;
  --h2-color: #25b5aa;
  --h3-color: #45bcb3;
  --h4-color: #62bfb8;
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 82% -10%, rgba(0, 140, 180, 0.12), transparent 34rem),
    linear-gradient(180deg, #02070a 0%, #03090c 55%, #020608 100%);
}

.site-header,
.site-body-left-column,
.site-body-right-column {
  background: rgba(3, 9, 12, 0.94);
  border-color: rgba(93, 151, 162, 0.16);
}

/* The public journal is image-led. The graph is useful in the private vault,
   but on the site it competes with the photographs and the listening. */
.site-body-right-column {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0 !important;
  border: 0 !important;
}

.site-body-center-column {
  width: auto !important;
  max-width: none !important;
  flex: 1 1 0 !important;
  min-width: 0;
}

.site-body-center-column .published-container {
  width: 100% !important;
  max-width: none !important;
  margin-inline: auto;
}

.site-body-center-column .markdown-preview-view {
  width: 100% !important;
  max-width: none !important;
}

.site-body-center-column .markdown-preview-sizer {
  width: min(1180px, calc(100% - 80px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
}

.site-header-text,
.site-name {
  color: #f4f6f6 !important;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.nav-view-outer .tree-item-self,
.site-body-left-column a {
  color: #a9b7ba;
}

.nav-view-outer .tree-item-self:hover,
.nav-view-outer .tree-item-self.is-active,
.site-body-left-column a:hover {
  color: var(--text-accent-hover);
  background: color-mix(in srgb, var(--text-accent) 9%, transparent);
}

.published-container {
  --page-width: min(1180px, 68vw);
  background: transparent;
}

.markdown-rendered {
  line-height: 1.72;
}

.markdown-rendered p {
  color: #d8dfdf;
}

.markdown-rendered h1 {
  color: var(--h1-color);
}

.markdown-rendered h2 {
  margin-top: 2.6em;
  color: var(--h2-color);
  letter-spacing: -0.025em;
}

.markdown-rendered h3 {
  color: var(--h3-color);
}

.markdown-rendered h4 {
  color: var(--h4-color);
}

/* These are useful inside the private vault, never on the public site. */
.callout[data-callout="publish"],
.callout[data-callout="private"],
.legio-private,
.legio-private-links,
.metadata-container,
.frontmatter,
.mod-header .published-section-header,
.mod-footer,
.site-footer,
.site-footer-link,
.site-footer .powered-by,
.published-section-footer {
  display: none !important;
}

/* Obsidian also renders its credit as a standalone link on some pages. */
a[href="https://publish.obsidian.md/"],
a[href="https://publish.obsidian.md"] {
  display: none !important;
}

.legio-home,
.legio-recording,
.legio-section,
.legio-story {
  --file-line-width: min(1180px, 68vw);
  --legio-forest: #082934;
  --legio-forest-soft: #124653;
  --legio-blue: #1ca89f;
  --legio-red: #ec3237;
  --legio-line: color-mix(in srgb, var(--text-normal) 14%, transparent);
}

/* Related edits and publication records */
.legio-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 24px;
}

.legio-related-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--legio-line);
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--legio-blue) 8%, var(--background-primary-alt)), var(--background-primary-alt));
  color: var(--text-normal);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  align-items: flex-start;
}

.legio-related-card:hover {
  border-color: color-mix(in srgb, var(--legio-blue) 62%, var(--legio-line));
  transform: translateY(-1px);
}

.legio-related-card strong {
  font-size: 1.02em;
}

.legio-related-card strong,
.legio-related-card small,
.legio-related-card span {
  display: block;
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
}

.legio-related-card small {
  color: var(--text-accent);
}

.legio-related-card span,
.legio-related-empty {
  color: var(--text-muted);
  line-height: 1.45;
}

.legio-version,
.legio-public-story {
  --file-line-width: min(1180px, 68vw);
}

@media (max-width: 700px) {
  .legio-related-grid {
    grid-template-columns: 1fr;
  }

  .legio-related-card {
    min-height: 104px;
    padding: 14px;
  }
}

.legio-recording {
  --file-line-width: min(1180px, 68vw);
}

.legio-story {
  --file-line-width: min(1180px, 68vw);
}

/* The catalogue is a working library rather than a reading page. Give its
   embedded Base views room to show useful columns without constraining the
   quieter story and recording layouts. */
.legio-catalogue {
  --file-line-width: 1380px;
}

.legio-catalogue .internal-embed[src$=".base"],
.legio-catalogue .bases-embed {
  width: 100%;
  max-width: none;
}

.legio-home .metadata-container,
.legio-recording .metadata-container,
.legio-section .metadata-container,
.legio-story .metadata-container {
  display: none;
}

/* Obsidian 1.13 places the property editor beside the note's styled
   container in Live Preview. These selectors keep Legio notes clean in
   both edit and reading views without changing any other vault notes. */
.workspace-leaf-content:has(.legio-home) .metadata-container,
.workspace-leaf-content:has(.legio-recording) .metadata-container,
.workspace-leaf-content:has(.legio-section) .metadata-container,
.workspace-leaf-content:has(.legio-story) .metadata-container,
.workspace-leaf-content:has(.legio-home) .inline-title,
.workspace-leaf-content:has(.legio-recording) .inline-title,
.workspace-leaf-content:has(.legio-section) .inline-title {
  display: none !important;
}

.workspace-leaf-content:has(.legio-story) .inline-title {
  display: none !important;
}

.legio-home img[alt*="legio-header"],
.legio-recording img[alt*="legio-recording-header"] {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(5, 25, 33, 0.18);
}

.legio-section img[alt*="legio-section-header"],
.legio-story img[alt*="legio-story-header"] {
  display: block;
  width: min(1240px, calc(100vw - 390px));
  max-width: none;
  height: clamp(390px, 58vh, 700px);
  margin: 0 0 54px 50%;
  transform: translateX(-50%);
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 28px 90px rgba(0, 17, 24, 0.42);
}

.legio-home img[alt*="legio-header"] {
  height: clamp(480px, 72vh, 800px);
  aspect-ratio: auto;
}

/* Homepage: cinematic opening followed by an editorial, image-led entry. */
.legio-home img[alt*="legio-home-hero"] {
  width: min(1320px, calc(100vw - 370px));
  max-width: none;
  height: auto;
  aspect-ratio: 4480 / 2100;
  margin: 0 0 0 50%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
  image-rendering: auto;
  box-shadow: 0 34px 110px rgba(0, 16, 23, 0.7);
}

.legio-home .legio-home-intro {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: clamp(-300px, -30vh, -220px) 0 0;
  padding: 80px 52px 52px;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 9, 12, 0.88) 34%, #03090c 78%);
}

.legio-home .legio-home-intro h1 {
  max-width: 11ch;
  margin: 10px 0 20px;
  color: #2bb9ad !important;
  font-size: clamp(3.2rem, 5.2vw, 5.35rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.55);
}

.legio-home .legio-home-intro .legio-story-deck {
  max-width: 44rem;
  color: #edf3f2 !important;
  font-size: clamp(1.12rem, 2vw, 1.48rem);
}

.legio-home .legio-home-manifesto {
  max-width: 880px;
  margin: 16px 0 110px;
  padding-left: 48px;
  border-left: 3px solid var(--legio-red);
  color: #cbd5d5 !important;
  font-size: clamp(1.35rem, 2.35vw, 2rem);
  line-height: 1.5;
}

.legio-home-entry {
  position: relative;
  z-index: 3;
  margin: 22px 0 70px !important;
}

.legio-home-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(67, 214, 203, 0.54);
  border-left: 4px solid var(--legio-red);
  border-radius: 2px;
  background: linear-gradient(120deg, rgba(5, 42, 53, 0.96), rgba(7, 25, 32, 0.96));
  color: #eef7f5 !important;
  font-weight: 760;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  box-shadow: 0 18px 50px rgba(0, 7, 10, 0.36);
}

.legio-home-entry a:hover {
  border-color: var(--text-accent-hover);
  background: linear-gradient(120deg, rgba(8, 66, 76, 0.98), rgba(7, 31, 39, 0.98));
  transform: translateY(-2px);
}

.legio-home > h2,
.legio-home .markdown-preview-sizer > h2 {
  max-width: 18ch;
  margin: 0 0 34px;
  font-size: clamp(2.25rem, 4.5vw, 4.2rem);
  line-height: 1;
}

.legio-home .callout[data-callout="home-grid"] {
  margin: 0 0 28px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.legio-home .callout[data-callout="home-grid"] .callout-title {
  display: none !important;
}

.legio-home .callout[data-callout="home-grid"] .callout-content {
  margin: 0 !important;
  padding: 0 !important;
}

.legio-home .callout[data-callout="home-grid"] .callout-content > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.legio-home .callout[data-callout="home-grid"] li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0 0 24px;
  overflow: hidden;
  border-bottom: 1px solid rgba(71, 151, 159, 0.25);
}

.legio-home .callout[data-callout="home-grid"] li:first-child {
  grid-column: 1 / -1;
}

.legio-home .callout[data-callout="home-grid"] .internal-embed {
  display: block;
  width: 100%;
  margin: 0 0 22px;
}

.legio-home .callout[data-callout="home-grid"] img[alt*="legio-home-card-image"] {
  display: block;
  width: 100%;
  height: 330px;
  margin: 0;
  transform: none;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(0.88) brightness(0.88);
  transition: filter 180ms ease, transform 240ms ease;
}

.legio-home .callout[data-callout="home-grid"] li:first-child img[alt*="legio-home-card-image"] {
  height: clamp(430px, 60vh, 680px);
}

.legio-home .callout[data-callout="home-grid"] li:hover img[alt*="legio-home-card-image"] {
  filter: saturate(1) brightness(1);
  transform: scale(1.008);
}

.legio-home .callout[data-callout="home-grid"] li::marker {
  content: "";
}

.legio-home .callout[data-callout="home-grid"] h3 {
  max-width: 24ch;
  margin: 7px 0 8px;
  font-size: clamp(1.5rem, 2.7vw, 2.65rem);
  line-height: 1.05;
}

.legio-home .callout[data-callout="home-grid"] h3 a {
  color: var(--h2-color) !important;
  text-decoration: none !important;
}

.legio-home .callout[data-callout="home-grid"] li > p:last-child {
  max-width: 46rem;
  margin: 0;
  color: #bcc8ca;
  font-size: 1.04rem;
}

.legio-home-card-place {
  color: var(--legio-red);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.14em;
}

.legio-home .legio-home-explore {
  margin: 34px 0 120px;
  font-size: 1.18rem;
  font-weight: 700;
}

.legio-home-closing {
  position: relative;
  max-width: 980px;
  margin: 0 0 32px;
  padding: 64px 68px 60px;
  overflow: hidden;
  border: 1px solid rgba(38, 181, 170, 0.25);
  border-radius: 3px;
  background:
    radial-gradient(circle at 88% 0%, rgba(28, 168, 159, 0.2), transparent 40%),
    linear-gradient(145deg, #06151b, #031016);
}

.legio-home-closing h2 {
  max-width: 16ch;
  margin: 8px 0 22px !important;
  color: var(--h2-color) !important;
  font-size: clamp(2.1rem, 3.5vw, 3.45rem);
  line-height: 1.05;
}

.legio-home-closing p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.legio-home-links {
  margin: 0 0 80px;
  font-weight: 650;
}

.legio-home-links span {
  margin: 0 0.55rem;
  color: var(--text-faint);
}

.legio-recording img[alt*="legio-recording-header"] {
  aspect-ratio: 2.5 / 1;
}

.legio-welcome,
.legio-recording-title {
  margin: 20px 4px 24px;
}

.legio-welcome h1,
.legio-recording-title h1,
.legio-section h1 {
  color: var(--legio-blue) !important;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.legio-story h1 {
  color: var(--legio-blue) !important;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.legio-story-intro {
  margin: 34px 4px 64px;
}

.legio-story-intro h1 {
  max-width: 17ch;
  margin: 6px 0 12px;
  font-size: clamp(2.35rem, 4.7vw, 4.15rem);
  line-height: 1.01;
}

.legio-story-deck {
  max-width: 42rem;
  margin: 0;
  color: var(--text-accent);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.55;
}

.legio-home-manifesto {
  max-width: 46rem;
  margin: 0 0 7rem;
  color: #c5d0d0 !important;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.65;
}

.legio-home-intro h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 5.2vw, 4.75rem);
}

.legio-home img[alt*="legio-feature-image"],
.legio-publish-index img[alt*="legio-index-image"] {
  display: block;
  width: min(1120px, calc(100vw - 430px));
  max-width: none;
  height: clamp(330px, 52vh, 620px);
  margin: 72px 0 24px 50%;
  transform: translateX(-50%);
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 24px 72px rgba(0, 17, 24, 0.38);
}

.legio-home img[alt*="legio-feature-image"] + br,
.legio-publish-index img[alt*="legio-index-image"] + br {
  display: none;
}

.legio-home h3,
.legio-publish-index h3 {
  max-width: 30ch;
  margin: 20px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.legio-home h3 a,
.legio-publish-index h3 a {
  color: var(--text-normal) !important;
  text-decoration: none !important;
}

.legio-home h3 a:hover,
.legio-publish-index h3 a:hover {
  color: var(--text-accent) !important;
}

/* Field Notes archive: one canonical, newest-first visual index. */
.legio-publish-index .callout[data-callout="field-notes-grid"] {
  margin: 0 0 72px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] .callout-title {
  display: none !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] .callout-content {
  margin: 0 !important;
  padding: 0 !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] .callout-content > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 24px;
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] li {
  min-width: 0;
  margin: 0;
  padding: 0 0 28px;
  overflow: hidden;
  border-bottom: 1px solid rgba(71, 151, 159, 0.28);
}

.legio-publish-index .callout[data-callout="field-notes-grid"] li::marker {
  content: "";
}

.legio-publish-index .callout[data-callout="field-notes-grid"] .internal-embed {
  display: block;
  width: 100%;
  margin: 0 0 20px;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] img[alt*="legio-index-image"] {
  width: 100%;
  height: 320px;
  margin: 0;
  transform: none;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(0.9) brightness(0.9);
  transition: filter 180ms ease, transform 240ms ease;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] li:hover img[alt*="legio-index-image"] {
  filter: saturate(1) brightness(1);
  transform: scale(1.008);
}

.legio-publish-index .callout[data-callout="field-notes-grid"] h3 {
  margin: 8px 0 9px;
  color: var(--h2-color) !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] h3 a {
  color: var(--h2-color) !important;
}

.legio-publish-index .callout[data-callout="field-notes-grid"] li > p:last-child {
  margin: 0;
  color: #bcc8ca;
}

@media (max-width: 1100px) {
  .legio-section img[alt*="legio-section-header"],
  .legio-story img[alt*="legio-story-header"] {
    width: calc(100vw - 40px);
    height: clamp(340px, 56vh, 620px);
  }

  .legio-home img[alt*="legio-feature-image"],
  .legio-publish-index img[alt*="legio-index-image"] {
    width: calc(100vw - 56px);
  }
}

.legio-soundcloud-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  margin: 10px 0 42px;
  padding: 24px 26px 25px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--legio-blue) 44%, transparent);
  border-left: 4px solid var(--legio-red);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(236, 50, 55, 0.14), transparent 35%),
    linear-gradient(135deg, #061b24, #0b303b 72%, #08252e);
  color: white !important;
  text-decoration: none !important;
  box-shadow: 0 20px 54px rgba(0, 13, 18, 0.24);
}

.legio-soundcloud-card::after {
  content: "SOUNDCLOUD";
  position: absolute;
  top: 18px;
  right: 22px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.legio-soundcloud-card:hover,
.legio-soundcloud-card:focus-visible {
  border-color: color-mix(in srgb, var(--legio-blue) 82%, white);
  transform: translateY(-1px);
}

.legio-soundcloud-card strong {
  font-size: 1.18rem;
}

.legio-soundcloud-card small {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.4;
}

.legio-soundcloud-player {
  position: relative;
  margin: 10px 0 42px;
  padding: 24px 26px 22px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--legio-blue) 44%, transparent);
  border-left: 4px solid var(--legio-red);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(236, 50, 55, 0.14), transparent 35%),
    linear-gradient(135deg, #061b24, #0b303b 72%, #08252e);
  box-shadow: 0 20px 54px rgba(0, 13, 18, 0.24);
}

.legio-soundcloud-player::after {
  content: "SOUNDCLOUD";
  position: absolute;
  top: 18px;
  right: 22px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.legio-soundcloud-heading {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 16px;
  color: white;
}

.legio-soundcloud-heading strong {
  font-size: 1.18rem;
}

.legio-soundcloud-heading small {
  color: rgba(255, 255, 255, 0.68);
}

.legio-soundcloud-player iframe {
  display: block;
  width: 100%;
  border: 1px solid rgba(37, 181, 170, 0.24);
  border-radius: 12px;
  background: #07151a;
  box-shadow: 0 12px 34px rgba(0, 8, 12, 0.35);
}

/* Map of published Field Notes that carry coordinates. */
.legio-map-shell {
  margin: 0 0 72px;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid rgba(37, 181, 170, 0.25);
  border-left: 4px solid var(--legio-red);
  border-radius: 4px;
  background: linear-gradient(145deg, #05151b, #02090d);
  box-shadow: 0 28px 80px rgba(0, 8, 12, 0.38);
}

#legio-field-map {
  width: 100%;
  height: clamp(480px, 68vh, 760px);
  border-radius: 3px;
  background: #061016;
}

.legio-map-data {
  display: none;
}

.legio-map-popup strong {
  display: block;
  margin-bottom: 5px;
  color: #25b5aa;
  font-size: 1rem;
}

.legio-map-popup span {
  color: #53656a;
  font-size: 0.82rem;
}

.leaflet-container {
  font-family: inherit;
}

/* Turn OpenStreetMap's no-key standard tiles into a quiet, teal-black basemap. */
.legio-osm-tiles {
  filter: brightness(0.62) invert(1) contrast(1.5) hue-rotate(155deg) saturate(0.42);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #eef3f3;
}

.legio-map-marker {
  width: 18px !important;
  height: 18px !important;
  margin: -9px 0 0 -9px !important;
  border: 3px solid #eef3f3;
  border-radius: 50%;
  background: #25b5aa;
  box-shadow: 0 0 0 5px rgba(37, 181, 170, 0.28), 0 7px 18px rgba(0, 0, 0, 0.45);
}

.legio-soundcloud-fallback {
  display: inline-block;
  margin-top: 13px;
  color: #60d4dc !important;
  font-size: 0.82rem;
  text-decoration: none !important;
}

/* Public conversation, placed immediately beneath the listening player. */
.legio-comments {
  margin: clamp(2.4rem, 6vw, 5rem) 0;
  padding-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid rgba(71, 198, 196, 0.22);
}

.legio-comments h2 {
  margin: 0.25rem 0 0.7rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.035em;
}

.legio-comments-intro {
  max-width: 48rem;
  margin: 0 0 1.7rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legio-comments .giscus,
.legio-comments .giscus-frame {
  width: 100%;
}

.legio-follow {
  margin: clamp(3rem, 7vw, 6rem) 0 1rem;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  border: 1px solid rgba(38, 181, 170, 0.25);
  border-left: 4px solid var(--legio-red);
  border-radius: 3px;
  background:
    radial-gradient(circle at 92% 0%, rgba(28, 168, 159, 0.18), transparent 42%),
    linear-gradient(145deg, #06151b, #031016);
}

.legio-follow h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.legio-follow > p:not(.legio-kicker):not(.legio-follow-links) {
  max-width: 46rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.legio-follow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  margin: 1.4rem 0 0;
  font-weight: 700;
}

.legio-waveform {
  width: fit-content;
  color: #21b8c0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: -0.18em;
}

.legio-story-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 48px 0 30px;
  padding-top: 18px;
  border-top: 1px solid var(--legio-line);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legio-about img[alt*="legio-about-portrait"] {
  display: block;
  width: min(100%, 470px);
  max-height: 620px;
  margin: 22px 0 44px;
  object-fit: cover;
  object-position: center 28%;
  border: 1px solid var(--legio-line);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 13, 18, 0.28);
}

.legio-story img[alt*="legio-story-photo"] {
  display: block;
  width: 100%;
  max-height: 580px;
  margin: 28px 0;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(5, 25, 33, 0.18);
}

.legio-welcome h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 4px 0 6px;
}

.legio-recording-title h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 4px 0 6px;
}

.legio-welcome > p:last-child,
.legio-recording-title > p:last-child {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.legio-kicker {
  color: var(--legio-red) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.legio-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 34px;
}

.legio-actions .legio-action {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--legio-line);
  border-radius: 16px;
  background: var(--background-primary-alt);
  color: var(--text-normal);
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

/* Fallback for Live Preview, which can unwrap the surrounding HTML div. */
.workspace-leaf-content:has(.legio-home) a.legio-action {
  box-sizing: border-box;
  width: calc(50% - 8px);
  min-height: 112px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  vertical-align: top;
  margin: 6px 4px;
  padding: 18px;
  border: 1px solid var(--legio-line);
  border-radius: 16px;
  background: var(--background-primary-alt);
  color: var(--text-normal);
  text-decoration: none;
}

.workspace-leaf-content:has(.legio-home) .legio-actions > a.legio-action {
  width: 100%;
  margin: 0;
}

.legio-actions .legio-action:hover {
  transform: translateY(-2px);
  border-color: var(--legio-blue);
  box-shadow: 0 10px 26px rgba(0, 92, 118, 0.12);
}

.legio-action span {
  color: var(--text-normal);
  font-size: 1.08rem;
  font-weight: 650;
}

.legio-action small {
  color: var(--text-muted);
  line-height: 1.4;
}

.legio-home h2,
.legio-recording h2,
.legio-section h2 {
  color: var(--h2-color) !important;
  font-weight: 650;
}

.legio-recording .callout[data-callout="listen"],
.legio-story .callout[data-callout="listen"] {
  --callout-color: 8, 41, 52;
  --callout-icon: lucide-headphones;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--legio-forest), var(--legio-forest-soft));
  color: white;
  padding: 8px;
}

.legio-recording .callout[data-callout="listen"] .callout-title,
.legio-recording .callout[data-callout="listen"] .callout-content,
.legio-story .callout[data-callout="listen"] .callout-title,
.legio-story .callout[data-callout="listen"] .callout-content {
  color: white;
}

.legio-recording .callout[data-callout="listen"] audio {
  width: 100%;
}

.legio-recording .callout[data-callout="next"] {
  --callout-color: 0, 140, 180;
  --callout-icon: lucide-sparkles;
  border: none;
  border-left: 4px solid var(--legio-blue);
  border-radius: 10px;
  background: color-mix(in srgb, var(--legio-blue) 10%, var(--background-primary));
}

.legio-recording .callout[data-callout="recording"],
.legio-story .callout[data-callout="recording"],
.legio-recording .callout[data-callout="archive"],
.legio-recording .callout[data-callout="wildlife"] {
  --callout-color: 37, 181, 170;
  border: 1px solid var(--legio-line);
  border-radius: 12px;
  background: linear-gradient(145deg, #071820, #092632);
}

.legio-recording .callout[data-callout="recording"],
.legio-story .callout[data-callout="recording"] {
  --callout-icon: lucide-sliders-horizontal;
  border-color: rgba(36, 188, 197, 0.34);
}

.legio-recording .callout[data-callout="recording"] > .callout-title,
.legio-story .callout[data-callout="recording"] > .callout-title {
  color: var(--text-accent);
}

.legio-recording .callout[data-callout="archive"] {
  --callout-icon: lucide-hard-drive;
}

.legio-recording .callout[data-callout="wildlife"] {
  --callout-icon: lucide-bird;
}

/* The field-session form uses Meta Bind controls, but keeps the visual
   language of Legio Sounds rather than looking like a settings screen. */
.legio-recording h2 {
  margin-top: 2.1em;
  color: color-mix(in srgb, var(--legio-blue) 82%, var(--text-normal)) !important;
  letter-spacing: -0.02em;
}

.legio-recording .mb-input-type-text,
.legio-recording .mb-input-type-text-area,
.legio-recording .mb-input-type-textarea,
.legio-recording .mb-input-type-suggester,
.legio-recording .mb-input-type-inline-select,
.legio-recording .mb-input-type-inline-list,
.legio-recording .mb-input-type-image-suggester {
  display: block;
  width: 100%;
}

.legio-recording .mb-input-type-text input,
.legio-recording .mb-input-textarea,
.legio-recording .mb-suggest-input,
.legio-recording .mb-inline-list {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  border-color: var(--legio-line);
  border-radius: 11px;
  background: var(--background-primary-alt);
  font-size: 16px;
}

.legio-recording .mb-input-textarea {
  min-height: 104px;
  padding: 12px;
  line-height: 1.45;
}

.legio-recording .mb-date-picker-input,
.legio-recording .mb-input-type-time input[type="time"] {
  min-height: 44px;
  font-size: 16px;
}

.legio-recording .mb-input-type-toggle .checkbox-container {
  transform: scale(1.1);
  transform-origin: left center;
}

/* Legio forms: one calm, thumb-friendly rhythm in both Reading view and
   Live Preview. The workspace fallbacks are needed because Obsidian's
   editor can render Meta Bind controls beside the cssclasses container. */
.legio-form h2 {
  margin-top: 2.1em;
  color: color-mix(in srgb, var(--legio-blue) 82%, var(--text-normal)) !important;
  letter-spacing: -0.02em;
}

:is(.legio-recording, .legio-form) .mb-input-wrapper:not(.mb-input-type-toggle),
.workspace-leaf-content:has(.legio-recording) .mb-input-wrapper:not(.mb-input-type-toggle),
.workspace-leaf-content:has(.legio-form) .mb-input-wrapper:not(.mb-input-type-toggle) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0.45rem 0 1.55rem;
}

:is(.legio-recording, .legio-form) .mb-input-type-toggle,
.workspace-leaf-content:has(.legio-recording) .mb-input-type-toggle,
.workspace-leaf-content:has(.legio-form) .mb-input-type-toggle {
  display: inline-block;
  margin: 0.45rem 0 1.2rem;
}

:is(.legio-recording, .legio-form) :is(.mb-input-type-text, .mb-input-type-text-area, .mb-input-type-textarea, .mb-input-type-suggester, .mb-input-type-inline-select, .mb-input-type-inline-list, .mb-input-type-image-suggester),
.workspace-leaf-content:has(.legio-recording) :is(.mb-input-type-text, .mb-input-type-text-area, .mb-input-type-textarea, .mb-input-type-suggester, .mb-input-type-inline-select, .mb-input-type-inline-list, .mb-input-type-image-suggester),
.workspace-leaf-content:has(.legio-form) :is(.mb-input-type-text, .mb-input-type-text-area, .mb-input-type-textarea, .mb-input-type-suggester, .mb-input-type-inline-select, .mb-input-type-inline-list, .mb-input-type-image-suggester) {
  width: 100%;
}

:is(.legio-recording, .legio-form) .mb-input-type-inline-select :is(select, .dropdown),
.workspace-leaf-content:has(.legio-recording) .mb-input-type-inline-select :is(select, .dropdown),
.workspace-leaf-content:has(.legio-form) .mb-input-type-inline-select :is(select, .dropdown) {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 8px 42px 8px 13px;
  border: 1px solid var(--legio-line);
  border-radius: 11px;
  background-color: var(--background-primary-alt);
  font-size: 16px;
}

:is(.legio-recording, .legio-form) .legio-photo-button button,
.workspace-leaf-content:has(.legio-recording) .legio-photo-button button,
.workspace-leaf-content:has(.legio-form) .legio-photo-button button {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

:is(.legio-recording, .legio-form) .legio-session-button button,
.workspace-leaf-content:has(.legio-recording) .legio-session-button button,
.workspace-leaf-content:has(.legio-form) .legio-session-button button {
  width: 100%;
  min-height: 56px;
  justify-content: center;
}

:is(.legio-recording, .legio-form) .legio-primary-photo-preview,
.workspace-leaf-content:has(.legio-recording) .legio-primary-photo-preview,
.workspace-leaf-content:has(.legio-form) .legio-primary-photo-preview {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border: 1px solid var(--legio-line);
  border-radius: 16px;
}

:is(.legio-recording, .legio-form) :is(.mb-input-type-text input, .mb-input-textarea, .mb-suggest-input, .mb-inline-list),
.workspace-leaf-content:has(.legio-recording) :is(.mb-input-type-text input, .mb-input-textarea, .mb-suggest-input, .mb-inline-list),
.workspace-leaf-content:has(.legio-form) :is(.mb-input-type-text input, .mb-input-textarea, .mb-suggest-input, .mb-inline-list) {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  border-color: var(--legio-line);
  border-radius: 11px;
  background: var(--background-primary-alt);
  font-size: 16px;
}

:is(.legio-recording, .legio-form) .mb-input-textarea,
.workspace-leaf-content:has(.legio-recording) .mb-input-textarea,
.workspace-leaf-content:has(.legio-form) .mb-input-textarea {
  min-height: 108px;
  padding: 12px;
  line-height: 1.45;
}

:is(.legio-recording, .legio-form) .mb-inline-list,
.workspace-leaf-content:has(.legio-recording) .mb-inline-list,
.workspace-leaf-content:has(.legio-form) .mb-inline-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

:is(.legio-recording, .legio-form) .mb-inline-list-add,
.workspace-leaf-content:has(.legio-recording) .mb-inline-list-add,
.workspace-leaf-content:has(.legio-form) .mb-inline-list-add {
  box-sizing: border-box;
  flex: 0 0 auto;
  justify-content: center;
  width: 46px !important;
  min-width: 46px;
  min-height: 44px;
}

:is(.legio-recording, .legio-form) .mb-inline-list :is(svg, .svg-icon),
.workspace-leaf-content:has(.legio-recording) .mb-inline-list :is(svg, .svg-icon),
.workspace-leaf-content:has(.legio-form) .mb-inline-list :is(svg, .svg-icon) {
  flex: 0 0 18px;
  width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  max-height: 18px !important;
}

/* A date is a field, not a status badge: keep it full-width and softly
   rectangular instead of inheriting the theme's round pill treatment. */
:is(.legio-recording, .legio-form) .mb-date-picker-input,
.workspace-leaf-content:has(.legio-recording) .mb-date-picker-input,
.workspace-leaf-content:has(.legio-form) .mb-date-picker-input,
:is(.legio-recording, .legio-form) .mb-input-type-time input[type="time"],
.workspace-leaf-content:has(.legio-recording) .mb-input-type-time input[type="time"],
.workspace-leaf-content:has(.legio-form) .mb-input-type-time input[type="time"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--legio-line);
  border-radius: 11px !important;
  background: var(--background-primary-alt);
  font-size: 16px;
}

/* Keep map popovers in the same dark Legio world on desktop and mobile. */
.maplibregl-popup-content,
.bases-view[data-view-type="map"] :is(.maplibregl-popup-content, .leaflet-popup-content-wrapper, .bases-map-popup),
.bases-map-container :is(.maplibregl-popup-content, .leaflet-popup-content-wrapper, .bases-map-popup),
.bases-map :is(.maplibregl-popup-content, .leaflet-popup-content-wrapper, .bases-map-popup) {
  border: 1px solid var(--legio-line) !important;
  border-radius: 15px !important;
  background: #111719 !important;
  color: var(--text-normal) !important;
  box-shadow: 0 18px 46px rgb(0 0 0 / 45%) !important;
}

.bases-view[data-view-type="map"] .leaflet-popup-tip,
.bases-map-container .leaflet-popup-tip,
.bases-map .leaflet-popup-tip {
  background: #111719 !important;
}

.maplibregl-popup-anchor-bottom > .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left > .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right > .maplibregl-popup-tip {
  border-top-color: #111719 !important;
}

.maplibregl-popup-anchor-top > .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left > .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right > .maplibregl-popup-tip {
  border-bottom-color: #111719 !important;
}

.maplibregl-popup-anchor-left > .maplibregl-popup-tip {
  border-right-color: #111719 !important;
}

.maplibregl-popup-anchor-right > .maplibregl-popup-tip {
  border-left-color: #111719 !important;
}

.bases-view[data-view-type="map"] .leaflet-popup-content,
.bases-map-container .leaflet-popup-content,
.bases-map .leaflet-popup-content,
.bases-view[data-view-type="map"] .maplibregl-popup-content,
.bases-map-container .maplibregl-popup-content,
.bases-map .maplibregl-popup-content {
  color: var(--text-normal) !important;
}

:is(.bases-map-popup, .leaflet-popup-content, .maplibregl-popup-content) :is(.bases-map-popup-property-label, .bases-property-label) {
  color: var(--text-muted) !important;
}

:is(.bases-map-popup, .leaflet-popup-content, .maplibregl-popup-content) :is(.bases-map-popup-property-value, .bases-property-value),
:is(.bases-map-popup, .leaflet-popup-content, .maplibregl-popup-content) :is(h1, h2, h3, strong) {
  color: var(--text-normal) !important;
}

:is(.bases-map-popup, .leaflet-popup-content, .maplibregl-popup-content) img {
  display: block;
  width: 100%;
  max-height: 190px;
  margin: 0 0 12px;
  border-radius: 11px;
  object-fit: cover;
}

.maplibregl-popup-content a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 3px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--legio-cyan) 48%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--legio-cyan) 10%, transparent);
  color: var(--legio-cyan) !important;
  font-weight: 650;
  text-decoration: none;
}

.maplibregl-popup-close-button {
  color: var(--text-muted) !important;
}

/* In a map card the date is information, not an editable pill. */
.maplibregl-popup-content input[type="date"],
.maplibregl-popup-content :is(.metadata-input-longtext, .metadata-property-value) input[type="date"] {
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-normal) !important;
  font: inherit !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.legio-listen-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 28px;
}

.legio-listen-links span {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--legio-line);
  border-radius: 12px;
  background: var(--background-primary-alt);
  color: var(--text-muted);
}

.legio-listen-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--legio-line);
  border-radius: 12px;
  background: var(--background-primary-alt);
  color: var(--text-accent);
  text-decoration: none;
}

.legio-recording .callout[data-callout="gallery"],
.legio-story .callout[data-callout="gallery"] {
  margin: 8px 0 24px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.legio-recording .callout[data-callout="gallery"] > .callout-title,
.legio-story .callout[data-callout="gallery"] > .callout-title {
  display: none;
}

.legio-recording .callout[data-callout="gallery"] .callout-content,
.legio-story .callout[data-callout="gallery"] .callout-content {
  display: block;
}

.legio-recording .callout[data-callout="gallery"] .callout-content > p,
.legio-story .callout[data-callout="gallery"] .callout-content > p {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.legio-recording .callout[data-callout="gallery"] .internal-embed,
.legio-story .callout[data-callout="gallery"] .internal-embed {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.legio-recording .callout[data-callout="gallery"] img,
.legio-story .callout[data-callout="gallery"] img {
  display: block;
  width: 100% !important;
  height: 220px;
  margin: 0;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
}

body.legio-lightbox-open {
  overflow: hidden;
}

.legio-public-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 42px);
  background: rgba(1, 6, 9, 0.94);
  backdrop-filter: blur(12px);
  cursor: zoom-out;
}

.legio-public-lightbox img {
  display: block;
  max-width: min(94vw, 1700px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.68);
}

.legio-public-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text-accent) 38%, transparent);
  border-radius: 999px;
  background: rgba(3, 12, 16, 0.82);
  color: var(--text-normal);
  font: 300 2rem/1 sans-serif;
  cursor: pointer;
}

.legio-image-modal {
  width: min(96vw, 1500px);
  max-width: 96vw;
  height: min(94vh, 1100px);
  max-height: 94vh;
  background: rgba(3, 10, 13, 0.98);
  border: 1px solid color-mix(in srgb, var(--legio-teal) 28%, var(--background-modifier-border));
}

.legio-image-modal .modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.legio-image-modal .modal-content img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 76px);
  object-fit: contain;
  border-radius: 10px;
  cursor: zoom-out;
}

.legio-image-modal-caption {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.82em;
}

.legio-recording .callout[data-callout="edit"] {
  margin: 22px 0 28px;
  border: 1px solid color-mix(in srgb, var(--legio-teal) 42%, var(--background-modifier-border));
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(9, 41, 44, 0.84), rgba(7, 20, 25, 0.78));
}

.legio-recording .callout[data-callout="edit"] > .callout-title {
  color: var(--legio-teal);
  font-weight: 720;
}

.legio-recording .callout[data-callout="edit"] .callout-content > p {
  margin-block: 10px;
}

.legio-recording .callout[data-callout="edit"] hr {
  margin: 24px 0 18px;
  border-color: color-mix(in srgb, var(--legio-teal) 24%, transparent);
}

.legio-recording .callout[data-callout="gallery"] p > .internal-embed:nth-child(odd):last-child:not(:only-child),
.legio-story .callout[data-callout="gallery"] p > .internal-embed:nth-child(odd):last-child:not(:only-child) {
  grid-column: 1 / -1;
}

.legio-recording .callout[data-callout="gallery"] p > .internal-embed:only-child,
.legio-story .callout[data-callout="gallery"] p > .internal-embed:only-child {
  max-width: 560px;
  justify-self: start;
}

.legio-actions-one {
  grid-template-columns: 1fr;
}

.legio-action-primary {
  border-color: color-mix(in srgb, var(--legio-red) 52%, var(--legio-line)) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--legio-red) 13%, var(--background-primary-alt)), var(--background-primary-alt)) !important;
}

.legio-action-primary span {
  color: color-mix(in srgb, var(--legio-red) 82%, var(--text-normal));
}

.legio-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 28px;
}

.legio-mini-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--legio-line);
  border-radius: 14px;
  background: var(--background-primary-alt);
}

.legio-mini-grid strong {
  color: var(--text-normal);
}

.legio-mini-grid small {
  color: var(--text-muted);
  line-height: 1.45;
}

.legio-shape-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 30px;
}

.legio-shape-button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--legio-line);
  border-radius: 16px;
  background: var(--background-primary-alt);
  color: var(--text-normal) !important;
  text-decoration: none !important;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.legio-shape-button:hover,
.legio-shape-button:active {
  transform: translateY(-2px);
  border-color: var(--legio-blue);
  box-shadow: 0 10px 26px rgba(0, 92, 118, 0.14);
}

.legio-shape-button strong {
  color: var(--text-normal);
  font-size: 1.05rem;
}

.legio-shape-button small {
  flex: 1;
  color: var(--text-muted);
  line-height: 1.45;
}

.legio-shape-button em {
  color: var(--legio-blue);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 650;
}

.legio-shape-button.external-link {
  background-image: none;
  padding-right: 18px;
}

.legio-step-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 28px;
}

.legio-step-list > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--legio-line);
  border-radius: 14px;
  background: var(--background-primary-alt);
}

.legio-step-list b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--legio-blue) 18%, var(--background-primary));
  color: var(--legio-blue);
}

.legio-step-list span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legio-step-list strong {
  color: var(--text-normal);
}

.legio-step-list small {
  color: var(--text-muted);
  line-height: 1.5;
}

.legio-details {
  margin: 10px 0;
  border-top: 1px solid var(--legio-line);
  border-bottom: 1px solid var(--legio-line);
  background: var(--background-primary-alt);
}

.legio-details summary {
  padding: 14px;
  color: var(--text-normal);
  font-weight: 650;
}

.legio-details > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}

.legio-home .internal-embed[src$=".base"],
.legio-home .bases-embed {
  border: 1px solid var(--legio-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--background-primary-alt);
}

/* One calm, thumb-sized control replaces the tiny inline-list add pill. */
.legio-location-button,
.legio-location-button .mb-button-inner,
:is(.legio-form, .legio-recording) .legio-location-button button {
  width: 100%;
  min-height: 52px;
  border-radius: 13px;
  font-weight: 650;
}

:is(.legio-form, .legio-recording) .legio-location-button {
  margin: 8px 0 10px;
}

@media (max-width: 600px) {
  .published-container {
    --page-width: 100%;
  }

  .site-body-center-column .markdown-preview-sizer {
    width: calc(100% - 20px) !important;
  }

  .legio-home,
  .legio-recording,
  .legio-section {
    --file-line-width: 100%;
  }

  .legio-story {
    --file-line-width: 100%;
  }

  .legio-catalogue {
    --file-line-width: 100%;
  }

  .legio-home img[alt*="legio-header"],
  .legio-recording img[alt*="legio-recording-header"],
  .legio-section img[alt*="legio-section-header"],
  .legio-story img[alt*="legio-story-header"] {
    width: calc(100vw - 20px);
    height: clamp(300px, 54vh, 520px);
    margin-bottom: 34px;
    border-radius: 3px;
  }

  .legio-home img[alt*="legio-home-hero"] {
    width: calc(100vw - 20px);
    height: auto;
    aspect-ratio: 4480 / 2100;
    object-fit: contain;
    margin-bottom: 24px;
  }

  .legio-home img[alt*="legio-feature-image"],
  .legio-publish-index img[alt*="legio-index-image"] {
    width: calc(100vw - 26px);
    height: min(55vh, 470px);
    margin-top: 54px;
    border-radius: 3px;
  }

  .legio-home-intro h1 {
    font-size: clamp(2.8rem, 15vw, 4.6rem);
  }

  .legio-story-intro {
    margin-top: 22px;
  }

  .legio-soundcloud-card {
    margin-bottom: 32px;
    padding: 20px 18px 21px;
  }

  .legio-soundcloud-player {
    margin-bottom: 32px;
    padding: 20px 18px 18px;
  }

  .legio-soundcloud-player::after {
    position: static;
    display: block;
    margin-bottom: 10px;
  }

  .legio-soundcloud-card::after {
    position: static;
    order: -1;
  }

  .legio-story-footer {
    flex-direction: column;
  }

  .legio-publish-index ul,
  .legio-publish-home ul {
    grid-template-columns: 1fr;
  }

  .legio-publish-index .callout[data-callout="field-notes-grid"] .callout-content > ul {
    grid-template-columns: 1fr;
  }

  .legio-publish-index .callout[data-callout="field-notes-grid"] img[alt*="legio-index-image"] {
    height: min(54vh, 420px);
  }

  #legio-field-map {
    height: 64vh;
    min-height: 430px;
  }

  .legio-actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .legio-mini-grid {
    grid-template-columns: 1fr;
  }

  .legio-shape-actions {
    grid-template-columns: 1fr;
  }

  .legio-shape-button {
    min-height: 118px;
  }

  .legio-actions .legio-action {
    min-height: 78px;
    padding: 14px;
  }

  .workspace-leaf-content:has(.legio-home) a.legio-action {
    width: 100%;
    min-height: 78px;
    margin: 5px 0;
    padding: 14px;
  }

  .legio-listen-links {
    grid-template-columns: 1fr;
  }

  .legio-recording .callout[data-callout="gallery"] img,
  .legio-story .callout[data-callout="gallery"] img {
    height: 150px;
  }

  .legio-recording .callout[data-callout="gallery"] .callout-content > p,
  .legio-story .callout[data-callout="gallery"] .callout-content > p {
    grid-template-columns: 1fr;
  }

  .legio-home-manifesto {
    margin-bottom: 4.5rem;
  }

  .legio-home img[alt*="legio-home-hero"] {
    width: calc(100vw - 20px);
    height: clamp(250px, 72vw, 320px);
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 48%;
    margin-bottom: 0;
  }

  .legio-home .legio-home-intro {
    margin-top: 0;
    padding: 22px 12px 26px;
    border-top: 1px solid rgba(93, 151, 162, 0.16);
    background: #03090c;
  }

  .legio-home .legio-home-intro .legio-kicker {
    margin: 0 0 10px;
    font-size: 0.68rem !important;
    line-height: 1.45;
    letter-spacing: 0.14em;
  }

  .legio-home .legio-home-intro h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 9vw, 3rem);
    line-height: 1;
  }

  .legio-home .legio-home-intro .legio-story-deck {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.55;
  }

  .legio-home-entry a {
    width: 100%;
    padding: 12px 17px;
    font-size: 1rem;
    line-height: 1.35;
  }

  .legio-home .legio-home-manifesto {
    margin-bottom: 76px;
    padding-left: 20px;
    font-size: 1.22rem;
  }

  .legio-home .callout[data-callout="home-grid"] .callout-content > ul {
    grid-template-columns: 1fr;
  }

  .legio-home .callout[data-callout="home-grid"] li:first-child {
    grid-column: auto;
  }

  .legio-home .callout[data-callout="home-grid"] img[alt*="legio-home-card-image"],
  .legio-home .callout[data-callout="home-grid"] li:first-child img[alt*="legio-home-card-image"] {
    height: min(52vh, 430px);
  }

  .legio-home .legio-home-explore {
    margin-bottom: 82px;
  }

  .legio-home-closing {
    padding: 40px 24px 38px;
  }

  .legio-home-links span {
    display: none;
  }

  .legio-home-links a {
    display: block;
    margin: 9px 0;
  }
}
.legio-ucs-field {
  width: 100%;
  margin: 0.15rem 0 0.45rem;
}

.legio-ucs-picker {
  width: 100%;
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--background-modifier-border);
  border-radius: 10px;
  background: var(--background-secondary);
  color: var(--text-normal);
  text-align: left;
  font: inherit;
}

.legio-ucs-picker:hover,
.legio-ucs-picker:focus-visible {
  border-color: var(--interactive-accent);
  box-shadow: 0 0 0 1px var(--interactive-accent);
}

.legio-ucs-picker.is-empty .legio-ucs-picker-value {
  color: var(--text-muted);
}

.legio-ucs-picker-arrow {
  flex: 0 0 auto;
  color: var(--text-accent);
  font-size: 1.15em;
}

.legio-ucs-modal .prompt-input {
  font-size: 1rem;
}

.legio-version-choice-modal .modal-content {
  padding-top: 0.5rem;
}

.legio-version-choice-intro {
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.legio-version-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.legio-version-choice {
  min-height: 7.4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--background-modifier-border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(0, 188, 196, 0.10), var(--background-secondary));
  color: var(--text-normal);
  text-align: left;
  white-space: normal;
}

.legio-version-choice:hover,
.legio-version-choice:focus-visible {
  border-color: var(--interactive-accent);
  transform: translateY(-1px);
}

.legio-version-choice-title {
  color: var(--text-accent);
  font-size: 1.05rem;
  font-weight: 700;
}

.legio-version-choice small {
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .legio-version-choice-grid {
    grid-template-columns: 1fr;
  }

  .legio-version-choice {
    min-height: 5.8rem;
  }
}
