/* ============================================================
   Copilot Studio → Web App — site styles
   ============================================================ */

:root {
  --bg:            #0b0f17;
  --bg-elev:       #111826;
  --bg-elev-2:     #161f30;
  --line:          #223049;
  --line-soft:     #1a2436;

  --text:          #e6edf7;
  --text-dim:      #9fb0c9;
  --text-faint:    #6b7d99;

  --accent:        #4da3ff;
  --accent-soft:   #1e3a5f;
  --purple:        #a97bff;
  --green:         #3fd68c;
  --amber:         #ffbe4d;
  --red:           #ff6b6b;

  --radius:        14px;
  --radius-sm:     9px;
  --maxw:          1080px;

  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(77,163,255,.13), transparent 60%),
    radial-gradient(700px 500px at 88% 8%, rgba(169,123,255,.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11,15,23,.82);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; gap: 26px;
}
.nav-brand {
  font-weight: 650; font-size: 15px; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
}
.nav-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  flex: none;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }
.nav-gh {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 13px;
  color: var(--text) !important; font-size: 13.5px;
}
.nav-gh:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 64px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft); background: rgba(77,163,255,.07);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  line-height: 1.1; letter-spacing: -.033em; margin: 0 0 22px; font-weight: 700;
}
.hero h1 .grad { color: var(--accent); }
.hero .lede { font-size: 1.2rem; color: var(--text-dim); max-width: 700px; margin: 0 0 20px; }

.verdict {
  margin: 34px 0 0; padding: 22px 26px;
  border: 1px solid rgba(63,214,140,.32);
  background: rgba(63,214,140,.06);
  border-radius: var(--radius-sm);
}
.verdict .lbl {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 680; color: var(--green);
  display: block; margin-bottom: 8px;
}
.verdict strong { color: var(--green); }
.verdict p { margin: 0; }
.verdict p + p { margin-top: 10px; color: var(--text-dim); font-size: .96rem; }

/* ---------- Sections ---------- */
section { padding: 62px 0; border-top: 1px solid var(--line-soft); }
section > .wrap > h2, .sec-h2 {
  font-size: clamp(1.5rem, 3vw, 2.05rem); letter-spacing: -.022em;
  margin: 0 0 12px; font-weight: 680;
}
.sec-num {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  letter-spacing: .07em; display: block; margin-bottom: 9px;
}
.sec-lede { color: var(--text-dim); max-width: 760px; margin: 0 0 34px; font-size: 1.04rem; }

h3 { font-size: 1.16rem; margin: 34px 0 12px; letter-spacing: -.012em; font-weight: 640; }
h4 { font-size: 1rem; margin: 24px 0 8px; color: var(--text); font-weight: 620; }
p { margin: 0 0 15px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 18px; margin: 30px 0; }
.cards.c3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.cards.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: #33486b; transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.07rem; }
.card p  { color: var(--text-dim); font-size: .94rem; margin: 0 0 10px; }
.card .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 5px;
  display: inline-block; margin-bottom: 12px; font-weight: 600;
}
.tag.rec  { background: rgba(63,214,140,.13);  color: var(--green);  border: 1px solid rgba(63,214,140,.3); }
.tag.warn { background: rgba(255,190,77,.12);  color: var(--amber);  border: 1px solid rgba(255,190,77,.28); }
.tag.alt  { background: rgba(159,176,201,.10); color: var(--text-dim); border: 1px solid var(--line); }

.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-dim); font-size: .91rem; }
.card ul li { margin-bottom: 6px; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--bg-elev); }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  background: var(--bg-elev-2); font-weight: 620; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .055em; color: var(--text-dim); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(77,163,255,.035); }
td code, th code { font-size: .87em; }
.yes { color: var(--green); font-weight: 600; }
.no  { color: var(--red);   font-weight: 600; }
.mid { color: var(--amber); font-weight: 600; }

/* ---------- Code ---------- */
pre {
  background: #0a0e16; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 17px 19px;
  overflow-x: auto; font-family: var(--mono); font-size: 13.2px;
  line-height: 1.62; margin: 18px 0;
}
code { font-family: var(--mono); font-size: .88em; }
:not(pre) > code {
  background: var(--bg-elev-2); border: 1px solid var(--line-soft);
  padding: 1.5px 6px; border-radius: 5px; color: #b9d4f5; white-space: nowrap;
}
pre code { background: none; border: none; padding: 0; color: #c9d6e8; white-space: pre; }

.c-com  { color: #5f7085; font-style: italic; }
.c-key  { color: #c191ff; }
.c-str  { color: #8fd98f; }
.c-fn   { color: #6fb7ff; }
.c-num  { color: #ffb86c; }
.c-attr { color: #79d0d0; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius-sm); padding: 15px 19px; margin: 20px 0;
  border: 1px solid; font-size: .95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout .lbl {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 680; display: block; margin-bottom: 6px;
}
.callout.warn  { border-color: rgba(255,190,77,.3);  background: rgba(255,190,77,.06); }
.callout.warn .lbl  { color: var(--amber); }
.callout.info  { border-color: rgba(77,163,255,.3);  background: rgba(77,163,255,.06); }
.callout.info .lbl  { color: var(--accent); }
.callout.good  { border-color: rgba(63,214,140,.3);  background: rgba(63,214,140,.06); }
.callout.good .lbl  { color: var(--green); }
.callout.bad   { border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.06); }
.callout.bad .lbl   { color: var(--red); }

/* ---------- Diagram ---------- */
.diagram {
  background: #0a0e16; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; overflow-x: auto; margin: 26px 0;
}
.diagram pre {
  background: none; border: none; padding: 0; margin: 0;
  font-size: 12.3px; line-height: 1.42; color: var(--text-dim);
}

/* ---------- Steps ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0; }
.steps > li {
  counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 20px;
}
.steps > li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps > li strong { display: block; margin-bottom: 3px; }
.steps > li p { color: var(--text-dim); font-size: .94rem; margin: 0; }

/* ---------- Source cite ---------- */
.src {
  font-size: .82rem; color: var(--text-faint); margin-top: -6px; margin-bottom: 20px;
  font-family: var(--mono);
}
.src a { color: var(--text-faint); text-decoration: underline; text-underline-offset: 2px; }
.src a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line-soft); padding: 46px 0 60px;
  color: var(--text-faint); font-size: .89rem;
}
footer h4 { color: var(--text-dim); margin-top: 0; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .07em; font-family: var(--mono); }
footer a { color: var(--text-dim); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 30px; margin-bottom: 34px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 7px; }
.foot-bottom { border-top: 1px solid var(--line-soft); padding-top: 22px; }

/* ---------- Misc ---------- */
.pill {
  font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 640; white-space: nowrap;
}
.pill.ga      { background: rgba(63,214,140,.13); color: var(--green); }
.pill.beta    { background: rgba(255,190,77,.13); color: var(--amber); }
.pill.preview { background: rgba(169,123,255,.14); color: var(--purple); }
.pill.legacy  { background: rgba(159,176,201,.1); color: var(--text-faint); }

hr { border: none; border-top: 1px solid var(--line-soft); margin: 34px 0; }

ul.clean { list-style: none; padding-left: 0; }
ul.clean li { padding-left: 24px; position: relative; margin-bottom: 9px; color: var(--text-dim); }
ul.clean li::before { content: "▸"; position: absolute; left: 6px; color: var(--accent); }

@media (max-width: 720px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-gh) { display: none; }
  .hero { padding: 58px 0 44px; }
  section { padding: 46px 0; }
}
