:root {
  --sg-ink: #223227;
  --sg-muted: #746f66;
  --sg-border: #e8dac6;
  --sg-surface: rgba(255, 252, 246, 0.92);
  --sg-accent: #c69a3d;
  --sg-bg: #f7f2e8;
  --sg-danger: #8a342c;
  --sg-success: #2d6b45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--sg-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--sg-bg);
}

.sgkb-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.sgkb-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.sgkb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.sgkb-hero > div,
.sgkb-hero aside,
.sgkb-start-card {
  border: 1px solid var(--sg-border);
  border-radius: 8px;
  background: var(--sg-surface);
}

.sgkb-hero > div {
  padding: 22px;
}

.sgkb-kicker {
  margin: 0 0 8px;
  color: var(--sg-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sgkb-hero h2 {
  margin: 0;
  max-width: 760px;
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 46px);
  line-height: 1.02;
}

.sgkb-hero aside {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-left: 5px solid var(--sg-accent);
  color: #5f5a52;
  line-height: 1.42;
}

.sgkb-hero aside strong {
  color: var(--sg-ink);
}

.sgkb-header img {
  width: 98px;
  height: auto;
}

.sgkb-header p {
  margin: 0 0 3px;
  color: var(--sg-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sgkb-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
}

.sgkb-search-panel {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, var(--sg-bg) 74%, rgba(247, 242, 232, 0));
}

.sgkb-search-panel input {
  width: 100%;
  border: 1px solid var(--sg-border);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--sg-ink);
  background: var(--sg-surface);
  font-size: 18px;
  font-weight: 700;
  outline: none;
}

.sgkb-product-filters,
.sgkb-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sgkb-group,
.sgkb-product-filter,
.sgkb-start-card button,
.sgkb-back {
  border: 1px solid var(--sg-border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--sg-ink);
  background: rgba(255, 252, 246, 0.78);
  font-weight: 800;
  cursor: pointer;
}

.sgkb-product-filter {
  border-color: rgba(34, 50, 39, 0.18);
  background: rgba(34, 50, 39, 0.06);
}

.sgkb-group.is-active {
  border-color: var(--sg-accent);
  background: rgba(198, 154, 61, 0.16);
}

.sgkb-start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 14px;
}

.sgkb-start-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.sgkb-start-card strong {
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.05;
}

.sgkb-start-card span {
  color: var(--sg-muted);
  line-height: 1.35;
}

.sgkb-start-card button {
  width: fit-content;
  margin-top: 4px;
}

.sgkb-results {
  display: grid;
  gap: 10px;
}

.sgkb-card {
  display: block;
  width: 100%;
  border: 1px solid var(--sg-border);
  border-left: 5px solid var(--sg-accent);
  border-radius: 8px;
  padding: 16px 18px;
  text-align: left;
  color: var(--sg-ink);
  background: var(--sg-surface);
  cursor: pointer;
}

.sgkb-card span,
.sgkb-article-meta {
  display: block;
  margin-bottom: 5px;
  color: var(--sg-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sgkb-card strong,
.sgkb-article h2 {
  display: block;
  margin: 0 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.08;
}

.sgkb-card em {
  display: block;
  color: #5f5a52;
  font-style: normal;
  line-height: 1.4;
}

.sgkb-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sgkb-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(45, 107, 69, 0.1);
  color: var(--sg-success);
  font-size: 11px;
  font-weight: 900;
}

.sgkb-badge.is-warning {
  background: rgba(138, 52, 44, 0.1);
  color: var(--sg-danger);
}

.sgkb-article {
  border: 1px solid var(--sg-border);
  border-radius: 8px;
  padding: 20px;
  background: var(--sg-surface);
}

.sgkb-article-notice {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px dashed var(--sg-accent);
  border-radius: 8px;
  background: rgba(198, 154, 61, 0.11);
  color: #5f5a52;
  line-height: 1.42;
}

.sgkb-article p {
  max-width: 76ch;
  white-space: pre-wrap;
  color: #4c473f;
  font-size: 17px;
  line-height: 1.55;
}

.sgkb-source {
  color: var(--sg-ink);
  font-weight: 900;
}

@media (max-width: 640px) {
  .sgkb-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .sgkb-header {
    align-items: flex-start;
  }

  .sgkb-header img {
    width: 72px;
  }

  .sgkb-hero,
  .sgkb-start {
    grid-template-columns: 1fr;
  }
}
