.kkt-search-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #eef6ff 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.kkt-search-hero__content {
  min-width: 0;
}

.kkt-search-hero__eyebrow {
  margin: 0 0 0.35rem;
  color: #2563eb;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.kkt-search-hero__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.24;
}

.kkt-search-hero__lead {
  max-width: 52rem;
  margin: 0.75rem 0 0;
  color: #475569;
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  line-height: 1.8;
}

.kkt-search-hero__stats {
  flex: 0 0 auto;
  display: grid;
  gap: 0.48rem;
  min-width: min(100%, 16rem);
}

.kkt-search-hero__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.36rem 0.72rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.06);
}

.kkt-search-form {
  margin-bottom: 1.1rem;
  padding: 1rem;
  border: 1px solid #dbe5f2;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.07), transparent 34%),
    #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.kkt-search-plan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.95rem;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.kkt-search-plan-strip__title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.kkt-search-plan-strip__copy {
  margin: 0.18rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.55;
}

.kkt-search-plan-strip__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  justify-content: flex-end;
}

.kkt-search-form__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.kkt-search-form__eyebrow {
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.28rem;
}

.kkt-search-form__title {
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.kkt-search-form__copy {
  flex: 0 1 30rem;
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.6;
}

.kkt-search-form__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(120px, 0.8fr)) minmax(96px, 0.5fr);
  gap: 0.8rem;
  align-items: end;
}

.kkt-search-field {
  min-width: 0;
}

.kkt-search-label {
  display: block;
  margin-bottom: 0.38rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
}

.kkt-search-control {
  width: 100%;
  min-height: 44px;
  padding: 0.66rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background-color: #fff;
  color: #0f172a;
  font: inherit;
  line-height: 1.2;
}

.kkt-search-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.kkt-search-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 52%,
    calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.kkt-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  min-height: 44px;
  padding: 0.66rem 0.9rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.kkt-search-submit:hover {
  filter: brightness(1.04);
}

.kkt-search-results {
  display: grid;
  gap: 0.8rem;
}

.kkt-search-results__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid #dbe5f2;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
    #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.kkt-search-results__title {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.kkt-search-results__lead {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.kkt-search-notice,
.kkt-search-empty {
  padding: 0.9rem 1rem;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.92rem;
}

.kkt-search-count {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  padding: 0.42rem 0.66rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.2;
}

.kkt-search-count span {
  color: #475569;
}

.kkt-search-list {
  display: grid;
  gap: 0.75rem;
}

.kkt-search-card {
  position: relative;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid #dbe5f2;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.kkt-search-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 5px;
  border-radius: 24px 0 0 24px;
  background: linear-gradient(to bottom, #60a5fa, #4f46e5);
}

.kkt-search-card[data-subject="theory"]::before { background: linear-gradient(to bottom, #f97373, #fb7185); }
.kkt-search-card[data-subject="power"]::before { background: linear-gradient(to bottom, #60a5fa, #3b82f6); }
.kkt-search-card[data-subject="machine"]::before { background: linear-gradient(to bottom, #34d399, #10b981); }
.kkt-search-card[data-subject="law"]::before { background: linear-gradient(to bottom, #a78bfa, #6366f1); }

.kkt-search-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.kkt-search-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.kkt-search-card__title {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: -0.025em;
}

.kkt-search-card__meta {
  margin: 0 0 0.2rem;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.kkt-search-card__state {
  flex: 0 0 auto;
  padding: 0.34rem 0.66rem;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.kkt-search-card__state.is-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.kkt-search-card__state.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.kkt-search-card__state.is-muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.kkt-search-card__title a {
  color: inherit;
  text-decoration: none;
}

.kkt-search-card__title a:hover {
  color: #1d4ed8;
}

.kkt-search-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.72rem;
}

.kkt-search-badge-subject,
.kkt-search-badge-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.kkt-search-badge-subject {
  padding: 0.34rem 0.82rem;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #4f46e5);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.kkt-search-badge-subject.is-theory { background: linear-gradient(135deg, #f97373, #fb7185); }
.kkt-search-badge-subject.is-power { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.kkt-search-badge-subject.is-machine { background: linear-gradient(135deg, #34d399, #10b981); }
.kkt-search-badge-subject.is-law { background: linear-gradient(135deg, #a78bfa, #6366f1); }

.kkt-search-badge-meta {
  padding: 0.32rem 0.62rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.kkt-search-badge-meta.is-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.kkt-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.72rem;
}

.kkt-search-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.56rem;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.kkt-search-pill.is-exam {
  flex: 0 0 auto;
  border-color: transparent;
  background: #334155;
  color: #fff;
}

.kkt-search-pill.is-match {
  border-color: #bae6fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.kkt-search-excerpt-box {
  margin: 0.72rem 0 0;
  padding: 0.78rem 0.86rem;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 32%),
    #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.035);
}

.kkt-search-excerpt-box__label {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin-bottom: 0.42rem;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.kkt-search-excerpt-box__label::before {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.kkt-search-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kkt-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.kkt-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.62rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.kkt-search-button.is-primary {
  flex: 1 1 180px;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.kkt-search-button.is-secondary {
  flex: 0 1 150px;
  border-color: #cbd5e1;
  color: #475569;
}

.kkt-search-button:hover {
  filter: brightness(0.985);
  transform: translateY(-1px);
}

.kkt-search-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.kkt-search-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 38px;
  padding: 0.52rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.kkt-search-page-link.is-current {
  border-color: transparent;
  background: #2563eb;
  color: #fff;
}

.kkt-search-page-link.is-disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
}

.kkt-search-empty__title {
  color: #0f172a;
  font-weight: 900;
  line-height: 1.4;
}

.kkt-search-empty__copy {
  margin-top: 0.25rem;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 1199.98px) {
  .kkt-search-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .kkt-search-hero__stats {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kkt-search-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kkt-search-field--keyword,
  .kkt-search-field--submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .kkt-search-hero,
  .kkt-search-form,
  .kkt-search-card {
    border-radius: 16px;
  }

  .kkt-search-hero {
    margin-bottom: 0.55rem;
    padding: 0.68rem;
  }

  .kkt-search-hero__eyebrow {
    margin-bottom: 0.18rem;
    font-size: 0.72rem;
  }

  .kkt-search-hero__title {
    font-size: 1.18rem;
    line-height: 1.16;
  }

  .kkt-search-hero__lead {
    margin-top: 0.28rem;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .kkt-search-hero__stats {
    display: none;
  }

  .kkt-search-form {
    margin-bottom: 0.62rem;
    padding: 0.62rem;
    border-radius: 16px;
  }

  .kkt-search-plan-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 0.46rem;
    margin-bottom: 0.62rem;
    padding: 0.6rem;
    border-radius: 16px;
  }

  .kkt-search-plan-strip__title {
    font-size: 0.9rem;
  }

  .kkt-search-plan-strip__copy {
    display: none;
  }

  .kkt-search-plan-strip__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .kkt-search-plan-strip__actions .kkt-search-button {
    flex: initial;
    min-height: 36px;
    padding: 0.48rem 0.5rem;
    font-size: 0.76rem;
  }

  .kkt-search-form__header {
    flex-direction: column;
    gap: 0.24rem;
    margin-bottom: 0.48rem;
  }

  .kkt-search-form__eyebrow {
    margin-bottom: 0.12rem;
    font-size: 0.68rem;
  }

  .kkt-search-form__title {
    font-size: 0.92rem;
  }

  .kkt-search-form__copy {
    display: none;
  }

  .kkt-search-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .kkt-search-field--keyword,
  .kkt-search-field--submit {
    grid-column: 1 / -1;
  }

  .kkt-search-label {
    margin-bottom: 0.22rem;
    font-size: 0.72rem;
  }

  .kkt-search-control {
    min-height: 38px;
    padding: 0.48rem 0.58rem;
    border-radius: 11px;
    font-size: 0.86rem;
  }

  .kkt-search-select {
    padding-right: 1.65rem;
    background-position:
      calc(100% - 13px) 52%,
      calc(100% - 8px) 52%;
  }

  .kkt-search-submit {
    min-height: 38px;
    padding: 0.5rem 0.7rem;
    border-radius: 11px;
    font-size: 0.86rem;
  }

  .kkt-search-card__head {
    align-items: flex-start;
    gap: 0.42rem;
  }

  .kkt-search-results__header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.42rem;
    padding: 0.58rem 0.62rem;
    border-radius: 16px;
  }

  .kkt-search-results {
    gap: 0.52rem;
  }

  .kkt-search-results__title {
    font-size: 0.96rem;
  }

  .kkt-search-results__lead {
    display: none;
  }

  .kkt-search-count {
    width: max-content;
    padding: 0.28rem 0.52rem;
    font-size: 0.74rem;
  }

  .kkt-search-list {
    gap: 0.5rem;
  }

  .kkt-search-card {
    padding: 0.66rem 0.62rem 0.7rem 0.82rem;
    border-radius: 16px;
  }

  .kkt-search-card::before {
    width: 4px;
    border-radius: 16px 0 0 16px;
  }

  .kkt-search-card__meta {
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
  }

  .kkt-search-card__title {
    font-size: 0.94rem;
    line-height: 1.32;
  }

  .kkt-search-card__state {
    padding: 0.24rem 0.48rem;
    font-size: 0.68rem;
  }

  .kkt-search-card__meta-row {
    gap: 0.24rem;
    margin-top: 0.44rem;
  }

  .kkt-search-badge-subject,
  .kkt-search-badge-meta {
    font-size: 0.68rem;
  }

  .kkt-search-badge-subject {
    padding: 0.24rem 0.54rem;
  }

  .kkt-search-badge-meta {
    padding: 0.22rem 0.44rem;
  }

  .kkt-search-tags {
    flex-wrap: nowrap;
    gap: 0.22rem;
    margin-top: 0.42rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .kkt-search-pill {
    flex: 0 0 auto;
    padding: 0.18rem 0.44rem;
    font-size: 0.66rem;
  }

  .kkt-search-excerpt-box {
    margin-top: 0.46rem;
    padding: 0.52rem 0.58rem;
    border-radius: 13px;
  }

  .kkt-search-excerpt-box__label {
    margin-bottom: 0.28rem;
    font-size: 0.7rem;
  }

  .kkt-search-excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    -webkit-line-clamp: 1;
  }

  .kkt-search-actions {
    flex-direction: row;
    gap: 0.34rem;
    margin-top: 0.54rem;
  }

  .kkt-search-button {
    width: auto;
    min-height: 36px;
    padding: 0.48rem 0.58rem;
    font-size: 0.78rem;
  }

  .kkt-search-button.is-primary {
    flex: 1 1 100%;
    order: -1;
  }

  .kkt-search-button.is-secondary {
    flex: 1 1 calc(50% - 0.2rem);
  }
}
