/* Simple page styles. No libraries or external fonts. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fcfcff;
  color: #141733;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.demo {
  width: min(1160px, calc(100% - 40px));
  margin: 48px auto;
}

.intro {
  text-align: center;
  margin-bottom: 32px;
}

.eyebrow {
  color: #3155f5;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 2px;
}

h1 {
  margin: 12px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -1.2px;
}

.intro > p:last-child {
  color: #596180;
  font-size: 18px;
}

code {
  font-family: ui-monospace, Consolas, monospace;
}

/* Three cards on desktop; one column on small screens. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  padding: 26px;
  background: #ffffff;
  border: 1px solid #dfe4f4;
  border-radius: 12px;
}

.number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #edf0ff;
  color: #3155f5;
  font-weight: 750;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
}

.card h2 {
  margin: 16px 0 12px;
}

.code-label {
  display: table;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f0f1ff;
  color: #444c7d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

button {
  min-height: 46px;
  padding: 11px 22px;
  border: 0;
  border-radius: 8px;
  background: #1652f5;
  color: #ffffff;
  font: 650 15px/1.5 system-ui, sans-serif;
  cursor: pointer;
}

button:hover {
  background: #123dcc;
}

button:focus-visible {
  outline: 3px solid #7c36b8;
  outline-offset: 5px;
}

/* This is the CSS rule we are learning. It does NOT disable keyboard activation. */
.no-pointer {
  pointer-events: none;
}

/* These styles only change the appearance of the truly disabled button. */
button:disabled {
  background: #dfe2eb;
  color: #586078;
  cursor: not-allowed;
}

dl {
  margin: 22px 0 0;
  font-size: 14px;
}

dl > div {
  display: flex;
  gap: 12px;
}

dt {
  min-width: 78px;
  color: #596180;
}

dd {
  margin: 0;
  font-weight: 650;
}

.works { color: #087442; }
.warning { color: #975400; }
.disabled-label { color: #b42335; }

.keyboard-tip {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 20px;
  padding: 22px 26px;
  border-radius: 12px;
  background: #f0f1ff;
}

.keys {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

kbd {
  padding: 11px 15px;
  border: 1px solid #cbd0e3;
  border-bottom-width: 3px;
  border-radius: 7px;
  background: #ffffff;
  font: 650 14px system-ui, sans-serif;
}

.keyboard-tip h2,
.result h2 {
  margin: 0 0 6px;
}

.keyboard-tip p,
.result p {
  margin: 0;
  color: #596180;
  font-size: 14px;
}

.keyboard-tip .small {
  margin-top: 6px;
  font-size: 12px;
}

.result {
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid #dfe4f4;
  border-radius: 12px;
  background: #ffffff;
}

.note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-radius: 9px;
  background: #f0f1ff;
  color: #505b82;
  font-size: 13px;
}

.note > span {
  color: #3155f5;
}

@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr; }
  .demo { margin-block: 28px; }
  .keyboard-tip { align-items: flex-start; flex-direction: column; gap: 16px; }
}
