﻿:root {
  --ui-font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  --code-font-family: Consolas, "Courier New", monospace;
  --selection-list-font-weight: 600;
  --selection-list-active-font-weight: 700;
  --control-height: 36px;
  --control-border-width: 2px;
  --control-radius: 5px;
  --font-size: 11px;
  --input-font-size: 11px;
  --output-font-size: 11px;
  --line-height: 1.3;
  --box-gap: 2px;
  --indent: 8px;
  --language-side-top: 130px;
  --language-side-bottom: 48px;
  --example-side-width: 220px;
  --ui-green: #bedbc9;
  --ui-red: #fecdd3;
  --button-surface: var(--ui-green);
  --button-feedback-hover-bg: var(--ui-red);
  --button-feedback-hover-border: #111;
  --button-feedback-active-bg: var(--ui-green);
  --button-feedback-active-border: #111;
  --button-feedback-deep-border: color-mix(
    in srgb,
    var(--side-accent) 88%,
    #111
  );
  --button-feedback-hover-shadow: none;
  --button-feedback-active-ring: none;
  --button-feedback-selection-shadow: none;
  --button-last-clicked-bg: #fde68a;
  --button-last-clicked-border: #a16207;
  --side-accent: #111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f1e7da;
  color: #111;
  font-family: var(--ui-font-family);
}

html.formatter-render-wait,
html.formatter-render-wait * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23dc2626' d='M5 17h3l3-5h10l4 5h2a2 2 0 0 1 2 2v4H3v-4a2 2 0 0 1 2-2Z'/%3E%3Cpath fill='%23fee2e2' d='M12 14h4v3H9.8l2.2-3Zm5 0h3.4l2.5 3H17v-3Z'/%3E%3Ccircle cx='9' cy='23' r='4' fill='%23111'/%3E%3Ccircle cx='23' cy='23' r='4' fill='%23111'/%3E%3Ccircle cx='9' cy='23' r='1.6' fill='%23f8fafc'/%3E%3Ccircle cx='23' cy='23' r='1.6' fill='%23f8fafc'/%3E%3Cpath fill='%23fef08a' d='M26 18h3v2h-3z'/%3E%3C/svg%3E")
      6 6,
    wait !important;
}

.top-strip {
  flex: 0 0 auto;
  position: relative;
  min-height: 108px;
  display: grid;
  grid-template-columns:
    minmax(300px, max-content) minmax(320px, 1fr)
    max-content;
  align-items: center;
  gap: 16px;
  padding: 8px 32px;
  border-bottom: 2px solid #111;
  background: #fbf0df;
}

.top-strip.is-collapsed {
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.top-strip.is-collapsed .ad-banner,
.top-strip.is-collapsed .login-actions {
  display: none;
}

.panel-toggle {
  position: absolute;
  z-index: 5;
  top: 6px;
  right: 32px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-family: var(--ui-font-family);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.ad-banner {
  grid-column: 2;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8bd51;
  border-radius: 6px;
  background: #fff6bf;
  color: #111;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0;
}

.professional-ad-slot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 42px;
  border-bottom: 1px solid #d5dde1;
  background: #fff;
}

.professional-ad-slot span {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d8bd51;
  border-radius: 7px;
  background: #fff6bf;
  color: #6b5b05;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.professional-ad-leaderboard span,
.professional-ad-footer span {
  max-width: 970px;
  min-height: 90px;
}

header {
  flex: 0 0 auto;
  padding: 12px 32px;
  border-bottom: 2px solid #111;
  background: #efe3d4;
}

.brand {
  font-weight: 800;
  min-width: 0;
  overflow-wrap: normal;
}

.page-title-group {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.page-version-title {
  min-width: 0;
  color: #111;
  font-size: 14px;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

.social-icon-link {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1d4ed8;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  text-decoration: none;
  transition:
    transform 70ms ease,
    background-color 70ms ease,
    box-shadow 70ms ease;
}

.facebook-link {
  border-color: #1d4ed8;
  background: #1877f2;
}

.facebook-link:hover,
.facebook-link:focus-visible {
  background: #0f5fc4;
}

.facebook-link:active {
  transform: translateY(1px);
  background: #0b4ea2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.22);
}

.youtube-link {
  border-color: #b91c1c;
  background: #ff0033;
}

.youtube-link:hover,
.youtube-link:focus-visible {
  background: #cc0029;
}

.youtube-link:active {
  transform: translateY(1px);
  background: #a80022;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.22);
}

.social-icon-link:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.social-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

.controls {
  width: 100%;
  display: grid;
  grid-template-columns:
    minmax(520px, 1.45fr) minmax(330px, 0.9fr) minmax(300px, 0.82fr)
    minmax(260px, 0.7fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  font-weight: 700;
  font-size: 12px;
  text-transform: lowercase;
}

.control-cluster {
  position: relative;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #c5c8c9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  overflow: visible;
}

[data-panel-number]::before {
  content: attr(data-panel-number);
  position: absolute;
  top: -9px;
  right: 12px;
  left: auto;
  transform: none;
  z-index: 12;
  min-width: 28px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1px solid #c9d8cf;
  border-radius: 999px;
  background: rgba(247, 251, 247, 0.96);
  color: #596a60;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 90ms ease;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-panel-number].pane::before,
.language-side-panel[data-panel-number]::before,
.example-side-panel[data-panel-number]::before {
  top: 8px;
  right: 12px;
  left: auto;
  transform: none;
}

.resizer[data-panel-number]::before {
  top: 8px;
  right: 4px;
  left: auto;
  transform: none;
}

[data-item-number] {
  position: relative;
}

[data-item-number]::before {
  content: attr(data-item-number);
  position: absolute;
  top: -5px;
  right: 5px;
  left: auto;
  z-index: 13;
  min-width: 20px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1px solid #c9d8cf;
  border-radius: 999px;
  background: rgba(247, 251, 247, 0.97);
  color: #596a60;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  pointer-events: none;
  transform: none;
  opacity: 0;
  transition: opacity 90ms ease;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-panel-number]:hover::before,
[data-panel-number]:focus-within::before,
[data-item-number]:hover::before,
[data-item-number]:focus-within::before {
  opacity: 1;
}

.panel-toggle[data-item-number]::before {
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 12px;
  padding: 0 2px;
  font-size: 7px;
  transform: none;
}

.control-cluster [data-item-number]::before {
  top: -5px;
  right: 5px;
  left: auto;
  transform: none;
}

.language-controls label[data-item-number]::before {
  top: -5px;
  right: 5px;
  left: auto;
  transform: none;
}

.tuning-controls label[data-item-number]::before {
  top: -5px;
  right: 5px;
  left: auto;
  transform: none;
}

[data-item-number="202"]::before {
  border-color: #111;
  background: var(--ui-green);
  color: #111;
}

[data-item-number="202"]:hover::before,
[data-item-number="202"]:focus-within::before {
  border-color: #111;
  background: var(--ui-red);
  color: #111;
}

.language-side-list[data-item-number],
.example-side-list[data-item-number] {
  padding-top: 16px;
}

.language-side-list[data-item-number]::before,
.example-side-list[data-item-number]::before {
  top: -5px;
  right: 5px;
  left: auto;
  transform: none;
}

.language-controls {
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(280px, 1.25fr);
  grid-template-areas:
    "category category"
    "language example";
  align-items: center;
  align-content: start;
  justify-content: stretch;
  gap: 8px;
}

.language-controls label {
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: var(--control-height);
}

.language-controls label:nth-child(1) {
  grid-area: category;
}

.language-controls label:nth-child(2) {
  grid-area: language;
}

.language-controls label:nth-child(3) {
  grid-area: example;
}

.language-control-text {
  white-space: nowrap;
}

.language-controls select {
  width: 100%;
  max-width: 100%;
}

.tuning-controls,
.output-controls,
.theme-controls {
  justify-content: flex-end;
}

.output-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  align-content: start;
  justify-content: stretch;
  gap: 6px;
}

.output-controls button {
  width: 100%;
  min-width: 0;
}

.output-controls button,
.output-controls .professional-page-link,
.login-btn,
.auth-logout-btn,
.compact-control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.output-controls #formatBtn {
  grid-column: 2;
}

.output-controls .professional-page-link {
  grid-column: 1;
  justify-self: stretch;
  width: 100%;
}

.tuning-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  justify-content: center;
  justify-items: center;
  align-items: center;
  gap: 6px;
  row-gap: 7px;
}

.tuning-controls label {
  position: relative;
  flex: 0 0 58px;
  min-width: 58px;
  width: 100%;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1.05;
}

.tuning-controls input {
  width: 58px;
  max-width: 58px;
}

.tuning-controls .input-wrap-control {
  flex-basis: 44px;
  min-width: 44px;
}

.tuning-controls input[type="checkbox"] {
  width: var(--control-height);
  height: var(--control-height);
  min-width: var(--control-height);
  appearance: none;
  -webkit-appearance: none;
  border: var(--control-border-width) solid #111;
  border-radius: var(--control-radius);
  background: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  accent-color: #111;
  cursor: pointer;
}

.tuning-controls input[type="checkbox"]:checked {
  border-color: #111;
  background-color: var(--ui-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='none' stroke='%23111' stroke-width='5' stroke-linecap='round' stroke-linejoin='round' d='M6 14.5l5 5.2L22 8.5'/%3E%3C/svg%3E");
}

.tuning-controls label[data-item-number="202"] input[type="checkbox"] {
  border-color: #111;
  accent-color: #111;
}

.tuning-controls label[data-item-number="202"] input[type="checkbox"]:checked {
  border-color: #111;
  background-color: var(--ui-green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='none' stroke='%23111' stroke-width='5' stroke-linecap='round' stroke-linejoin='round' d='M6 14.5l5 5.2L22 8.5'/%3E%3C/svg%3E");
}

.tuning-controls label[data-item-number="202"]:hover input[type="checkbox"],
.tuning-controls label[data-item-number="202"] input[type="checkbox"]:hover {
  border-color: #111;
  background-color: var(--ui-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='none' stroke='%23111' stroke-width='5' stroke-linecap='round' stroke-linejoin='round' d='M6 14.5l5 5.2L22 8.5'/%3E%3C/svg%3E");
}

.tuning-controls input[type="checkbox"]:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.tuning-controls .compact-control-btn {
  grid-column: 3 / 5;
  width: 100%;
  min-width: 0;
}

.box-theme-panel {
  align-self: start;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 8px 8px;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #c5c8c9;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.theme-controls {
  grid-column: 4;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
}

.box-theme-panel legend {
  align-self: center;
  padding: 0 6px;
  text-align: center;
  font-weight: 800;
  line-height: 1;
}

.box-theme-options {
  width: auto;
  min-width: 0;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.box-theme-btn {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 10px;
  border: var(--control-border-width) solid var(--button-feedback-hover-border);
  border-radius: var(--control-radius);
  background: var(--button-surface);
  cursor: pointer;
  overflow: visible;
}

.box-theme-btn.is-active {
  border-color: var(--button-feedback-hover-border);
  box-shadow:
    0 0 0 2px rgba(4, 120, 87, 0.18),
    inset 0 0 0 1px rgba(17, 17, 17, 0.25);
}

.box-theme-swatch {
  position: absolute;
  inset: 4px;
  display: block;
  border: 1px solid rgba(17, 17, 17, 0.32);
  border-radius: 3px;
}

.box-theme-name {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(17, 17, 17, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.theme-classic {
  background: linear-gradient(
    90deg,
    #daf7d8 0 14.2%,
    #d9eefb 14.2% 28.4%,
    #eadcff 28.4% 42.6%,
    #fff0cc 42.6% 56.8%,
    #d7f8ef 56.8% 71%,
    #ffe1f0 71% 85.2%,
    #eee6ff 85.2% 100%
  );
}

.theme-varied {
  background: linear-gradient(
    90deg,
    #ddf9df 0 8.3%,
    #dcf8ec 8.3% 16.6%,
    #dcf7f8 16.6% 24.9%,
    #dcedfa 24.9% 33.2%,
    #e2e3fb 33.2% 41.5%,
    #ecdefb 41.5% 49.8%,
    #f6dcf8 49.8% 58.1%,
    #f9dceb 58.1% 66.4%,
    #fadfe1 66.4% 74.7%,
    #fae8dc 74.7% 83%,
    #faf3dc 83% 91.3%,
    #eff8dc 91.3% 100%
  );
}

.theme-distinct {
  background: linear-gradient(
    90deg,
    #b7f0c0 0 8.3%,
    #aee7f7 8.3% 16.6%,
    #b7ccff 16.6% 24.9%,
    #d2b8ff 24.9% 33.2%,
    #f2b6e2 33.2% 41.5%,
    #ffbbb8 41.5% 49.8%,
    #ffd28a 49.8% 58.1%,
    #f2ef8f 58.1% 66.4%,
    #c9f296 66.4% 74.7%,
    #9ef0cf 74.7% 83%,
    #9bdcf8 83% 91.3%,
    #e2b5ff 91.3% 100%
  );
}

.theme-layered {
  background: linear-gradient(
    90deg,
    #f2f6fa 0 10%,
    #d8e2ee 10% 20%,
    #b9c9dc 20% 30%,
    #97acc6 30% 40%,
    #748cab 40% 50%,
    #5e7798 50% 60%,
    #4d6688 60% 70%,
    #3d5678 70% 80%,
    #304763 80% 90%,
    #263951 90% 100%
  );
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.compact-control-btn {
  flex: 0 0 92px;
  width: 92px;
  min-height: var(--control-height);
  padding: 0 8px;
  align-self: end;
  justify-self: center;
}

label {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
}

input,
select {
  width: 62px;
  height: var(--control-height);
  border: var(--control-border-width) solid #111;
  border-radius: var(--control-radius);
  background: #fff;
  text-align: center;
  font: inherit;
  font-weight: 800;
}

select {
  width: clamp(180px, 32vw, 320px);
  min-width: 0;
  padding: 0 8px;
  text-align: left;
  font-weight: var(--selection-list-font-weight);
  text-transform: lowercase;
}

select option {
  font-weight: var(--selection-list-font-weight);
}

#languageCategorySelect,
#languageGroupSelect {
  width: clamp(90px, 16vw, 160px);
}

#languageSelect {
  width: clamp(260px, 28vw, 430px);
}

.language-controls #languageCategorySelect,
.language-controls #languageGroupSelect,
.language-controls #languageSelect {
  width: 100%;
  min-width: 0;
}

button {
  --button-bg: var(--button-surface);
  --button-border: var(--button-feedback-hover-border);
  --button-hover-bg: var(--button-feedback-hover-bg);
  --button-hover-border: var(--button-feedback-hover-border);
  --button-active-bg: var(--button-feedback-active-bg);
  --button-active-border: var(--button-feedback-active-border);
  min-height: var(--control-height);
  padding: 0 14px;
  border: var(--control-border-width) solid var(--button-border);
  border-radius: var(--control-radius);
  background: var(--button-bg);
  color: #111;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
  transition:
    transform 90ms ease,
    background-color 90ms ease,
    border-color 90ms ease,
    box-shadow 90ms ease;
}

button:not(:disabled):hover {
  border-color: var(--button-hover-border);
  background: var(--button-hover-bg);
  box-shadow: var(--button-feedback-hover-shadow);
}

button:not(:disabled):active {
  transform: translateY(2px) scale(0.985);
  border-color: var(--button-active-border);
  background: var(--button-active-bg);
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.24),
    var(--button-feedback-active-ring);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.tool-btn {
  --button-bg: var(--button-surface);
  color: #111;
}

#downloadPdfBtn,
#downloadJpgBtn {
  --button-bg: var(--button-surface);
  color: #111;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.export-btn-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: currentColor;
}

.export-btn-icon path,
.export-btn-icon rect,
.export-btn-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.export-btn-icon text {
  fill: currentColor;
  font-family: Arial, sans-serif;
  font-size: 5px;
  font-weight: 800;
  letter-spacing: 0;
}

#formatBtn {
  --button-bg: var(--ui-green);
  --button-border: #111;
  --button-hover-bg: var(--ui-red);
  --button-hover-border: #111;
  --button-active-bg: var(--ui-green);
  --button-active-border: #111;
  color: #111;
  box-shadow: none;
}

#formatBtn:disabled {
  opacity: 1;
}

#formatBtn.is-cooling-down {
  --button-bg: #ffffff;
  --button-border: #111;
  --button-hover-bg: #ffffff;
  --button-hover-border: #111;
  --button-active-bg: #ffffff;
  --button-active-border: #111;
  background: #ffffff;
  border-color: #111;
  color: #111;
  box-shadow: none;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
}

.output-controls .login-actions {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  justify-self: stretch;
}

.output-controls .login-actions:has(.auth-profile:not([hidden])) {
  grid-template-columns: 1fr;
}

.login-btn {
  width: 100%;
  min-width: 74px;
  min-height: 34px;
}

.login-btn.secondary {
  background: var(--button-surface);
  color: #111;
}

.auth-profile {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 2px solid #111;
  border-radius: 7px;
  background: #fff;
  text-transform: none;
}

.auth-profile[hidden] {
  display: none;
}

.auth-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 50%;
  background: #d9f0e4;
  background-position: center;
  background-size: cover;
  color: #0f3d31;
  font-size: 14px;
  font-weight: 900;
}

.auth-avatar.has-picture {
  color: transparent;
}

.auth-profile-text {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.auth-name,
.auth-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-name {
  font-size: 12px;
  font-weight: 900;
}

.auth-email {
  color: #52606b;
  font-size: 10px;
  font-weight: 700;
}

.auth-logout-btn {
  width: auto;
  min-width: 58px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.professional-page-link {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--button-feedback-hover-border);
  border-radius: 5px;
  background: var(--button-surface);
  color: #064e3b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  transition:
    transform 90ms ease,
    background-color 90ms ease,
    border-color 90ms ease,
    box-shadow 90ms ease;
}

.professional-page-link:hover,
.professional-page-link:focus-visible {
  border-color: var(--button-feedback-active-border);
  background: var(--button-feedback-hover-bg);
  box-shadow: var(--button-feedback-hover-shadow);
}

.professional-page-link:active {
  transform: translateY(2px) scale(0.985);
  border-color: var(--button-feedback-deep-border);
  background: var(--button-feedback-active-bg);
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.24),
    var(--button-feedback-active-ring);
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.site-nav a,
.info-nav a,
.info-action {
  min-height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5da;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: lowercase;
  transition:
    transform 90ms ease,
    background-color 90ms ease,
    border-color 90ms ease,
    box-shadow 90ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.info-nav a:hover,
.info-nav a:focus-visible,
.info-action:hover,
.info-action:focus-visible {
  border-color: var(--button-feedback-hover-border);
  background: var(--button-feedback-hover-bg);
  box-shadow: var(--button-feedback-hover-shadow);
}

.site-nav a[aria-current="page"],
.info-nav a[aria-current="page"] {
  border-color: var(--button-feedback-deep-border);
  background: var(--button-feedback-active-bg);
  color: #7f1d1d;
  box-shadow:
    inset 0 0 0 1px rgba(136, 19, 55, 0.28),
    var(--button-feedback-active-ring);
}

.site-nav a:active,
.info-nav a:active,
.info-action:active {
  transform: translateY(2px) scale(0.985);
  border-color: var(--button-feedback-deep-border);
  background: var(--button-feedback-active-bg);
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.24),
    var(--button-feedback-active-ring);
}

.info-page {
  height: auto;
  min-height: 100vh;
  overflow: auto;
  background: #f1e7da;
  color: #111;
}

.info-top {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 32px;
  border-bottom: 2px solid #111;
  background: #fbf0df;
}

.info-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.info-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111;
  border-radius: 7px;
  background: #e6fff1;
  color: #064e3b;
  font-family: var(--code-font-family);
  font-size: 18px;
  font-weight: 900;
}

.info-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.info-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: 34px;
  padding: 44px 48px 38px;
  border-bottom: 1px solid #cbd5da;
  background:
    linear-gradient(
      90deg,
      rgba(226, 255, 241, 0.88),
      rgba(255, 247, 225, 0.92)
    ),
    #f7fafb;
}

.info-kicker {
  margin: 0 0 10px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.info-lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: #25323a;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.55;
}

.info-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.info-action.primary {
  border-color: var(--button-feedback-hover-border);
  color: #7f1d1d;
}

.info-visual {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.info-code-panel {
  min-height: 290px;
  padding: 18px;
  border: 2px solid #111;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 0 rgba(17, 24, 39, 0.08);
}

.info-code-panel strong {
  display: block;
  margin-bottom: 12px;
  color: #7f1d1d;
  font-size: 12px;
  text-transform: uppercase;
}

.info-code-panel pre {
  margin: 0;
  white-space: pre-wrap;
  color: #111;
  font-family: var(--code-font-family);
  font-size: 12px;
  line-height: 1.55;
}

.info-code-panel.after {
  background: #f1fff5;
}

.info-trace-line {
  display: block;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid #4ade80;
  border-left-width: 5px;
  border-radius: 7px;
  background: #dcfce7;
}

.info-band {
  padding: 34px 48px;
  border-bottom: 1px solid #d5dde1;
  background: #fff;
}

.info-band.alt {
  background: #f7fafb;
}

.info-band h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.info-band p {
  max-width: 980px;
  margin: 0 0 12px;
  color: #25323a;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.info-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #cbd5da;
  border-radius: 7px;
  background: #fff;
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.info-card p {
  margin: 0;
  font-size: 14px;
}

.info-logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.info-logo-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #cbd5da;
  border-radius: 7px;
  background: #fff;
  font-weight: 900;
}

.info-logo-strip img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.info-note-list {
  max-width: 980px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: #25323a;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.info-footer {
  padding: 20px 48px 30px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.professional-page .language-side-panel,
.professional-page .example-side-panel,
.professional-page .temp-language-footer {
  display: none;
}

.professional-page {
  counter-reset: professional-section;
  height: auto;
  min-height: 100vh;
  overflow: auto;
  background: #f1e7da;
}

.professional-page > header {
  position: relative;
  top: auto;
  z-index: auto;
  border-bottom-color: #c6ced2;
  background: #f7efe5;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
}

.professional-page > header .controls {
  grid-template-columns: minmax(360px, 560px);
  align-items: center;
}

.professional-page .control-cluster {
  min-height: 44px;
  padding: 7px 10px;
}

.professional-page .professional-top-strip {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 32px;
}

.professional-page .professional-top-strip .page-title-group {
  grid-column: 1;
}

.info-page .info-fixed-top {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 32px;
}

.info-page .info-fixed-top .page-title-group {
  grid-column: 1;
}

.professional-page .language-controls label:nth-child(3) {
  display: none;
}

.professional-page .professional-hero,
.professional-page > .professional-ad-slot,
.professional-page .professional-signal-strip,
.professional-page .professional-flow,
.professional-page .professional-use-cases,
.professional-page .professional-trust,
.professional-page .professional-language-showcase,
.professional-page > header,
.professional-page .professional-work-zone,
.professional-page .professional-faq {
  position: relative;
  counter-increment: professional-section;
}

.professional-page .professional-hero::before,
.professional-page > .professional-ad-slot::before,
.professional-page .professional-signal-strip::before,
.professional-page .professional-flow::before,
.professional-page .professional-use-cases::before,
.professional-page .professional-trust::before,
.professional-page .professional-language-showcase::before,
.professional-page > header::before,
.professional-page .professional-work-zone::before,
.professional-page .professional-faq::before {
  content: counter(professional-section, decimal-leading-zero);
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 10px;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-family: var(--ui-font-family);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(17, 24, 39, 0.16);
  pointer-events: none;
}

.professional-hero {
  flex: 0 0 auto;
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(420px, 1.18fr);
  align-items: stretch;
  gap: 18px;
  padding: 22px 42px 18px;
  border-bottom: 2px solid #111;
  background: #fffaf4;
}

.professional-hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.professional-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.professional-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #111;
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: 0;
}

.professional-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: #263238;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.professional-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.professional-primary-link,
.professional-secondary-link {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: lowercase;
  transition:
    transform 90ms ease,
    background-color 90ms ease,
    border-color 90ms ease,
    box-shadow 90ms ease;
}

.professional-primary-link {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.professional-secondary-link {
  border-color: var(--button-feedback-hover-border);
  color: #7f1d1d;
}

.professional-primary-link:hover,
.professional-primary-link:focus-visible {
  background: #115e59;
}

.professional-secondary-link:hover,
.professional-secondary-link:focus-visible {
  background: var(--button-feedback-hover-bg);
}

.professional-primary-link:active,
.professional-secondary-link:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.24);
}

.professional-comparison {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(230px, 0.92fr) minmax(270px, 1.08fr);
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #f8fbfc;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.09);
}

.professional-compare-panel {
  min-width: 0;
  min-height: 190px;
  padding: 12px;
  border: 1px solid #c7d2d8;
  border-radius: 7px;
  background: #fff;
}

.professional-compare-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.professional-compare-panel pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #111;
  font-family: var(--code-font-family);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.professional-compare-panel.before {
  background: #fff;
}

.professional-compare-panel.after {
  background: #f1fff5;
}

.professional-trace-box {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 7px;
  color: #111;
  font-family: var(--code-font-family);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.42;
}

.professional-trace-box span {
  overflow-wrap: anywhere;
}

.professional-trace-box.level-one {
  border: 2px solid #22c55e;
  background: #dcfce7;
}

.professional-trace-box.level-two {
  border: 2px solid #0ea5e9;
  background: #e0f2fe;
}

.professional-trace-box.level-three {
  border: 2px solid #d946ef;
  background: #fae8ff;
}

.professional-visual {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #f8fbfc;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
}

.professional-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  gap: 12px;
}

.professional-logo-grid span {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid #d3dce0;
  border-radius: 7px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.professional-preview-code {
  min-width: 0;
  padding: 18px 18px 18px 20px;
  border: 1px solid #b7c7cd;
  border-left: 6px solid #0f766e;
  border-radius: 7px;
  background: #111827;
  color: #e5f8f5;
  font-family: var(--code-font-family);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.professional-preview-code span {
  display: block;
  overflow-wrap: anywhere;
}

.professional-preview-code .preview-indent {
  padding-left: 18px;
  color: #fef3c7;
}

.professional-signal-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px 42px;
  border-bottom: 1px solid #c9d3d7;
  background: #f7fafb;
}

.professional-signal {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d4dde1;
  border-radius: 7px;
  background: #fff;
}

.professional-signal span {
  color: #617077;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.professional-signal strong {
  min-width: 0;
  color: #111;
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.professional-flow {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(420px, 1fr);
  align-items: stretch;
  gap: 18px;
  padding: 24px 42px;
  border-bottom: 1px solid #c9d3d7;
  background: #f7fafb;
}

.professional-flow-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.professional-flow-copy h2 {
  margin: 0;
  color: #111;
  font-size: 26px;
  line-height: 1.14;
  letter-spacing: 0;
}

.professional-flow-copy p:not(.professional-kicker) {
  margin: 12px 0 0;
  color: #3b4850;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.professional-flow-steps {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.professional-flow-steps article {
  min-width: 0;
  min-height: 150px;
  padding: 14px;
  border: 1px solid #d2dce0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(17, 24, 39, 0.05);
}

.professional-flow-steps span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f766e;
  border-radius: 7px;
  background: #e6fffa;
  color: #0f766e;
  font-size: 14px;
  font-weight: 950;
}

.professional-flow-steps h3 {
  margin: 12px 0 7px;
  color: #111;
  font-size: 15px;
  line-height: 1.15;
}

.professional-flow-steps p {
  margin: 0;
  color: #3b4850;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.professional-use-cases {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(480px, 1fr);
  gap: 18px;
  padding: 24px 42px;
  border-bottom: 1px solid #c9d3d7;
  background: #fff;
}

.professional-use-cases-head {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.professional-use-cases-head h2 {
  margin: 0;
  color: #111;
  font-size: 24px;
  line-height: 1.14;
  letter-spacing: 0;
}

.professional-use-case-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.professional-use-case-grid article {
  min-width: 0;
  min-height: 132px;
  padding: 14px;
  border: 1px solid #d6e0e3;
  border-left: 5px solid var(--button-feedback-hover-border);
  border-radius: 7px;
  background: #fff7fa;
}

.professional-use-case-grid h3 {
  margin: 0 0 8px;
  color: #111;
  font-size: 15px;
  line-height: 1.2;
}

.professional-use-case-grid p {
  margin: 0;
  color: #3b4850;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.professional-trust {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(460px, 1fr);
  align-items: stretch;
  gap: 18px;
  padding: 22px 42px;
  border-bottom: 1px solid #c9d3d7;
  background: #f7fafb;
}

.professional-trust-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.professional-trust-copy h2 {
  margin: 0;
  color: #111;
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: 0;
}

.professional-trust-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.professional-trust-list article {
  min-width: 0;
  min-height: 126px;
  padding: 14px;
  border: 1px solid #c9d3d7;
  border-top: 5px solid #0f766e;
  border-radius: 7px;
  background: #fff;
}

.professional-trust-list strong {
  display: block;
  margin-bottom: 8px;
  color: #111;
  font-size: 14px;
  line-height: 1.22;
}

.professional-trust-list p {
  margin: 0;
  color: #3b4850;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.professional-language-showcase {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(360px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 42px;
  border-bottom: 1px solid #c9d3d7;
  background: #ffffff;
}

.professional-language-showcase-copy {
  min-width: 0;
}

.professional-language-showcase-copy .professional-kicker {
  margin-bottom: 4px;
}

.professional-language-showcase h2 {
  margin: 0;
  color: #111;
  font-size: 20px;
  line-height: 1.24;
  letter-spacing: 0;
}

.professional-showcase-logos {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.professional-showcase-logos span {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d6e0e3;
  border-radius: 7px;
  background: #f9fbfc;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.professional-showcase-logos img {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.professional-workbench-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-bottom: 1px solid #c9d3d7;
  background: #fff;
}

.professional-workbench-copy {
  min-width: 0;
}

.professional-workbench-copy .professional-kicker {
  margin-bottom: 4px;
}

.professional-workbench-copy h2 {
  margin: 0;
  color: #111;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.professional-workbench-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.professional-workbench-actions button {
  min-width: 104px;
  min-height: 34px;
  font-size: 12px;
}

.professional-page #output:empty::before {
  content: "Formatted visual trace will appear here.";
  display: block;
  color: #7a858b;
  font-family: var(--ui-font-family);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.professional-work-zone {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(720px, 1fr);
  grid-template-rows: auto minmax(0, auto);
  gap: 12px;
  padding: 42px 32px 22px;
  border-bottom: 1px solid #d5dde1;
  background: #f1e7da;
}

.professional-work-tools {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 62px;
  z-index: 18;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 190px) minmax(560px, 1fr) minmax(
      96px,
      120px
    );
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid #c9d2d7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.1);
}

.professional-work-tuning {
  min-height: 44px;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 10px;
  border: 0;
  background: #f7fafb;
}

.professional-work-tuning label {
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid #d8e1e5;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}

.professional-work-tuning input {
  width: 70px;
}

.professional-work-tuning input[type="checkbox"] {
  width: 26px;
  height: 26px;
}

.professional-run-cell {
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.professional-work-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.professional-work-actions button {
  min-height: 34px;
  flex: 1 1 44px;
  padding: 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.professional-run-cell > #formatBtn {
  --button-bg: var(--ui-green);
  --button-border: #111;
  --button-hover-bg: var(--ui-red);
  --button-hover-border: #111;
  --button-active-bg: var(--ui-green);
  --button-active-border: #111;
  width: 100%;
  min-height: 52px;
  align-self: stretch;
  color: #111;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: none;
}

.professional-run-cell > #formatBtn:not(:disabled):hover {
  color: #111;
  box-shadow: none;
}

.professional-run-cell > #formatBtn:not(:disabled):active {
  transform: translateY(3px) scale(0.99);
  box-shadow:
    inset 0 3px 8px rgba(5, 46, 22, 0.36),
    0 1px 0 rgba(20, 83, 45, 0.22);
}

.professional-page main {
  grid-column: 1;
  grid-row: 2;
  flex: 0 0 min(68vh, 760px);
  grid-template-columns:
    minmax(180px, 240px) minmax(360px, 0.95fr) 8px
    minmax(420px, 1.05fr);
  gap: 6px;
  padding: 0;
  background: #f1e7da;
}

.professional-language-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  border: 2px solid #111;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
}

.professional-language-column .controls {
  width: 100%;
  min-width: 0;
  display: block;
  padding: 10px;
}

.professional-language-column .language-controls {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px;
}

.professional-language-column .language-controls label {
  width: 100%;
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 6px;
}

.professional-language-column .language-controls select {
  width: 100%;
  min-width: 0;
}

.professional-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 42px 24px;
  border-top: 1px solid #d5dde1;
  background: #111;
  color: #fff;
}

.professional-footer p {
  margin: 0;
  min-width: 0;
  color: #eef7f6;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.professional-footer-nav {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.professional-footer-nav a {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #54616a;
  border-radius: 5px;
  background: #1f2933;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: lowercase;
}

.professional-footer-nav a:hover,
.professional-footer-nav a:focus-visible {
  border-color: var(--button-feedback-hover-border);
  background: #7f1d1d;
}

.professional-page .input-workspace,
.professional-page
  .input-workspace:has(.example-side-panel:not(.is-collapsed)) {
  grid-template-columns: 1fr;
}

.professional-page .pane {
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.professional-page .pane:focus-within {
  border-color: #111;
  box-shadow:
    0 0 0 3px rgba(17, 17, 17, 0.12),
    0 8px 22px rgba(17, 24, 39, 0.12);
}

.professional-page textarea,
.professional-page #output {
  padding-top: 24px;
}

.professional-faq {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(520px, 1fr);
  gap: 18px;
  padding: 24px 42px 32px;
  border-top: 1px solid #c9d3d7;
  background: #fff;
}

.professional-faq-head {
  min-width: 0;
}

.professional-faq-head h2 {
  margin: 0;
  color: #111;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.professional-faq-list {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.professional-faq-list details {
  min-width: 0;
  border: 1px solid #c9d3d7;
  border-radius: 7px;
  background: #f7fafb;
}

.professional-faq-list summary {
  min-height: 44px;
  padding: 12px 14px;
  color: #111;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.professional-faq-list details[open] summary {
  border-bottom: 1px solid #d8e0e4;
  background: var(--button-feedback-hover-bg);
}

.professional-faq-list p {
  margin: 0;
  padding: 12px 14px 14px;
  color: #3b4850;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 40%) 8px minmax(340px, 1fr);
  gap: 6px;
  padding: 20px 50px 20px 292px;
}

body:has(.language-side-panel.is-collapsed) main {
  padding-left: 62px;
}

.professional-page:has(.language-side-panel.is-collapsed) main {
  padding: 0;
}

.input-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
}

.input-workspace:has(.example-side-panel:not(.is-collapsed)) {
  grid-template-columns: var(--example-side-width) minmax(0, 1fr);
}

.example-side-panel {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fbfbf8;
  overflow: hidden;
}

.example-side-panel[data-category="databases"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.example-side-panel[data-category="web"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.example-side-panel[data-category="backend"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.example-side-panel.is-collapsed .example-side-content {
  display: none;
}

.example-panel-toggle {
  position: static;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 6px 0 6px 6px;
}

.example-side-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.example-side-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: auto;
  padding-right: 2px;
}

.example-side-family-separator {
  height: 0;
  margin: 5px 4px;
  border-top: 1px solid #111;
  background: transparent;
}

.example-side-item {
  --button-bg: var(--button-surface);
  --button-hover-bg: var(--button-feedback-hover-bg);
  --button-hover-border: var(--button-feedback-hover-border);
  --button-active-bg: var(--button-feedback-active-bg);
  --button-active-border: var(--button-feedback-active-border);
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--side-accent) 28%, #ffffff);
  border-radius: 5px;
  background: var(--button-surface);
  color: #111;
  text-align: left;
  font-size: 12px;
  font-weight: var(--selection-list-font-weight);
  line-height: 1.2;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.example-side-item:hover {
  border-color: var(--button-feedback-hover-border);
  background: var(--button-feedback-hover-bg);
}

.example-side-item:focus-visible,
.language-side-item:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.example-side-item.is-active {
  border-color: #111;
  background: var(--ui-green);
  color: #111;
  box-shadow: none;
  font-weight: var(--selection-list-active-font-weight);
}

[data-panel-number="600"] button.example-side-item:not(.is-active) {
  border-color: #d8dddc;
  background: #ffffff;
  box-shadow: none;
}

[data-panel-number="600"] button.example-side-item:not(.is-active):not(:disabled):hover {
  border-color: #111;
  background: var(--ui-red);
  box-shadow: none;
}

[data-panel-number="600"] button.example-side-item.is-active:not(:disabled):hover {
  border-color: #111;
  background: var(--ui-green);
}

.language-side-panel {
  position: fixed;
  z-index: 12;
  left: 12px;
  top: var(--language-side-top);
  bottom: var(--language-side-bottom);
  width: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.language-side-panel.is-collapsed {
  width: 36px;
}

.language-side-panel.is-collapsed .language-side-content {
  display: none;
}

.side-panel-toggle {
  position: static;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 6px 0 6px 6px;
}

.language-side-content {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  padding: 0 8px 8px;
  overflow: auto;
}

.language-side-category {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
  padding: 7px 0 9px;
  border-top: 1px solid #d6dbdd;
}

.language-side-category[data-category="databases"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.language-side-category[data-category="web"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.language-side-category[data-category="backend"] {
  --side-accent: #111;
  --side-bg: #f0fdfa;
  --side-active-bg: #ccfbf1;
}

.language-side-category:first-child {
  border-top: 0;
  padding-top: 0;
}

.language-side-category-title {
  margin: 0 0 6px;
  color: var(--side-accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: lowercase;
}

.language-side-items {
  display: grid;
  gap: 4px;
}

.language-side-subgroup-label {
  margin: 8px 2px 2px;
  padding: 0 3px 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--side-accent) 24%, #ffffff);
  color: color-mix(in srgb, var(--side-accent) 78%, #111111);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.language-side-subgroup-label:first-child {
  margin-top: 0;
}

.language-side-item {
  --button-bg: #ffffff;
  --button-hover-bg: var(--ui-red);
  --button-hover-border: #111;
  --button-active-bg: var(--button-feedback-active-bg);
  --button-active-border: var(--button-feedback-active-border);
  min-height: 34px;
  width: 100%;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid #d8dddc;
  border-radius: 5px;
  background: #ffffff;
  color: #111;
  text-align: left;
  font-size: 13px;
  font-weight: var(--selection-list-font-weight);
  line-height: 1.2;
  text-transform: none;
}

[data-panel-number="500"] .language-side-category-title,
[data-panel-number="500"] .language-side-subgroup-label,
[data-panel-number="500"] .language-side-item,
[data-panel-number="500"] .language-side-item-label {
  -webkit-user-select: text;
  user-select: text;
}

.language-side-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-panel-number="500"] .language-side-item-label {
  cursor: text;
}

.language-side-item-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 22px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #ffffff;
  color: #111;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

[data-panel-number="500"] .language-side-item-icon,
[data-panel-number="500"] .language-side-item-icon * {
  -webkit-user-select: none;
  user-select: none;
}

.language-side-logo {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.language-side-icon-fallback {
  display: none;
}

.language-side-icon-fallback.is-visible {
  display: inline;
}

.language-side-item.is-active {
  border-color: #111;
  background: var(--ui-green);
  color: #111;
  box-shadow: none;
  font-weight: var(--selection-list-active-font-weight);
}

.language-side-item.is-active .language-side-item-icon {
  background: #ffffff;
  color: #111;
}

.language-side-item:not(.is-active):hover {
  border-color: var(--button-feedback-hover-border);
  background: var(--button-feedback-hover-bg);
}

.language-side-item.is-active:hover {
  border-color: #111;
  background: var(--ui-green);
}

[data-panel-number="500"] button.language-side-item:not(.is-active):not(:disabled):hover {
  border-color: #111;
  background: var(--ui-red);
  box-shadow: none;
}

[data-panel-number="500"] button.language-side-item.is-active:not(:disabled):hover {
  border-color: #111;
  background: var(--ui-green);
}

.language-logo-preview {
  position: fixed;
  z-index: 30;
  width: 228px;
  height: 228px;
  padding: 18px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  border: 2px solid #0b5f78;
  border-radius: 8px;
  background: #e8f7ff;
  box-shadow: 0 10px 28px rgba(11, 95, 120, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: none;
  transition: none;
}

.language-logo-preview.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}

.language-logo-preview-img {
  display: block;
  max-width: 118px;
  max-height: 118px;
  object-fit: contain;
}

.language-logo-preview-fallback {
  width: 118px;
  height: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #74b7ca;
  border-radius: 7px;
  background: #d9f0f7;
  color: #111;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.language-logo-preview-name {
  max-width: 100%;
  color: #111;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 0 0 #111;
}

.temp-language-footer {
  flex: 0 0 auto;
  position: relative;
  min-height: 44px;
  padding: 10px 32px 14px;
  border-top: 2px solid #111;
  background: #efe3d4;
}

.temp-language-footer.is-collapsed {
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.temp-language-footer.is-collapsed .temp-language-box {
  display: none;
}

.footer-toggle {
  top: 5px;
}

.temp-language-box {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 14px;
  border: 1px solid #b9bec1;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.temp-language-box p {
  margin: 0;
  overflow-wrap: anywhere;
}

.temp-language-box p + p {
  margin-top: 4px;
}

.pane {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
}

.numbered-pane {
  position: relative;
}

.line-gutter {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 52px;
  overflow: hidden;
  border-right: 1px solid #ddd;
  background: #f4f4f1;
  color: #777;
  font-family: var(--code-font-family);
  font-size: var(--font-size);
  font-variant-numeric: tabular-nums;
  line-height: var(--line-height);
  font-weight: 700;
  user-select: none;
  pointer-events: none;
  contain: strict;
}

.line-gutter-content {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

#inputLines {
  font-size: var(--input-font-size);
}

#outputLines {
  font-size: var(--output-font-size);
}

.ln-mark {
  position: absolute;
  right: 9px;
  width: 34px;
  text-align: right;
}

body:not(.exporting-pdf) .ln-mark.is-active {
  color: #111;
  background: rgba(255, 249, 196, 0.86);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(161, 98, 7, 0.42);
  font-weight: 900;
}

textarea,
#output {
  width: 100%;
  height: 100%;
  padding: 20px 20px 44px 72px;
  border: 0;
  outline: 0;
  overflow: auto;
  font-family: var(--code-font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  white-space: pre;
  tab-size: 4;
}

#output {
  position: relative;
  font-size: var(--output-font-size);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

textarea {
  position: relative;
  z-index: 2;
  background: transparent;
  font-size: var(--input-font-size);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  overflow-x: auto;
  resize: none;
  spellcheck: false;
}

:root.input-wrap-enabled textarea {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
}

.input-active-line-marker {
  position: absolute;
  z-index: 1;
  left: 52px;
  right: 0;
  border-top: 1px solid rgba(161, 98, 7, 0.22);
  border-bottom: 1px solid rgba(161, 98, 7, 0.22);
  background: rgba(255, 249, 196, 0.48);
  pointer-events: none;
}

.input-active-line-marker[hidden] {
  display: none;
}

.input-selection-link-marker {
  position: absolute;
  z-index: 1;
  border-radius: 0;
  background: rgba(248, 113, 113, 0.42);
  box-shadow: none;
  pointer-events: none;
}

.input-selection-link-marker[hidden] {
  display: none;
}

.pane-counter {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 8px;
  min-width: 96px;
  max-width: calc(100% - 72px);
  padding: 4px 8px;
  border: 1px solid #b8c2c7;
  border-radius: 5px;
  background: #f8fbfc;
  color: #263238;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.pane-counter.is-tracing-line {
  border-color: #a16207;
  background: #fff7d6;
  color: #111;
  box-shadow:
    0 0 0 2px rgba(161, 98, 7, 0.16),
    0 1px 2px rgba(0, 0, 0, 0.08);
}

.resizer {
  position: relative;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  border: 0;
  outline: 0;
  background: #e6e6e1;
}

.resizer:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.28);
}

.line {
  min-height: calc(var(--output-font-size) * var(--line-height));
  font-family: var(--code-font-family);
  font-weight: 700;
}

.line.comment,
.comment-token {
  color: #168a3a;
  font-weight: 700;
}

.line.paren-line {
  color: #555;
  opacity: 0.75;
  min-height: calc(var(--output-font-size) * 1.15);
}

.line.collapsed-hidden,
.block.collapsed-hidden {
  display: none;
}

.block {
  position: relative;
  margin: var(--box-gap) var(--box-gap) calc(var(--box-gap) * 2) var(--indent);
  padding: 6px 8px;
  border: 1px solid hsl(var(--hue), 76%, 78%);
  border-left: 3px solid hsl(var(--hue), 78%, 46%);
  border-radius: 8px;
  background: hsla(var(--hue), 86%, 93%, 0.82);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.7);
}

.block > .line {
  box-sizing: border-box;
  padding-right: 30px;
}

body:not(.exporting-pdf) #output .line:not(.collapsed-hidden):hover,
body:not(.exporting-pdf)
  #output
  .line[data-trace-active="true"]:not(.collapsed-hidden) {
  background: rgba(255, 249, 196, 0.72);
}

.selection-linked-output-token {
  position: absolute;
  z-index: 3;
  display: block;
  border-radius: 0;
  background: rgba(248, 113, 113, 0.4);
  box-shadow: none;
  pointer-events: none;
}

.selection-linked-output-token[hidden] {
  display: none;
}

.block > .collapse-btn + .block {
  margin-top: 18px;
}

.collapse-btn {
  --button-bg: #fff;
  --button-border: rgba(0, 0, 0, 0.18);
  --button-hover-bg: #fff;
  --button-hover-border: var(--button-feedback-hover-border);
  --button-active-bg: #fff;
  --button-active-border: var(--button-feedback-active-border);
  position: absolute;
  top: 2px;
  right: 3px;
  width: 21px;
  height: 21px;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--button-border);
  border-radius: 3px;
  background: var(--button-bg);
  color: #222;
  cursor: pointer;
  font-family: var(--ui-font-family);
  font-size: 18px;
  font-weight: 900;
  line-height: 15px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 1;
  -webkit-user-select: none;
  user-select: none;
  transition:
    transform 90ms ease,
    opacity 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.collapse-btn::before {
  content: attr(data-collapse-symbol);
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.block.type-sql {
  border-color: #8dd09a;
  border-left-color: #238b35;
  background: rgba(232, 250, 233, 0.88);
}

.block.type-begin {
  border-color: #b5a7ef;
  border-left-color: #6546d8;
  background: rgba(241, 238, 255, 0.88);
}

.block.type-declare {
  border-color: #7dd3fc;
  border-left-color: #0284c7;
  background: rgba(232, 246, 255, 0.9);
}

.block.type-if {
  border-color: #f2a1bf;
  border-left-color: #d12b70;
  background: rgba(255, 235, 244, 0.88);
}

.block.type-loop {
  border-color: #80cf8f;
  border-left-color: #1d9a42;
  background: rgba(229, 250, 233, 0.88);
}

.block.type-try,
.block.type-catch,
.block.type-finally {
  border-color: #d0a56b;
  border-left-color: #a25d05;
  background: rgba(255, 243, 224, 0.9);
}

.block.type-jsfunction {
  border-color: #b79ff0;
  border-left-color: #7147d8;
  background: rgba(242, 236, 255, 0.88);
}

.block.type-jsclass {
  border-color: #a8b9ff;
  border-left-color: #335bd6;
  background: rgba(235, 240, 255, 0.9);
}

.block.type-exec {
  border-color: #7dd3fc;
  border-left-color: #0284c7;
  background: rgba(232, 246, 255, 0.9);
}

.block.type-case {
  border-color: #d2b25e;
  border-left-color: #9b6a00;
  background: rgba(255, 244, 210, 0.9);
}

.block.type-decls,
.block.type-vars {
  border-color: #8ebde8;
  border-left-color: #1e73be;
  background: rgba(230, 244, 255, 0.86);
}

.block.type-varsgroup {
  border-color: #93c5fd;
  border-left-color: #2563eb;
  border-left-width: 4px;
  background: rgba(239, 246, 255, 0.78);
}

.block.type-type,
.block.type-cursor {
  border-color: #73c7c1;
  border-left-color: #088982;
  background: rgba(225, 249, 247, 0.86);
}

.block.type-exception {
  border-color: #e78abf;
  border-left-color: #c21872;
  background: rgba(255, 232, 244, 0.9);
}

.block.type-exceptionwhen {
  border-color: #d991c5;
  border-left-color: #9c2a8f;
  background: rgba(253, 231, 250, 0.92);
}

.block.type-sqlselect {
  margin-top: 8px;
  margin-bottom: 8px;
  border-color: #6fc4aa;
  border-left-color: #0f8b6b;
  background: rgba(225, 248, 239, 0.9);
}

.block.type-programunit {
  margin-top: 12px;
  margin-bottom: 14px;
  border-color: #4ade80;
  border-left-color: #16a34a;
  border-left-width: 3px;
  background: rgba(232, 252, 236, 0.96);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.block.type-programdecls {
  border-color: #7dd3fc;
  border-left-color: #0284c7;
  background: rgba(232, 246, 255, 0.9);
}

.block.type-signature {
  border-color: #c084fc;
  border-left-color: #7e22ce;
  background: rgba(243, 232, 255, 0.9);
}

.block.type-parameters {
  border-color: #f0abfc;
  border-left-color: #c026d3;
  background: rgba(253, 244, 255, 0.92);
}

.block.type-vars {
  border-color: #60a5fa;
  border-left-color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
}

.block.type-localsubprogram {
  border-color: #f0abfc;
  border-left-color: #a21caf;
  background: rgba(253, 232, 255, 0.9);
}

.block.type-localbody {
  border-color: #67e8f9;
  border-left-color: #0891b2;
  background: rgba(236, 254, 255, 0.92);
}

.block.type-sqlsection {
  margin-top: 3px;
  margin-bottom: 3px;
  margin-right: 4px;
  padding-right: 8px;
  padding-left: 8px;
  padding-top: 2px;
  padding-bottom: 2px;
  border-color: transparent;
  border-left-color: #4d988d;
  background: transparent;
}

.block.type-subquery {
  margin-top: 4px;
  margin-bottom: 4px;
  padding-top: 3px;
  padding-bottom: 3px;
  border-color: #72b7dd;
  border-left-color: #1f78b4;
  background: rgba(229, 243, 252, 0.88);
}

.block.type-viewoption {
  margin-top: 6px;
  margin-bottom: 6px;
  border-color: #8dd09a;
  border-left-color: #238b35;
  background: rgba(232, 250, 233, 0.9);
}

.block.type-label {
  margin-top: 4px;
  margin-bottom: 4px;
  padding-top: 3px;
  padding-bottom: 3px;
  border-color: #f3c27c;
  border-left-color: #c26a00;
  background: rgba(255, 244, 224, 0.92);
}

.block.type-decode {
  border-color: #ddb553;
  border-left-color: #a46c00;
  background: rgba(255, 244, 205, 0.9);
}

.block.type-window {
  border-color: #69a9e9;
  border-left-color: #1666b1;
  background: rgba(226, 240, 255, 0.9);
}

.block.type-function {
  border-color: #c084fc;
  border-left-color: #7e22ce;
  background: rgba(243, 232, 255, 0.88);
}

.block.type-with {
  border-color: #86efac;
  border-left-color: #16a34a;
  background: rgba(240, 253, 244, 0.9);
}

.block.type-cte {
  border-color: #93c5fd;
  border-left-color: #2563eb;
  background: rgba(239, 246, 255, 0.9);
}

.block.type-grouping {
  border-color: #9f8cea;
  border-left-color: #6046c6;
  background: rgba(239, 235, 255, 0.9);
}

.block.type-groupingitem {
  border-color: #c2a16a;
  border-left-color: #8b5e16;
  background: rgba(255, 247, 232, 0.88);
}

.block[data-depth] {
  border-color: hsl(var(--hue), 76%, 78%);
  border-left-color: hsl(var(--hue), 78%, 46%);
  background: hsla(var(--hue), 86%, 93%, 0.84);
}

#output .block[data-depth="16"],
#output .block[data-depth="17"],
#output .block[data-depth="18"],
#output .block[data-depth="19"],
#output .block[data-depth="20"],
#output .block[data-depth="21"],
#output .block[data-depth="22"],
#output .block[data-depth="23"],
#output .block[data-depth="24"],
#output .block[data-depth="25"],
#output .block[data-depth="26"],
#output .block[data-depth="27"],
#output .block[data-depth="28"],
#output .block[data-depth="29"],
#output .block[data-depth="30"] {
  margin-left: calc(var(--indent) * 0.5);
  padding-left: 6px;
  padding-right: 6px;
}

#output .block[data-depth="16"] > .line,
#output .block[data-depth="17"] > .line,
#output .block[data-depth="18"] > .line,
#output .block[data-depth="19"] > .line,
#output .block[data-depth="20"] > .line,
#output .block[data-depth="21"] > .line,
#output .block[data-depth="22"] > .line,
#output .block[data-depth="23"] > .line,
#output .block[data-depth="24"] > .line,
#output .block[data-depth="25"] > .line,
#output .block[data-depth="26"] > .line,
#output .block[data-depth="27"] > .line,
#output .block[data-depth="28"] > .line,
#output .block[data-depth="29"] > .line,
#output .block[data-depth="30"] > .line {
  padding-right: 18px;
}

.block.type-programunit[data-depth] {
  border-color: #4ade80;
  border-left-color: #16a34a;
  border-left-width: 7px;
  background: rgba(232, 252, 236, 0.96);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.block.type-programdecls[data-depth] {
  border-color: #7dd3fc;
  border-left-color: #0284c7;
  background: rgba(232, 246, 255, 0.9);
}

.block.type-signature[data-depth] {
  border-color: #c084fc;
  border-left-color: #7e22ce;
  background: rgba(243, 232, 255, 0.9);
}

.block.type-parameters[data-depth] {
  border-color: #f0abfc;
  border-left-color: #c026d3;
  background: rgba(253, 244, 255, 0.92);
}

.block.type-vars[data-depth] {
  border-color: #60a5fa;
  border-left-color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
}

.block.type-varsgroup[data-depth] {
  border-color: #93c5fd;
  border-left-color: #2563eb;
  border-left-width: 4px;
  background: rgba(239, 246, 255, 0.78);
}

.block.type-using[data-depth] {
  border-color: #9fbfda;
  border-left-color: #3c75a6;
  background: rgba(235, 244, 252, 0.9);
}

.block.type-record[data-depth] {
  border-color: #8fd4bd;
  border-left-color: #16856c;
  background: rgba(232, 250, 244, 0.9);
}

.block.type-property[data-depth] {
  border-color: #a7c7e7;
  border-left-color: #2f72b8;
  background: rgba(239, 247, 255, 0.92);
}

.block.type-rootline[data-depth] {
  border-color: #d8b36a;
  border-left-color: #a16612;
  background: rgba(255, 248, 224, 0.92);
}

:root[data-box-color-mode="similar"] #output .block[data-depth] {
  border-color: hsl(
    var(--depth-sequence-hue),
    76%,
    var(--depth-border-lightness)
  );
  border-left-color: hsl(
    var(--depth-sequence-hue),
    86%,
    var(--depth-left-lightness)
  );
  background: hsla(
    var(--depth-sequence-hue),
    var(--depth-bg-saturation),
    var(--depth-bg-lightness),
    0.9
  );
  box-shadow: inset 0 0 0 1px
    hsla(var(--depth-sequence-hue), 78%, var(--depth-border-lightness), 0.28);
}

:root[data-box-color-mode="distinct"] #output .block[data-depth] {
  border-color: hsl(var(--depth-distinct-hue), 82%, 66%);
  border-left-color: hsl(var(--depth-distinct-hue), 90%, 42%);
  background: hsla(var(--depth-distinct-hue), 82%, 89%, 0.94);
  box-shadow: inset 0 0 0 1px
    hsla(var(--depth-distinct-hue), 82%, 58%, 0.34);
}

:root[data-box-color-mode="layered"] #output .block[data-depth] {
  border-color: hsl(
    var(--depth-layered-hue),
    34%,
    var(--depth-layered-border-lightness)
  );
  border-left-color: hsl(
    var(--depth-layered-hue),
    46%,
    var(--depth-layered-left-lightness)
  );
  background: hsla(
    var(--depth-layered-hue),
    34%,
    var(--depth-layered-bg-lightness),
    0.98
  );
  box-shadow:
    inset 0 0 0 1px
      hsla(var(--depth-layered-hue), 30%, 46%, 0.18),
    0 6px 14px rgba(40, 58, 80, 0.08);
}

.line.sql-union {
  margin: 8px 0;
  color: #222;
  font-weight: 900;
}

.line.sql-case-line {
  padding-left: 16px;
}

.block.type-inlinecase {
  border-color: #e4bd59;
  border-left-color: #b06f00;
  background: rgba(255, 241, 196, 0.94);
  box-shadow: inset 0 0 0 1px rgba(214, 168, 79, 0.28);
}

.kw {
  color: #064f8f;
  font-weight: 900;
}

.alias-token {
  color: #b91c1c;
  font-weight: 900;
}

.line.closes-loop,
.line.closes-if,
.line.closes-begin,
.line.closes-case {
  margin-bottom: 6px;
}

button:not(:disabled):not(.box-theme-btn):hover,
button:not(:disabled):not(.box-theme-btn):focus-visible,
.professional-page-link:hover,
.professional-page-link:focus-visible {
  border-color: #111;
  background: var(--ui-red);
  color: #111;
  box-shadow: none;
}

#formatBtn:not(:disabled):hover,
#formatBtn:not(:disabled):focus-visible {
  box-shadow: none;
}

button.formatter-last-clicked-button:not(.is-cooling-down),
button.formatter-last-clicked-button:not(.is-cooling-down):not(:disabled):hover,
button.formatter-last-clicked-button:not(.is-cooling-down):not(:disabled):focus-visible,
button.formatter-last-clicked-button:not(.is-cooling-down):not(:disabled):active,
.professional-page-link.formatter-last-clicked-button,
.professional-page-link.formatter-last-clicked-button:hover,
.professional-page-link.formatter-last-clicked-button:focus-visible,
.professional-page-link.formatter-last-clicked-button:active {
  border-color: var(--button-last-clicked-border);
  background: var(--button-last-clicked-bg);
  color: #111;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.tuning-controls label.formatter-last-clicked-button {
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--button-last-clicked-bg) 82%, #fff);
  color: #111;
  box-shadow:
    0 0 0 2px var(--button-last-clicked-border),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.tuning-controls label.formatter-last-clicked-button input {
  border-color: var(--button-last-clicked-border);
  background-color: var(--button-last-clicked-bg);
  color: #111;
}

.tuning-controls
  label.formatter-last-clicked-button
  input[type="checkbox"]:checked {
  background-color: var(--button-last-clicked-bg);
}

.box-theme-btn.formatter-last-clicked-button,
.box-theme-btn.formatter-last-clicked-button:hover,
.box-theme-btn.formatter-last-clicked-button:focus-visible,
.box-theme-btn.formatter-last-clicked-button:active {
  border-color: var(--button-last-clicked-border);
  background: var(--button-last-clicked-bg);
  color: #111;
  box-shadow:
    0 0 0 2px rgba(161, 98, 7, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.box-theme-btn.formatter-last-clicked-button .box-theme-name {
  border-color: var(--button-last-clicked-border);
  background: color-mix(in srgb, var(--button-last-clicked-bg) 88%, #fff);
  color: #111;
}

@media (max-width: 2100px) {
  .controls {
    grid-template-columns:
      minmax(520px, 1.45fr) minmax(330px, 0.9fr) minmax(300px, 0.82fr)
      minmax(260px, 0.7fr);
  }

  .control-cluster {
    justify-content: flex-start;
  }

  .language-controls {
    grid-column: 1;
  }

  .tuning-controls {
    grid-column: 2;
  }

  .output-controls {
    grid-column: 3;
  }

  .theme-controls {
    grid-column: 4;
  }

  .language-controls label:last-child {
    flex: 0 0 auto;
  }

  .output-controls button {
    flex: 1 1 auto;
  }

  .professional-page .controls {
    grid-template-columns: minmax(360px, 560px);
  }

  .professional-page .language-controls {
    grid-column: auto;
  }

  .professional-work-tools {
    grid-template-columns: minmax(150px, 170px) minmax(430px, 1fr) minmax(
        84px,
        104px
      );
  }

  .professional-work-tuning {
    grid-template-columns: repeat(5, minmax(74px, 1fr));
    gap: 8px;
  }

  .professional-work-tuning label {
    padding-right: 6px;
    padding-left: 6px;
  }

  .professional-work-tuning input {
    width: 62px;
  }
}

@media (max-width: 1500px) {
  .controls {
    grid-template-columns: minmax(520px, 1fr) minmax(330px, 0.72fr);
  }

  .language-controls {
    grid-column: 1;
  }

  .tuning-controls {
    grid-column: 2;
  }

  .output-controls {
    grid-column: 1;
  }

  .theme-controls {
    grid-column: 2;
  }
}

@media (max-width: 1100px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .professional-hero {
    grid-template-columns: 1fr;
  }

  .professional-comparison,
  .professional-visual {
    grid-template-columns: 1fr;
  }

  .professional-work-zone {
    grid-template-columns: 1fr;
  }

  .professional-work-tools,
  .professional-page main {
    grid-column: 1;
    grid-row: auto;
  }

  .professional-work-tools {
    grid-template-columns: 1fr;
  }

  .professional-work-actions {
    justify-content: flex-start;
  }

  .professional-work-actions button {
    flex: 1 1 150px;
  }

  .professional-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 14px 22px;
  }

  .professional-footer-nav {
    justify-content: flex-start;
  }

  .professional-flow {
    grid-template-columns: 1fr;
  }

  .professional-use-cases {
    grid-template-columns: 1fr;
  }

  .professional-trust {
    grid-template-columns: 1fr;
  }

  .professional-faq {
    grid-template-columns: 1fr;
  }

  .professional-flow-steps {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .professional-use-case-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .professional-trust-list {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .professional-signal-strip,
  .professional-language-showcase {
    grid-template-columns: 1fr;
  }

  .professional-showcase-logos {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .professional-workbench-head {
    grid-template-columns: 1fr;
  }

  .professional-workbench-actions {
    justify-content: flex-start;
  }

  .language-controls,
  .tuning-controls,
  .output-controls,
  .theme-controls {
    grid-column: 1;
  }
}

@media (max-width: 800px) {
  .top-strip {
    grid-template-columns: 1fr;
    padding: 8px 14px;
  }

  .panel-toggle {
    right: 14px;
  }

  .ad-banner,
  .login-actions {
    grid-column: 1;
  }

  .ad-banner {
    width: 100%;
  }

  header {
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }

  .professional-hero {
    min-height: 0;
    padding: 24px 14px 18px;
    gap: 16px;
  }

  .professional-hero h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .professional-lead {
    font-size: 14px;
  }

  .professional-comparison,
  .professional-visual {
    padding: 14px;
  }

  .professional-signal-strip,
  .professional-ad-slot,
  .professional-flow,
  .professional-use-cases,
  .professional-trust,
  .professional-language-showcase {
    padding: 14px;
  }

  .professional-ad-leaderboard span,
  .professional-ad-footer span {
    min-height: 74px;
  }

  .professional-faq {
    padding: 18px 14px 24px;
  }

  .professional-flow-steps {
    grid-template-columns: 1fr;
  }

  .professional-use-case-grid {
    grid-template-columns: 1fr;
  }

  .professional-trust-list {
    grid-template-columns: 1fr;
  }

  .professional-signal-strip {
    grid-template-columns: 1fr;
  }

  .professional-showcase-logos {
    grid-template-columns: 1fr;
  }

  .professional-workbench-head {
    padding: 14px;
  }

  .professional-workbench-copy h2 {
    font-size: 17px;
  }

  .professional-logo-grid {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    gap: 8px;
  }

  .controls {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .language-controls,
  .tuning-controls,
  .output-controls,
  .theme-controls {
    grid-column: 1;
  }

  .login-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .control-cluster {
    padding: 8px;
  }

  label {
    flex: 1 1 130px;
  }

  select {
    flex: 1 1 220px;
    width: 100%;
  }

  #languageCategorySelect,
  #languageGroupSelect {
    flex: 1 1 150px;
    width: 100%;
  }

  #languageSelect {
    flex: 1 1 260px;
    width: 100%;
  }

  .language-controls {
    grid-template-columns: 1fr;
    grid-template-areas:
      "category"
      "language"
      "example";
  }

  .output-controls {
    grid-template-columns: 1fr;
  }

  .output-controls #formatBtn {
    grid-column: auto;
  }

  button {
    flex: 1 1 130px;
  }

  main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    padding: 12px;
  }

  .professional-page main,
  .professional-page:has(.language-side-panel.is-collapsed) main {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, 1fr) minmax(260px, 1fr);
    padding: 12px;
  }

  .language-side-panel,
  .example-side-panel {
    display: none;
  }

  .input-workspace,
  .input-workspace:has(.example-side-panel:not(.is-collapsed)) {
    grid-template-columns: 1fr;
  }

  .resizer {
    display: none;
  }
}

@media (max-width: 980px) {
  .info-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .info-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .info-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 28px 18px;
  }

  .info-visual {
    grid-template-columns: 1fr;
  }

  .info-band {
    padding: 26px 18px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-footer {
    padding: 18px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body.exporting-pdf {
    height: auto;
    overflow: visible;
    background: #fff;
  }

  body.exporting-pdf .top-strip,
  body.exporting-pdf header,
  body.exporting-pdf .language-side-panel,
  body.exporting-pdf .temp-language-footer,
  body.exporting-pdf #leftPane,
  body.exporting-pdf #resizer {
    display: none;
  }

  body.exporting-pdf main {
    display: block;
    height: auto;
    padding: 0;
  }

  body.exporting-pdf .pane {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: #fff;
  }

  body.exporting-pdf #output {
    height: auto;
    overflow: visible;
    padding: 0 0 0 62px;
    white-space: pre;
  }

  body.exporting-pdf #outputLines {
    position: absolute;
    inset: 0 auto 0 0;
    height: auto;
    background: #fff;
  }

  body.exporting-pdf .collapse-btn {
    display: none;
  }
}
