.sql-page .step-tabs { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
.sql-page .step-tab { min-height: 62px; padding: 10px 13px; }
.sql-page .step-tab[aria-selected="true"] { color: #fff; border-color: #1455b1; background: linear-gradient(135deg, #087d9c, #2458c7); }
.sql-page .step-panel { min-height: 0; }
.sql-page .progress-card { position: static; }
.sql-schema-card { position: sticky; top: 10px; z-index: 15; max-width: 100%; margin-bottom: 18px; padding: 0; box-shadow: 0 8px 22px rgba(30, 52, 85, .12); }
.schema-title { display: block; margin-bottom: 6px; color: #1b426f; }
.schema-scroll { display: grid; align-content: start; gap: 4px; min-height: 88px; max-width: 100%; overflow-x: auto; padding: 10px 13px 15px; border-radius: inherit; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
.schema-scroll .schema-title { position: sticky; left: 0; width: max-content; max-width: 100%; }
.schema-scroll:focus-visible { outline: 3px solid rgba(23, 99, 213, .32); outline-offset: -3px; }
.schema-code { width: max-content; min-width: 100%; color: #244d78; font: .82rem/1.45 "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.attribute-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.attribute-pills code { padding: 5px 8px; border: 1px solid #b8cde2; border-radius: 7px; background: #fff; color: #244d78; }
.sql-task { max-width: 980px; }
.sql-label { display: block; margin: 16px 0 7px; color: #244d78; font-weight: 800; }
.sql-input, .description-input { box-sizing: border-box; width: 100%; min-height: 96px; padding: 12px; border: 1px solid #aebfd3; border-radius: 10px; background: #fcfdff; color: #172f49; font: 0.94rem/1.45 "SFMono-Regular", Consolas, monospace; resize: vertical; }
.description-input { min-height: 120px; font-family: inherit; }
.sql-input:focus, .description-input:focus { outline: 3px solid rgba(23, 99, 213, .25); border-color: #286fc8; }
.given-sql { overflow-x: auto; margin: 14px 0 0; padding: 12px; border: 1px solid #d7e4f3; border-radius: 10px; background: #f4f8fc; color: #163e6b; white-space: pre-wrap; font: 0.9rem/1.45 "SFMono-Regular", Consolas, monospace; }
.shortcut-hint { align-self: center; color: #64758a; font-size: .8rem; }
.sql-info { margin-top: 14px; padding: 10px 13px; border: 1px solid #ead6a7; border-radius: 10px; background: #fffbef; }
.sql-info summary { cursor: pointer; color: #80530d; font-weight: 800; }
.sql-info p { margin: 9px 0 0 !important; color: #6f5527; }
.aggregate-intro h3 { margin-top: 0; color: #1b426f; }
.aggregate-list { display: grid; grid-template-columns: minmax(190px, .9fr) 1fr; gap: 7px 16px; margin: 15px 0 0; }
.aggregate-list dt { font-family: "SFMono-Regular", Consolas, monospace; font-weight: 800; color: #244d78; }
.aggregate-list dd { margin: 0; }
.result-relation { max-width: 100%; margin-top: 16px; overflow: hidden; }
.sql-page .feedback.partial { color: #9a5b0d; }
.result-relation .table-scroll:focus-visible { outline: 3px solid rgba(23, 99, 213, .32); outline-offset: 3px; }
.result-relation .table-scroll { max-height: clamp(18rem, 52vh, 34rem); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.result-relation .data-table, .result-relation .data-table.compact { width: max-content; min-width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0; }
.result-relation th { position: sticky; top: 0; z-index: 2; min-width: 9rem; max-width: 24rem; background: #fafcff; white-space: nowrap; }
.result-relation td { min-width: 9rem; max-width: 24rem; overflow-wrap: anywhere; }
.result-relation.has-column-groups thead tr:last-child th { top: 2.15rem; }
.result-relation .relation-group-heading { z-index: 3; }
.empty-result { padding: 15px; margin: 0; color: #52647b; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.server-feedback.result { margin-top: 1rem; padding: 1rem; border: 1px solid #e2ddd6; border-radius: 6px; background: #eef3f8; color: #1e1e1e; font-weight: 400; }
.server-feedback.result.high { background: #edf7ee; border-color: #7aae80; }
.server-feedback.result.medium { background: #fff4df; border-color: #d99a3a; }
.server-feedback.result.low, .server-feedback.result.error { background: #fff0f0; border-color: #d38181; }
.server-feedback.result h3 { margin: 0 0 .6rem; color: inherit; font-size: 1.05rem; }
.server-feedback.result h4 { margin: 1rem 0 .35rem; color: inherit; font-size: .95rem; }
.server-feedback.result p { margin: .3rem 0 !important; }
.server-feedback.result ul { margin: .3rem 0; padding-left: 1.4rem; }
.server-feedback.result .feedback { min-height: 0; margin-top: 1rem !important; padding-top: .8rem; border-top: 1px solid rgba(0, 0, 0, .12); color: inherit; font-weight: 400; }
.menu-cross-product-page .step-tabs { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.menu-source-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.menu-source-table { margin: 0; min-width: 0; }
.menu-source-table table { width: 100%; border-collapse: collapse; }
.menu-source-table caption { padding: 9px; color: #163e6b; font-weight: 800; text-align: left; }
.menu-source-table th, .menu-source-table td { padding: 8px; border: 1px solid #d7e4f3; text-align: left; }
.menu-source-table th { background: #edf5fb; color: #244d78; }
.menu-number-input { display: block; width: min(100%, 190px); min-height: 44px; margin: 0 0 14px; padding: 8px 10px; border: 1px solid #aebfd3; border-radius: 10px; color: #172f49; font: inherit; }
.menu-number-input:focus { outline: 3px solid rgba(23, 99, 213, .25); border-color: #286fc8; }
.menu-result .data-table, .menu-result table { min-width: 680px; border-collapse: collapse; }
.menu-result th, .menu-result td { padding: 9px 10px; border: 1px solid #d7e4f3; text-align: left; }
.menu-result thead tr:last-child th { background: #edf5fb; color: #244d78; }
.menu-result .menu-group-heading { background: #dcecf7; color: #163e6b; text-align: center; }
.menu-memory { border-left: 5px solid #087d9c; white-space: pre-line; }
.help-stack summary:focus-visible { outline: 3px solid rgba(23, 99, 213, .35); outline-offset: 3px; border-radius: 3px; }
.song-verbund-page .step-tabs { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.song-source-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.song-source-table { min-width: 0; margin: 0; }
.song-source-table table { width: 100%; border-collapse: collapse; }
.song-source-table caption { padding: 9px; color: #163e6b; font-weight: 800; text-align: left; }
.song-source-table th, .song-source-table td { padding: 8px; border: 1px solid #d7e4f3; text-align: left; vertical-align: top; }
.song-source-table th { background: #edf5fb; color: #244d78; }
.song-source-table .key-label { display: block; margin-top: 4px; color: #4d6077; font-size: .72rem; font-weight: 700; }
.song-source-table .column-selector { width: 100%; min-height: 38px; text-align: left; }
.verbund-result .data-table { min-width: 860px; }
.verbund-result th, .verbund-result td { padding: 8px 10px; border: 1px solid #d7e4f3; text-align: left; vertical-align: top; }
.verbund-result thead tr:last-child th { background: #edf5fb; color: #244d78; }
.verbund-result .relation-group-heading { background: #dcecf7; color: #163e6b; text-align: center; }
.verbund-classify { display: grid; gap: 7px; margin: 14px 0; padding: 10px 12px; border: 1px solid #d7e4f3; border-radius: 10px; }
.verbund-classify legend { padding-inline: 5px; color: #244d78; font-weight: 800; }
.selected-columns { padding: 9px 11px; border-radius: 8px; background: #f4f8fc; color: #244d78; font-family: "SFMono-Regular", Consolas, monospace; }
.verbund-memory { margin-top: 16px; border-left: 5px solid #087d9c; white-space: pre-line; }
.sql-page:not(.menu-cross-product-page):not(.song-verbund-page) .step-tabs { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.sql-intro { max-width: 100%; }
.sql-intro .intro-workspace { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(285px, .8fr); gap: 14px; align-items: start; }
.sql-intro .intro-stage, .sql-intro .intro-side { min-width: 0; }
.sql-intro .intro-side { display: grid; gap: 8px; align-content: start; }
.sql-intro .intro-sql code { display: block; font: inherit; }
.sql-intro .intro-sql code span { display: block; padding: 2px 6px; border-radius: 6px; }
.sql-intro .intro-active-clause { background: #dcecf7; color: #123c6b; font-weight: 800; }
.sql-intro .intro-caption { margin: 0 0 6px; color: #52647b; font-size: .82rem; }
.sql-intro .intro-step-buttons { display: grid; gap: 5px; }
.sql-intro .intro-step-buttons button { min-height: 36px; padding: 6px 9px; text-align: left; }
.sql-intro .intro-step-buttons button[aria-current="step"] { border-color: #1455b1; background: #dcecf7; color: #123c6b; font-weight: 800; }
.sql-intro .intro-explanation { margin: 0; padding: 7px 9px; border-radius: 8px; background: #fff8dc; font-size: .88rem; line-height: 1.35; }
.sql-intro .intro-controls { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0; }
.sql-intro .intro-controls button { min-height: 36px; padding: 6px 10px; }
.sql-intro .tab-flow-navigation { margin: 2px 0 0; padding: 0; }
.sql-intro .tab-flow-button { min-height: 36px; padding: 6px 10px; }
.sql-intro .intro-progress { color: #244d78; }
.sql-intro .intro-sql { margin: 0; padding: 7px; font-size: .8rem; line-height: 1.3; }
.sql-intro .intro-visual { display: grid; gap: 6px; }
.sql-intro .result-relation { margin: 0; }
.sql-intro .result-relation .table-scroll { max-height: 19rem; }
.sql-intro .result-relation .data-table, .sql-intro .result-relation .data-table.compact { min-width: 100%; }
.sql-intro .result-relation th, .sql-intro .result-relation td { min-width: 6.7rem; padding: 5px 7px; font-size: .74rem; line-height: 1.2; }
.sql-intro .table-caption { padding: 5px 8px; }
.sql-intro-memory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; margin: 8px 0 0; padding: 8px 10px; }
.sql-intro-memory h3 { grid-column: 1 / -1; margin: 0; }
.sql-intro-memory p { margin: 0; font-size: .82rem; line-height: 1.35; }
@media (min-width: 901px) {
  .sql-intro-active .learning-shell { padding-top: 6px; }
  .sql-intro-active .module-topbar { margin-bottom: 5px; }
  .sql-intro-active .module-header { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 14px; max-width: none; margin-bottom: 8px; text-align: left; }
  .sql-intro-active .module-header .eyebrow { display: none; }
  .sql-intro-active .module-header h1 { flex: 0 0 auto; margin: 0; font-size: 1.45rem; }
  .sql-intro-active .module-header .module-task-number { grid-column: 1; grid-row: 2; margin: 0; }
  .sql-intro-active .module-header p:not(.module-task-number) { grid-column: 2; grid-row: 1 / 3; }
  .sql-intro-active .module-header p { font-size: .88rem; line-height: 1.3; }
  .sql-intro-active .progress-card { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 3px 11px; }
  .sql-intro-active .progress-copy { justify-content: start; gap: 8px; margin: 0; white-space: nowrap; }
  .sql-intro-active #data-status { margin: 0; min-height: 0; padding: 0; }
  .sql-intro-active .step-tabs { margin-bottom: 5px; padding-bottom: 2px; }
  .sql-intro-active .step-tab { min-height: 42px; padding: 5px 9px; font-size: .79rem; }
  .sql-intro-active .step-panel { padding: 8px 16px; }
  .sql-intro-active .step-heading { margin-bottom: 5px; }
  .sql-intro-active .step-number { width: 34px; height: 34px; border-radius: 10px; font-size: .9rem; }
  .sql-intro-active .step-heading h2 { font-size: 1.25rem; }
  .sql-intro-active .sql-intro { margin-bottom: 2px; padding: 7px 12px; }
  .sql-intro-active .sql-intro > p { margin-bottom: 7px; font-size: .9rem; line-height: 1.35; }
}
.sql-quiz-overview { margin-top: 20px; }
.sql-quiz-overview li { margin-bottom: 8px; }
@media (max-width: 900px) { .sql-intro .intro-workspace { grid-template-columns: 1fr; } .sql-intro .intro-side { grid-row: 1; } .sql-intro .intro-step-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sql-intro-memory { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .sql-intro .intro-step-buttons { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .menu-source-tables { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .song-source-tables { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .sql-page .step-tabs { grid-template-columns: repeat(4, 210px); } .song-verbund-page .step-tabs { grid-template-columns: repeat(6, 190px); } }
@media (max-width: 860px) { .sql-page:not(.menu-cross-product-page):not(.song-verbund-page) .step-tabs { grid-template-columns: repeat(6, 190px); } }
@media (max-width: 650px) { .sql-page .step-panel { padding: 20px 15px; border-radius: 18px; } .sql-schema-card { top: 6px; } .schema-code { font-size: .76rem; } .result-relation .table-scroll { max-height: 58vh; } .aggregate-list { grid-template-columns: 1fr; } .shortcut-hint { width: 100%; } }
