/* FineCart / RetailCenter guides portal — shared theme */

:root {
  --fc-bg: #0a0c12;
  --fc-bg-elevated: #12151f;
  --fc-bg-card: #151a24;
  --fc-border: rgba(255, 255, 255, 0.08);
  --fc-text: #e8eaef;
  --fc-muted: #9aa3b5;
  /* Brand teal (FineCart storefront mark) + sky accents */
  --fc-teal: #14b8a6;
  --fc-teal-soft: rgba(20, 184, 166, 0.22);
  --fc-teal-glow: rgba(20, 184, 166, 0.35);
  --fc-accent: #5eead4;
  --fc-accent-dim: rgba(94, 234, 212, 0.12);
  --fc-brand: #38bdf8;
  --fc-radius: 14px;
  --fc-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fc-text);
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(56, 189, 248, 0.14), transparent 52%),
    radial-gradient(900px 480px at 92% 5%, var(--fc-teal-soft), transparent 48%),
    radial-gradient(800px 420px at 50% 108%, rgba(20, 184, 166, 0.09), transparent 45%),
    var(--fc-bg);
  line-height: 1.6;
}

a {
  color: var(--fc-brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.fc-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 2rem) 3rem;
}

.fc-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin: 0 0 1.5rem;
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
  background: rgba(18, 21, 31, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 2;
}

.fc-header-brand {
  width: 100%;
}

.fc-header-title {
  width: 100%;
}
.fc-header-title h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.fc-header-title p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--fc-muted);
}

.fc-header-title--doc h1 {
  font-size: 1.05rem;
  font-weight: 600;
}
@media (min-width: 480px) {
  .fc-header-title--doc h1 {
    font-size: 1.15rem;
  }
}

.fc-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
a.fc-brand-lockup {
  text-decoration: none !important;
  color: inherit;
}
a.fc-brand-lockup:hover .fc-wordmark-text {
  filter: brightness(1.08);
}

.fc-wordmark-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(92deg, #5eead4, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fc-logo {
  display: block;
}

/* Colored FineCart mark — crisp circle, teal ring */
.fc-logo--symbol {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--fc-teal-glow);
  box-shadow:
    0 0 0 4px var(--fc-teal-soft),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.fc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  padding-top: 0.65rem;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.fc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fc-text);
  background: linear-gradient(145deg, rgba(22, 26, 38, 0.95), rgba(14, 16, 24, 0.85));
  border: 1px solid var(--fc-border);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.fc-pill:hover {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: 0 0 0 1px var(--fc-teal-soft);
  text-decoration: none;
}

.fc-hero {
  padding: 1.5rem 0 0.5rem;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.fc-hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  width: 100%;
  max-width: 44rem;
}
.fc-hero p {
  margin: 0;
  color: var(--fc-muted);
  max-width: 44rem;
  font-size: 1.02rem;
  width: 100%;
}

.fc-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #99f6e4;
  background: linear-gradient(135deg, var(--fc-accent-dim), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(20, 184, 166, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.fc-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(22, 28, 40, 0.98), rgba(12, 14, 22, 0.72));
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--fc-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100%;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.fc-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--fc-radius) var(--fc-radius) 0 0;
  background: linear-gradient(90deg, var(--fc-teal), var(--fc-brand));
  opacity: 0.85;
}
.fc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow:
    var(--fc-shadow),
    0 0 0 1px var(--fc-teal-soft);
}
.fc-card h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.fc-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fc-muted);
  flex: 1;
}
.fc-card .fc-cta {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fc-brand);
}

.fc-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.fc-chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fc-muted);
  background: rgba(18, 21, 31, 0.65);
  border: 1px solid var(--fc-border);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.fc-chip code {
  font-size: 0.85em;
  background: transparent;
  border: none;
  padding: 0;
  color: #c4f1f9;
}

.fc-section {
  margin-top: 2.35rem;
}
.fc-section-head {
  margin-bottom: 1rem;
}
.fc-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.fc-section-lead {
  margin: 0;
  font-size: 0.95rem;
  color: var(--fc-muted);
  max-width: 44rem;
}
.fc-section-lead code {
  font-size: 0.88em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--fc-bg-elevated);
  border: 1px solid var(--fc-border);
}

.fc-grid--readmes {
  margin-top: 1rem;
}

.fc-tools-bar {
  margin-top: 0.75rem;
}

.fc-tools-grid {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.55rem;
}

.fc-tools-grid a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(18, 21, 31, 0.72);
  border: 1px solid var(--fc-border);
  color: var(--fc-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.fc-tools-grid a:hover {
  border-color: rgba(20, 184, 166, 0.45);
  background: rgba(22, 28, 40, 0.9);
}

.fc-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
}

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}
.fc-btn:hover {
  transform: translateY(-1px);
}
.fc-btn--primary {
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4, #2dd4bf);
  box-shadow: 0 8px 22px rgba(20, 184, 166, 0.25);
}
.fc-btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.35);
}

.fc-btn--secondary {
  color: var(--fc-text);
  background: rgba(18, 21, 31, 0.85);
  border: 1px solid var(--fc-border);
  box-shadow: none;
}
.fc-btn--secondary:hover {
  transform: none;
  border-color: rgba(56, 189, 248, 0.45);
  filter: none;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

/* --- Markdown body (viewer) --- */
.fc-article-wrap {
  background: var(--fc-bg-card);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-top: 0.5rem;
}

/* GitHub-style overrides for dark + our palette */
.markdown-body {
  color: var(--fc-text) !important;
  background: transparent !important;
  font-size: 0.98rem;
}
.markdown-body h1,
.markdown-body h2 {
  border-color: var(--fc-border) !important;
}
.markdown-body a {
  color: var(--fc-brand) !important;
}
.markdown-body code,
.markdown-body tt {
  background: var(--fc-bg-elevated) !important;
  border: 1px solid var(--fc-border);
}
.markdown-body pre {
  background: #0a0c12 !important;
  border: 1px solid var(--fc-border) !important;
  border-radius: 10px !important;
}
.markdown-body pre code {
  background: transparent !important;
  border: none !important;
}
.markdown-body blockquote {
  color: var(--fc-muted) !important;
  border-left-color: var(--fc-teal) !important;
  background: rgba(20, 184, 166, 0.06) !important;
  border-radius: 0 10px 10px 0 !important;
}
.markdown-body table tr {
  background: transparent !important;
  border-color: var(--fc-border) !important;
}
.markdown-body table th,
.markdown-body table td {
  border-color: var(--fc-border) !important;
}

.fc-error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(252, 165, 165, 0.4);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.fc-loading {
  color: var(--fc-muted);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .fc-card:hover {
    transform: none;
  }
}
