/* CCE's visual layer keeps Material's accessibility and navigation behavior. */
:root {
  --md-primary-fg-color: #123f3a;
  --md-primary-fg-color--light: #23675b;
  --md-primary-fg-color--dark: #0b2927;
  --md-accent-fg-color: #c95e3d;
  --md-typeset-a-color: #146d5c;
  --cce-ink: #172b2a;
  --cce-muted: #526665;
  --cce-forest: #123f3a;
  --cce-deep: #0b2927;
  --cce-mint: #bcebd6;
  --cce-bright: #7ce0b8;
  --cce-coral: #e87955;
  --cce-paper: #fbfcf8;
  --cce-surface: #f0f5ef;
  --cce-line: #d9e2dc;
  --cce-card: #ffffff;
  --cce-shadow: 0 18px 50px rgba(17, 50, 45, 0.1);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #123f3a;
  --md-primary-fg-color--light: #23675b;
  --md-primary-fg-color--dark: #071f1d;
  --md-accent-fg-color: #f09472;
  --md-typeset-a-color: #8ce3bd;
  --cce-ink: #e7f0eb;
  --cce-muted: #aec1ba;
  --cce-surface: #1e302e;
  --cce-line: #354946;
  --cce-card: #223634;
  --cce-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.md-grid { max-width: 76rem; }
.md-header { box-shadow: none; }
.md-header__title { letter-spacing: -0.02em; }
.md-header__button.md-logo img { height: 1.5rem; }
.md-tabs { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.md-tabs__link--active { font-weight: 700; }
.md-typeset h1, .md-typeset h2, .md-typeset h3 { letter-spacing: -0.025em; }
.md-typeset h1 { font-weight: 700; }
.md-typeset h2 { margin-top: 2.2em; font-weight: 650; }
.md-typeset h3 { font-weight: 650; }
.md-typeset a { text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.md-typeset .admonition, .md-typeset details { border-radius: 8px; box-shadow: none; }
.md-typeset .highlight { border-radius: 10px; }
.md-typeset pre > code { font-size: 0.82rem; }
.md-typeset table:not([class]) { border: 1px solid var(--cce-line); border-radius: 8px; box-shadow: none; }
.md-typeset table:not([class]) th { background: var(--cce-surface); }

.cce-home { color: var(--cce-ink); }
.cce-home p { line-height: 1.65; }
.cce-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 3.5rem;
  overflow: hidden;
  margin-top: 1.4rem;
  padding: 4rem;
  color: #f4fbf7;
  background: var(--cce-deep);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 50, 45, 0.16);
}
.cce-hero::after {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -250px;
  top: -240px;
  border: 1px solid rgba(188, 235, 214, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(188, 235, 214, 0.035), 0 0 0 140px rgba(188, 235, 214, 0.025);
  content: "";
  pointer-events: none;
}
.cce-hero-copy { position: relative; z-index: 1; }
.cce-eyebrow {
  margin: 0 0 1rem;
  color: #23725e;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}
.cce-hero .cce-eyebrow, .cce-final-cta .cce-eyebrow { color: var(--cce-bright); }
.cce-home .cce-hero h1 {
  margin: 0 0 1.2rem;
  color: #ffffff;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.04;
}
.cce-hero-lede { margin-bottom: 1.6rem; color: #c5d8d0; font-size: 1rem; }
.cce-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cce-home .cce-button { margin: 0; border-radius: 8px; box-shadow: none; font-weight: 700; }
.cce-home .md-button--primary { color: var(--cce-deep); background: var(--cce-bright); border-color: var(--cce-bright); }
.cce-home .md-button--primary:hover { background: var(--cce-mint); border-color: var(--cce-mint); }
.cce-home .cce-button-light { color: #f4fbf7; background: transparent; border-color: #76988d; }
.cce-home .cce-button-light:hover { background: rgba(255, 255, 255, 0.08); }
.md-typeset .cce-hero-notes { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin: 1.5rem 0 0; padding: 0; color: #b8cec5; font-size: 0.67rem; list-style: none; }
.md-typeset .cce-hero-notes li { list-style: none; }
.cce-hero-notes li::before { margin-right: 0.35rem; color: var(--cce-bright); content: "✓"; font-weight: 800; }

.cce-terminal { position: relative; z-index: 1; overflow: hidden; color: #e9f5ef; background: #071f1d; border: 1px solid #35554d; border-radius: 14px; box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25); }
.cce-terminal-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1rem; background: #173b35; border-bottom: 1px solid #35554d; }
.cce-terminal-bar > span { width: 0.55rem; height: 0.55rem; background: #e87955; border-radius: 50%; }
.cce-terminal-bar > span:nth-child(2) { background: #e7bf62; }
.cce-terminal-bar > span:nth-child(3) { background: #7ce0b8; }
.cce-terminal-bar strong { margin-left: auto; color: #b5cdc3; font-family: var(--md-code-font); font-size: 0.58rem; font-weight: 500; }
.cce-terminal-body { padding: 0.35rem 0; }
.cce-terminal-body .highlight { margin: 0; background: transparent; border-radius: 0; }
.md-typeset .cce-terminal-body .highlight pre { margin: 0; background: #071f1d; }
.md-typeset .cce-terminal-body .highlight pre > code { color: #e9f5ef; background: transparent; font-size: 0.7rem; }
.md-typeset .cce-terminal-body .highlight code span { color: #e9f5ef; }
.cce-terminal-body .md-annotation { display: none; }
.cce-terminal-result { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.8rem; padding: 1rem 1.2rem; background: #102e2a; border-top: 1px solid #35554d; }
.cce-terminal-result p { margin: 0; color: #c5d8d0; font-size: 0.61rem; }
.cce-terminal-result span { margin-right: 0.3rem; color: var(--cce-bright); }

.cce-language-strip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.7rem 1.6rem; padding: 1.6rem 1rem; color: var(--cce-muted); border-bottom: 1px solid var(--cce-line); font-size: 0.72rem; }
.cce-language-strip > span { font-weight: 700; }
.cce-language-strip i { width: 1px; height: 1rem; background: var(--cce-line); }
.cce-language-strip strong { color: var(--md-typeset-a-color); font-size: 0.64rem; letter-spacing: 0.06em; }
.cce-section { padding: 4.5rem 0 1.5rem; }
.cce-section-heading { max-width: 47rem; margin-bottom: 2rem; }
.cce-home .cce-section-heading h2, .cce-home .cce-split h2, .cce-home .cce-final-cta h2 { margin: 0 0 0.8rem; color: var(--cce-ink); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; }
.cce-section-heading > p:last-child { max-width: 43rem; color: var(--cce-muted); font-size: 0.9rem; }
.cce-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cce-home .cce-card { display: flex; min-height: 14.5rem; flex-direction: column; padding: 1.5rem; color: var(--cce-ink); background: var(--cce-card); border: 1px solid var(--cce-line); border-radius: 14px; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.cce-home .cce-card:hover { border-color: #80b9a5; box-shadow: var(--cce-shadow); transform: translateY(-3px); }
.cce-card-number { margin-bottom: 1.6rem; color: var(--cce-coral); font-family: var(--md-code-font); font-size: 0.65rem; font-weight: 800; }
.cce-home .cce-card h3 { margin: 0 0 0.7rem; font-size: 1.05rem; line-height: 1.25; }
.cce-home .cce-card p { margin-bottom: 1.2rem; color: var(--cce-muted); font-size: 0.75rem; }
.cce-home .cce-card strong { margin-top: auto; color: var(--md-typeset-a-color); font-size: 0.7rem; }
.cce-examples { padding-bottom: 1rem; }
.cce-examples + * { margin-top: 0; }
.cce-inline-link { font-size: 0.75rem; font-weight: 700; }
.cce-home ~ .tabbed-set { border: 1px solid var(--cce-line); border-radius: 12px; }
.md-typeset .tabbed-labels { padding: 0 0.8rem; background: var(--cce-surface); border-radius: 12px 12px 0 0; }
.md-typeset .cce-home ~ .tabbed-set .tabbed-labels { box-sizing: border-box; width: 100%; margin: 0; }
.md-typeset .tabbed-labels > label { font-size: 0.7rem; font-weight: 700; }
.md-typeset .tabbed-content { border-radius: 0 0 12px 12px; }
.md-typeset .tabbed-block { padding: 0.2rem 0.5rem; }
.md-typeset .tabbed-block > p:last-child { padding-inline: 0.5rem; }

.cce-split { display: grid; grid-template-columns: 0.85fr 1.15fr; align-items: center; gap: 4rem; }
.cce-split > div > p:not(.cce-eyebrow) { color: var(--cce-muted); }
.cce-output-panel { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: var(--cce-card); border: 1px solid var(--cce-line); border-radius: 14px; box-shadow: var(--cce-shadow); }
.cce-output-panel > div { display: grid; gap: 0.25rem; padding: 1.2rem; border-bottom: 1px solid var(--cce-line); }
.cce-output-panel > div:nth-child(odd) { border-right: 1px solid var(--cce-line); }
.cce-output-panel > div:nth-last-child(-n+2) { border-bottom: 0; }
.cce-output-panel strong { font-size: 0.76rem; }
.cce-output-panel span { color: var(--cce-muted); font-size: 0.65rem; }
.cce-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 4rem; padding: 2rem; background: var(--cce-surface); border-radius: 14px; }
.cce-principles strong { font-size: 0.76rem; }
.cce-principles p { margin: 0.45rem 0 0; color: var(--cce-muted); font-size: 0.68rem; }
.cce-final-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 4rem; padding: 2.5rem; color: #ffffff; background: var(--cce-deep); border-radius: 16px; }
.cce-final-cta > div:first-child { max-width: 42rem; }
.cce-home .cce-final-cta h2 { color: #ffffff; }
.cce-final-cta .cce-actions { flex-shrink: 0; }
.cce-final-cta .cce-button:not(.md-button--primary) { color: #ffffff; border-color: #7b968d; }
.cce-home .cce-limitations-link, .cce-limitations-link { display: inline-block; margin-top: 1.4rem; color: var(--cce-muted); font-size: 0.68rem; }

/* Capability chooser is shared with the examples page. */
.cce-task-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1.8rem 0 2.5rem; }
.md-typeset .cce-task-grid a { display: grid; gap: 0.25rem; padding: 1.1rem; color: var(--cce-ink); background: var(--cce-card); border: 1px solid var(--cce-line); border-radius: 10px; }
.md-typeset .cce-task-grid a:hover { border-color: var(--md-typeset-a-color); box-shadow: var(--cce-shadow); }
.cce-task-grid strong { font-size: 0.78rem; }
.cce-task-grid span { color: var(--cce-muted); font-size: 0.65rem; }

@media screen and (max-width: 1100px) {
  .cce-hero { grid-template-columns: 1fr 0.9fr; gap: 2rem; padding: 2.5rem; }
  .cce-card-grid { grid-template-columns: repeat(2, 1fr); }
  .cce-split { gap: 2rem; }
  .cce-final-cta { align-items: flex-start; flex-direction: column; }
}

@media screen and (max-width: 760px) {
  .cce-hero { grid-template-columns: 1fr; gap: 2.5rem; margin-top: 0.8rem; padding: 2rem; border-radius: 16px; }
  .cce-home .cce-hero h1 { font-size: 2.55rem; }
  .cce-terminal { max-width: 34rem; }
  .cce-section { padding-top: 3.2rem; }
  .cce-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .cce-principles { grid-template-columns: 1fr; gap: 1.2rem; }
  .cce-task-grid { grid-template-columns: repeat(2, 1fr); }
  .cce-language-strip i { display: none; }
}

@media screen and (max-width: 480px) {
  .cce-hero { padding: 1.5rem; }
  .cce-home .cce-hero h1 { font-size: 2.2rem; }
  .cce-actions { align-items: stretch; flex-direction: column; }
  .cce-actions .md-button { text-align: center; }
  .cce-terminal-result { grid-template-columns: 1fr; }
  .cce-card-grid, .cce-task-grid { grid-template-columns: 1fr; }
  .cce-home .cce-card { min-height: 0; }
  .cce-output-panel { grid-template-columns: 1fr; }
  .cce-output-panel > div, .cce-output-panel > div:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--cce-line); }
  .cce-output-panel > div:last-child { border-bottom: 0; }
  .cce-final-cta { padding: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cce-home .cce-card { transition: none; }
}
