.programming-card { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: var(--format-top) max(var(--edge), env(safe-area-inset-right)) var(--content-bottom) max(var(--edge), env(safe-area-inset-left)); color: #eff6fa; background: radial-gradient(ellipse at 100% 12%, #193c49 0, transparent 55%), #111c2b; }
/* The workspace fits the card. Only code and explicitly opened details scroll. */
.programming-card__body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 720px; margin: 0 auto; }
.programming-card__intro { flex: none; display: flex; flex-direction: column; gap: 8px; }
.programming-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.programming-card__eyebrow { color: #88e2cc; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.programming-card__duration { color: #9cb5c1; font-size: 11px; }
.programming-card__title { margin: 0; font-size: clamp(26px, 3.6vw, 39px); line-height: 1.1; font-weight: 650; letter-spacing: -.035em; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.programming-card__prompt { margin: 0; max-width: 64ch; font-size: 13px; line-height: 1.5; color: #b2c4d0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.programming-card__summary { flex: none; min-height: 32px; display: flex; align-items: center; }
.programming-card__example { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 11px; line-height: 1.5; color: #90adbb; }
.programming-card__example > span { flex: none; }
.programming-card__example code { min-width: 0; color: #b0eddc; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.programming-card__editor { flex: 1; min-height: 0; max-height: 360px; display: flex; flex-direction: column; border: 1px solid #36535f; border-radius: 15px; background: #0b1421; overflow: hidden; touch-action: pan-x pan-y; cursor: auto; }
.programming-card__toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 4px 0 12px; border-bottom: 1px solid #2b435288; }
.programming-card__filename { color: #9cb5c1; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.programming-card__reset { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 11px; border: 0; background: none; color: #a4bdca; cursor: pointer; }
.programming-card__reset svg { width: 20px; height: 20px; }
.programming-card__code { display: block; flex: 1; width: 100%; min-height: 0; height: 0; margin: 0; border: 0; border-radius: 0; padding: 12px; resize: none; background: transparent; color: #b0eddc; font: 16px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; caret-color: #f5d779; user-select: text; -webkit-user-select: text; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.programming-card__code:focus { outline: none; background: #0d1927; }
.programming-card__editor:focus-within { border-color: #80d8be; box-shadow: 0 0 0 1px #80d8be; }
.programming-card__tools { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.programming-card__checks-toggle, .programming-card__help-button, .programming-card__result-button, .programming-card__hint-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; border: 0; background: none; color: #89d7c3; font: inherit; font-size: 12px; line-height: 1.4; cursor: pointer; }
.programming-card__checks-toggle { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; text-align: right; }
.programming-card__help-button { text-align: left; }
.programming-card__count { color: #90adbb; font-size: 10px; }
.programming-card__feedback { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.programming-card__feedback strong { font-size: 13px; font-weight: 600; color: #d8e4ed; }
.programming-card__feedback[data-status="success"] strong { color: #a2eed4; }
.programming-card__result-button { flex: none; font-size: 11px; }
.programming-card__footer { flex: none; width: 100%; --card-footer-color: #89a3b1; }
.programming-card__action { display: block; width: 100%; max-width: 720px; min-height: 50px; margin-inline: auto; padding: 13px 16px; border: 0; border-radius: 12px; background: #95e3c7; color: #12332d; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.programming-card__action:disabled { background: #2f4c4c; color: #8ba8a5; cursor: default; }
.programming-card :is(button):focus-visible { outline: 2px solid #e8cb76; outline-offset: 2px; }
/* Same sheet shell as comments, with a subtle blue tint from this format. */
.programming-details { --sheet-surface: #f6f9fa; --sheet-ink: #263d48; --sheet-border: #dfe7eb; --sheet-muted: #70858f; --sheet-control: #e9f0f3; --sheet-control-ink: #4c6672; --sheet-focus: #327c70; --sheet-backdrop: #0b192b77; }
.programming-details__body { padding: 20px 24px max(24px, env(safe-area-inset-bottom)); }
.programming-details__body h3 { margin: 0 0 12px; font-size: 21px; letter-spacing: -.025em; }
.programming-details__body p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.programming-details__example { display: block; margin-bottom: 16px; color: #336d65; font-size: 13px; overflow-wrap: anywhere; }
.programming-details .programming-card__hint-button { display: flex; color: #327565; }
.programming-details .programming-card__hint { margin: 4px 0 0; padding-left: 12px; border-left: 2px solid #7db7a7; color: #42665b; }
.programming-card__checks { border-top: 1px solid #dce5e9; }
.programming-card__case { display: flex; align-items: center; gap: 10px; min-height: 64px; border-bottom: 1px solid #dce5e9; }
.programming-card__case-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border: 1px solid #adc0ca; border-radius: 50%; color: #78909c; font-size: 13px; }
.programming-card__case-copy { min-width: 0; display: grid; gap: 3px; font-size: 13px; color: #344d5a; }
.programming-card__case-copy small { color: #6b818d; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.programming-card__expected { margin-left: auto; padding-left: 10px; color: #3b635a; font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; }
.programming-card__case.is-pass .programming-card__case-icon { color: #32755f; border-color: #94b8aa; background: #e8f3ed; }
.programming-card__case.is-fail .programming-card__case-icon { color: #a35a37; border-color: #d9b5a3; background: #faeee6; }
.programming-card__case.is-fail small { color: #a35a37; }
.programming-card__error-detail { display: block; margin: 0 0 16px; color: #985b40; font-size: 12px; overflow-wrap: anywhere; }
@media (max-height: 690px) {
  .programming-card { gap: 6px; }
  .programming-card__body { gap: 6px; }
  .programming-card__intro { gap: 6px; }
  .programming-card__title { font-size: 26px; }
}
@media (max-height: 540px) and (min-width: 650px) {
  .programming-card__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-rows: minmax(0, 1fr) auto auto; column-gap: 20px; }
  .programming-card__intro { grid-column: 1; min-height: 0; }
  .programming-card__prompt { -webkit-line-clamp: 2; }
  .programming-card__editor { grid-column: 2; grid-row: 1 / 4; max-height: none; }
  .programming-card__summary, .programming-card__tools { grid-column: 1; }
  .programming-card__feedback { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
  .programming-card__feedback .programming-card__result-button { min-height: 24px; }
  .programming-card__tools { gap: 8px; }
}
@media (max-height: 540px) and (max-width: 649px) {
  .programming-card__prompt { display: none; }
  .programming-card__title { font-size: 23px; }
}
