/* ==========================================================================
   EASY AMADEUS - CONTENT PAGES (LEARN / ARTICLES / ABOUT / CONTACT / DEMO)
   Reuses tokens from style.css and components from landing.css.
   All selectors are prefixed with .ct-
   ========================================================================== */

.ct-page {
  background: var(--bg-main);
}

.ct-main {
  flex: 1 0 auto;
}

/* ---------- Skip link (accessibility) ---------- */
.ct-skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--brand-dark);
  color: #ffffff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
}

.ct-skip:focus {
  inset-inline-start: 1rem;
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.ct-header .nav-container {
  gap: 0.85rem;
}

.ct-nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem;
}

.ct-nav .nav-btn {
  white-space: nowrap;
  text-decoration: none;
}

.ct-nav .nav-btn.active {
  color: var(--brand-dark);
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
}

body.dark-mode .ct-nav .nav-btn.active {
  color: var(--brand-accent);
}

.ct-lang-btn {
  flex-shrink: 0;
  font-family: 'Inter', 'Cairo', system-ui, sans-serif;
  color: var(--text-main);
}

/* ---------- Buttons ---------- */
.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.ct-btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-medium));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.24);
}

.ct-btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-forest), var(--brand-primary));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.32);
}

.ct-btn-ghost {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.ct-btn-ghost:hover {
  border-color: var(--brand-accent);
  color: var(--brand-primary);
  background: var(--brand-light);
}

.ct-btn-sm {
  padding: 0.58rem 0.95rem;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.ct-hero {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.9rem 0 1.9rem;
  text-align: center;
}

.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
  color: var(--brand-primary);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 0.9rem;
}

.ct-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  line-height: 1.28;
  color: var(--brand-dark);
  letter-spacing: -0.4px;
  margin-bottom: 0.7rem;
}

.ct-hero-sub {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.85;
}

.ct-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.ct-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Breadcrumbs ---------- */
.ct-crumbs {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ct-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.ct-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ct-crumbs li + li::before {
  content: "›";
  color: var(--border-strong);
  font-weight: 800;
}

body[dir="ltr"] .ct-crumbs li + li::before {
  content: "›";
}

.ct-crumbs a {
  color: var(--text-muted);
  font-weight: 700;
}

.ct-crumbs a:hover {
  color: var(--brand-primary);
}

.ct-crumbs [aria-current="page"] {
  color: var(--text-main);
  font-weight: 800;
}

/* ---------- Article layout ---------- */
.ct-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding-bottom: 3.5rem;
}

.ct-toc {
  position: sticky;
  top: 92px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow-sm);
}

.ct-toc h2 {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.ct-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: ctToc;
}

.ct-toc li {
  counter-increment: ctToc;
}

.ct-toc a {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.38rem 0.3rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
}

.ct-toc a::before {
  content: counter(ctToc);
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.ct-toc a:hover {
  color: var(--brand-primary);
  background: var(--brand-light);
}

.ct-toc a:hover::before {
  background: var(--brand-tint);
  color: var(--brand-dark);
}

.ct-article {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 2.6rem);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.ct-article section {
  scroll-margin-top: 96px;
}

.ct-article section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border-light);
}

.ct-lead {
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.ct-article h2 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1.45;
  color: var(--brand-dark);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.ct-article h2 .num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d472a, #15803d);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.ct-article h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-forest);
  margin: 1.25rem 0 0.45rem;
}

.ct-article p {
  font-size: 0.96rem;
  line-height: 1.95;
  color: var(--text-main);
}

.ct-article p + p {
  margin-top: 0.7rem;
}

.ct-article ul,
.ct-article ol {
  margin: 0.6rem 0 1rem;
  padding-inline-start: 1.4rem;
}

.ct-article li {
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 0.45rem;
}

.ct-article li::marker {
  color: var(--brand-accent);
  font-weight: 700;
}

.ct-article strong {
  color: var(--brand-dark);
  font-weight: 800;
}

.ct-article a {
  color: var(--brand-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}

.ct-article a:hover {
  color: var(--brand-medium);
}

.ct-article code {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.84em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--brand-forest);
  font-weight: 700;
}

body.dark-mode .ct-article code {
  color: var(--brand-accent);
}

/* ---------- Command blocks ---------- */
.ct-cmd {
  direction: ltr;
  text-align: left;
  background: #04140c;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0.9rem 0 1.15rem;
  box-shadow: 0 12px 28px rgba(4, 20, 12, 0.18);
}

.ct-cmd-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background: #0a2417;
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.7px;
  color: #4ade80;
  text-transform: uppercase;
}

.ct-cmd-head::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 14px 0 0 #f59e0b, 28px 0 0 #ef4444;
  margin-inline-end: 26px;
}

.ct-cmd pre {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.9;
  color: #86efac;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.ct-cmd .in {
  color: #ffffff;
  font-weight: 700;
}

.ct-cmd .in::before {
  content: "> ";
  color: #22c55e;
  font-weight: 700;
}

.ct-cmd .out {
  color: #5f9670;
}

.ct-cmd .ok {
  color: #34d399;
  font-weight: 700;
}

.ct-cmd .err {
  color: #f87171;
  font-weight: 700;
}

/* ---------- Callouts ---------- */
.ct-tip,
.ct-warn {
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  margin: 1rem 0 1.15rem;
  font-size: 0.93rem;
  line-height: 1.85;
}

.ct-tip {
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
  border-inline-start: 4px solid var(--brand-accent);
}

.ct-warn {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
  border-inline-start: 4px solid #f59e0b;
  color: var(--warning-text);
}

.ct-tip strong,
.ct-warn strong {
  font-weight: 900;
}

body.dark-mode .ct-tip {
  background: rgba(34, 197, 94, 0.08);
}

body.dark-mode .ct-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

/* ---------- Tables ---------- */
.ct-table-wrap {
  overflow-x: auto;
  margin: 0.9rem 0 1.2rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.ct-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.9rem;
}

.ct-table th,
.ct-table td {
  padding: 0.65rem 0.8rem;
  text-align: start;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  line-height: 1.7;
}

.ct-table th {
  background: var(--bg-subtle);
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ct-table tr:last-child td {
  border-bottom: none;
}

.ct-table code {
  white-space: nowrap;
}

body.dark-mode .ct-table th {
  color: var(--brand-accent);
}

/* ---------- Numbered steps ---------- */
.ct-steps {
  list-style: none;
  counter-reset: ctStep;
  padding: 0;
  margin: 1rem 0;
}

.ct-steps li {
  counter-increment: ctStep;
  position: relative;
  padding-inline-start: 2.6rem;
  margin-bottom: 0.9rem;
  min-height: 30px;
}

.ct-steps li::before {
  content: counter(ctStep);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d472a, #15803d);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Article footer / related ---------- */
.ct-article-footer {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ct-updated {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ct-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ct-tags li {
  margin: 0;
}

.ct-tag {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.ct-related {
  padding: 0 0 3.5rem;
}

.ct-related h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--brand-dark);
  margin-bottom: 1rem;
}

/* ---------- Card grids ---------- */
.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.ct-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ct-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ct-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-tint);
  box-shadow: var(--shadow-lg);
}

.ct-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

.ct-card h3 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.ct-card p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-muted);
  flex: 1 1 auto;
}

.ct-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.ct-card:hover .ct-card-link {
  gap: 0.55rem;
}

.ct-card-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--brand-primary);
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.6rem;
  align-self: flex-start;
}

.ct-card-meta {
  margin-top: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------- Section blocks ---------- */
.ct-section {
  padding: 0 0 3.5rem;
}

.ct-section-head {
  max-width: 680px;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.ct-section-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 900;
  color: var(--brand-dark);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.ct-section-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ---------- About page ---------- */
.ct-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
}

.ct-about-copy h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-dark);
  margin: 1.6rem 0 0.6rem;
}

.ct-about-copy h2:first-child {
  margin-top: 0;
}

.ct-about-copy p {
  font-size: 0.96rem;
  line-height: 1.95;
  color: var(--text-main);
}

.ct-about-copy p + p {
  margin-top: 0.7rem;
}

.ct-about-copy ul {
  margin: 0.6rem 0 0.9rem;
  padding-inline-start: 1.4rem;
}

.ct-about-copy li {
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 0.4rem;
}

.ct-facts {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 96px;
}

.ct-facts h2 {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.ct-facts dl {
  margin: 0;
}

.ct-facts dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.ct-facts dt:first-child {
  margin-top: 0;
}

.ct-facts dd {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.6;
}

.ct-facts .ct-btn {
  width: 100%;
  margin-top: 1.2rem;
}

/* ---------- Contact page ---------- */
.ct-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.4rem;
  padding-bottom: 3rem;
}

.ct-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.ct-contact-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.ct-contact-card p {
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.ct-contact-card .ct-btn {
  margin-top: 1rem;
}

.ct-mail {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-primary);
  word-break: break-all;
}

.ct-contact-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.ct-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

.ct-contact-list li:last-child {
  border-bottom: none;
}

.ct-contact-list .ico {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--brand-light);
  border: 1px solid var(--brand-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.ct-contact-note {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.ct-contact-note strong {
  color: var(--text-main);
}

/* ---------- WhatsApp contact band ---------- */
.ct-wa-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.1rem 1.6rem;
  margin-bottom: 1.4rem;
  border-inline-start: 4px solid #25d366;
}

.ct-wa-body {
  flex: 1 1 320px;
  min-width: 0;
}

.ct-wa-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ct-wa-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: #e7f9ee;
  border: 1px solid #b7e4c7;
}

.ct-wa-head h2 {
  margin-bottom: 0.25rem;
}

.ct-wa-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ct-wa-actions .ct-btn {
  margin-top: 0;
}

.ct-wa-number {
  direction: ltr;
  unicode-bidi: embed;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 0.02em;
}

body.dark-mode .ct-wa-icon {
  background: #0f2e22;
  border-color: #1c5c43;
}

/* ---------- Demo page ---------- */
.ct-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;
}

.ct-demo-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  padding-bottom: 3rem;
}

.ct-term {
  direction: ltr;
  text-align: left;
  background: #04140c;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(4, 20, 12, 0.3);
}

.ct-term-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  background: #0a2417;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.8px;
  color: #4ade80;
}

.ct-term-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.ct-term-bar .dot.red { background: #ef4444; }
.ct-term-bar .dot.yellow { background: #f59e0b; }
.ct-term-bar .dot.green { background: #22c55e; }

.ct-term-bar .title {
  margin-inline-start: auto;
  opacity: 0.85;
}

.ct-term-out {
  height: 340px;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.85;
  color: #86efac;
  scrollbar-width: thin;
  scrollbar-color: #1d5c3a #04140c;
}

.ct-term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.ct-term-line.cmd {
  color: #ffffff;
  margin-top: 0.35rem;
}

.ct-term-line.cmd::before {
  content: "> ";
  color: #22c55e;
  font-weight: 700;
}

.ct-term-line.dim {
  color: #5f9670;
}

.ct-term-line.ok {
  color: #34d399;
  font-weight: 700;
}

.ct-term-line.err {
  color: #f87171;
  font-weight: 700;
}

.ct-term-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
  background: #071a10;
  padding: 0.55rem 0.75rem;
}

.ct-term-form .prompt {
  color: #22c55e;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.9rem;
}

.ct-term-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 0.35rem 0;
  text-transform: uppercase;
}

.ct-term-input::placeholder {
  color: #3f6b4f;
  text-transform: none;
}

.ct-term-form button {
  flex-shrink: 0;
  background: #22c55e;
  color: #04140c;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ct-term-form button:hover {
  background: #4ade80;
}

.ct-demo-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ct-demo-side h2 {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ct-chips li {
  margin: 0;
}

.ct-chip {
  direction: ltr;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  color: var(--brand-forest);
  cursor: pointer;
  transition: var(--transition);
}

.ct-chip:hover,
.ct-chip:focus-visible {
  border-color: var(--brand-accent);
  background: var(--brand-light);
  color: var(--brand-dark);
}

body.dark-mode .ct-chip {
  color: var(--brand-accent);
}

.ct-demo-note {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.ct-demo-note p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.ct-demo-note .ct-btn {
  width: 100%;
  margin-top: 0.9rem;
}

/* ---------- Footer ---------- */
.ct-footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ---------- CTA band (shared) ---------- */
.ct-cta {
  padding: 3.25rem 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.28) 0%, transparent 45%),
    linear-gradient(135deg, var(--brand-dark), var(--brand-forest));
}

.ct-cta-inner {
  max-width: 720px;
  text-align: center;
}

.ct-cta h2 {
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.ct-cta p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  margin-bottom: 1.4rem;
}

/* ---------- Focus visibility ---------- */
.ct-page a:focus-visible,
.ct-page button:focus-visible,
.ct-page input:focus-visible,
.ct-page summary:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ct-page *,
  .ct-page *::before,
  .ct-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Dark mode tweaks ---------- */
body.dark-mode .ct-hero h1,
body.dark-mode .ct-section-head h2,
body.dark-mode .ct-card h3,
body.dark-mode .ct-article h2,
body.dark-mode .ct-related h2,
body.dark-mode .ct-about-copy h2,
body.dark-mode .ct-contact-card h2 {
  color: #4ade80;
}

body.dark-mode .ct-article h3 {
  color: var(--brand-accent);
}

body.dark-mode .ct-article strong,
body.dark-mode .ct-about-copy strong {
  color: #86efac;
}

body.dark-mode .ct-btn-ghost {
  background: var(--bg-surface);
  color: var(--text-main);
}

body.dark-mode .ct-contact-note {
  background: var(--bg-subtle);
}

body.dark-mode .ct-facts,
body.dark-mode .ct-contact-card,
body.dark-mode .ct-demo-note,
body.dark-mode .ct-toc {
  background: var(--bg-card);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-about-grid,
  .ct-demo-wrap {
    grid-template-columns: 1fr;
  }

  .ct-facts {
    position: static;
  }
}

@media (max-width: 980px) {
  .ct-layout {
    grid-template-columns: 1fr;
  }

  .ct-toc {
    position: static;
    order: 2;
  }
}

@media (max-width: 900px) {
  .ct-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ct-footer-grid .lp-footer-brand {
    grid-column: 1 / -1;
  }

  .ct-header .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    gap: 0.5rem;
  }

  .ct-header .brand-link {
    flex: 1 1 auto;
  }

  .ct-header .nav-actions {
    order: 2;
  }

  .ct-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

@media (max-width: 760px) {
  .ct-hero {
    padding-top: 1.9rem;
    text-align: start;
  }

  .ct-hero-sub {
    margin-inline: 0;
  }

  .ct-meta {
    justify-content: flex-start;
  }

  .ct-contact-grid {
    grid-template-columns: 1fr;
  }

  .ct-article h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  .ct-grid,
  .ct-grid-2 {
    grid-template-columns: 1fr;
  }

  .ct-cmd pre {
    font-size: 0.74rem;
  }

  .ct-term-out {
    height: 300px;
    font-size: 0.74rem;
  }

  .ct-term-bar .title {
    display: none;
  }
}

@media (max-width: 420px) {
  .ct-nav .nav-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
  }

  .ct-header .nav-actions .ct-btn {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }
}
