:root {
  --port-accent: #2563eb;
  --port-accent-soft: #eaf2ff;
  --port-border: #d8e3f2;
  --port-surface: #ffffff;
  --port-surface-soft: #f6f9fd;
  --port-text: #112031;
  --port-muted: #5f7187;
  --port-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.35);
}

.workspace,
.panel-work,
.panel-related,
.panel-comments {
  display: grid;
  gap: 20px;
}

.panel-intro,
.panel-work,
.panel-related,
.panel-comments {
  position: relative;
  overflow: hidden;
}

.panel-intro::before,
.panel-work::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 140px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 52%),
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0));
  pointer-events: none;
}

.intro-head,
.port-layout {
  position: relative;
  z-index: 1;
}

.intro-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.intro-meta {
  display: grid;
  gap: 16px;
}

.intro-meta h1 {
  margin: 0;
  color: var(--port-text);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.intro-meta .muted {
  margin: 0;
  max-width: 920px;
  color: #4d6279;
  font-size: 15px;
  line-height: 1.9;
}

.intro-meta .ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
}

.panel-intro .tags,
.port-quick-row,
.port-stats-grid,
.port-category-grid,
.port-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-intro .tags span,
.tool-billing span,
.port-pill,
.port-pager button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.panel-intro .tags span {
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #2e4c74;
}

.tool-billing {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-billing .bill-mode {
  background: linear-gradient(135deg, var(--port-accent) 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 16px 28px -20px rgba(37, 99, 235, 0.78);
}

.tool-billing .bill-credit {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.lang-switch {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #d9e4f3;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
  box-shadow: var(--port-shadow);
}

.lang-switch label {
  color: var(--port-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch select,
.port-search-input,
.port-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--port-border);
  border-radius: 18px;
  background: #fff;
  color: var(--port-text);
  padding: 0 16px;
  font-size: 14px;
}

.port-layout {
  display: grid;
  gap: 20px;
}

.port-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.port-block,
.port-result-card,
.port-guide-card,
.port-category-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #dbe5f2;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.98));
  box-shadow: var(--port-shadow);
}

.port-section-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf4ff, #dbe9ff);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #c8dafc;
}

.port-form-grid,
.port-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
}

.port-field {
  display: grid;
  gap: 8px;
}

.port-field label,
.port-meta-card span,
.port-category-card span,
.port-guide-list li {
  color: #5d7186;
  font-size: 13px;
}

.port-field strong,
.port-meta-card strong {
  color: var(--port-text);
}

.port-action-row,
.port-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.port-action-row button,
.port-pager button {
  border: 1px solid #cad7e8;
  background: #f7f9fc;
  color: #395067;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.port-action-row button:hover,
.port-pager button:hover {
  transform: translateY(-1px);
  border-color: #b7c8e0;
  box-shadow: 0 14px 24px -20px rgba(37, 99, 235, 0.5);
}

.port-action-row .primary {
  color: #fff;
  border-color: var(--port-accent);
  background: linear-gradient(135deg, var(--port-accent), #1d4ed8);
}

.port-quick-row button {
  border: 1px solid #d5dfec;
  background: #fff;
  color: #43607e;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.tool-tip {
  min-height: 22px;
  color: var(--port-accent);
  font-size: 13px;
  line-height: 1.6;
}

.tool-tip.error {
  color: #c2410c;
}

.port-meta-card {
  min-width: 150px;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #dae5f2;
  border-radius: 20px;
  background: var(--port-surface-soft);
}

.port-meta-card strong {
  font-size: 28px;
  line-height: 1;
}

.port-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.port-category-card strong {
  font-size: 18px;
  color: var(--port-text);
}

.port-category-card p,
.port-guide-list {
  margin: 0;
  color: #466077;
  line-height: 1.8;
}

.port-guide-list {
  padding-left: 18px;
}

.port-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.port-pill {
  border: 1px solid #cfe0f8;
  background: var(--port-accent-soft);
  color: var(--port-accent);
}

.port-result-wrap {
  overflow-x: auto;
  border: 1px solid #dbe5f1;
  border-radius: 22px;
  background: #fff;
}

.port-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.port-table th,
.port-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e6edf6;
  text-align: left;
  vertical-align: top;
}

.port-table th {
  background: #f8fbff;
  color: #334960;
  font-size: 13px;
  font-weight: 700;
}

.port-table td {
  color: #415a73;
  font-size: 14px;
  line-height: 1.75;
}

.port-table tbody tr:hover {
  background: #fafcff;
}

.port-table code {
  color: var(--port-accent);
  font-size: 18px;
  font-weight: 700;
}

.port-table .type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d3ddeb;
  background: #f7f9fc;
  color: #4a5f76;
}

.port-pager {
  align-items: center;
  justify-content: space-between;
}

.port-pager-status {
  color: #597086;
  font-size: 13px;
}

.port-pager button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.port-empty {
  padding: 24px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 960px) {
  .intro-head,
  .port-top-grid,
  .port-category-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .panel {
    padding: 16px;
  }

  .port-block,
  .port-result-card,
  .port-guide-card,
  .port-category-card {
    padding: 18px;
    border-radius: 22px;
  }

  .intro-meta h1 {
    font-size: 30px;
  }

  .port-table {
    min-width: 640px;
  }
}
