/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Hide native <summary> marker (Safari/Chrome) */
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }

/* Hide scrollbar on carousel tracks (scrollbar-width:none handles Firefox inline) */
.leker-carousel-track::-webkit-scrollbar { display: none; }

/* Carousel download button — darken on hover */
.leker-carousel-dl:hover { background: rgba(0,0,0,0.7) !important; }

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/InstrumentSans-Variable-265d6ea6.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/InterTight-Variable-0a534b34.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --leker-font-display: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --leker-font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --leker-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --leker-tracking-display: -0.025em;
}

body {
  font-family: var(--leker-font-body);
}

.leker-app h1,
.leker-app h2,
.leker-app h3 {
  font-family: var(--leker-font-display);
  font-weight: 500;
  letter-spacing: var(--leker-tracking-display);
}

.leker-app h1 {
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  line-height: 1.02;
}

.leker-app h2 {
  line-height: 0.98;
}

.leker-app h3 {
  line-height: 1;
}

.leker-app button,
.leker-app input,
.leker-app select,
.leker-app textarea,
.leker-app [role="button"],
.leker-app a.inline-flex,
.leker-app a.block.w-full {
  font-family: var(--leker-font-body);
}

.leker-app .font-mono,
.leker-app code,
.leker-app kbd {
  font-family: var(--leker-font-mono);
}

.leker-category-pill,
.leker-app a.leker-category-pill,
.leker-app button.leker-category-pill {
  font-family: var(--leker-font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

/* Public journal theme: keeps classic as the default and only scopes dark colors to public journal pages. */
.journal-theme-dark {
  background: #111111;
  color: #f3f3f3;
}

.journal-theme-dark :where(.min-h-full, main, header, footer, .bg-white, .bg-gray-50) {
  background-color: #111111;
}

.journal-theme-dark :where(.border-gray-100, .border-gray-200, .border-gray-300) {
  border-color: #2a2a2a;
}

.journal-article-row::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background-color: #eeeeee;
}

.journal-theme-dark :where(.text-gray-900, .text-gray-800, .text-gray-700) {
  color: #f4f4f4;
}

.journal-theme-dark :where(.text-gray-600, .text-gray-500) {
  color: #b7b7b7;
}

.journal-theme-dark :where(.text-gray-400) {
  color: #8f8f8f;
}

.journal-theme-dark :where(.bg-gray-100, .bg-gray-200, .bg-primary-50) {
  background-color: #2a2d31;
}

.journal-theme-dark :where(.text-primary-700, .text-primary-600) {
  color: #d7d7d7;
}

.journal-theme-dark .leker-category-pill,
.journal-theme-dark :where(a.leker-category-pill, button.leker-category-pill) {
  background-color: #2a2d31;
  color: #c9cdd4;
}

.journal-theme-dark #articles-list a {
  color: inherit;
}

.journal-theme-dark #articles-list a :where(.text-gray-900) {
  color: #f4f4f4;
}

.journal-theme-dark .journal-read-link {
  color: #f4f4f4;
}

.journal-theme-dark .journal-read-link :where(span)::after {
  background-color: #f4f4f4;
}

.journal-theme-dark #articles-list a :where(.after\:bg-gray-900)::after {
  background-color: #f4f4f4;
}

.leker-app.journal-theme-dark :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea) {
  background-color: #111111;
  border-color: #343434;
  color: #f4f4f4;
}

.leker-app.journal-theme-dark :where(input::placeholder, textarea::placeholder) {
  color: #777777;
}

.leker-app.journal-theme-dark :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea):focus {
  border-color: #5b6472;
  box-shadow: 0 0 0 1px #5b6472;
}

.journal-theme-dark :where(.shadow-sm, .shadow-lg) {
  box-shadow: none;
}

.journal-theme-dark .journal-article-row::after {
  background-color: #2a2a2a;
}

.journal-theme-dark .prose {
  color: #d7d7d7;
}

.journal-theme-dark .prose :where(h1, h2, h3, strong, a) {
  color: #f4f4f4;
}

.journal-theme-dark .journal-actions-menu {
  background-color: #151515;
  border-color: #343434;
}

.journal-theme-dark .journal-actions-menu-item {
  color: #f4f4f4;
}

.journal-theme-dark .journal-actions-menu-item svg {
  color: #9ca3af;
}

.journal-theme-dark .journal-actions-menu-item:hover {
  background-color: #242424;
  color: #ffffff;
}

.journal-theme-dark .journal-actions-menu-item--danger {
  color: #fca5a5;
}

.journal-theme-dark .journal-actions-menu-item--danger:hover {
  background-color: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.journal-article-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: transparent;
}

.journal-article-cover img {
  width: auto;
  max-width: min(100%, 920px);
  max-height: min(420px, 58vh);
  object-fit: contain;
  border-radius: 0.5rem;
}

.journal-theme-dark .journal-article-cover {
  background-color: transparent;
}

/* Compatibility layer for older screens still using the previous UI tokens. */
.leker-app :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  border-color: #dfe1e8;
  border-radius: 1rem;
}

.leker-app :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea):focus {
  border-color: #356fcb;
  box-shadow: 0 0 0 1px #356fcb;
}

.leker-app :where(input[type="submit"], button[type="submit"], a.inline-flex) {
  border-radius: 9999px;
}

.leker-app .article-title-input,
.leker-app .article-title-input:focus {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.leker-app .leker-plain-input,
.leker-app .leker-plain-input:focus {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.leker-app th,
.leker-app th a.inline-flex {
  font-weight: 600;
}

.leker-app :where(.text-primary-600, .text-primary-700, .text-indigo-600, .text-indigo-500) {
  color: #356fcb;
}

.leker-app :where(.bg-primary-50, .bg-indigo-50) {
  background-color: #f4f7ff;
}

.leker-app :where(.border-primary-300, .border-primary-400, .border-primary-500) {
  border-color: #b9c9f0;
}

.leker-app :where(.text-gray-400) {
  color: #7c8596;
}

.leker-app :where(.text-gray-500) {
  color: #626b7a;
}

.leker-app h1 + p.text-sm {
  font-size: 1rem;
  line-height: 1.5;
}

.contact-stat-card {
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), inset 0 0 0 1px #eeeeee;
}

.contact-stat-card__icon {
  background: #f4f4f4;
  color: #6622cc;
}

.contact-stat-card__metric {
  color: #6622cc;
}

.contact-stat-card--contacts {
  background: #e6e6ef;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), inset 0 0 0 1px #d7d7e6;
}

.contact-stat-card--contacts .contact-stat-card__icon,
.contact-stat-card--subscribers .contact-stat-card__icon,
.contact-stat-card--excluded .contact-stat-card__icon {
  background: rgba(255, 255, 255, 0.7);
}

.contact-stat-card--subscribers {
  background: #eef4f7;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), inset 0 0 0 1px #d4e2e8;
}

.contact-stat-card--active {
  background: #ffffff;
}

.contact-stat-card--excluded {
  background: #fff0ea;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), inset 0 0 0 1px #f3c7b8;
}

.contact-stat-card--excluded .contact-stat-card__icon,
.contact-stat-card--excluded .contact-stat-card__metric {
  color: #e4572e;
}

/* Article body — style inline links */
.prose a { color: #6366f1; text-decoration: underline; }
.prose a:hover { opacity: 0.75; }
