:root {
  --orange: #ff4f91;
  --lime: #ffe04a;
  --teal: #6545d8;
  --blue: #235ee7;
}

.brand-mark { background: #86b2ff; }
.side-tip { background: #ffe04a; }
.principles { background: #6545d8; }
.lesson-badge { background: #86b2ff; }
.portal-back { display: inline-flex; margin: 0 10px 18px; color: var(--muted); font: 750 11px var(--mono); text-decoration: none; text-transform: uppercase; }
.portal-back:hover { color: var(--ink); }

.markup-card { position: relative; width: 100%; max-width: 610px; min-width: 0; transform: rotate(1deg); }
.markup-card::before { content: ""; position: absolute; inset: -18px 24px 18px -18px; border: 2px solid var(--ink); border-radius: 20px; background: #ff4f91; transform: rotate(-3deg); }
.markup-browser { position: relative; border: 2px solid var(--ink); border-radius: 16px; background: var(--white); box-shadow: 10px 12px 0 var(--ink); overflow: hidden; }
.markup-browser__body { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 360px; }
.markup-code { padding: 24px; background: #171916; color: #f6f3e8; font: 12px/1.8 var(--mono); overflow: hidden; }
.markup-code span { display: block; white-space: nowrap; }
.token-tag { color: #ff79b0; }
.token-attr { color: #ffe04a; }
.token-value { color: #8ed7ff; }
.markup-preview { display: flex; flex-direction: column; justify-content: center; padding: 28px; background: #dce7ff; }
.markup-preview small { font: 800 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.markup-preview h2 { margin: 18px 0 8px; font-size: 34px; line-height: .95; letter-spacing: -.05em; }
.markup-preview p { margin: 0 0 18px; color: #45443e; font-size: 13px; }
.markup-preview span { align-self: flex-start; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 7px; background: var(--lime); font: 800 10px var(--mono); }
.markup-sticker { position: absolute; right: -18px; bottom: -24px; display: grid; place-items: center; width: 104px; height: 104px; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); font: 900 12px/1.15 var(--mono); text-align: center; transform: rotate(-8deg); }

.html-lab-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 250px; gap: 18px; margin-top: 34px; }
.html-editor-panel, .html-preview-panel { min-width: 0; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.html-panel-bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 9px 12px; border-bottom: 2px solid var(--ink); background: var(--paper-2); font: 800 11px var(--mono); text-transform: uppercase; }
.html-panel-bar button { padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--white); font: 750 10px var(--mono); cursor: pointer; }
.html-editor { display: block; width: 100%; min-height: 470px; padding: 18px; border: 0; outline: 0; resize: vertical; background: #171916; color: #f7f3e8; font: 13px/1.65 var(--mono); tab-size: 2; }
.html-editor:focus-visible { outline: 3px solid var(--blue); outline-offset: -5px; }
.html-preview { display: block; width: 100%; min-height: 470px; border: 0; background: white; }
.html-lab-shell .lab-guide { box-shadow: 4px 4px 0 var(--ink); }
.preview-status { color: var(--teal); font: 750 10px var(--mono); }
.html-project { padding: 22px; margin-top: 24px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); box-shadow: 5px 5px 0 var(--ink); overflow-wrap: anywhere; }
.html-project h2 { font-size: clamp(22px, 4vw, 30px); }
.html-project p { margin-block: 12px; }
.html-project a { color: var(--blue); text-underline-offset: 3px; }
.html-project summary { padding-block: 12px; min-height: 44px; cursor: pointer; font-weight: 750; }
.html-project :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.html-panel-bar button { min-height: 44px; }

@media (max-width: 1180px) {
  .html-lab-shell { grid-template-columns: 1fr 1fr; }
  .html-lab-shell .lab-guide { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .home h1 { font-size: clamp(50px, 17vw, 68px); }
  .markup-card { max-width: calc(100vw - 52px); margin-inline: auto; transform: none; }
  .markup-card::before { inset: -12px 12px 12px -10px; transform: rotate(-1deg); }
  .markup-browser__body { grid-template-columns: 1fr; }
  .markup-code { min-height: 250px; }
  .markup-preview { min-height: 230px; }
  .html-lab-shell { grid-template-columns: 1fr; }
  .html-lab-shell .lab-guide { grid-column: auto; order: -1; }
  .html-editor, .html-preview { min-height: 390px; }
}
