:root {
  --leb-ink: #18212f;
  --leb-muted: #657184;
  --leb-line: #dfe6ef;
  --leb-soft: #f4f7fb;
  --leb-panel: #ffffff;
  --leb-blue: #2563eb;
  --leb-orange: #f97316;
  --leb-green: #11845b;
  --leb-yellow: #9a6500;
  --leb-red: #b42318;
}

.leb-app,
.leb-app * {
  box-sizing: border-box;
}

.leb-app {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  color: var(--leb-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.leb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--leb-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(238, 244, 255, 0.94) 54%, rgba(255, 247, 237, 0.95) 100%),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0 1px, transparent 1px 28px);
  overflow: hidden;
  position: relative;
}

.leb-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 290px;
  height: 290px;
  border: 28px solid rgba(24, 33, 47, 0.08);
  border-radius: 50%;
  box-shadow: inset 0 0 0 22px rgba(249, 115, 22, 0.08);
  pointer-events: none;
}

.leb-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--leb-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leb-hero h2 {
  margin: 0;
  max-width: 760px;
  color: var(--leb-ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.leb-hero p {
  margin: 14px 0 0;
  max-width: 720px;
  color: #435064;
  font-size: 16px;
  line-height: 1.6;
}

.leb-hero-card {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  position: relative;
  z-index: 1;
}

.leb-hero-card span {
  color: var(--leb-blue);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.leb-hero-card small {
  max-width: 120px;
  margin-top: 8px;
  color: var(--leb-muted);
  text-align: center;
}

.leb-tool {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.leb-form-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.leb-form-panel > .leb-section-title,
.leb-form-panel > .leb-actions,
.leb-form-panel > .leb-quick-examples {
  grid-column: 1 / -1;
}

.leb-panel,
.leb-results,
.leb-info-grid article,
.leb-knowledge,
.leb-seo-content,
.leb-faq {
  border: 1px solid var(--leb-line);
  border-radius: 8px;
  background: var(--leb-panel);
  box-shadow: 0 16px 36px rgba(24, 33, 47, 0.08);
}

.leb-panel {
  padding: 18px;
}

.leb-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.leb-section-title > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--leb-blue);
  font-weight: 800;
}

.leb-section-title h3,
.leb-info-grid h3,
.leb-comparison-table h3,
.leb-suggestions h3,
.leb-conversion h3,
.leb-knowledge h3,
.leb-seo-content h3,
.leb-faq h3 {
  margin: 0;
  color: var(--leb-ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.leb-section-title p {
  margin: 4px 0 0;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.leb-app label {
  display: block;
  margin: 13px 0 6px;
  color: #2c3646;
  font-size: 14px;
  font-weight: 700;
}

.leb-app input,
.leb-app select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  color: var(--leb-ink);
  font: 600 16px/1.2 Arial, Helvetica, sans-serif;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.leb-app select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.leb-app input:focus,
.leb-app select:focus {
  border-color: var(--leb-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.leb-size-group {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.leb-size-group h4 {
  margin: 0 0 10px;
  color: var(--leb-ink);
  font-size: 15px;
  line-height: 1.25;
}

.leb-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.leb-select-grid label {
  margin: 0;
  color: var(--leb-muted);
  font-size: 12px;
}

.leb-select-grid select {
  margin-top: 6px;
}

.leb-actions,
.leb-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.leb-actions {
  margin-top: 16px;
}

.leb-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--leb-blue);
  border-radius: 8px;
  background: var(--leb-blue);
  color: #fff;
  font: 800 14px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.leb-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.leb-btn-ghost {
  border-color: #cfd8e5;
  background: #fff;
  color: var(--leb-ink);
}

.leb-btn-ghost:hover {
  background: #f8fafc;
  box-shadow: none;
}

.leb-quick-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.leb-quick-examples button {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: var(--leb-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.leb-visual-panel {
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#leb-canvas {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 24px rgba(15, 23, 42, 0.08);
}

.leb-status {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.leb-status strong {
  color: var(--leb-ink);
  font-size: 15px;
}

.leb-status.leb-ok {
  background: #ecfdf5;
  color: #0f6b4a;
}

.leb-status.leb-caution {
  background: #fffbeb;
  color: var(--leb-yellow);
}

.leb-status.leb-warn {
  background: #fef3f2;
  color: var(--leb-red);
}

.leb-results {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.leb-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.leb-stat {
  min-height: 112px;
  padding: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.leb-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--leb-blue), var(--leb-orange));
}

.leb-stat span,
.leb-stat small {
  display: block;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.35;
}

.leb-stat strong {
  display: block;
  margin: 8px 0;
  color: var(--leb-ink);
  font-size: 23px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.leb-speed-note {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #ffffff;
}

.leb-speed-note div {
  display: grid;
  gap: 4px;
}

.leb-speed-note span {
  color: var(--leb-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.leb-speed-note strong {
  color: var(--leb-ink);
  font-size: 26px;
  line-height: 1;
}

.leb-speed-note p {
  margin: 0;
  color: #435064;
  font-size: 14px;
  line-height: 1.55;
}

.leb-speed-ok {
  border-color: rgba(17, 132, 91, 0.25);
  background: #ecfdf5;
}

.leb-speed-caution {
  border-color: rgba(154, 101, 0, 0.25);
  background: #fffbeb;
}

.leb-speed-warn {
  border-color: rgba(180, 35, 24, 0.22);
  background: #fef3f2;
}

.leb-warning-panel,
.leb-speed-table {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.leb-warning-panel ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.leb-warning-panel li {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #f8fafc;
}

.leb-warning-panel strong {
  color: var(--leb-ink);
  font-size: 15px;
}

.leb-warning-panel span {
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.leb-risk-ok {
  border-color: rgba(17, 132, 91, 0.22) !important;
  background: #ecfdf5 !important;
}

.leb-risk-caution {
  border-color: rgba(154, 101, 0, 0.24) !important;
  background: #fffbeb !important;
}

.leb-risk-warn {
  border-color: rgba(180, 35, 24, 0.22) !important;
  background: #fef3f2 !important;
}

.leb-speed-table table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.leb-speed-table th,
.leb-speed-table td {
  padding: 12px;
  border-bottom: 1px solid #e5edf6;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.leb-speed-table th {
  background: #eef4ff;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.leb-comparison-table,
.leb-suggestions {
  margin-top: 18px;
}

.leb-comparison-table {
  padding: 18px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0 1px, transparent 1px 28px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.leb-table-head {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.leb-table-head > span {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--leb-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.leb-table-head p {
  margin: 0;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.leb-suggestions {
  padding: 18px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #ffffff;
}

.leb-suggestions p {
  margin: 6px 0 0;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.45;
}

.leb-comparison-table table {
  width: 100%;
  margin-top: 0;
  border-collapse: collapse;
  font-size: 14px;
  overflow: hidden;
  border-radius: 8px;
}

.leb-comparison-table th,
.leb-comparison-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e5edf6;
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
}

.leb-comparison-table th {
  background: #eef4ff;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
}

.leb-comparison-table tbody tr:hover td {
  background: #f8fbff;
}

.leb-comparison-table td:first-child strong {
  display: block;
  color: var(--leb-ink);
  font-size: 15px;
}

.leb-comparison-table td:first-child small {
  display: block;
  margin-top: 4px;
  color: var(--leb-muted);
  font-size: 12px;
  line-height: 1.35;
}

.leb-diff {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.leb-diff-positive {
  background: #fff7ed;
  color: #c2410c;
}

.leb-diff-negative {
  background: #eff6ff;
  color: #1d4ed8;
}

.leb-diff-neutral {
  background: #f1f5f9;
  color: #475569;
}

.leb-suggestions ul,
.leb-conversion-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.leb-suggestions li,
.leb-conversion-list li {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.leb-suggestions li::after,
.leb-conversion-list li::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
}

.leb-suggestions strong,
.leb-conversion-list strong {
  color: var(--leb-ink);
  font-size: 18px;
}

.leb-suggestions span,
.leb-conversion-list span {
  color: var(--leb-muted);
  font-size: 12px;
}

.leb-alt-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.leb-alt-top span {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--leb-blue);
  font-weight: 800;
}

.leb-alt-meter {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.leb-alt-meter i {
  display: block;
  min-width: 8px;
  height: 100%;
  border-radius: inherit;
  background: var(--leb-blue);
}

.leb-alt-meta {
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.leb-alt-meta span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.leb-alt-meta b {
  color: var(--leb-ink);
}

.leb-alt-good .leb-alt-meter i,
.leb-alt-good .leb-alt-top span {
  background: #dcfce7;
  color: var(--leb-green);
}

.leb-alt-mid .leb-alt-meter i,
.leb-alt-mid .leb-alt-top span {
  background: #fef3c7;
  color: var(--leb-yellow);
}

.leb-alt-high .leb-alt-meter i,
.leb-alt-high .leb-alt-top span {
  background: #fee2e2;
  color: var(--leb-red);
}

.leb-offroad-tool {
  grid-template-columns: 460px minmax(0, 1fr);
}

.leb-offroad-tool > .leb-panel {
  display: block;
}

.leb-conversion {
  min-height: 180px;
}

.leb-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.leb-mini-stats span {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--leb-soft);
  color: var(--leb-muted);
  font-size: 13px;
}

.leb-offroad-preview {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 8px;
  background: #fff7ed;
}

.leb-offroad-preview span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.leb-offroad-preview strong {
  color: var(--leb-ink);
  font-size: 22px;
  line-height: 1.05;
}

.leb-offroad-preview small {
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.45;
}

.leb-metric-preview {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eef4ff;
}

.leb-metric-preview span {
  color: #1d4ed8;
}

.leb-metric-preview small {
  color: #1e3a8a;
}

.leb-metric-inch-card {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 58%, #fff7ed 100%);
}

.leb-metric-inch-card > span {
  color: var(--leb-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.leb-metric-inch-card > strong {
  color: var(--leb-ink);
  font-size: 30px;
  line-height: 1;
}

.leb-conversion-subtitle {
  margin-top: 18px !important;
}

.leb-empty {
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--leb-muted);
  font-size: 14px;
}

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

.leb-info-grid article {
  padding: 18px;
}

.leb-info-grid p {
  margin: 9px 0 0;
  color: var(--leb-muted);
  font-size: 14px;
  line-height: 1.6;
}

.leb-knowledge,
.leb-seo-content,
.leb-faq {
  margin-top: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.leb-seo-content p {
  margin: 10px 0 0;
  color: var(--leb-muted);
  font-size: 14px;
  line-height: 1.7;
}

.leb-knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.leb-knowledge-grid article {
  min-height: 150px;
  padding: 15px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
}

.leb-knowledge-grid strong {
  display: block;
  color: var(--leb-ink);
  font-size: 16px;
}

.leb-knowledge-grid p {
  margin: 8px 0 0;
  color: var(--leb-muted);
  font-size: 13px;
  line-height: 1.55;
}

.leb-faq details {
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.leb-faq details + details {
  margin-top: 10px;
}

.leb-faq summary {
  padding: 15px 44px 15px 15px;
  color: var(--leb-ink);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.leb-faq summary::-webkit-details-marker {
  display: none;
}

.leb-faq summary::after {
  content: "+";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--leb-blue);
  line-height: 24px;
  text-align: center;
  transform: translateY(-50%);
}

.leb-faq details[open] summary::after {
  content: "-";
}

.leb-faq details p {
  margin: 0;
  padding: 0 15px 15px;
  color: var(--leb-muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 940px) {
  .leb-hero,
  .leb-tool,
  .leb-offroad-tool,
  .leb-info-grid {
    grid-template-columns: 1fr;
  }

  .leb-hero-card {
    min-height: 110px;
  }

  .leb-form-panel {
    grid-template-columns: 1fr;
  }

  .leb-result-grid,
  .leb-knowledge-grid,
  .leb-warning-panel ul,
  .leb-suggestions ul,
  .leb-conversion-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .leb-hero,
  .leb-panel,
  .leb-results,
  .leb-knowledge,
  .leb-seo-content,
  .leb-faq,
  .leb-info-grid article {
    padding: 14px;
  }

  .leb-hero h2 {
    font-size: 28px;
  }

  .leb-actions,
  .leb-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .leb-select-grid {
    grid-template-columns: 1fr;
  }

  .leb-btn {
    width: 100%;
  }

  #leb-canvas {
    height: 300px;
  }

  .leb-result-grid,
  .leb-knowledge-grid,
  .leb-warning-panel ul,
  .leb-suggestions ul,
  .leb-conversion-list {
    grid-template-columns: 1fr;
  }

  .leb-speed-note {
    grid-template-columns: 1fr;
  }

  .leb-comparison-table {
    overflow-x: auto;
  }

  .leb-comparison-table table {
    min-width: 560px;
  }
}
