@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Sora:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f1f1f1;
  --surface: #ffffff;
  --border: #d9e3ef;
  --border-strong: #e4ecf5;
  --text-strong: #0f1b2d;
  --text: #42546b;
  --muted: #5f7187;
  --accent: #2f6fe1;
  --accent-soft: rgba(47, 111, 225, 0.12);
  --accent-ghost: rgba(47, 111, 225, 0.08);
  --accent-warm: #f4b740;
  --success: #16a34a;
  --shadow-soft: 0 16px 32px rgba(15, 23, 42, 0.08);
  --shadow-mid: 0 20px 40px rgba(15, 23, 42, 0.1);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", "Segoe UI Web", "Segoe UI Variable", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.kb-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.kb-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-strong);
}

.kb-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kb-header-inner--text {
  justify-content: center;
}

.kb-header-inner--logo {
  position: relative;
}

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

.kb-brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: none;
}

.kb-brand--logo img {
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 140px;
  border-radius: 0;
}

.kb-header-inner--text .kb-brand {
  margin: 0 auto;
  width: 100%;
  justify-content: center;
}

.kb-header-inner--text .kb-brand-text {
  text-align: center;
}

.kb-header-inner--text .kb-brand-name {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.kb-header-inner--logo .kb-brand {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding-left: 12px;
}

.kb-header-inner--logo .kb-brand-text {
  text-align: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.kb-header-inner--logo .kb-brand img {
  margin-top: 10px;
}

.kb-header-inner--logo .kb-brand-name {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.kb-brand-text {
  display: grid;
  gap: 4px;
}

.kb-brand-name {
  font-family: "Fraunces", "Sora", sans-serif;
  font-size: 1.3rem;
  color: var(--text-strong);
}

.kb-brand-sub {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.kb-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef3f9;
  color: #3d4b61;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.kb-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.kb-hero {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-strong);
  padding: 36px;
}

.kb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.kb-hero h1 {
  margin: 12px 0 14px;
  font-family: "Fraunces", "Sora", sans-serif;
  font-size: clamp(32px, 4.2vw, 50px);
  color: var(--text-strong);
  line-height: 1.08;
}

.kb-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--accent-warm);
  font-weight: 600;
}

.kb-lead {
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
  max-width: 42ch;
}

.kb-hero-panel {
  display: grid;
  gap: 14px;
}

.kb-panel-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}

.kb-panel-card.subtle {
  background: #f6f9ff;
}

.kb-panel-title {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 14px;
}

.kb-panel-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.kb-panel-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.kb-panel-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-warm);
}

.kb-search {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  position: relative;
}

.kb-search-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.kb-search-input input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kb-search-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(47, 111, 225, 0.18);
}

.kb-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-mid);
  padding: 8px;
  display: none;
  z-index: 10;
}

.kb-search-panel.is-open {
  display: block;
}

.kb-search-loading,
.kb-search-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.kb-search-list {
  display: grid;
  gap: 6px;
}

.kb-search-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.kb-search-item:hover {
  background: #f1f6ff;
  border-color: #d7e3f8;
  transform: translateY(-1px);
}

.kb-search-title {
  font-weight: 600;
  color: var(--text-strong);
}

.kb-search-intro {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.kb-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kb-section-header h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", "Sora", sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--text-strong);
}

.kb-section-header p {
  margin: 0;
  color: var(--muted);
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.kb-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kb-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-mid);
}

.kb-card h3 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: 1.1rem;
}

.kb-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.kb-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.kb-card-meta .arrow {
  color: var(--accent);
  font-size: 1.2rem;
}

.kb-empty {
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: #ffffff;
}

.kb-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--success);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid #15803d;
  box-shadow: 0 14px 24px rgba(22, 163, 74, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.kb-button:hover,
.kb-button:focus-visible {
  transform: translateY(-2px);
  background: #15803d;
  box-shadow: 0 18px 28px rgba(22, 163, 74, 0.24);
}

.kb-breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  min-height: 28px;
}

.kb-breadcrumbs--home {
  margin-bottom: 4px;
}

.kb-breadcrumbs a {
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(15, 27, 45, 0.45);
}

.kb-breadcrumbs a:hover {
  color: var(--accent-warm);
  text-decoration: none;
}

.kb-breadcrumbs .kb-breadcrumb-current {
  font-weight: 700;
  color: var(--text-strong);
}

.kb-collection-hero,
.kb-article {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  display: grid;
  gap: 20px;
  width: 100%;
}

.kb-collection-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  max-width: 1180px;
  margin: 0;
}

.kb-collection-content {
  max-width: 1180px;
  width: 100%;
  margin: 0;
  display: grid;
  gap: 24px;
}

.kb-count-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.kb-article h1 {
  margin: 0 0 2px;
  font-family: "Fraunces", "Sora", sans-serif;
  font-size: clamp(26px, 3.6vw, 40px);
  color: var(--text-strong);
}

.kb-article {
  max-width: 960px;
  margin: 0;
}

.kb-article .kb-lead {
  margin: 0;
}

.kb-article-header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-strong);
  display: grid;
  gap: 6px;
}

.kb-article-meta {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-align: right;
  margin: 0;
}

.kb-article-body p {
  line-height: 1.8;
  margin: 0 0 8px;
  color: var(--text);
  text-align: justify;
  text-justify: inter-word;
}

.kb-article-body h2,
.kb-article-body h3,
.kb-article-body h4 {
  font-family: "Fraunces", "Sora", sans-serif;
  color: var(--text-strong);
  margin: 24px 0 12px;
  line-height: 1.3;
}

.kb-article-body h2 {
  font-size: 1.5rem;
}

.kb-article-body h3 {
  font-size: 1.2rem;
}

.kb-article-body ul,
.kb-article-body ol {
  margin: 4px 0 12px 20px;
  line-height: 1.4;
}

.kb-article-body li {
  margin: 2px 0;
}

.kb-article-body li p {
  margin: 0;
}

.kb-article-body a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

.kb-article-body a:visited {
  color: var(--accent);
}

.kb-article-body a:hover {
  text-decoration: none;
}

.kb-article-body blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent-soft);
  background: #f4f7ff;
  color: var(--muted);
}

.kb-article-body code {
  font-family: "Sora", "Segoe UI", sans-serif;
  background: #eef3f9;
  padding: 2px 6px;
  border-radius: 8px;
}

.kb-article-body pre {
  background: #eef3f9;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
}

.kb-footer {
  border-top: 1px solid var(--border-strong);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.kb-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 960px) {
  .kb-header-inner,
  .kb-main {
    padding-left: 20px;
    padding-right: 20px;
  }

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

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

@media (max-width: 640px) {
  .kb-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .kb-hero {
    padding: 24px;
  }

  .kb-collection-hero,
  .kb-article {
    padding: 24px;
  }
}
