/**
 * LogixFlow — Operate-mode components (buttons, toolbars, tabs, chips)
 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lf-app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 20px;
}

.lf-app-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lf-app-header__title {
  font-family: var(--lf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--lf-ink);
  letter-spacing: -0.02em;
}

.lf-app-header__subtitle {
  font-size: 0.6875rem;
  color: var(--lf-ink-muted);
  margin-top: 2px;
}

.lf-landing-site-title {
  font-family: var(--lf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--lf-ink);
}

.lf-landing-hero {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.lf-landing-lead {
  font-size: 1.25rem;
}

.lf-landing-card-title {
  font-family: var(--lf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.lf-landing-page {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  .lf-landing-page {
    scroll-behavior: auto;
  }
}

.lf-landing-hero-section {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .lf-landing-hero-section {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

.lf-landing-hero-aside {
  padding: 1.25rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.88);
  box-shadow: var(--lf-shadow);
}

.lf-landing-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(214, 207, 196, 0.65);
}

.lf-landing-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.lf-landing-stat__value {
  font-family: var(--lf-font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--lf-teal);
  line-height: 1.2;
}

.lf-landing-stat__label {
  font-size: 0.8125rem;
  color: var(--lf-ink-muted);
  line-height: 1.45;
}

.lf-landing-section-title {
  font-family: var(--lf-font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--lf-ink);
  letter-spacing: -0.02em;
}

.lf-landing-section-lead {
  font-size: 1.0625rem;
  color: var(--lf-ink-muted);
  line-height: 1.55;
  max-width: 42rem;
}

.lf-landing-anchor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.lf-landing-anchor-links a {
  color: var(--lf-teal);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.lf-landing-anchor-links a:hover {
  border-bottom-color: rgba(15, 118, 110, 0.45);
}

.lf-landing-cta {
  text-align: center;
}

.lf-landing-cta .lf-landing-section-title {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.lf-landing-shell {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.lf-landing-shell--wide {
  max-width: 80rem;
}

.lf-landing-nav {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lf-ink-muted);
}

@media (min-width: 900px) {
  .lf-landing-nav {
    display: flex;
  }
}

.lf-landing-nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.lf-landing-nav a:hover {
  color: var(--lf-teal);
}

.lf-landing-eyebrow {
  font-family: var(--lf-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-teal);
  font-weight: 600;
}

.lf-landing-display {
  font-family: var(--lf-font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--lf-ink);
}

.lf-landing-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.lf-landing-outcome {
  font-size: 0.8125rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.07);
  color: #134e4a;
  line-height: 1.35;
}

.lf-landing-band {
  border-top: 1px solid var(--lf-line);
  border-bottom: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.72);
  padding: 3.5rem 0;
}

.lf-landing-logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 2.5rem;
  font-family: var(--lf-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: rgba(87, 83, 78, 0.85);
  letter-spacing: -0.02em;
}

.lf-landing-stories {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .lf-landing-stories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.lf-landing-story {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.95);
  box-shadow: var(--lf-shadow);
}

.lf-landing-story blockquote {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--lf-ink);
  flex: 1;
}

.lf-landing-story__metric {
  font-family: var(--lf-font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--lf-teal);
  line-height: 1.1;
}

.lf-landing-story__meta {
  font-size: 0.75rem;
  color: var(--lf-ink-muted);
  line-height: 1.45;
}

.lf-landing-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .lf-landing-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.lf-landing-pillars {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .lf-landing-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.lf-landing-pillar {
  padding: 1.35rem 1.25rem;
  border-radius: 1.15rem;
  border: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.92);
}

.lf-landing-pillar h3 {
  font-family: var(--lf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--lf-ink);
}

.lf-landing-pillar p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--lf-ink-muted);
}

.lf-landing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.lf-landing-tab {
  font-family: var(--lf-font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.9);
  color: var(--lf-ink-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.lf-landing-tab--active,
.lf-landing-tab:hover {
  border-color: rgba(15, 118, 110, 0.45);
  color: var(--lf-teal);
  background: rgba(15, 118, 110, 0.08);
}

.lf-landing-channel-panel {
  padding: 1.75rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--lf-line);
  background: linear-gradient(145deg, rgba(255, 252, 247, 0.98) 0%, rgba(232, 238, 234, 0.55) 100%);
}

.lf-landing-channel-panel h3 {
  font-family: var(--lf-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--lf-ink);
}

.lf-landing-channel-panel p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--lf-ink-muted);
  max-width: 36rem;
}

.lf-landing-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 900px) {
  .lf-landing-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.lf-landing-metric {
  text-align: center;
  padding: 1.35rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--lf-line);
  background: rgba(255, 252, 247, 0.88);
}

.lf-landing-metric__value {
  font-family: var(--lf-font-mono);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  color: var(--lf-teal);
  line-height: 1.1;
}

.lf-landing-metric__label {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--lf-ink-muted);
  line-height: 1.4;
}

.lf-landing-resource-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .lf-landing-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lf-landing-footer {
  margin-top: auto;
  border-top: 1px solid var(--lf-line);
  background: rgba(28, 25, 23, 0.03);
  padding: 3rem 0 2rem;
}

.lf-landing-footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .lf-landing-footer-grid {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  }
}

.lf-landing-footer h3.lf-landing-footer__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-ink-muted);
  margin: 0 0 0.85rem;
}

.lf-landing-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lf-landing-footer a {
  font-size: 0.8125rem;
  color: var(--lf-ink);
  text-decoration: none;
}

.lf-landing-footer a:hover {
  color: var(--lf-teal);
}

.lf-landing-footer__brand {
  font-family: var(--lf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--lf-ink);
  margin: 0 0 0.5rem;
}

.lf-landing-footer__copy {
  font-size: 0.75rem;
  color: var(--lf-ink-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lf-line);
}

.lf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

/* AOP Studio — avoid single-row header crush */
.lf-studio-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 20px;
  flex-shrink: 0;
}

.lf-studio-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
}

.lf-studio-header__workflow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lf-aop-select {
  flex: 1 1 18rem;
  min-width: min(100%, 12rem);
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid var(--lf-line);
  background: var(--lf-panel);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-brand-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

/* Segmented in toolbars must not shrink (flex:1 is for full-width tab bars only) */
.lf-toolbar .lf-segmented {
  flex: 0 0 auto;
}

.lf-toolbar .lf-segmented__btn {
  flex: 0 0 auto;
  min-width: 5.75rem;
  white-space: nowrap;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.lf-auth-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lf-auth-nav__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 4px;
  max-width: 12rem;
}

.lf-auth-nav__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--lf-ink);
  line-height: 1.2;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.lf-auth-nav__role {
  font-family: var(--lf-font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lf-ink-muted);
}

/* —— Buttons —— */
.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 2.25rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}

.lf-btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.45);
  outline-offset: 2px;
}

.lf-btn--secondary {
  background: var(--lf-panel);
  border-color: var(--lf-line);
  color: #44403c;
}

.lf-btn--secondary:hover {
  background: #f5f1ea;
  border-color: #c4bdb2;
  color: var(--lf-ink);
}

.lf-btn--accent {
  background: rgba(194, 65, 12, 0.1);
  border-color: rgba(194, 65, 12, 0.28);
  color: #9a3412;
}

.lf-btn--accent:hover {
  background: rgba(194, 65, 12, 0.16);
}

.lf-btn--success {
  background: rgba(77, 124, 15, 0.1);
  border-color: rgba(77, 124, 15, 0.28);
  color: #3f6212;
}

.lf-btn--success:hover {
  background: rgba(77, 124, 15, 0.16);
}

.lf-btn--brand {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.28);
  color: #115e59;
}

.lf-btn--brand:hover {
  background: rgba(15, 118, 110, 0.16);
}

.lf-btn--primary {
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 4px 14px rgba(15, 118, 110, 0.22);
  min-height: 2.5rem;
  padding-left: 1.125rem;
  padding-right: 1.125rem;
}

.lf-btn--primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 18px rgba(15, 118, 110, 0.28);
}

.lf-btn--primary:active {
  transform: translateY(1px);
}

.lf-btn--danger-soft {
  background: rgba(190, 18, 60, 0.08);
  border-color: rgba(190, 18, 60, 0.22);
  color: #9f1239;
}

.lf-btn--danger-soft:hover {
  background: rgba(190, 18, 60, 0.12);
}

.lf-quick-action {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid var(--lf-line);
  background: var(--lf-panel);
  font-size: 0.75rem;
  font-family: var(--lf-font-mono);
  color: #44403c;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lf-quick-action:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #f5f1ea;
}

.lf-quick-action strong {
  font-weight: 600;
  color: #115e59;
}

/* Segmented control (inspector tabs) */
.lf-segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 0.75rem;
  background: #f5f1ea;
  border: 1px solid var(--lf-line);
}

.lf-segmented__btn {
  flex: 1;
  min-height: 2rem;
  padding: 0.375rem 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  font-family: var(--lf-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: #78716c;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lf-segmented__btn:hover {
  color: var(--lf-ink);
  background: rgba(255, 255, 255, 0.65);
}

.lf-segmented__btn--active {
  background: var(--lf-panel);
  color: #115e59;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

.lf-segmented__btn:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.4);
  outline-offset: 1px;
}

/* Step / status chips */
.lf-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid var(--lf-line);
  background: var(--lf-panel);
  font-family: var(--lf-font-mono);
  font-size: 0.6875rem;
  color: #78716c;
}

.lf-chip--active {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
  color: #115e59;
  font-weight: 600;
}

.lf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3125rem 0.5625rem;
  border-radius: 999px;
  font-family: var(--lf-font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lf-badge--live {
  background: rgba(77, 124, 15, 0.1);
  border: 1px solid rgba(77, 124, 15, 0.25);
  color: #3f6212;
}

.lf-badge--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4d7c0f;
}

.lf-badge--brand {
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.22);
  color: #115e59;
}

.lf-theme .glass-card {
  padding: 1rem 1.125rem;
}

.lf-theme .glass-card.lf-card-lg {
  padding: 1.25rem 1.375rem;
}

.lf-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--lf-line);
  background: rgba(245, 241, 234, 0.85);
}

.lf-stepper {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

@media (min-width: 1024px) {
  .lf-stepper {
    display: flex;
  }
}

.lf-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lf-inspector {
  width: 100%;
  max-width: 28rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.25rem;
  gap: 1rem;
  border-left: 1px solid var(--lf-line);
}

.lf-inspector__title {
  font-family: var(--lf-font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lf-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .lf-workspace {
    flex-direction: column;
  }

  .lf-inspector {
    max-width: none;
    border-left: none;
    border-top: 1px solid var(--lf-line);
    max-height: 42vh;
  }
}

.lf-quick-action.lf-btn--danger-soft {
  border-color: rgba(190, 18, 60, 0.22);
  background: rgba(190, 18, 60, 0.06);
}
.lf-quick-action.lf-btn--danger-soft strong {
  color: #9f1239;
}
