
.amde-grid-lesson {
  --ink: #182033;
  --muted: #596579;
  --line: #dce3ed;
  --blue: #2855d9;
  --lime: #b8f34b;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.65;
}
.amde-grid-lesson * { box-sizing: border-box; }
.amde-grid-lesson h1,
.amde-grid-lesson h2,
.amde-grid-lesson h3 { line-height: 1.2; }
.amde-grid-lesson .ag-hero {
  background: #111827;
  color: #fff;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 18px;
  margin-bottom: 30px;
}
.amde-grid-lesson .ag-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 12px 0 18px;
}
.amde-grid-lesson .ag-hero p { color: #e3e9f3; }
.amde-grid-lesson .ag-eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 10px;
}
.amde-grid-lesson .ag-hero .ag-eyebrow { color: var(--lime); }
.amde-grid-lesson .ag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.amde-grid-lesson .ag-chip {
  border: 1px solid #566176;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .82rem;
  color: #fff;
}
.amde-grid-lesson .ag-section { margin: 34px 0; }
.amde-grid-lesson .ag-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin: 8px 0 16px;
}
.amde-grid-lesson .ag-section h3 { margin-top: 20px; }
.amde-grid-lesson .ag-muted { color: var(--muted); }
.amde-grid-lesson .ag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.amde-grid-lesson .ag-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
}
.amde-grid-lesson .ag-card h3 { margin-top: 8px; }
.amde-grid-lesson .ag-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 900;
}
.amde-grid-lesson .ag-callout {
  background: #edf3ff;
  border-left: 5px solid var(--blue);
  padding: 18px 20px;
  border-radius: 10px;
  margin: 22px 0;
}
.amde-grid-lesson .ag-callout.ag-green {
  background: #f2fbe4;
  border-color: #83b72b;
}
.amde-grid-lesson .ag-callout.ag-yellow {
  background: #fff8dc;
  border-color: #e5b52e;
}
.amde-grid-lesson .ag-code {
  background: #111827;
  color: #e6edf7;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
  line-height: 1.65;
  margin: 12px 0 20px;
  tab-size: 2;
}
.amde-grid-lesson .ag-code code {
  font-family: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
}
.amde-grid-lesson .ag-tag { color: #ff9b78; }
.amde-grid-lesson .ag-attr { color: #80dcf3; }
.amde-grid-lesson .ag-value { color: #d6c0ff; }
.amde-grid-lesson .ag-text { color: #fff1a8; }
.amde-grid-lesson .ag-comment { color: #9cafaa; }
.amde-grid-lesson .ag-css-prop { color: #80dcf3; }
.amde-grid-lesson .ag-css-value { color: #d6c0ff; }
.amde-grid-lesson .ag-code-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 5px 9px;
  margin-top: 12px;
}
.amde-grid-lesson .ag-html-label {
  background: #ffe9df;
  color: #8c351a;
}
.amde-grid-lesson .ag-css-label {
  background: #e1eaff;
  color: #1e43ad;
}
.amde-grid-lesson .ag-inline {
  background: #edf0f5;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
  overflow-wrap: anywhere;
}
.amde-grid-lesson .ag-steps li,
.amde-grid-lesson .ag-checklist li {
  margin-bottom: 9px;
}
.amde-grid-lesson a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.amde-grid-lesson .ag-demo-link {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 9px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  margin: 4px 4px 4px 0;
}
.amde-grid-lesson .ag-demo-link:hover {
  background: #183ca9;
}
.amde-grid-lesson .ag-image-demo {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f7f9fc;
  margin: 16px 0;
}
.amde-grid-lesson .ag-image-demo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
}
.amde-grid-lesson .ag-image-demo figcaption {
  font-size: .88rem;
  color: var(--muted);
  margin-top: 10px;
}
.amde-grid-lesson .ag-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 38px;
  color: var(--muted);
  font-size: .9rem;
}
@media (max-width: 600px) {
  .amde-grid-lesson .ag-hero { padding: 24px 20px; }
  .amde-grid-lesson .ag-code {
    font-size: .8rem;
    padding: 15px;
  }
  .amde-grid-lesson .ag-card { padding: 16px; }
}



/* AMDE 155 Week 04 — scoped styles. Keep these inside .amde-grid-lesson. */
.amde-grid-lesson {
  --ag-ink: #20252b; --ag-muted: #66717d; --ag-paper: #fff;
  --ag-soft: #f4f6f8; --ag-line: #dce2e8; --ag-accent: #5d49c7;
  --ag-green: #e9f6ef; --ag-yellow: #fff4d8;
  max-width: 980px; margin: 0 auto; color: var(--ag-ink);
  font-family: inherit; font-size: 1rem; line-height: 1.7;
  overflow-wrap: anywhere;
}
.amde-grid-lesson *, .amde-grid-lesson *::before, .amde-grid-lesson *::after { box-sizing: border-box; }
.amde-grid-lesson h1, .amde-grid-lesson h2, .amde-grid-lesson h3 { color: var(--ag-ink); line-height: 1.2; margin: 0 0 .75rem; }
.amde-grid-lesson h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); letter-spacing: -.045em; }
.amde-grid-lesson h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.025em; }
.amde-grid-lesson h3 { font-size: 1.18rem; margin-top: 1.2rem; }
.amde-grid-lesson p { margin: 0 0 1rem; }
.amde-grid-lesson ul, .amde-grid-lesson ol { padding-left: 1.5rem; }
.amde-grid-lesson li { margin: .4rem 0; }
.amde-grid-lesson .ag-hero { padding: clamp(1.5rem, 5vw, 3.75rem); border: 1px solid #14263d; border-radius: 12px; background: #14263d; color: #f5f7fb; margin: 1rem 0 2rem; }
.amde-grid-lesson .ag-hero h1 { color: #fff; }
.amde-grid-lesson .ag-hero > p:not(.ag-eyebrow) { max-width: 700px; color: #cbd7e4; font-size: 1.12rem; }
.amde-grid-lesson .ag-eyebrow { color: var(--ag-accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem; }
.amde-grid-lesson .ag-hero .ag-eyebrow { color: #ff9f43; }
.amde-grid-lesson .ag-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.amde-grid-lesson .ag-chip { display: inline-block; border: 1px solid #667085; border-radius: 999px; padding: .3rem .75rem; color: #fff; font-size: .82rem; }
.amde-grid-lesson .ag-section { margin: 1.75rem 0; padding: clamp(1.25rem, 4vw, 2.1rem); background: #fff; border: 1px solid var(--ag-line); border-radius: 16px; }
.amde-grid-lesson .ag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.amde-grid-lesson .ag-card { min-width: 0; padding: 1.1rem; background: #fbfcfd; border: 1px solid var(--ag-line); border-radius: 12px; }
.amde-grid-lesson .ag-card h3 { margin-top: .35rem; }
.amde-grid-lesson .ag-number { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: #eeeafd; color: #4936ad; font-weight: 800; margin-bottom: .5rem; }
.amde-grid-lesson .ag-callout { margin: 1.2rem 0; padding: 1rem 1.1rem; border-left: 5px solid #5d49c7; background: #f2f0ff; border-radius: 0 10px 10px 0; }
.amde-grid-lesson .ag-green { background: var(--ag-green); border-left-color: #37845c; }
.amde-grid-lesson .ag-yellow { background: var(--ag-yellow); border-left-color: #c58b19; }
.amde-grid-lesson .ag-muted { color: var(--ag-muted); }
.amde-grid-lesson .ag-inline, .amde-grid-lesson code:not(.ag-code code) { padding: .12em .35em; border-radius: 4px; background: #eef1f5; font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.amde-grid-lesson .ag-code-label { margin: 1rem 0 0; padding: .5rem .8rem; border-radius: 8px 8px 0 0; background: #e8edf4; color: #39465a; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.amde-grid-lesson .ag-code { display: block; margin: 0 0 1rem; padding: 1rem 1.15rem; overflow-x: auto; border: 1px solid #26334b; border-radius: 0 0 8px 8px; background: #101827; color: #e5e7eb; font: .88rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }
.amde-grid-lesson .ag-code code { color: inherit; background: transparent; padding: 0; font: inherit; }
.amde-grid-lesson .ag-tag { color: #7dd3fc; }
.amde-grid-lesson .ag-attr, .amde-grid-lesson .ag-css-prop { color: #c4b5fd; }
.amde-grid-lesson .ag-value, .amde-grid-lesson .ag-css-value { color: #86efac; }
.amde-grid-lesson .ag-text { color: #fef3c7; }
.amde-grid-lesson .ag-steps { counter-reset: agstep; list-style: none; padding: 0; }
.amde-grid-lesson .ag-steps li { counter-increment: agstep; position: relative; padding: .8rem .9rem .8rem 3.5rem; border: 1px solid var(--ag-line); border-radius: 10px; margin: .65rem 0; background: #fbfcfd; }
.amde-grid-lesson .ag-steps li::before { content: counter(agstep, decimal-leading-zero); position: absolute; left: 1rem; top: .8rem; color: #4936ad; font-weight: 900; }
.amde-grid-lesson .ag-checklist { list-style: none; padding-left: 0; }
.amde-grid-lesson .ag-checklist li { position: relative; padding-left: 1.8rem; }
.amde-grid-lesson .ag-checklist li::before { content: "✓"; position: absolute; left: 0; color: #37845c; font-weight: 900; }
.amde-grid-lesson .ag-footer { border-top: 1px solid var(--ag-line); margin-top: 2rem; padding: 1.5rem .5rem; text-align: center; color: var(--ag-muted); font-size: .9rem; }
.amde-grid-lesson a { color: #4936ad; text-underline-offset: .18em; }
.amde-grid-lesson a:hover { text-decoration-thickness: 2px; }
.amde-grid-lesson a:focus-visible { outline: 3px solid #7d6be5; outline-offset: 3px; border-radius: 3px; }
@media (max-width: 700px) {
  .amde-grid-lesson .ag-grid { grid-template-columns: 1fr; }
  .amde-grid-lesson .ag-hero { padding: 1.5rem 1.2rem; border-radius: 10px; }
  .amde-grid-lesson .ag-section { padding: 1.2rem 1rem; margin: 1rem 0; }
  .amde-grid-lesson .ag-code { font-size: .78rem; padding: .8rem; }
}
