:root {
  --wra-ink: #16202a;
  --wra-muted: #607080;
  --wra-line: #dce5ec;
  --wra-surface: #ffffff;
  --wra-bg: #f5f7fa;
  --wra-blue: #2563eb;
  --wra-teal: #0f9f8f;
  --wra-amber: #c47a13;
  --wra-red: #dc2626;
  --wra-green: #15803d;
  --wra-shadow: 0 12px 35px rgba(22, 32, 42, 0.09);
}

#root {
  width: 100%;
}

body.page-id-740 .entry-title,
body.page-id-740 .nv-page-title {
  display: none;
}

.wra-app {
  min-height: 100vh;
  color: var(--wra-ink);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 360px),
    var(--wra-bg);
  font-family: Arial, Helvetica, sans-serif;
}

.wra-app *,
.wra-app *::before,
.wra-app *::after {
  box-sizing: border-box;
}

.wra-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.wra-header {
  padding: 28px 0 18px;
  border-bottom: 1px solid rgba(22, 32, 42, 0.08);
}

.wra-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wra-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.wra-kicker {
  margin: 0 0 4px;
  color: var(--wra-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wra-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.wra-subtitle {
  max-width: 840px;
  margin: 16px 0 0;
  color: #3d4d5c;
  font-size: 1rem;
  line-height: 1.65;
}

.wra-main {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0 44px;
}

.wra-panel {
  background: var(--wra-surface);
  border: 1px solid var(--wra-line);
  border-radius: 8px;
  box-shadow: var(--wra-shadow);
}

.wra-panel + .wra-panel {
  margin-top: 18px;
}

.wra-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #edf2f6;
}

.wra-panel-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.wra-panel-body {
  padding: 18px;
}

.wra-button,
.wra-file-label,
.wra-icon-button,
.wra-segment button,
.wra-tab {
  border: 1px solid var(--wra-line);
  border-radius: 6px;
  background: #fff;
  color: var(--wra-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.wra-button,
.wra-file-label {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.wra-button:hover,
.wra-file-label:hover,
.wra-icon-button:hover,
.wra-tab:hover,
.wra-segment button:hover {
  border-color: #b7c6d4;
  background: #f7fafc;
}

.wra-button-primary {
  border-color: var(--wra-blue);
  background: var(--wra-blue);
  color: #fff;
}

.wra-button-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.wra-button-danger {
  color: var(--wra-red);
}

.wra-file-label input {
  display: none;
}

.wra-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.wra-helper {
  margin: 0 0 10px;
  color: var(--wra-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.wra-table-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid var(--wra-line);
  border-radius: 8px;
}

.wra-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.wra-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 8px;
  background: #f2f6fa;
  color: #405060;
  text-align: left;
  font-size: 0.78rem;
}

.wra-table td {
  border-top: 1px solid #edf2f6;
  padding: 5px;
}

.wra-table input,
.wra-table select,
.wra-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--wra-ink);
  font: inherit;
  padding: 6px 8px;
}

.wra-table input:focus,
.wra-table select:focus,
.wra-field input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: var(--wra-blue);
  background: #fff;
}

.wra-icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.wra-empty {
  padding: 26px 12px;
  text-align: center;
  color: var(--wra-muted);
}

.wra-segment {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef3f8;
  border-radius: 8px;
}

.wra-segment button {
  border-color: transparent;
  padding: 8px 12px;
  font-size: 0.84rem;
  white-space: nowrap;
}

.wra-segment .is-active {
  background: #fff;
  color: var(--wra-blue);
  border-color: #d8e2ec;
  box-shadow: 0 2px 8px rgba(22, 32, 42, 0.08);
}

.wra-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.wra-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2eaf1;
  border-radius: 8px;
  background: #f8fbfd;
}

.wra-metric-label {
  color: var(--wra-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.wra-metric-value {
  margin-top: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wra-notice {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #f3cf8c;
  border-radius: 8px;
  background: #fff8e8;
  color: #70450b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.wra-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wra-chart-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--wra-line);
  border-radius: 8px;
  background: #fff;
}

.wra-chart-card-wide {
  margin-bottom: 18px;
}

.wra-chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.wra-chart-title {
  margin: 0;
  font-size: 1rem;
}

.wra-chart-note {
  margin: 4px 0 0;
  color: var(--wra-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.wra-chart {
  position: relative;
  width: 100%;
  height: 360px;
}

.wra-chart-small {
  height: 290px;
}

.wra-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wra-axis,
.wra-grid-line {
  stroke: #ccd7e1;
  stroke-width: 1;
}

.wra-axis-label,
.wra-tick {
  fill: #536372;
  font-size: 12px;
}

.wra-line-blue {
  fill: none;
  stroke: var(--wra-blue);
  stroke-width: 2.5;
}

.wra-line-teal {
  fill: none;
  stroke: var(--wra-teal);
  stroke-width: 2.5;
}

.wra-line-amber {
  fill: none;
  stroke: var(--wra-amber);
  stroke-width: 2.5;
}

.wra-point {
  fill: var(--wra-blue);
  stroke: #fff;
  stroke-width: 2;
}

.wra-hover-zone {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.wra-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  pointer-events: none;
  padding: 10px 12px;
  border: 1px solid var(--wra-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 28px rgba(22, 32, 42, 0.18);
  color: var(--wra-ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.wra-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.wra-tab {
  padding: 8px 11px;
  font-size: 0.84rem;
}

.wra-tab.is-active {
  border-color: var(--wra-blue);
  background: #eaf1ff;
  color: #1d4ed8;
}

.wra-learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wra-explain {
  padding: 15px;
  border: 1px solid var(--wra-line);
  border-radius: 8px;
  background: #fbfdff;
}

.wra-explain h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.wra-explain p,
.wra-explain li {
  color: #435466;
  font-size: 0.9rem;
  line-height: 1.55;
}

.wra-explain p {
  margin: 0 0 10px;
}

.wra-explain ul,
.wra-explain ol {
  margin: 0;
  padding-left: 20px;
}

.wra-theory-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 12px;
  font-size: 0.84rem;
}

.wra-theory-table th,
.wra-theory-table td {
  padding: 9px 8px;
  border: 1px solid #dce6ee;
  text-align: left;
  vertical-align: top;
}

.wra-theory-table th {
  background: #eef5fb;
  color: #263847;
  font-weight: 700;
}

.wra-equation {
  margin: 12px 0;
  padding: 14px;
  border-radius: 8px;
  background: #101826;
  color: #f8fafc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  overflow-x: auto;
}

.wra-formula {
  white-space: nowrap;
}

.wra-formula + .wra-formula {
  margin-top: 8px;
}

.wra-inline-math {
  font-family: Georgia, "Times New Roman", serif;
  color: #16202a;
  white-space: nowrap;
}

.wra-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  min-width: 1.2em;
  margin: 0 0.12em;
  vertical-align: middle;
  line-height: 1.05;
}

.wra-frac > span:first-child {
  width: 100%;
  padding: 0 0.12em 0.08em;
  border-bottom: 1px solid currentColor;
  text-align: center;
}

.wra-frac > span:last-child {
  padding: 0.08em 0.12em 0;
  text-align: center;
}

.wra-paren {
  font-size: 1.15em;
}

.wra-equation sup,
.wra-inline-math sup {
  font-size: 0.72em;
  line-height: 0;
}

.wra-variable-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wra-var {
  padding: 11px;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: #fff;
}

.wra-var strong {
  display: block;
  margin-bottom: 4px;
  color: var(--wra-ink);
}

.wra-field-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.wra-field label {
  display: block;
  margin-bottom: 5px;
  color: var(--wra-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.wra-field input {
  border-color: var(--wra-line);
  background: #fff;
}

.wra-derived {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.wra-derived div {
  padding: 10px;
  border-radius: 8px;
  background: #edf7f5;
  color: #164d45;
  font-size: 0.85rem;
}

.wra-derived strong {
  display: block;
  color: #0b3d37;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1rem;
}

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

.wra-interpret-card {
  padding: 14px;
  border: 1px solid var(--wra-line);
  border-radius: 8px;
  background: #fff;
}

.wra-interpret-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.wra-interpret-card p {
  margin: 0;
  color: #435466;
  font-size: 0.88rem;
  line-height: 1.52;
}

.wra-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
}

.wra-placeholder {
  padding: 34px 20px;
  border: 1px dashed #c8d6e2;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--wra-muted);
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .wra-main,
  .wra-learning-grid,
  .wra-interpretation {
    grid-template-columns: 1fr;
  }

  .wra-sidebar {
    order: 1;
  }

  .wra-content {
    order: 2;
  }
}

@media (max-width: 760px) {
  .wra-shell {
    width: min(100% - 20px, 1440px);
  }

  .wra-header {
    padding-top: 20px;
  }

  .wra-logo {
    width: 40px;
    height: 40px;
  }

  .wra-main {
    padding-top: 14px;
    gap: 14px;
  }

  .wra-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wra-action-row,
  .wra-metrics,
  .wra-grid-two,
  .wra-variable-list,
  .wra-field-row,
  .wra-derived {
    grid-template-columns: 1fr;
  }

  .wra-chart {
    height: 310px;
  }
}
